public interface SourceReader extends Serializable
Trees and nodes are expected to conform to the 'data type' of the source.
Source.reader(),
Tree,
Pattern| Modifier and Type | Method and Description |
|---|---|
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 source which match a given pattern, after
pruning them with it.
|
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 source with given identifiers, after pruning them
with a given pattern.
|
org.gcube.data.trees.data.Tree |
get(String id,
org.gcube.data.trees.patterns.Pattern pattern)
Returns a tree in the source with a given identifier, after pruning it
with a given pattern.
|
org.gcube.data.trees.data.Node |
getNode(String... path)
Returns a tree node in the source from the path of identifiers which
connects it to the root of the tree.
|
org.gcube.data.streams.Stream<org.gcube.data.trees.data.Node> |
getNodes(org.gcube.data.streams.Stream<Path> pathStream)
Returns tree nodes in the source from the paths of identifiers which
connect them to the roots of the trees.
|
org.gcube.data.trees.data.Tree get(String id, org.gcube.data.trees.patterns.Pattern pattern) throws UnsupportedOperationException, UnsupportedRequestException, UnknownTreeException, InvalidTreeException, Exception
id - the identifierpattern - the patternUnknownTreeException - if the source does not contain a tree with the given
identifierInvalidTreeException - if the Tree with the the given identifier does not
match the PatternUnsupportedOperationException - if the data source does not support this operationException - if the operation fails for any other errorUnsupportedRequestExceptionorg.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 UnsupportedOperationException, UnsupportedRequestException, Exception
idStream - a stream of tree identifierspattern - the patternUnsupportedOperationException - if the data source does not support this operationException - if the operation fails for an unexpected errorUnsupportedRequestExceptionorg.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> get(org.gcube.data.trees.patterns.Pattern pattern)
throws UnsupportedOperationException,
UnsupportedRequestException,
Exception
pattern - the patternUnsupportedOperationException - if the data source does not support this operationUnsupportedRequestException - if the data source does not support this requestException - if the operation fails for an unexpected errororg.gcube.data.trees.data.Node getNode(String... path) throws UnsupportedOperationException, UnknownPathException, UnsupportedRequestException, Exception
path - the identifiersUnknownPathException - if the path does not lead to a nodeUnsupportedOperationException - if the data source does not support this operationUnsupportedRequestException - if the data source does not support this requestException - if the operation fails for any other errororg.gcube.data.streams.Stream<org.gcube.data.trees.data.Node> getNodes(org.gcube.data.streams.Stream<Path> pathStream) throws UnsupportedOperationException, Exception
pathStream - a stream of paths to the nodesUnsupportedOperationException - if the data source does not support this operationUnsupportedRequestException - if the data source does not support this requestException - if the operation fails for an unexpected errorCopyright © 2018. All Rights Reserved.