| java.lang.Object | ||
| ↳ | com.google.gdata.model.Element | |
| ↳ | com.google.gdata.model.atom.Entry | |
Known Direct Subclasses
|
The Entry class is a base class that defines the in-memory object model for GData entries.
Entry subclasses should expose convenience APIs to retrieve and set
attributes or subelements, with implementations that delegate to
Element methods to store/retrieve the appropriate data.
Here is the Relax-NG schema that represents an Atom 1.0 entry:
atomEntry =
element atom:entry {
atomCommonAttributes,
(atomAuthor*
& atomCategory*
& atomContent?
& atomContributor*
& atomId
& atomLink*
& atomPublished?
& atomRights?
& atomSource?
& atomSummary?
& atomTitle
& atomUpdated
& extensionElement*)
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Entry.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 Entry subtype. | ||||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| ID | The atom:id child element | ||||||||||
| KEY | The key for this element. | ||||||||||
| PUBLISHED | The atom:published child element | ||||||||||
| RIGHTS | The atom:rights child element | ||||||||||
| SUMMARY | The atom:summary child element. | ||||||||||
| TITLE | The atom:title child element | ||||||||||
| UPDATED | The atom:updated child element | ||||||||||
| state | Basic state for this entry. | ||||||||||
|
[Expand]
Inherited Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gdata.model.Element
| |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new Entry instance, using default metadata.
| |||||||||||
| Protected Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new Entry instance, using the given key.
| |||||||||||
Copy constructor that initializes a new Entry instance to have identical
contents to another instance, using a shared reference to the same
Entry.EntryState. | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
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.
| |||||||||||
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.
| |||||||||||
Gets the app:control tag.
| |||||||||||
Retrieves the resource edit link.
| |||||||||||
Get a
DateTime instance representing the last time this entry was
edited. | |||||||||||
Returns the
ETAG value for this feed. | |||||||||||
Retrieves the first HTML link.
| |||||||||||
Get the unique id for this resource.
| |||||||||||
Returns the
KIND value for this entry. | |||||||||||
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
| |||||||||||
Get a
DateTime instance representing the time that this entry was
created. | |||||||||||
Retrieves the media resource resumable edit link.
| |||||||||||
Returns the
FIELDS value for this 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.
| |||||||||||
Returns whether it has the Atom publication control status.
| |||||||||||
Draft status.
| |||||||||||
Registers the metadata for this element.
| |||||||||||
Removes any content element.
| |||||||||||
Removes all links from the this resource.
| |||||||||||
Remove all links that match the given
rel and type values. | |||||||||||
Sets whether the server allows this entry to be modified by the client.
| |||||||||||
Sets the app:control tag, which usually contains app:draft.
| |||||||||||
Set draft status.
| |||||||||||
Set the last time this entry was edited using the app:edited element.
| |||||||||||
Sets the
ETAG value for this entry. | |||||||||||
Sets the unique id for this resource.
| |||||||||||
Sets the
KIND value for this entry. | |||||||||||
Sets the date of publishing for this entry.
| |||||||||||
Sets the
FIELDS value for this 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 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Narrows this entry using categories with an appropriate kind value.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gdata.model.Element
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.google.gdata.data.IAtom
| |||||||||||
From interface
com.google.gdata.data.IEntry
| |||||||||||
Basic state for this entry. May be shared across multiple adapted instances associated with the same logical entry.
Constructs a new Entry instance, using default metadata.
Constructs a new Entry instance, using the given key.
| key |
|---|
Copy constructor that initializes a new Entry instance to have identical
contents to another instance, using a shared reference to the same
Entry.EntryState. Subclasses of Entry can use this constructor to
create adaptor instances of an entry that share state with the original.
| key | The element key to use for this entry. |
|---|---|
| source | To copy data from |
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. |
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.
Returns the ETAG value for this feed. A value of
null indicates the value is unknown.
Get the unique id for this resource. Represents the atom:id element.
Returns the KIND value for this entry. The kind
attribute may be null if this feed does not have a kind.
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 | Link relation |
|---|---|
| type | Link 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. |
|---|
Get a DateTime instance representing the time that this entry was
created. Represents the atom:published element.
Returns the FIELDS value for this entry. The fields
attribute may be null if this entry contains a full representation.
Retrieves the current version of this Entry by requesting it from the associated GData service.
| IOException | on IO error during retrieval from the service. |
|---|---|
| ServiceException | if there is a problem retrieving the element. |
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).
Returns whether it has the Atom publication control status.
Draft status.
Registers the metadata for this element.
| registry |
|---|
Removes any content element.
This method is equivalent to: setContent((Content) null); , but
without the ugly cast.
Removes all links from the this resource.
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 |
|---|
Sets the app:control tag, which usually contains app:draft.
| value | Control the new object or null |
|---|
Set draft status. Passing a null value means clearing the draft status.
| v | Draft status, or null to clear. |
|---|
Set the last time this entry was edited using the app:edited element.
| v |
|---|
Sets the ETAG value for this entry. A value of null indicates the value is unknown.
| v |
|---|
Sets the unique id for this resource.
| v |
|---|
Sets the KIND value for this entry. The kind may be
set to null to remove the attribute value.
| v |
|---|
Sets the date of publishing for this entry. Used on the server to specify when the entry was created.
| v |
|---|
Sets theFIELDS value for this entry. The fields
attribute may be set to null to remove the attribute value.
| 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. |
Narrows this entry using categories with an appropriate kind value. This will loop through the categories, checking if they represent kinds, and adapting the entry to that kind of an appropriate adaptation was found. This will return the most specific subtype of the narrowed type that could be found.
| metadata | The element metadata to narrow to. |
|---|---|
| vc | Validation context |