|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.data.tmf.impl.AbstractReader
public abstract class AbstractReader
Partial implementation of 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 Summary | |
|---|---|
AbstractReader()
|
|
| Method Summary | |
|---|---|
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(RemoteIterator)
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<org.gcube.data.tm.stubs.Path> stream)
Default implementation of SourceReader.getNodes(Stream)
based on repeated delegation to SourceReader.getNode(String...). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.gcube.data.tmf.api.SourceReader |
|---|
get, get |
| Constructor Detail |
|---|
public AbstractReader()
| Method Detail |
|---|
public 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,
org.gcube.data.tml.exceptions.UnknownTreeException,
org.gcube.data.tml.exceptions.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 pattern
UnsupportedOperationException - if the data source does not support this operation
Exception - if the operation fails for an unexpected error
org.gcube.data.tml.exceptions.UnknownTreeException
org.gcube.data.tml.exceptions.InvalidTreeExceptionSourceReader.get(Stream, Pattern)
public org.gcube.data.trees.data.Node getNode(String... path)
throws UnsupportedOperationException,
org.gcube.data.tml.exceptions.UnknownPathException,
Exception
SourceReader#getNodes(RemoteIterator)
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 identifiers
UnsupportedOperationException - if the data source does not support this operation
org.gcube.data.tml.exceptions.UnknownPathException - if the path does not lead to a node
org.gcube.common.clients.exceptions.UnsupportedRequestException - if the data source does not support this request
Exception - if the operation fails for any other errorSourceReader#getNodes(RemoteIterator)
public org.gcube.data.streams.Stream<org.gcube.data.trees.data.Node> getNodes(org.gcube.data.streams.Stream<org.gcube.data.tm.stubs.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 nodes
UnsupportedOperationException - if the data source does not support this operation
org.gcube.common.clients.exceptions.UnsupportedRequestException - if the data source does not support this request
Exception - if the operation fails for an unexpected errorSourceReader.getNodes(Stream)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||