org.apache.wookie.w3c.updates
Class UpdateDescriptionDocument

java.lang.Object
  extended by org.apache.wookie.w3c.updates.UpdateDescriptionDocument

public class UpdateDescriptionDocument
extends java.lang.Object

An update description document (UDD) as defined at http://www.w3.org/TR/widgets-updates


Constructor Summary
UpdateDescriptionDocument(java.lang.String href)
          Load a UDD from a URL
UpdateDescriptionDocument(java.lang.String details, java.net.URL updateSource, java.lang.String versionTag)
          Manually construct a document.
 
Method Summary
 void fromXML(org.jdom.Document document)
          Parse a UDD from XML
 java.lang.String getDetails(java.lang.String locale)
          Get the details of the update, typically a short description of any new features.
 java.net.URL getUpdateSource()
          Get the URL for the updated widget
 java.lang.String getVersionTag()
          Get the version tag for the update
 org.jdom.Element toXml()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdateDescriptionDocument

public UpdateDescriptionDocument(java.lang.String details,
                                 java.net.URL updateSource,
                                 java.lang.String versionTag)
Manually construct a document. Only used for testing.

Parameters:
details -
updateSource -
versionTag -

UpdateDescriptionDocument

public UpdateDescriptionDocument(java.lang.String href)
                          throws InvalidUDDException
Load a UDD from a URL

Parameters:
href - the URL to load the UDD from
Throws:
InvalidUDDException - if the UDD cannot be found, or is not valid
Method Detail

getDetails

public java.lang.String getDetails(java.lang.String locale)
Get the details of the update, typically a short description of any new features.

Parameters:
locale - the preferred locale for the details
Returns:
the update details

getUpdateSource

public java.net.URL getUpdateSource()
Get the URL for the updated widget

Returns:
the URL

getVersionTag

public java.lang.String getVersionTag()
Get the version tag for the update

Returns:
the version tag

fromXML

public void fromXML(org.jdom.Document document)
             throws InvalidUDDException
Parse a UDD from XML

Parameters:
document - the XML document to parse
Throws:
InvalidUDDException - if the document is not a valid UDD

toXml

public org.jdom.Element toXml()


2012 Apache Software Foundation.