Package org.apache.abdera.model
Interface Workspace
-
- All Superinterfaces:
Base,java.lang.Cloneable,Element,ExtensibleElement,java.lang.Iterable<Element>
public interface Workspace extends ExtensibleElement
An Atom Publishing Protocol Introspection Document workspace element.
Per APP Draft-08
The "app:workspace" element contains information elements about the collections of resources available for editing. The app:workspace element MUST contain one or more app:collection elements. appWorkspace = element app:workspace { appCommonAttributes, ( atomTitle & appCollection* & extensionElement* ) }
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CollectionaddCollection(java.lang.String title, java.lang.String href)Adds an individual collection to this workspaceWorkspaceaddCollection(Collection collection)Adds an individual collection to this workspaceCollectionaddMultipartCollection(java.lang.String title, java.lang.String href)Adds a multipart collection to this workspaceCollectiongetCollection(java.lang.String title)Returns the named collectionjava.util.List<Collection>getCollections()Returns the full set of collections in this workspacejava.util.List<Collection>getCollectionsThatAccept(java.lang.String... type)Returns collections that accept the specified media typesjava.util.List<Collection>getCollectionsThatAccept(javax.activation.MimeType... type)Returns collections that accept the specified media typesCollectiongetCollectionThatAccepts(java.lang.String... type)Returns a collection that accepts the specified media typesCollectiongetCollectionThatAccepts(javax.activation.MimeType... type)Returns a collection that accepts the specified media typesjava.lang.StringgetTitle()Return the workspace titleTextgetTitleElement()Return the atom:titleTextsetTitle(java.lang.String title)Set the workspace titleTextsetTitleAsHtml(java.lang.String title)Set the workspace title as escaped HTMLTextsetTitleAsXHtml(java.lang.String title)Set the workspace title as 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, writeTo
-
Methods 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, setText
-
Methods inherited from interface org.apache.abdera.model.ExtensibleElement
addExtension, addExtension, addExtension, addExtension, addExtension, addSimpleExtension, addSimpleExtension, getExtension, getExtension, getExtensions, getExtensions, getExtensions, getSimpleExtension, getSimpleExtension
-
-
-
-
Method Detail
-
getTitle
java.lang.String getTitle()
Return the workspace title- Returns:
- The atom:title value
-
setTitle
Text setTitle(java.lang.String title)
Set the workspace title- Parameters:
title- The atom:title value- Returns:
- The newly created atom:title
-
setTitleAsHtml
Text setTitleAsHtml(java.lang.String title)
Set the workspace title as escaped HTML- Parameters:
title- The atom:title value- Returns:
- The newly created atom:title
-
setTitleAsXHtml
Text setTitleAsXHtml(java.lang.String title)
Set the workspace title as XHTML- Parameters:
title- The atom:title value- Returns:
- the newly created atom:title
-
getTitleElement
Text getTitleElement()
Return the atom:title- Returns:
- The atom:title element
-
getCollections
java.util.List<Collection> getCollections()
Returns the full set of collections in this workspace- Returns:
- A listing of app:collection elements
-
getCollection
Collection getCollection(java.lang.String title)
Returns the named collection- Parameters:
title- A collection title- Returns:
- A matching app:collection
-
addCollection
Workspace addCollection(Collection collection)
Adds an individual collection to this workspace- Parameters:
collection- The collection to add
-
addCollection
Collection addCollection(java.lang.String title, java.lang.String href)
Adds an individual collection to this workspace- Parameters:
title- The collection titlehref- The collection HREF- Returns:
- The newly created app:collection
- Throws:
IRISyntaxException- if the href is malformed
-
addMultipartCollection
Collection addMultipartCollection(java.lang.String title, java.lang.String href)
Adds a multipart collection to this workspace- Parameters:
title- The collection titlehref- The collection HREF- Returns:
- The newly created app:collection
- Throws:
IRISyntaxException- if the href is malformed
-
getCollectionThatAccepts
Collection getCollectionThatAccepts(javax.activation.MimeType... type)
Returns a collection that accepts the specified media types- Parameters:
a- listing of media types the collection must accept- Returns:
- A matching app:collection element
-
getCollectionThatAccepts
Collection getCollectionThatAccepts(java.lang.String... type)
Returns a collection that accepts the specified media types- Parameters:
a- listing of media types the collection must accept- Returns:
- A matching app:collection element
-
getCollectionsThatAccept
java.util.List<Collection> getCollectionsThatAccept(javax.activation.MimeType... type)
Returns collections that accept the specified media types- Parameters:
a- listing of media types the collection must accept- Returns:
- A listing matching app:collection elements
-
getCollectionsThatAccept
java.util.List<Collection> getCollectionsThatAccept(java.lang.String... type)
Returns collections that accept the specified media types- Parameters:
a- listing of media types the collection must accept- Returns:
- A listing of matching app:collection elements
-
-