public class FOMCollection extends FOMExtensibleElement implements Collection
CDATA_SECTION_NODE, COMMENT_NODE, DTD_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, PI_NODE, SPACE_NODE, TEXT_NODEACCEPT, AID, ALTERNATE, APP_MEDIA_TYPE, APP_NS, APP_NS_PRE_RFC, APP_PREFIX, ATITLE, ATOM_MEDIA_TYPE, ATOM_NS, AURI, AUTHOR, BASE, CAT_MEDIA_TYPE, CATEGORIES, CATEGORY, CLASS, COLLECTION, CONFIG_FACTORY, CONFIG_PARSER, CONFIG_PARSERFACTORY, CONFIG_STREAMWRITER, CONFIG_WRITER, CONFIG_WRITERFACTORY, CONFIG_XPATH, CONTENT, CONTRIBUTOR, CONTROL, CONTROL_NS, CONTROL_PREFIX, DEFAULT_FACTORY, DEFAULT_PARSER, DEFAULT_PARSERFACTORY, DEFAULT_STREAMWRITER, DEFAULT_WRITER, DEFAULT_WRITERFACTORY, DEFAULT_XPATH, DIV, DRAFT, EDITED, EMAIL, ENTRY_MEDIA_TYPE, FEED, FEED_MEDIA_TYPE, FIXED, GENERATOR, HREF, HREFLANG, HTML, ICON, ID, LABEL, LANG, LENGTH, LINK, LN_ACCEPT, LN_ALTERNATE, LN_ALTERNATE_MULTIPART_RELATED, LN_AUTHOR, LN_BASE, LN_CATEGORIES, LN_CATEGORY, LN_CLASS, LN_COLLECTION, LN_CONTENT, LN_CONTRIBUTOR, LN_CONTROL, LN_DIV, LN_DRAFT, LN_EDITED, LN_EMAIL, LN_ENTRY, LN_FEED, LN_FIXED, LN_GENERATOR, LN_HREF, LN_HREFLANG, LN_ICON, LN_ID, LN_LABEL, LN_LANG, LN_LENGTH, LN_LINK, LN_LOGO, LN_NAME, LN_PUBLISHED, LN_REL, LN_RIGHTS, LN_SCHEME, LN_SERVICE, LN_SOURCE, LN_SPACE, LN_SRC, LN_SUBTITLE, LN_SUMMARY, LN_TERM, LN_TITLE, LN_TYPE, LN_UPDATED, LN_URI, LN_VERSION, LN_WORKSPACE, LOGO, MULTIPART_RELATED_TYPE, NAME, NAMED_PARSER, NAMED_WRITER, NO, PRE_RFC_ACCEPT, PRE_RFC_CATEGORIES, PRE_RFC_COLLECTION, PRE_RFC_CONTROL, PRE_RFC_DRAFT, PRE_RFC_EDITED, PRE_RFC_SERVICE, PRE_RFC_WORKSPACE, PREFIX, PREFIXED_TITLE, PUBLISHED, REL, RIGHTS, SCHEME, SERVICE, SOURCE, SPACE, SRC, STREAM_WRITER, SUBTITLE, SUMMARY, TERM, TEXT, TITLE, TYPE, UPDATED, URI, VERSION, WORKSPACE, XHTML, XHTML_NS, XML, XML_MEDIA_TYPE, XML_NS, YESARRAY_ITEM_LOCALNAME, ARRAY_ITEM_NS_PREFIX, ARRAY_ITEM_NSURI, ARRAY_ITEM_QNAME, DATA_HANDLER, DEFAULT_CHAR_SET_ENCODING, DEFAULT_DEFAULT_NAMESPACE, DEFAULT_XML_VERSION, IS_BINARY, IS_DATA_HANDLERS_AWARE, PULL_TYPE_BUILDER, PUSH_TYPE_BUILDER, XMLNS_NS_PREFIX, XMLNS_NS_URI, XMLNS_PREFIX, XMLNS_URI| Constructor and Description |
|---|
FOMCollection() |
FOMCollection(java.lang.String title,
java.lang.String href,
java.lang.String[] accepts) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(javax.activation.MimeType mediaType)
Returns true if the collection accepts the given media-type
|
boolean |
accepts(java.lang.String mediaType)
Returns true if the collection accepts the given media-type
|
boolean |
acceptsEntry()
Returns true if the collection accepts Atom entry documents
(equivalent to calling accepts("application/atom+xml;type=entry");)
|
boolean |
acceptsNothing()
Returns true if the collection accepts nothing (i.e.
|
Collection |
addAccepts(java.lang.String... mediaRanges)
Adds new accept elements to the collection
|
Collection |
addAccepts(java.lang.String mediaRange)
Adds a new accept element to the collection
|
Collection |
addAcceptsEntry()
Same as setAcceptsEntry except the existing accepts are not discarded
|
Categories |
addCategories()
Add an app:categories element
|
Collection |
addCategories(Categories categories)
Add the app:categories element to the collection
|
Categories |
addCategories(java.util.List<Category> categories,
boolean fixed,
java.lang.String scheme)
Add a listing of categories to the collection
|
Categories |
addCategories(java.lang.String href)
Add an app:categories element that links to an external Category Document
|
java.lang.String[] |
getAccept()
Returns the listing of media-ranges allowed for this collection
|
java.util.List<Categories> |
getCategories()
Returns the app:categories element
|
IRI |
getHref()
Return the value of the app:collection elements href attribute
|
IRI |
getResolvedHref()
Return the href attribute resolved against the in-scope Base URI
|
java.lang.String |
getTitle()
The text value of the collections atom:title element
|
Text |
getTitleElement()
Return the title element
|
Collection |
setAccept(java.lang.String... mediaRanges)
Set the listing of media-ranges allowed for this collection.
|
Collection |
setAccept(java.lang.String mediaRange) |
Collection |
setAcceptsEntry()
Sets the appropriate accept element to indicate that entries are accepted
(equivalent to calling setAccept("application/atom+xml;type=entry");)
|
Collection |
setAcceptsNothing()
Sets the collection so that nothing is accepted
(equivalent to calling setAccept(""); )
|
Collection |
setHref(java.lang.String href)
Set the value of the href attribute
|
Text |
setTitle(java.lang.String title)
Set the value of the collections atom:title element using type="text"
|
Text |
setTitleAsHtml(java.lang.String title)
Set the value of the collections atom:title element using type="html".
|
Text |
setTitleAsXHtml(java.lang.String title)
Set the value of the collections atom:title element using type="xhtml".
|
addExtension, addExtension, addExtension, addExtension, addExtension, addExtensions, addSimpleExtension, addSimpleExtension, getExtension, getExtension, getExtensions, getExtensions, getExtensions, getSimpleExtension, getSimpleExtensionaddComment, clone, complete, declareNS, getAttributes, getAttributeValue, getAttributeValue, getBaseUri, getDefaultWriterOptions, getDocument, getElements, getExtensionAttributes, getFactory, getFirstChild, getFirstChild, getLanguage, getLanguageTag, getLocale, getMustPreserveWhitespace, getNamespaces, getNextSibling, getNextSibling, getParentElement, getPreviousSibling, getPreviousSibling, getResolvedBaseUri, getText, iterator, removeAttribute, removeAttribute, setAttributeValue, setAttributeValue, setBaseUri, setBaseUri, setLanguage, setMustPreserveWhitespace, setParentElement, setText, setText, toFormattedString, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeToaddAttribute, addAttribute, addChild, build, buildNext, buildWithAttachments, cloneOMElement, declareDefaultNamespace, declareNamespace, declareNamespace, detach, discard, findNamespace, findNamespaceURI, getAllAttributes, getAllDeclaredNamespaces, getAttribute, getBuilder, getChildElements, getChildren, getChildrenWithName, getDefaultNamespace, getFirstChildWithName, getFirstElement, getFirstOMChild, getLineNumber, getLocalName, getNamespace, getNextOMSibling, getQName, getTextAsQName, getTrimmedText, getType, getXMLStreamReader, getXMLStreamReaderWithoutCaching, internalSerialize, internalSerializeAndConsume, isComplete, removeAttribute, resolveQName, setBuilder, setFirstChild, setLineNumber, setLocalName, setNamespace, setNamespaceWithNoFindInCurrentScope, setText, toString, toStringWithConsumegetOMFactory, getParent, getPreviousOMSibling, insertSiblingAfter, insertSiblingBefore, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, setComplete, setNextOMSibling, setParent, setPreviousOMSibling, setTypeequals, getClass, hashCode, notify, notifyAll, wait, wait, waitaddExtension, addExtension, addExtension, addExtension, addExtension, addSimpleExtension, addSimpleExtension, getExtension, getExtension, getExtensions, getExtensions, getExtensions, getSimpleExtension, getSimpleExtensiondeclareNS, discard, getAttributes, getAttributeValue, getAttributeValue, getBaseUri, getDocument, getElements, getExtensionAttributes, getFirstChild, getFirstChild, getLanguage, getLanguageTag, getLocale, getMustPreserveWhitespace, getNamespaces, getNextSibling, getNextSibling, getParentElement, getPreviousSibling, getPreviousSibling, getQName, getResolvedBaseUri, getText, removeAttribute, removeAttribute, setAttributeValue, setAttributeValue, setBaseUri, setBaseUri, setLanguage, setMustPreserveWhitespace, setParentElement, setText, setTextaddComment, clone, complete, getDefaultWriterOptions, getFactory, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeToaddAttribute, addAttribute, cloneOMElement, declareDefaultNamespace, declareNamespace, declareNamespace, findNamespace, findNamespaceURI, getAllAttributes, getAllDeclaredNamespaces, getAttribute, getBuilder, getChildElements, getDefaultNamespace, getFirstElement, getLineNumber, getLocalName, getNamespace, getQName, getTextAsQName, getXMLStreamReader, getXMLStreamReaderWithoutCaching, removeAttribute, resolveQName, setBuilder, setFirstChild, setLineNumber, setLocalName, setNamespace, setNamespaceWithNoFindInCurrentScope, setText, toString, toStringWithConsumebuild, buildWithAttachments, detach, discard, getNextOMSibling, getOMFactory, getParent, getPreviousOMSibling, getType, insertSiblingAfter, insertSiblingBefore, isComplete, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsumepublic FOMCollection()
public FOMCollection(java.lang.String title,
java.lang.String href,
java.lang.String[] accepts)
public java.lang.String getTitle()
CollectiongetTitle in interface Collectionpublic Text setTitle(java.lang.String title)
CollectionsetTitle in interface Collectiontitle - The value of the atom:titlepublic Text setTitleAsHtml(java.lang.String title)
CollectionsetTitleAsHtml in interface Collectiontitle - The value of the atom:titlepublic Text setTitleAsXHtml(java.lang.String title)
CollectionsetTitleAsXHtml in interface Collectiontitle - The value of the atom:titlepublic Text getTitleElement()
CollectiongetTitleElement in interface Collectionpublic IRI getHref()
CollectiongetHref in interface Collectionpublic IRI getResolvedHref()
CollectiongetResolvedHref in interface Collectionpublic Collection setHref(java.lang.String href)
CollectionsetHref in interface Collectionhref - The value of href attributepublic java.lang.String[] getAccept()
CollectiongetAccept in interface Collectionpublic Collection setAccept(java.lang.String mediaRange)
public Collection setAccept(java.lang.String... mediaRanges)
CollectionsetAccept in interface CollectionmediaRanges - a listing of media-rangespublic Collection addAccepts(java.lang.String mediaRange)
CollectionaddAccepts in interface Collectionpublic Collection addAccepts(java.lang.String... mediaRanges)
CollectionaddAccepts in interface Collectionpublic Collection addAcceptsEntry()
CollectionaddAcceptsEntry in interface Collectionpublic Collection setAcceptsEntry()
CollectionsetAcceptsEntry in interface Collectionpublic Collection setAcceptsNothing()
CollectionsetAcceptsNothing in interface Collectionpublic boolean acceptsEntry()
CollectionacceptsEntry in interface Collectionpublic boolean acceptsNothing()
CollectionacceptsNothing in interface Collectionpublic boolean accepts(java.lang.String mediaType)
Collectionaccepts in interface CollectionmediaType - The media-type to checkpublic boolean accepts(javax.activation.MimeType mediaType)
Collectionaccepts in interface CollectionmediaType - The media-type to checkpublic Categories addCategories()
CollectionaddCategories in interface Collectionpublic Collection addCategories(Categories categories)
CollectionaddCategories in interface Collectioncategories - The app:categories elementpublic Categories addCategories(java.lang.String href)
CollectionaddCategories in interface Collectionhref - The IRI of the external Category Documentpublic Categories addCategories(java.util.List<Category> categories, boolean fixed, java.lang.String scheme)
CollectionaddCategories in interface Collectioncategories - The listing of categories to addfixed - True if the listing of categories should be fixedscheme - The default IRI scheme for the categories listingpublic java.util.List<Categories> getCategories()
CollectiongetCategories in interface CollectionCopyright © 2010 - 2019 Adobe. All Rights Reserved