public interface SourceWriter extends Serializable
The trees and the updates to the trees are expected to conform to the 'data type' of the source.
Source.writer(),
Tree| Modifier and Type | Method and Description |
|---|---|
org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> |
add(org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> treeStream)
Adds many trees at once to the source.
|
org.gcube.data.trees.data.Tree |
add(org.gcube.data.trees.data.Tree tree)
Adds a tree to the source.
|
org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> |
update(org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> deltaStream)
Updates many trees at once in the source with the delta trees that capture their changes.
|
org.gcube.data.trees.data.Tree |
update(org.gcube.data.trees.data.Tree delta)
Updates a tree in the source with the delta tree that captures the changes.
|
org.gcube.data.trees.data.Tree add(org.gcube.data.trees.data.Tree tree)
throws UnsupportedOperationException,
UnsupportedRequestException,
InvalidTreeException,
Exception
tree - the treeInvalidTreeException - if the tree does not conform to the data type of the source or if it is invalid for
addition (e.g. some of its nodes have already identifiers)UnsupportedOperationException - 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 reasonorg.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> add(org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> treeStream)
throws UnsupportedOperationException,
UnsupportedRequestException,
Exception
treeStream - the stream of treesUnsupportedOperationException - if the data source does not support this operationUnsupportedRequestException - if the data source does not support this requestException - if the operation fails as a whole for an unexpected errororg.gcube.data.trees.data.Tree update(org.gcube.data.trees.data.Tree delta)
throws UnknownTreeException,
InvalidTreeException,
Exception
delta - the delta treeUnknownTreeException - if the delta tree does not identify a tree in the sourceInvalidTreeException - if the delta tree does now qualify for updateUnsupportedOperationException - 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.Tree> update(org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> deltaStream)
throws UnsupportedOperationException,
UnsupportedRequestException,
Exception
deltaStream - the delta treesUnsupportedOperationException - if the data source does not support this operationUnsupportedRequestException - if the data source does not support this requestException - if the operation fails as a whole for an expected errorCopyright © 2018. All Rights Reserved.