org.gcube.dir.master.state
Class CollectionSet

java.lang.Object
  extended by GCUBEWSResource
      extended by org.gcube.dir.master.state.CollectionSet

public class CollectionSet
extends GCUBEWSResource

A set of Collections.

Author:
Fabio Simeoni (University of Strathclyde)

Constructor Summary
CollectionSet()
           
 
Method Summary
 void addCollections(java.lang.String... ids)
          Adds one or more collections to the set.
 java.util.List<java.lang.String> getCollectionIDs()
          Returns the identifiers of the the collections in the set.
 java.util.Map<java.lang.String,Collection> getCollections(java.lang.String... ids)
          Returns one or more collection in the set.
 long getDocumentSize()
          Returns the total number of documents of the collections in the set.
 java.lang.String[] getPropertyNames()
          
 int getSize()
          Returns the number of collections in the set.
 void removeCollections(java.lang.String... ids)
          Remove one or more collections from the set.
 void setCollectionIDs(java.util.List<java.lang.String> ids)
          Sets the identifiers of the collections in the set.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionSet

public CollectionSet()
Method Detail

getSize

public int getSize()
Returns the number of collections in the set.

Returns:
the number.

getCollectionIDs

public java.util.List<java.lang.String> getCollectionIDs()
Returns the identifiers of the the collections in the set.

Returns:
the identifiers.

setCollectionIDs

public void setCollectionIDs(java.util.List<java.lang.String> ids)
Sets the identifiers of the collections in the set.


getCollections

public java.util.Map<java.lang.String,Collection> getCollections(java.lang.String... ids)
Returns one or more collection in the set.

Parameters:
(optional) - ids the identifiers of the collections to return. If omitted, it returns all the collections in the set.
Returns:
the retrieved collections, indexed by their identifier.

getDocumentSize

public long getDocumentSize()
Returns the total number of documents of the collections in the set.

Returns:
the total number of documents.

addCollections

public void addCollections(java.lang.String... ids)
                    throws java.lang.Exception
Adds one or more collections to the set.

Throws:
java.lang.Exception

removeCollections

public void removeCollections(java.lang.String... ids)
Remove one or more collections from the set.

Parameters:
ids - the collection identifiers.

getPropertyNames

public java.lang.String[] getPropertyNames()