org.gcube.data.tml.proxies
Interface TReader

All Known Implementing Classes:
DefaultTReader

public interface TReader

An interface over remote T-Reader endpoints.

T-Reader endpoints give access to data sources under a tree-based model.

Author:
Fabio Simeoni
See Also:
TWriter, TBinder

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 which match a given Pattern.
 org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> get(org.gcube.data.streams.Stream<String> ids, org.gcube.data.trees.patterns.Pattern pattern)
          Returns Trees in the bound source from their identifiers, after pruning them with a Pattern.
 org.gcube.data.trees.data.Tree get(String id)
          Returns a Tree with a given identifier in the bound source.
 org.gcube.data.trees.data.Tree get(String id, org.gcube.data.trees.patterns.Pattern pattern)
          Returns a Tree in with a given identifier the bound source, after pruning it with a Pattern.
 org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> get(URI idLocator, org.gcube.data.trees.patterns.Pattern pattern)
          Returns Trees in the bound source from their identifiers, after pruning them with a Pattern.
 org.gcube.data.trees.data.Node getNode(String... path)
          Returns a Node in the bound source from its path in a tree, i.e.
 org.gcube.data.streams.Stream<org.gcube.data.trees.data.Node> getNodes(org.gcube.data.streams.Stream<org.gcube.data.tm.stubs.Path> paths)
          Returns Nodes from their paths in a tree, i.e.
 org.gcube.data.streams.Stream<org.gcube.data.trees.data.Node> getNodes(URI pathsLocator)
          Returns Nodes from their paths in a tree, i.e.
 

Method Detail

get

org.gcube.data.trees.data.Tree get(String id)
                                   throws UnknownTreeException
Returns a Tree with a given identifier in the bound source.

Parameters:
id - the tree identifier
Returns:
the tree
Throws:
UnknownTreeException - if the identifier does not identify a tree in the bound source
org.gcube.common.clients.exceptions.DiscoveryException - if the proxy is created in discovery mode but no service endpoints can be discovered
org.gcube.common.clients.exceptions.UnsupportedOperationException - if the bound source does not support the operation
org.gcube.common.clients.exceptions.UnsupportedRequestException - if the bound source does not support this particular request
org.gcube.common.clients.exceptions.ServiceException - if the call fails for any other error

get

org.gcube.data.trees.data.Tree get(String id,
                                   org.gcube.data.trees.patterns.Pattern pattern)
                                   throws UnknownTreeException,
                                          InvalidTreeException
Returns a Tree in with a given identifier the bound source, after pruning it with a Pattern.

Parameters:
id - the tree identifier
pattern - the pattern
Returns:
the pruned tree
Throws:
UnknownTreeException - if the identifier does not identify a tree in the bound source
InvalidTreeException - if the identified tree does not match the pattern
org.gcube.common.clients.exceptions.DiscoveryException - if the proxy is created in discovery mode but no service endpoints can be discovered
org.gcube.common.clients.exceptions.UnsupportedOperationException - if the bound source does not support the operation
org.gcube.common.clients.exceptions.UnsupportedRequestException - if the bound source does not support this particular request
org.gcube.common.clients.exceptions.ServiceException - if the call fails for any other error

get

org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> get(org.gcube.data.streams.Stream<String> ids,
                                                                  org.gcube.data.trees.patterns.Pattern pattern)
Returns Trees in the bound source from their identifiers, after pruning them with a Pattern.

Parameters:
loc - a locator to a Resultset of tree identifiers
pattern - the pattern
Returns:
a Stream of resolved Trees
Throws:
org.gcube.common.clients.exceptions.DiscoveryException - if the proxy is created in discovery mode but no service endpoints can be discovered
org.gcube.common.clients.exceptions.UnsupportedOperationException - if the bound source does not support the operation
org.gcube.common.clients.exceptions.UnsupportedRequestException - if the bound source does not support this particular request
org.gcube.common.clients.exceptions.ServiceException - if the call fails for any other error

get

org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> get(URI idLocator,
                                                                  org.gcube.data.trees.patterns.Pattern pattern)
Returns Trees in the bound source from their identifiers, after pruning them with a Pattern.

Parameters:
idLocator - a locator to a stream of tree identifiers
pattern - the pattern
Returns:
a Stream of resolved Trees
Throws:
org.gcube.common.clients.exceptions.DiscoveryException - if the proxy is created in discovery mode but no service endpoints can be discovered
org.gcube.common.clients.exceptions.UnsupportedOperationException - if the bound source does not support the operation
org.gcube.common.clients.exceptions.UnsupportedRequestException - if the bound source does not support this particular request
org.gcube.common.clients.exceptions.ServiceException - if the call fails for any other error

get

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 which match a given Pattern.

Parameters:
pattern - the pattern
Returns:
a Stream of matching Trees
Throws:
org.gcube.common.clients.exceptions.DiscoveryException - if the proxy is created in discovery mode but no service endpoints can be discovered
org.gcube.common.clients.exceptions.UnsupportedOperationException - if the bound source does not support the operation
org.gcube.common.clients.exceptions.UnsupportedRequestException - if the bound source does not support this particular request
org.gcube.common.clients.exceptions.ServiceException - if the call fails for any other error

getNode

org.gcube.data.trees.data.Node getNode(String... path)
                                       throws UnknownPathException
Returns a Node in the bound source from its path in a tree, i.e. the list of of one or more identifiers of the nodes that connect it to the root of the tree.

Parameters:
path - the node identifiers
Returns:
the node
Throws:
UnknownPathException - if the identifiers do not identify a node in the bound source
org.gcube.common.clients.exceptions.DiscoveryException - if the proxy is created in discovery mode but no service endpoints can be discovered
org.gcube.common.clients.exceptions.UnsupportedOperationException - if the bound source does not support the operation
org.gcube.common.clients.exceptions.UnsupportedRequestException - if the bound source does not support this particular request
org.gcube.common.clients.exceptions.ServiceException - if the call fails for any other error

getNodes

org.gcube.data.streams.Stream<org.gcube.data.trees.data.Node> getNodes(org.gcube.data.streams.Stream<org.gcube.data.tm.stubs.Path> paths)
Returns Nodes from their paths in a tree, i.e. lists of identifiers of the nodes that connect them to the root of a tree.

Parameters:
paths - a Stream of Paths
Returns:
a Stream of Nodes
Throws:
org.gcube.common.clients.exceptions.DiscoveryException - if the proxy is created in discovery mode but no service endpoints can be discovered
org.gcube.common.clients.exceptions.UnsupportedOperationException - if the bound source does not support the operation
org.gcube.common.clients.exceptions.UnsupportedRequestException - if the bound source does not support this particular request
org.gcube.common.clients.exceptions.ServiceException - if the call fails for any other error

getNodes

org.gcube.data.streams.Stream<org.gcube.data.trees.data.Node> getNodes(URI pathsLocator)
Returns Nodes from their paths in a tree, i.e. lists of identifiers of the nodes that connect them to the root of a tree.

Parameters:
pathsLocator - a locator to a stream of paths
Returns:
a Stream of Nodes
Throws:
org.gcube.common.clients.exceptions.DiscoveryException - if the proxy is created in discovery mode but no service endpoints can be discovered
org.gcube.common.clients.exceptions.UnsupportedOperationException - if the bound source does not support the operation
org.gcube.common.clients.exceptions.UnsupportedRequestException - if the bound source does not support this particular request
org.gcube.common.clients.exceptions.ServiceException - if the call fails for any other error


Copyright © 2012. All Rights Reserved.