public interface Collection extends ExtensibleElement
Represents an collection element in an Atom Publishing Protocol introspection document.
The "app:collection" describes an Atom Protocol collection. One
child element is defined here for app:collection: "app:member-type".
appCollection =
element app:collection {
appCommonAttributes,
attribute href { text },
( atomTitle
& appAccept
& extensionElement* )
}
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(MimeType mediaType)
Returns true if the collection accepts the given media-type
|
boolean |
accepts(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(String... mediaRanges)
Adds new accept elements to the collection
|
Collection |
addAccepts(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(List<Category> categories,
boolean fixed,
String scheme)
Add a listing of categories to the collection
|
Categories |
addCategories(String href)
Add an app:categories element that links to an external Category Document
|
String[] |
getAccept()
Returns the listing of media-ranges allowed for this collection
|
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
|
String |
getTitle()
The text value of the collections atom:title element
|
Text |
getTitleElement()
Return the title element
|
Collection |
setAccept(String... mediaRanges)
Set the listing of media-ranges allowed for this collection.
|
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(String href)
Set the value of the href attribute
|
Text |
setTitle(String title)
Set the value of the collections atom:title element using type="text"
|
Text |
setTitleAsHtml(String title)
Set the value of the collections atom:title element using type="html".
|
Text |
setTitleAsXHtml(String title)
Set the value of the collections atom:title element using type="xhtml".
|
addExtension, 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, writeToforEach, iterator, spliteratorString getTitle()
Text setTitle(String title)
title - The value of the atom:titleText setTitleAsHtml(String title)
title - The value of the atom:titleText setTitleAsXHtml(String title)
title - The value of the atom:titleText getTitleElement()
IRI getHref()
IRISyntaxException - if the value of the href attribute is malformedIRI getResolvedHref()
IRISyntaxException - if the value of the href attribute is malformedCollection setHref(String href)
href - The value of href attributeIRISyntaxException - if the href attribute is malformedString[] getAccept()
Collection setAccept(String... mediaRanges)
mediaRanges - a listing of media-rangesMimeTypeParseExceptionboolean accepts(String mediaType)
mediaType - The media-type to checkboolean acceptsEntry()
boolean acceptsNothing()
Collection setAcceptsEntry()
Collection setAcceptsNothing()
Collection addAccepts(String mediaRange)
Collection addAccepts(String... mediaRanges)
Collection addAcceptsEntry()
boolean accepts(MimeType mediaType)
mediaType - The media-type to checkList<Categories> getCategories()
Categories addCategories()
Categories addCategories(String href)
href - The IRI of the external Category DocumentCollection addCategories(Categories categories)
categories - The app:categories elementCategories addCategories(List<Category> categories, boolean fixed, String scheme)
categories - The listing of categories to addfixed - True if the listing of categories should be fixedscheme - The default IRI scheme for the categories listingCopyright © 2010 - 2020 Adobe. All Rights Reserved