|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SourceWriter
Writes, changes, or deletes trees in a data source.
The trees and the updates to the trees are expected to conform to the 'data type' of the source.
Source.writer(),
Tree| Method Summary | |
|---|---|
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. |
| Method Detail |
|---|
org.gcube.data.trees.data.Tree add(org.gcube.data.trees.data.Tree tree)
throws UnsupportedOperationException,
UnsupportedRequestException,
InvalidTreeException,
Exception
tree - the tree
InvalidTreeException - 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 operation
UnsupportedRequestException - if the data source does not support this request
Exception - if the operation fails for any other reason
org.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 trees
UnsupportedOperationException - if the data source does not support this operation
UnsupportedRequestException - if the data source does not support this request
Exception - if the operation fails as a whole for an unexpected error
org.gcube.data.trees.data.Tree update(org.gcube.data.trees.data.Tree delta)
throws UnknownTreeException,
InvalidTreeException,
Exception
delta - the delta tree
UnknownTreeException - if the delta tree does not identify a tree in the source
InvalidTreeException - if the delta tree does now qualify for update
UnsupportedOperationException - if the data source does not support this operation
UnsupportedRequestException - if the data source does not support this request
Exception - if the operation fails for any other error
org.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 trees
UnsupportedOperationException - if the data source does not support this operation
UnsupportedRequestException - if the data source does not support this request
Exception - if the operation fails as a whole for an expected error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||