org.outerj.daisy.repository
Interface DocumentCollection


public interface DocumentCollection

A collection of documents in the repository. This interface is called DocumentCollection to avoid a name collision with the often-used Collection interface from the Java API.

Using Document.getCollections(), you can retrieve the collections to which a document belongs. To get a list of all documents belonging to a collection, peform a query using the QueryManager.

Creating and deleting collection is done using the CollectionManager which can be obtained using Repository.getCollectionManager().


Method Summary
 long getId()
          Returns the ID of this collection.
 java.util.Date getLastModified()
          Gets the date when this collection was last saved.
 long getLastModifier()
          Get the id of the user that last modified this collection.
 java.lang.String getName()
          Returns the name of this collection.
 long getUpdateCount()
           
 org.outerx.daisy.x10.CollectionDocument getXml()
          Get an XML document describing this collection.
 void save()
          Stores the modified collection.
 void setName(java.lang.String name)
          Sets the name of this collection.
 

Method Detail

getId

public long getId()
Returns the ID of this collection. For newly created collections, this method returns -1 until save() is called.


getName

public java.lang.String getName()
Returns the name of this collection.


setName

public void setName(java.lang.String name)
Sets the name of this collection.


save

public void save()
          throws RepositoryException
Stores the modified collection.

Throws:
RepositoryException

getXml

public org.outerx.daisy.x10.CollectionDocument getXml()
Get an XML document describing this collection.


getLastModified

public java.util.Date getLastModified()
Gets the date when this collection was last saved. This does NOT include the adding or removing of documents to the collection.


getLastModifier

public long getLastModifier()
Get the id of the user that last modified this collection.


getUpdateCount

public long getUpdateCount()


Copyright © -2005 . All Rights Reserved.