|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gdata.data.AbstractExtension
com.google.gdata.data.ExtensionPoint
com.google.gdata.data.Source
public class Source
The Source class represents an Atom feed source object
primarily on the data model for an <atom:source>
element.
Here is the Relax-NG schema that represents an Atom 1.0
Source:
atomSource = element atom:source { atomCommonAttributes, (atomAuthor* & atomCategory* & atomContributor* & atomGenerator? & atomIcon? & atomId? & atomLink* & atomLogo? & atomRights? & atomSubtitle? & atomTitle? & atomUpdated? & extensionElement*) }
Nested Class Summary | |
---|---|
class |
Source.SourceHandler
<atom:source> parser. |
protected static class |
Source.SourceState
The SourceState class provides a simple structure that encapsulates the attributes of an Atom source that should be shared with a shallow copy if the entry is adapted to a more specific Source Kind.Adaptor subtypes. |
Nested classes/interfaces inherited from class com.google.gdata.data.ExtensionPoint |
---|
ExtensionPoint.CumulativeBlobHandler, ExtensionPoint.ExtensionHandler |
Nested classes/interfaces inherited from class com.google.gdata.data.AbstractExtension |
---|
AbstractExtension.AttributesHandler |
Field Summary | |
---|---|
protected Source.SourceState |
srcState
Basic state for this source. |
Fields inherited from class com.google.gdata.data.ExtensionPoint |
---|
xmlBlob |
Fields inherited from class com.google.gdata.data.AbstractExtension |
---|
localName, namespace |
Constructor Summary | |
---|---|
|
Source()
Constructs a new Source instance with no initial state. |
protected |
Source(Source sourceSource)
Copy constructor that initializes a new Source instance to have identical contents to another instance, using a shared reference to the same Source.SourceState . |
Method Summary | |
---|---|
void |
addHtmlLink(java.lang.String htmlUri,
java.lang.String lang,
java.lang.String title)
Adds a link pointing to an HTML representation. |
void |
addLink(Link link)
|
Link |
addLink(java.lang.String rel,
java.lang.String type,
java.lang.String href)
|
void |
generateAtom(XmlWriter w,
ExtensionProfile extProfile)
Generates XML in the Atom format. |
protected void |
generateInnerAtom(XmlWriter w,
ExtensionProfile extProfile)
Generates inner XML content in the Atom format. |
java.util.List<Person> |
getAuthors()
|
java.util.Set<Category> |
getCategories()
|
java.util.List<Person> |
getContributors()
|
Generator |
getGenerator()
|
Link |
getHtmlLink()
Retrieves the first HTML link. |
java.lang.String |
getIcon()
|
java.lang.String |
getId()
|
Link |
getLink(java.lang.String rel,
java.lang.String type)
Retrieves the first link with the supplied rel and/or
type value. |
java.util.List<Link> |
getLinks()
|
java.util.List<Link> |
getLinks(java.lang.String relToMatch,
java.lang.String typeToMatch)
Return the links that match the given rel and type values. |
java.lang.String |
getLogo()
|
TextConstruct |
getRights()
|
TextConstruct |
getSubtitle()
|
TextConstruct |
getTitle()
|
DateTime |
getUpdated()
|
void |
parseAtom(ExtensionProfile extProfile,
java.io.InputStream stream)
Parses XML in the Atom format. |
void |
parseAtom(ExtensionProfile extProfile,
java.io.Reader reader)
Parses XML in the Atom format. |
void |
removeLinks()
Removes all links. |
void |
removeLinks(java.lang.String relToMatch,
java.lang.String typeToMatch)
Remove all links that match the given rel and type values. |
void |
setGenerator(Generator v)
|
Generator |
setGenerator(java.lang.String version,
java.lang.String uri,
java.lang.String name)
|
void |
setIcon(java.lang.String v)
|
void |
setId(java.lang.String v)
|
void |
setLogo(java.lang.String v)
|
void |
setRights(TextConstruct v)
|
void |
setSubtitle(TextConstruct v)
|
void |
setTitle(TextConstruct v)
|
void |
setUpdated(DateTime v)
|
Methods inherited from class com.google.gdata.data.AbstractExtension |
---|
consumeAttributes, disableStrictValidation, enableStrictValidation, eq, generate, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, putAttributes, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Source.SourceState srcState
Constructor Detail |
---|
public Source()
Source
instance with no initial state.
protected Source(Source sourceSource)
Source.SourceState
.
Method Detail |
---|
public java.lang.String getId()
public void setId(java.lang.String v)
public DateTime getUpdated()
public void setUpdated(DateTime v)
public java.util.Set<Category> getCategories()
public TextConstruct getTitle()
public void setTitle(TextConstruct v)
public TextConstruct getSubtitle()
public void setSubtitle(TextConstruct v)
public TextConstruct getRights()
public void setRights(TextConstruct v)
public java.lang.String getIcon()
public void setIcon(java.lang.String v)
public java.lang.String getLogo()
public void setLogo(java.lang.String v)
public java.util.List<Link> getLinks()
public java.util.List<Person> getAuthors()
public java.util.List<Person> getContributors()
public Generator getGenerator()
public void setGenerator(Generator v)
public Generator setGenerator(java.lang.String version, java.lang.String uri, java.lang.String name)
public Link getLink(java.lang.String rel, java.lang.String type)
rel
and/or
type
value.
If either parameter is null
, doesn't return matches
for that parameter.
public java.util.List<Link> getLinks(java.lang.String relToMatch, java.lang.String typeToMatch)
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.
public void addLink(Link link)
public Link addLink(java.lang.String rel, java.lang.String type, java.lang.String href)
public void removeLinks(java.lang.String relToMatch, java.lang.String typeToMatch)
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.public void removeLinks()
public void addHtmlLink(java.lang.String htmlUri, java.lang.String lang, java.lang.String title)
htmlUri
- link URIlang
- optional language codetitle
- optional titlepublic Link getHtmlLink()
public void generateAtom(XmlWriter w, ExtensionProfile extProfile) throws java.io.IOException
w
- output writerextProfile
- extension profile
java.io.IOException
protected void generateInnerAtom(XmlWriter w, ExtensionProfile extProfile) throws java.io.IOException
w
- output writerextProfile
- extension profile
java.io.IOException
public void parseAtom(ExtensionProfile extProfile, java.io.InputStream stream) throws java.io.IOException, ParseException
extProfile
- extension profilestream
- XML input stream
java.io.IOException
ParseException
public void parseAtom(ExtensionProfile extProfile, java.io.Reader reader) throws java.io.IOException, ParseException
extProfile
- extension profilereader
- XML Reader. The caller is responsible for ensuring that
the character encoding is correct.
java.io.IOException
ParseException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |