public abstract class AbstractReader extends Object implements SourceReader
SourceReader.
Plugins that extend this class need only to implement
SourceReader.get(String, Pattern) and
SourceReader.get(Pattern), as the implementation of the other methods
are derived from these methods.
Note that the derived implementations are inefficient in principle if the data source supports more direct implementations. In this case, plugins can override derived implementations selectively.
SourceReader,
Serialized Form| Constructor and Description |
|---|
AbstractReader() |
| Modifier and Type | Method and Description |
|---|---|
org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> |
get(org.gcube.data.streams.Stream<String> stream,
org.gcube.data.trees.patterns.Pattern pattern)
Default implementation of
SourceReader.get(Stream, Pattern) based on repeated
delegation to SourceReader.get(String,Pattern). |
org.gcube.data.trees.data.Node |
getNode(String... path)
Default implementation of
SourceReader.getNodes(Stream)
based on delegation to SourceReader.get(String,Pattern). |
org.gcube.data.streams.Stream<org.gcube.data.trees.data.Node> |
getNodes(org.gcube.data.streams.Stream<Path> stream)
Default implementation of
SourceReader.getNodes(Stream)
based on repeated delegation to SourceReader.getNode(String...). |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitget, getpublic org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> get(org.gcube.data.streams.Stream<String> stream, org.gcube.data.trees.patterns.Pattern pattern) throws UnsupportedOperationException, UnknownTreeException, InvalidTreeException, Exception
SourceReader.get(Stream, Pattern) based on repeated
delegation to SourceReader.get(String,Pattern).
It should be inherited only if the source does not not support stream-based tree retrieval.
get in interface SourceReaderstream - a stream of tree identifierspattern - the patternUnsupportedOperationException - if the data source does not support this operationException - if the operation fails for an unexpected errorUnknownTreeExceptionInvalidTreeExceptionSourceReader.get(Stream, Pattern)public org.gcube.data.trees.data.Node getNode(String... path) throws UnsupportedOperationException, UnknownPathException, Exception
SourceReader.getNodes(Stream)
based on delegation to SourceReader.get(String,Pattern).
It should be inherited only if the source does not support node retrieval
getNode in interface SourceReaderpath - the identifiersUnsupportedOperationException - if the data source does not support this operationUnknownPathException - if the path does not lead to a nodeUnsupportedRequestException - if the data source does not support this requestException - if the operation fails for any other errorSourceReader.getNodes(Stream)public org.gcube.data.streams.Stream<org.gcube.data.trees.data.Node> getNodes(org.gcube.data.streams.Stream<Path> stream) throws UnsupportedOperationException, Exception
SourceReader.getNodes(Stream)
based on repeated delegation to SourceReader.getNode(String...).
It should be inherited only if the source does not support stream-based node retrieval
getNodes in interface SourceReaderstream - 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 errorSourceReader.getNodes(Stream)Copyright © 2018. All Rights Reserved.