Package org.restlet.ext.atom
Class Collection
- java.lang.Object
-
- org.restlet.ext.atom.Collection
-
public class Collection extends java.lang.ObjectAtom Protocol collection, part of a workspace.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<MediaType>acceptThe accepted media types.private ReferencebaseReferenceThe base reference used to resolve relative references found within the scope of the xml:base attribute.private CategoriescategoriesThe categories.private ReferencehrefThe hypertext reference.private java.lang.StringtitleThe title.private WorkspaceworkspaceThe parent workspace.
-
Constructor Summary
Constructors Constructor Description Collection(Workspace workspace, java.lang.String title, java.lang.String href)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<MediaType>getAccept()Returns the accepted media types.ReferencegetBaseReference()Returns the base reference used to resolve relative references found within the scope of the xml:base attribute.CategoriesgetCategories()Returns the categories.FeedgetFeed()Returns the feed representation.ReferencegetHref()Returns the hypertext reference.java.lang.StringgetTitle()Returns the title.WorkspacegetWorkspace()Returns the parent workspace.ReferencepostMember(Representation member)Posts a member to the collection resulting in the creation of a new resource.voidsetAccept(java.util.List<MediaType> accept)Sets the accepted media types.voidsetBaseReference(Reference baseReference)Sets the base reference used to resolve relative references found within the scope of the xml:base attribute.voidsetCategories(Categories categories)Sets the categories.voidsetHref(Reference href)Sets the hypertext reference.voidsetTitle(java.lang.String title)Sets the title.voidsetWorkspace(Workspace workspace)Sets the parent workspace.voidwriteElement(XmlWriter writer)Writes the current object as an XML element using the given SAX writer.
-
-
-
Field Detail
-
accept
private volatile java.util.List<MediaType> accept
The accepted media types.
-
baseReference
private volatile Reference baseReference
The base reference used to resolve relative references found within the scope of the xml:base attribute.
-
categories
private volatile Categories categories
The categories.
-
href
private volatile Reference href
The hypertext reference.
-
title
private volatile java.lang.String title
The title.
-
workspace
private volatile Workspace workspace
The parent workspace.
-
-
Constructor Detail
-
Collection
public Collection(Workspace workspace, java.lang.String title, java.lang.String href)
Constructor.- Parameters:
workspace- The parent workspace.title- The title.href- The hypertext reference.
-
-
Method Detail
-
getAccept
public java.util.List<MediaType> getAccept()
Returns the accepted media types.- Returns:
- The accepted media types.
-
getBaseReference
public Reference getBaseReference()
Returns the base reference used to resolve relative references found within the scope of the xml:base attribute.- Returns:
- The base reference used to resolve relative references found within the scope of the xml:base attribute.
-
getCategories
public Categories getCategories()
Returns the categories.- Returns:
- The categories.
-
getFeed
public Feed getFeed() throws java.lang.Exception
Returns the feed representation.- Returns:
- The feed representation.
- Throws:
java.lang.Exception
-
getHref
public Reference getHref()
Returns the hypertext reference.- Returns:
- The hypertext reference.
-
getTitle
public java.lang.String getTitle()
Returns the title.- Returns:
- The title.
-
getWorkspace
public Workspace getWorkspace()
Returns the parent workspace.- Returns:
- The parent workspace.
-
postMember
public Reference postMember(Representation member) throws java.lang.Exception
Posts a member to the collection resulting in the creation of a new resource.- Parameters:
member- The member representation to post.- Returns:
- The reference of the new resource.
- Throws:
java.lang.Exception
-
setAccept
public void setAccept(java.util.List<MediaType> accept)
Sets the accepted media types.- Parameters:
accept- The accepted media types.
-
setBaseReference
public void setBaseReference(Reference baseReference)
Sets the base reference used to resolve relative references found within the scope of the xml:base attribute.- Parameters:
baseReference- The base reference used to resolve relative references found within the scope of the xml:base attribute.
-
setCategories
public void setCategories(Categories categories)
Sets the categories.- Parameters:
categories- The categories.
-
setHref
public void setHref(Reference href)
Sets the hypertext reference.- Parameters:
href- The hypertext reference.
-
setTitle
public void setTitle(java.lang.String title)
Sets the title.- Parameters:
title- The title.
-
setWorkspace
public void setWorkspace(Workspace workspace)
Sets the parent workspace.- Parameters:
workspace- The parent workspace.
-
writeElement
public void writeElement(XmlWriter writer) throws org.xml.sax.SAXException
Writes the current object as an XML element using the given SAX writer.- Parameters:
writer- The SAX writer.- Throws:
org.xml.sax.SAXException
-
-