org.gcube.data.tm.state
Class TReaderResource
java.lang.Object
org.gcube.common.core.utils.handlers.GCUBEServiceClientImpl
org.gcube.common.core.state.GCUBEStatefulResource<org.gcube.common.core.state.GCUBEWSResourceKey>
org.gcube.common.core.state.GCUBEWSResource
org.gcube.common.core.state.GCUBEWSLiteResource<SourceResource>
org.gcube.data.tm.state.AccessorResource
org.gcube.data.tm.state.TReaderResource
- All Implemented Interfaces:
- org.gcube.common.core.utils.handlers.GCUBEServiceClient, org.gcube.data.tmf.api.SourceConsumer, org.globus.wsrf.PersistenceCallback, org.globus.wsrf.Resource, org.globus.wsrf.ResourceLifetime, org.globus.wsrf.ResourceProperties, org.globus.wsrf.TopicListAccessor
public class TReaderResource
- extends AccessorResource
A stateful resource of the T-Reader service.
- Author:
- Fabio Simeoni, Lucio Lelii (lucio.lelii@isti.cnr.it)
| Nested classes/interfaces inherited from class org.gcube.common.core.state.GCUBEStatefulResource |
org.gcube.common.core.state.GCUBEStatefulResource.LOCK, org.gcube.common.core.state.GCUBEStatefulResource.TaskContext |
| Fields inherited from class org.gcube.common.core.state.GCUBEStatefulResource |
logger, uuidGen |
|
Method Summary |
org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> |
get(org.gcube.data.trees.patterns.Pattern pattern)
Returns all the Trees in the bound source, after pruning them
with a given Pattern. |
org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> |
get(org.gcube.data.streams.Stream<String> idStream,
org.gcube.data.trees.patterns.Pattern pattern)
Returns Trees in the bound source that have given identifiers,
after they have been pruned by a given Pattern. |
org.gcube.data.trees.data.Tree |
get(String id,
org.gcube.data.trees.patterns.Pattern pattern)
Returns a Tree in tha bound source that has a given identifier
after it has been pruned with a given Pattern. |
org.gcube.data.trees.data.Node |
getNode(String... ids)
Returns a document node from the path of identifiers which connects it to
the document root. |
org.gcube.data.streams.Stream<org.gcube.data.trees.data.Node> |
getNodes(URI pathsRs)
Returns document nodes identified by document Paths. |
| Methods inherited from class org.gcube.data.tm.state.AccessorResource |
getCardinality, getLastUpdate, getName, getPlugin, getProperty, getPropertyNames, getSourceId, getType, initialise, initialiseContainers, onEvent, subscribeForChange |
| Methods inherited from class org.gcube.common.core.state.GCUBEWSLiteResource |
getLocalID, getLocalResource, getProperty, initialise, onRemove, setLocalID, transformParams |
| Methods inherited from class org.gcube.common.core.state.GCUBEWSResource |
getCurrentTime, getEPR, getPorttypeContext, getPublisher, getResourcePropertySet, getServiceContext, getTerminationTime, getTopicList, getTopicNames, inScope, load, publish, setPortTypeContext, setTerminationTime, unpublish |
| Methods inherited from class org.gcube.common.core.state.GCUBEStatefulResource |
getID, getLock, getScheduledTasks, getScope, launchTask, setID, setPersistenceDelegate, stopTask, store |
| Methods inherited from class org.gcube.common.core.utils.handlers.GCUBEServiceClientImpl |
getPortTypeMap, setPortTypeMap |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.globus.wsrf.PersistenceCallback |
store |
SERVICETHREADPROVIDER
public static final org.gcube.data.streams.publishers.ThreadProvider SERVICETHREADPROVIDER
TReaderResource
public TReaderResource()
get
public org.gcube.data.trees.data.Tree get(String id,
org.gcube.data.trees.patterns.Pattern pattern)
throws org.gcube.data.tml.exceptions.UnsupportedOperationException,
org.gcube.data.tml.exceptions.UnsupportedRequestException,
org.gcube.data.tml.exceptions.UnknownTreeException,
org.gcube.data.tml.exceptions.InvalidTreeException,
Exception
- Returns a
Tree in tha bound source that has a given identifier
after it has been pruned with a given Pattern.
- Parameters:
id - the identifierpattern - the Pattern
- Returns:
- the pruned
Tree
- Throws:
org.gcube.data.tml.exceptions.UnsupportedOperationException - if the target plugin does not support this operation
org.gcube.data.tml.exceptions.UnsupportedRequestException - if the target plugin does not support this particular request
org.gcube.data.tml.exceptions.UnknownTreeException - if the bound source does not contain a tree with the given
identifier
org.gcube.data.tml.exceptions.InvalidTreeException - if the trees with the the given identifier does not match the
predicate
Exception - if the operation fails for an unexpected error
get
public org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> get(org.gcube.data.streams.Stream<String> idStream,
org.gcube.data.trees.patterns.Pattern pattern)
throws org.gcube.data.tml.exceptions.UnsupportedOperationException,
org.gcube.data.tml.exceptions.UnsupportedRequestException,
Exception
- Returns
Trees in the bound source that have given identifiers,
after they have been pruned by a given Pattern.
- Parameters:
idStream - the identifierspattern - the pattern
- Returns:
- the pruned trees, relatively ordered as their identifiers
- Throws:
org.gcube.data.tml.exceptions.UnsupportedOperationException - if the target plugin does not support this operation
org.gcube.data.tml.exceptions.UnsupportedRequestException - if the target plugin does not support this particular request
Exception - if the operation fails for an unexpected error
get
public org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> get(org.gcube.data.trees.patterns.Pattern pattern)
throws org.gcube.data.tml.exceptions.UnsupportedOperationException,
org.gcube.data.tml.exceptions.UnsupportedRequestException,
Exception
- Returns all the
Trees in the bound source, after pruning them
with a given Pattern.
- Parameters:
pattern - the pattern
- Returns:
- the pruned trees
- Throws:
org.gcube.data.tml.exceptions.UnsupportedOperationException - if the target plugin does not support this operation
org.gcube.data.tml.exceptions.UnsupportedRequestException - if the target plugin does not support this particular request
Exception - if the operation fails for an unexpected error
getNode
public org.gcube.data.trees.data.Node getNode(String... ids)
throws org.gcube.data.tml.exceptions.UnsupportedOperationException,
org.gcube.data.tml.exceptions.UnsupportedRequestException,
org.gcube.data.tml.exceptions.UnknownPathException,
Exception
- Returns a document node from the path of identifiers which connects it to
the document root.
- Parameters:
ids - the identifiers
- Returns:
- the node
- Throws:
org.gcube.data.tml.exceptions.UnsupportedOperationException - if the target plugin does not support this operation
org.gcube.data.tml.exceptions.UnsupportedRequestException - if the target plugin does not support this particular request
org.gcube.data.tml.exceptions.UnknownPathException - if the path does not lead to a node
Exception - if the operation fails for an unexpected error
getNodes
public org.gcube.data.streams.Stream<org.gcube.data.trees.data.Node> getNodes(URI pathsRs)
throws org.gcube.data.tml.exceptions.UnsupportedOperationException,
org.gcube.data.tml.exceptions.UnsupportedRequestException,
Exception
- Returns document nodes identified by document
Paths.
- Parameters:
pathsRs - the locator of a result set of paths
- Returns:
- the locator to a result set of nodes, relatively ordered as the
corresponding paths
- Throws:
org.gcube.data.tml.exceptions.UnsupportedOperationException - if the target plugin does not support this operation
org.gcube.data.tml.exceptions.UnsupportedRequestException - if the target plugin does not support this particular request
Exception - if the operation fails for an unexpected error
Copyright © 2012. All Rights Reserved.