org.gcube.contentmanagement.contentmanager.plugin.defaultplugin
Class DefaultReader

java.lang.Object
  extended by org.gcube.contentmanagement.contentmanager.plugin.delegates.ManagerDelegate
      extended by org.gcube.contentmanagement.contentmanager.plugin.delegates.ReadDelegate
          extended by org.gcube.contentmanagement.contentmanager.plugin.defaultplugin.DefaultReader
All Implemented Interfaces:
java.io.Serializable

public class DefaultReader
extends ReadDelegate

Author:
Fabio Simeoni (University of Strathclyde)
See Also:
Serialized Form

Constructor Summary
DefaultReader()
           
 
Method Summary
 RemoteIterator<GDoc> get(Predicate projection)
          Returns all the gDoc documents, requesting the application of a projection over each of them.
 GDoc get(java.lang.String id, Predicate projection)
          Returns a gDoc document from its identifier, requesting the preliminary application of a filter and a projection over it.
 DefaultCollection getCollection()
          Returns the Collection.
 
Methods inherited from class org.gcube.contentmanagement.contentmanager.plugin.delegates.ReadDelegate
get, getNode, getNodes
 
Methods inherited from class org.gcube.contentmanagement.contentmanager.plugin.delegates.ManagerDelegate
setCollection
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultReader

public DefaultReader()
Method Detail

get

public GDoc get(java.lang.String id,
                Predicate projection)
         throws UnknownDocumentException,
                java.lang.Exception,
                GCUBEException
Returns a gDoc document from its identifier, requesting the preliminary application of a filter and a projection over it.

Specified by:
get in class ReadDelegate
Parameters:
id - the identifier.
projection - the projection predicate, or null if no projection is required.
Returns:
the document.
Throws:
UnknownDocumentException - if the document is unknown.
java.lang.Exception - if the document could not be returned for a local error.
GCUBEException - if the document could not be returned for a remote error.

get

public RemoteIterator<GDoc> get(Predicate projection)
                         throws java.lang.Exception,
                                GCUBEException
Returns all the gDoc documents, requesting the application of a projection over each of them.

Specified by:
get in class ReadDelegate
Parameters:
projection - the projection predicate.
Returns:
an iterator over the DOM representations of the documents.
Throws:
java.lang.Exception - if the locator to the remote resultset could not be returned for a local error.
GCUBEException - if the locator to the remote resultset could not be returned for a remote error.

getCollection

public DefaultCollection getCollection()
Returns the Collection.

Overrides:
getCollection in class ManagerDelegate
Returns:
the collection