| java.lang.Object | |||
| ↳ | com.google.gdata.data.AbstractExtension | ||
| ↳ | com.google.gdata.data.ExtensionPoint | ||
| ↳ | com.google.gdata.data.BaseEntry<E extends com.google.gdata.data.BaseEntry> | ||
Known Direct Subclasses
AbPageVariationEntry,
AccountEntry,
AclEntry,
ArchiveEntry,
AttendeeEntry,
BaseActivityEntry<E extends BaseActivityEntry<E>>,
BaseEventEntry<E extends BaseEventEntry<E>>,
BaseHealthEntry<E extends BaseHealthEntry>,
BasePersonEntry<E extends BasePersonEntry<E>>,
BlogEntry,
CalendarEntry,
CellEntry,
ChannelEntry,
CodeSearchEntry,
CollectionEntry,
and
49 others.
|
Known Indirect Subclasses
ActivityEntry,
AlbumEntry,
AnnouncementEntry,
AnnouncementsPageEntry,
AttachmentEntry,
AudioEntry,
BaseContentEntry<E extends BaseContentEntry<E>>,
BaseDocumentListEntry<E>,
BasePageEntry<E extends BasePageEntry<E>>,
BrixEntry,
CalendarAclEntry,
CalendarEventEntry,
CaptionTrackEntry,
ChangelogEntry,
CommentEntry,
and
43 others.
|
The BaseEntry class is an abstract base class that defines the in-memory object model for GData entries.
It is capable of parsing the Atom XML for an <atom:entry>
element as well as any contained Extension elements. It can generate
both Atom and RSS 2.0 representations of the entry from the object
model.
The BaseEntry class implements the Kind.Adaptable interface, meaning
it is possible to create new Kind.Adaptor subtypes that defines
a custom extension model (and associated convenience APIs) for a BaseEntry
subtypes that use Atom/RSS extensions to extend the content model for a
particular type of data.
An Kind.Adaptor subclass of BaseEntry should do the following:
Kind.Term annotation on the class declaration that
defines the Category term value for the GData kind handled by the
adaptor.declareExtensions(ExtensionProfile)
method and use it to declare the extension model for the adapted instance
within the profile passed as a parameter. This is used to auto-extend
an extension profile when kind Category tags are found during parsing of
content.ExtensionPoint methods to
store/retrieve the extension data.
atomEntry =
element atom:entry {
atomCommonAttributes,
(atomAuthor*
& atomCategory*
& atomContent?
& atomContributor*
& atomId
& atomLink*
& atomPublished?
& atomRights?
& atomSource?
& atomSummary?
& atomTitle
& atomUpdated
& extensionElement*)
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| BaseEntry.AtomHandler | <atom:entry> parser. |
||||||||||
| BaseEntry.EntryState | The EntryState class provides a simple structure that encapsulates
the attributes of an Atom entry that should be shared with a shallow
copy if the entry is adapted to a more specific BaseEntry
Kind.Adaptor subtypes. |
||||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| adaptedEntry | |||||||||||
| adaptors | |||||||||||
| atomPubNs | |||||||||||
| contributors | |||||||||||
| editLink | |||||||||||
| etag | |||||||||||
| htmlLink | |||||||||||
| links | |||||||||||
| mediaEditLink | |||||||||||
| namespaceDeclsAtom | Top-level namespace declarations for generated XML. | ||||||||||
| namespaceDeclsRss | |||||||||||
| resumableEditMediaLink | |||||||||||
| rights | |||||||||||
| self | |||||||||||
| selfLink | |||||||||||
| service | |||||||||||
| source | |||||||||||
| state | Basic state for this entry. | ||||||||||
|
[Expand]
Inherited Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gdata.data.ExtensionPoint
| |||||||||||
From class
com.google.gdata.data.AbstractExtension
| |||||||||||
| Protected Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new BaseEntry instance.
| |||||||||||
Copy constructor that initializes a new BaseEntry instance to have
identical contents to another instance, using a shared reference to
the same
BaseEntry.EntryState. | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Associates a new
Kind.Adaptor with this Adaptable instance. | |||||||||||
Adds a link pointing to an HTML representation.
| |||||||||||
Adds a link with the given rel, type, and href.
| |||||||||||
Deletes this entry by sending a request to the associated GData
service.
| |||||||||||
Generates an XML representation for the extension.
| |||||||||||
Generates XML in the Atom format.
| |||||||||||
Generates XML in the RSS format.
| |||||||||||
Locates and returns the most specific
Kind.Adaptor BaseEntry
subtype for this entry. | |||||||||||
Returns the collection of
Kind.Adaptor instances associated with the
this Adaptable instance. | |||||||||||
Returns the list of all authors on this resource.
| |||||||||||
Returns
true if the entry can be modified by a client. | |||||||||||
Returns a set of categories on this resource.
| |||||||||||
Gets the content of this entry.
| |||||||||||
Retrieves the resource edit link.
| |||||||||||
Get a
DateTime instance representing the last time this entry was
edited. | |||||||||||
Gets the value of the gd:etag attribute for this resource.
| |||||||||||
The default implementation uses the
AbstractExtension.AttributesHandler to handle
parsing the extension. | |||||||||||
Retrieves the first HTML link.
| |||||||||||
Get the unique id for this resource.
| |||||||||||
Returns the value of the gd:kind attribute for this resource.
| |||||||||||
Retrieves the first link with the supplied
rel and/or
type value. | |||||||||||
Returns a list of atom:link elements on this resource.
| |||||||||||
Return the links that match the given
rel and type values. | |||||||||||
Retrieves the media resource edit link.
| |||||||||||
Assumes the
| |||||||||||
Gets the app:control tag.
| |||||||||||
Get a
DateTime instance representing the time that this entry was
created. | |||||||||||
Retrieves the media resource resumable upload link.
| |||||||||||
Returns the current fields selection for this partial entry.
| |||||||||||
Retrieves the current version of this Entry by requesting it from
the associated GData service.
| |||||||||||
Retrieves the resource access link.
| |||||||||||
Returns the atom:summary element of this entry.
| |||||||||||
Assumes the content element's contents are text and
returns them as a TextContent.
| |||||||||||
Returns the atom:title element of this resource.
| |||||||||||
Get a
DateTime instance representing the last time this resource
was updated. | |||||||||||
Version ID.
| |||||||||||
Draft status.
| |||||||||||
Parses XML in the Atom format from a parser-defined content source.
| |||||||||||
Parses XML in the Atom format.
| |||||||||||
Parses XML in the Atom format.
| |||||||||||
Reads an entry of type
T using the given extension profile. | |||||||||||
Reads an entry representation from the provided
ParseSource. | |||||||||||
Remove all links.
| |||||||||||
Remove all links that match the given
rel and type values. | |||||||||||
Sets whether the server allows this entry to be modified by the client.
| |||||||||||
Set draft status.
| |||||||||||
Set the last time this entry was edited using the app:edited element.
| |||||||||||
Sets the value of the gd:etag attribute for this resource.
| |||||||||||
Sets the unique id for this resource.
| |||||||||||
Sets the value of the gd:kind attribute for this resource.
| |||||||||||
Sets the app:control tag, which usually contains app:draft.
| |||||||||||
Sets the date of publishing for this entry.
| |||||||||||
Sets the current fields selection for this partial entry.
| |||||||||||
Sets the service that this resource is being used with.
| |||||||||||
Sets the last time this resource was updated.
| |||||||||||
Sets the versionId.
| |||||||||||
Updates this entry by sending the current representation to the
associated GData service.
| |||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Returns information about the content element processing.
| |||||||||||
Called to visit all children of this extension point.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gdata.data.ExtensionPoint
| |||||||||||
From class
com.google.gdata.data.AbstractExtension
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.google.gdata.data.Extension
| |||||||||||
From interface
com.google.gdata.data.IAtom
| |||||||||||
From interface
com.google.gdata.data.IEntry
| |||||||||||
From interface
com.google.gdata.data.Kind.Adaptable
| |||||||||||
From interface
com.google.gdata.data.Kind.Adaptor
| |||||||||||
Top-level namespace declarations for generated XML.
Basic state for this entry. May be shared across multiple adapted instances associated with the same logical entry.
Constructs a new BaseEntry instance.
Copy constructor that initializes a new BaseEntry instance to have
identical contents to another instance, using a shared reference to
the same BaseEntry.EntryState. Kind.Adaptor subclasses
of BaseEntry can use this constructor to create adaptor
instances of an entry that share state with the original.
| sourceEntry |
|---|
Associates a new Kind.Adaptor with this Adaptable instance.
| adaptor |
|---|
Adds a link pointing to an HTML representation.
| htmlUri | Link URI. |
|---|---|
| lang | Optional language code. |
| title | Optional title. |
Adds a link with the given rel, type, and href.
| rel | |
|---|---|
| type | |
| href |
Deletes this entry by sending a request to the associated GData service.
| ServiceException | If there is no associated GData service or the service is unable to perform the deletion. |
|---|---|
| UnsupportedOperationException | If deletion is not supported for the target entry. |
| IOException | If there is an error communicating with the GData service. |
Generates an XML representation for the extension.
| w | XML writer |
|---|---|
| p | Extension profile |
| IOException |
|---|
Generates XML in the Atom format.
| w | Output writer. |
|---|---|
| extProfile | Extension profile. |
| IOException |
|---|
Generates XML in the RSS format.
| w | Output writer. |
|---|---|
| extProfile | Extension profile. |
| IOException |
|---|
Locates and returns the most specific Kind.Adaptor BaseEntry
subtype for this entry. If none can be found for the current class,
null will be returned.
| Kind.AdaptorException | for subclasses to throw. |
|---|
| adaptorClass |
|---|
Returns the collection of Kind.Adaptor instances associated with the
this Adaptable instance.
Returns true if the entry can be modified by a client.
Get a DateTime instance representing the last time this entry was
edited. Represents the app:edited element.
Gets the value of the gd:etag attribute for this resource. See RFC 2616, Section 3.11.
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 |
Get the unique id for this resource. Represents the atom:id element.
Returns the value of the gd:kind attribute for this resource. Returns
null if the kind attribute is missing.
Retrieves the first link with the supplied rel and/or
type value.
If either parameter is null, doesn't return matches
for that parameter.
| rel | |
|---|---|
| type |
Returns a list of atom:link elements on this resource. If there are no links, an empty list will be returned.
Return the links that match the given rel and type values.
| relToMatch | rel value to match or null to match any
rel value. |
|---|---|
| typeToMatch | type value to match or null to match any
type value. |
Assumes the
| IllegalStateException | If the content element is not a text type. |
|---|
Gets the app:control tag.
Get a DateTime instance representing the time that this entry was
created. Represents the atom:published element.
Returns the current fields selection for this partial entry. A
value of null indicates the entry is not a partial entry.
Retrieves the current version of this Entry by requesting it from the associated GData service.
| IOException | |
|---|---|
| ServiceException |
Assumes the content element's contents are text and returns them as a TextContent.
| IllegalStateException | If the content element is not a text type. |
|---|
Get a DateTime instance representing the last time this resource
was updated. Represents the atom:updated element.
Version ID. This is a unique number representing this particular resource. Every update changes the version ID (unless the update doesn't modify anything, in which case it's permissible for version ID to stay the same). Services are free to interpret this string in the most convenient way. Some services may choose to use a monotonically increasing sequence of version IDs. Other services may compute a hash of entry properties or feed content and use that.
This property is only used for services to communicate the current version ID back to the servlet. It is NOT set when resources are parsed (either from requests or from arbitrary XML).
Draft status.
Parses XML in the Atom format from a parser-defined content source.
| extProfile | Extension profile. |
|---|---|
| eventSource | XML event source. |
| IOException | |
|---|---|
| ParseException |
Parses XML in the Atom format.
| extProfile | Extension profile. |
|---|---|
| input | XML input stream. |
| IOException | |
|---|---|
| ParseException |
Parses XML in the Atom format.
| extProfile | Extension profile. |
|---|---|
| reader | XML Reader. The caller is responsible for ensuring that the character encoding is correct. |
| IOException | |
|---|---|
| ParseException |
Reads an entry of type T using the given extension profile.
| source | |
|---|---|
| entryClass | |
| extProfile |
| IOException | |
|---|---|
| ParseException | |
| ServiceException |
Reads an entry representation from the provided ParseSource.
The return type of the entry will be determined using dynamic adaptation
based upon any Kind category tag found in the input content. If
no kind tag is found an Entry instance will be returned.
| source |
|---|
| IOException | |
|---|---|
| ParseException | |
| ServiceException |
Remove all links.
Remove all links that match the given rel and type values.
| relToMatch | rel value to match or null to match any
rel value. |
|---|---|
| typeToMatch | type value to match or null to match any
type value.
|
Sets whether the server allows this entry to be modified by the client.
| v |
|---|
Set draft status. Passing a null value means unsetting the draft status.
| v | Draft status, or null to unset. |
|---|
Set the last time this entry was edited using the app:edited element.
| v |
|---|
Sets the value of the gd:etag attribute for this resource.
| v |
|---|
Sets the unique id for this resource.
| v |
|---|
Sets the value of the gd:kind attribute for this resource. A value of
null will remove the kind attribute.
| v |
|---|
Sets the app:control tag, which usually contains app:draft.
| value | PubControl the new object or null |
|---|
Sets the date of publishing for this entry. Used on the server to specify when the entry was created.
| v |
|---|
Sets the current fields selection for this partial entry. A
value of null indicates the entry is not a partial entry.
| v |
|---|
Sets the service that this resource is being used with.
| s |
|---|
Sets the versionId. See getVersionId() for a description of what
the versionId is used for.
| v |
|---|
Updates this entry by sending the current representation to the associated GData service.
| ServiceException | If there is no associated GData service or the service is unable to perform the update. |
|---|---|
| UnsupportedOperationException | If update is not supported for the target entry. |
| IOException | If there is an error communicating with the GData service. |
Returns information about the content element processing.
| extProfile | |
|---|---|
| attrs |
| IOException | |
|---|---|
| ParseException |
Called to visit all children of this extension point.
| ev | The extension visitor. |
|---|