Package org.apache.abdera.model
Interface Collection
Deprecated.
This API is deprecated as Apache Abdera is a retired project since 2017.
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* )
}
-
Method Summary
Modifier and TypeMethodDescriptionbooleanDeprecated.Returns true if the collection accepts the given media-typebooleanaccepts(javax.activation.MimeType mediaType) Deprecated.Returns true if the collection accepts the given media-typebooleanDeprecated.Returns true if the collection accepts Atom entry documents (equivalent to calling accepts("application/atom+xml;type=entry");)booleanDeprecated.Returns true if the collection accepts nothing (i.e.addAccepts(String mediaRange) Deprecated.Adds a new accept element to the collectionaddAccepts(String... mediaRanges) Deprecated.Adds new accept elements to the collectionDeprecated.Same as setAcceptsEntry except the existing accepts are not discardedDeprecated.Add an app:categories elementaddCategories(String href) Deprecated.Add an app:categories element that links to an external Category DocumentaddCategories(List<Category> categories, boolean fixed, String scheme) Deprecated.Add a listing of categories to the collectionaddCategories(Categories categories) Deprecated.Add the app:categories element to the collectionString[]Deprecated.Returns the listing of media-ranges allowed for this collectionDeprecated.Returns the app:categories elementgetHref()Deprecated.Return the value of the app:collection elements href attributeDeprecated.Return the href attribute resolved against the in-scope Base URIgetTitle()Deprecated.The text value of the collections atom:title elementDeprecated.Return the title elementDeprecated.Set the listing of media-ranges allowed for this collection.Deprecated.Sets the appropriate accept element to indicate that entries are accepted (equivalent to calling setAccept("application/atom+xml;type=entry");)Deprecated.Sets the collection so that nothing is accepted (equivalent to calling setAccept(""); )Deprecated.Set the value of the href attributeDeprecated.Set the value of the collections atom:title element using type="text"setTitleAsHtml(String title) Deprecated.Set the value of the collections atom:title element using type="html".setTitleAsXHtml(String title) Deprecated.Set the value of the collections atom:title element using type="xhtml".Methods inherited from interface org.apache.abdera.model.Base
addComment, clone, complete, getDefaultWriterOptions, getFactory, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeToMethods inherited from interface org.apache.abdera.model.Element
declareNS, 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, setTextMethods inherited from interface org.apache.abdera.model.ExtensibleElement
addExtension, addExtension, addExtension, addExtension, addExtension, addSimpleExtension, addSimpleExtension, getExtension, getExtension, getExtensions, getExtensions, getExtensions, getSimpleExtension, getSimpleExtensionMethods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
getTitle
String getTitle()Deprecated.The text value of the collections atom:title element- Returns:
- The atom:title value
-
setTitle
Deprecated.Set the value of the collections atom:title element using type="text"- Parameters:
title- The value of the atom:title- Returns:
- The newly created title element
-
setTitleAsHtml
Deprecated.Set the value of the collections atom:title element using type="html". Special characters in the value will be automatically escaped (e.g. invalid input: '&' will become &- Parameters:
title- The value of the atom:title- Returns:
- The newly created title element
-
setTitleAsXHtml
Deprecated.Set the value of the collections atom:title element using type="xhtml". The title text will be wrapped in a xhtml:div and parsed to ensure that it is welformed XML. A ParseException (RuntimeException) could be thrown- Parameters:
title- The value of the atom:title- Returns:
- The newly created title element
-
getTitleElement
Text getTitleElement()Deprecated.Return the title element- Returns:
- The title element
-
getHref
IRI getHref()Deprecated.Return the value of the app:collection elements href attribute- Returns:
- The href attribute IRI value
-
getResolvedHref
IRI getResolvedHref()Deprecated.Return the href attribute resolved against the in-scope Base URI- Returns:
- The href attribute IRI value
-
setHref
Deprecated.Set the value of the href attribute- Parameters:
href- The value of href attribute
-
getAccept
String[] getAccept()Deprecated.Returns the listing of media-ranges allowed for this collection- Returns:
- An array listing the media-ranges allowed for this collection
-
setAccept
Deprecated.Set the listing of media-ranges allowed for this collection. The special value "entry" is used to indicate Atom Entry Documents.- Parameters:
mediaRanges- a listing of media-ranges
-
accepts
Deprecated.Returns true if the collection accepts the given media-type- Parameters:
mediaType- The media-type to check- Returns:
- True if the media-type is acceptable
-
acceptsEntry
boolean acceptsEntry()Deprecated.Returns true if the collection accepts Atom entry documents (equivalent to calling accepts("application/atom+xml;type=entry");) -
acceptsNothing
boolean acceptsNothing()Deprecated.Returns true if the collection accepts nothing (i.e. there is an empty accept element) -
setAcceptsEntry
Collection setAcceptsEntry()Deprecated.Sets the appropriate accept element to indicate that entries are accepted (equivalent to calling setAccept("application/atom+xml;type=entry");) -
setAcceptsNothing
Collection setAcceptsNothing()Deprecated.Sets the collection so that nothing is accepted (equivalent to calling setAccept(""); ) -
addAccepts
Deprecated.Adds a new accept element to the collection -
addAccepts
Deprecated.Adds new accept elements to the collection -
addAcceptsEntry
Collection addAcceptsEntry()Deprecated.Same as setAcceptsEntry except the existing accepts are not discarded -
accepts
boolean accepts(javax.activation.MimeType mediaType) Deprecated.Returns true if the collection accepts the given media-type- Parameters:
mediaType- The media-type to check- Returns:
- True if the media-type is acceptable
-
getCategories
List<Categories> getCategories()Deprecated.Returns the app:categories element- Returns:
- The app:categories element
-
addCategories
Categories addCategories()Deprecated.Add an app:categories element- Returns:
- The newly created app:categories element
-
addCategories
Deprecated.Add an app:categories element that links to an external Category Document- Parameters:
href- The IRI of the external Category Document- Returns:
- The newly created app:categories element
-
addCategories
Deprecated.Add the app:categories element to the collection- Parameters:
categories- The app:categories element
-
addCategories
Deprecated.Add a listing of categories to the collection- Parameters:
categories- The listing of categories to addfixed- True if the listing of categories should be fixedscheme- The default IRI scheme for the categories listing- Returns:
- The newly created app:categories element
-