org.restlet.ext.atom
Class Collection

java.lang.Object
  extended by org.restlet.ext.atom.Collection

public class Collection
extends Object

Atom Protocol collection, part of a workspace.

Author:
Jerome Louvel

Constructor Summary
Collection(Workspace workspace, String title, String href)
          Constructor.
 
Method Summary
 List<MediaType> getAccept()
          Returns the accepted media types.
 Reference getBaseReference()
          Returns the base reference used to resolve relative references found within the scope of the xml:base attribute.
 Categories getCategories()
          Returns the categories.
 Feed getFeed()
          Returns the feed representation.
 Reference getHref()
          Returns the hypertext reference.
 String getTitle()
          Returns the title.
 Workspace getWorkspace()
          Returns the parent workspace.
 Reference postMember(Representation member)
          Posts a member to the collection resulting in the creation of a new resource.
 void setAccept(List<MediaType> accept)
          Sets the accepted media types.
 void setBaseReference(Reference baseReference)
          Sets the base reference used to resolve relative references found within the scope of the xml:base attribute.
 void setCategories(Categories categories)
          Sets the categories.
 void setHref(Reference href)
          Sets the hypertext reference.
 void setTitle(String title)
          Sets the title.
 void setWorkspace(Workspace workspace)
          Sets the parent workspace.
 void writeElement(XmlWriter writer)
          Writes the current object as an XML element using the given SAX writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Collection

public Collection(Workspace workspace,
                  String title,
                  String href)
Constructor.

Parameters:
workspace - The parent workspace.
title - The title.
href - The hypertext reference.
Method Detail

getAccept

public 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 Exception
Returns the feed representation.

Returns:
The feed representation.
Throws:
Exception

getHref

public Reference getHref()
Returns the hypertext reference.

Returns:
The hypertext reference.

getTitle

public 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 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:
Exception

setAccept

public void setAccept(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(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 SAXException
Writes the current object as an XML element using the given SAX writer.

Parameters:
writer - The SAX writer.
Throws:
SAXException


Copyright © 2005-2013 Restlet.