| java.lang.Object | ||
| ↳ | com.google.gdata.data.AbstractExtension | |
| ↳ | com.google.gdata.data.ExtensionPoint | |
Known Direct Subclasses
|
Known Indirect Subclasses
|
Base class for GData data types that support hosting extensions.
For example, a calendar <atom:entry> supports hosting
<gd:when>.
The set of accepted extensions is defined within ExtensionManifest.
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| ExtensionPoint.CumulativeBlobHandler | Parser class for cumulative XML blobs. | ||||||||||
| ExtensionPoint.ExtensionHandler | ElementHandler implementation for handlers associated with an ExtensionPoint class. | ||||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| extensions | |||||||||||
| manifest | Manifest for this instance. | ||||||||||
| nonRepeatingExtensionMap | Collection of non-repeating extensions. | ||||||||||
| repeatingExtensionMap | Collection of repeating extensions. | ||||||||||
| repeatingExtensions | |||||||||||
| xmlBlob | Arbitrary XML (unrecognized extensions). | ||||||||||
|
[Expand]
Inherited Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gdata.data.AbstractExtension
| |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Simple constructor to create a new (empty) ExtensionPoint.
| |||||||||||
| Protected Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Simple copy constructor that does a shallow copy of extension and manifest
data from an existing ExtensionPoint to the constructed instance.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Adds an extension object.
| |||||||||||
Adds a repeating extension object.
| |||||||||||
Declares the set of expected Extension types for an ExtensionPoint within
the target extension profile.
| |||||||||||
Generates an XML blob containing all recognized and unrecognized
extensions.
| |||||||||||
Retrieves a non-repeating extension or
null if not present. | |||||||||||
Returns an unmodifiable collection of non-repeating extensions in this
ExtensionPoint.
| |||||||||||
The default implementation uses the
AbstractExtension.AttributesHandler to handle
parsing the extension. | |||||||||||
Retrieves a repeating extension list (an empty list if not present).
| |||||||||||
Returns an unmodifiable collection of lists of repeating extensions in this
ExtensionPoint.
| |||||||||||
Retrieves the XML blob containing arbitrary (unrecognized) extensions.
| |||||||||||
Returns whether the non-repeating extension is present.
| |||||||||||
Returns whether the repeating extension is present.
| |||||||||||
Removes an extension object.
| |||||||||||
Removes an extension object based on its class.
| |||||||||||
Removes a repeating extension object.
| |||||||||||
Sets an extension object.
| |||||||||||
Sets the XML blob containing arbitrary (unrecognized) extensions.
| |||||||||||
Visits the tree of extension data associated with this extension point
instance using the specified
ExtensionVisitor, starting at this
extension point. | |||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Internal helper method.
| |||||||||||
Internal helper method.
| |||||||||||
Checks whether all required extensions are present.
| |||||||||||
Creates an instance of the given extension class.
| |||||||||||
Generates the XML into the XML writer.
| |||||||||||
Generates XML corresponding to extended properties.
| |||||||||||
Generates XML corresponding to the type implementing
ExtensionPoint. | |||||||||||
Returns the extension description for the namespace URI and local name for
the XML element based on the extension point in the extension profile.
| |||||||||||
XML parser callback for extended properties.
| |||||||||||
Retrieves the manifest for the specified class.
| |||||||||||
Initializes parser handler's XML blob state.
| |||||||||||
Called to visit a child of this extension point.
| |||||||||||
Called to visit all children of this extension point.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gdata.data.AbstractExtension
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.google.gdata.data.Extension
| |||||||||||
Collection of non-repeating extensions. Uses LinkedHashMap in order to provide a predictable generation output order based upon insertion order.
Collection of repeating extensions. Uses LinkedHashMap in order to provide a predictable generation output order based upon insertion order.
Simple constructor to create a new (empty) ExtensionPoint.
Simple copy constructor that does a shallow copy of extension and manifest data from an existing ExtensionPoint to the constructed instance.
| sourcePoint |
|---|
Declares the set of expected Extension types for an ExtensionPoint within the target extension profile. The base implementation does not declare any extensions, but can be overridden by specific types of ExtensionPoints that always contain a well-defined set of extensions.
| extProfile | The ExtensionProfile to initialize. |
|---|
Generates an XML blob containing all recognized and unrecognized extensions. This can be used by applications that persist data in a store that might be accessed by other applications--ones that don't necessarily recognize the same set of extensions.
| extProfile |
|---|
| IOException |
|---|
Retrieves a non-repeating extension or null if not present.
| extensionClass |
|---|
Returns an unmodifiable collection of non-repeating extensions in this ExtensionPoint.
The default implementation uses the AbstractExtension.AttributesHandler to handle
parsing the extension.
| p | Extension profile |
|---|---|
| namespace | Extension namespace |
| localName | Tag name, without the namespace prefix |
| attrs | Tag attributes |
| ParseException |
|---|
Retrieves a repeating extension list (an empty list if not present).
| extensionClass |
|---|
Returns an unmodifiable collection of lists of repeating extensions in this ExtensionPoint. The Extensions that are of the same type are grouped together in lists within the collection.
Returns whether the non-repeating extension is present.
| extensionClass |
|---|
Returns whether the repeating extension is present.
| extensionClass |
|---|
Reverses generateCumulativeXmlBlob(ExtensionProfile). This
operation overwrites the current contents of this extension point.
| blob | |
|---|---|
| extProfile | |
| extendedClass |
| IOException | |
|---|---|
| ParseException |
Removes an extension object based on its class.
| extensionClass |
|---|
Removes a repeating extension object.
| ext |
|---|
Sets an extension object. If one exists of this type, it's replaced.
| ext |
|---|
| extensionClass | |
|---|---|
| value |
Sets the XML blob containing arbitrary (unrecognized) extensions.
| xmlBlob |
|---|
Visits the tree of extension data associated with this extension point
instance using the specified ExtensionVisitor, starting at this
extension point.
| ev | The extension visitor instance to use. |
|---|---|
| parent | The parent of this extension point (or null if no
parent or unspecified. |
Internal helper method.
| ext | |
|---|---|
| extClass |
Internal helper method.
| ext | |
|---|---|
| extClass |
Creates an instance of the given extension class.
| extClass |
|---|
| ParseException | if unable to create an instance of the extension |
|---|
Generates the XML into the XML writer. Default implementation generates a "simple" element with the attributes and content found in the attribute generator.
| w | XML writer |
|---|---|
| p | Extension profile |
| namespace | XML namespace for this extension |
| localName | XML local name for this extension |
| attrs | List of XML attributes |
| generator | Attribute generator |
| IOException |
|---|
Generates XML corresponding to extended properties. Implementations in extended classes should always call the base class to allow for nested extensions.
| w | Output writer. |
|---|---|
| extProfile | Extension profile for use by nested extensions. |
| IOException |
|---|
Generates XML corresponding to the type implementing ExtensionPoint. The reason this routine is necessary is that the embedded
XML blob may contain namespace declarations.
| w | |
|---|---|
| namespace | |
| elementName | |
| additionalAttrs | |
| additionalNs |
| IOException |
|---|
Returns the extension description for the namespace URI and local name for the XML element based on the extension point in the extension profile.
| extProfile | Extension profile |
|---|---|
| extPoint | Extension point to use from the extension profile |
| namespaceUri | Namespace URI of the XML element |
| localName | Name of the XML element |
XML parser callback for extended properties. Implementations in extended classes should always call the base class to allow for nested extensions.
| extProfile | Extension profile for use by nested element handlers. |
|---|---|
| extPoint | Current active ExtensionPoint class within which you're looking for a handler for a nested extension element. |
| namespaceUri | Namespace URI of the XML element. |
| localName | Name of the XML element. |
| attrs | Child element attributes. These attributes will be
communicated to the returned XmlParser.ElementHandler through its
processAttribute(String, String, String)
method. They are passed here because sometimes the value of some
attribute determines the element's content type, so different
element handlers may be needed. |
null if the tag is
not recognized. Unrecognized tags are stored in the XML blob.| ParseException | XML schema error. Could be a result of having a duplicate entry, illegal contents (such as unrecognized attributes or nested elements), etc. |
|---|---|
| IOException |
Retrieves the manifest for the specified class.
| extProfile | |
|---|---|
| extendedClass |
Initializes parser handler's XML blob state. Should be called by the
handler's constructor in order to honor
declareArbitraryXmlExtension(Class).
| profile | |
|---|---|
| extPoint | |
| handler |
Called to visit a child of this extension point.
| ev | The extension visitor |
|---|---|
| child | The child extension |
Called to visit all children of this extension point.
| ev | The extension visitor. |
|---|