org.gcube.contentmanagement.contentmanager.plugin.defaultplugin
Class DefaultReader
java.lang.Object
org.gcube.contentmanagement.contentmanager.plugin.delegates.ManagerDelegate
org.gcube.contentmanagement.contentmanager.plugin.delegates.ReadDelegate
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
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultReader
public DefaultReader()
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