org.gcube.data.tml.proxies
Interface TWriter

All Known Implementing Classes:
DefaultTWriter

public interface TWriter

An interface over remote T-Writer endpoints.

T-Writer endpoints give access to data sources under a tree-based model.

Author:
Fabio Simeoni
See Also:
TWriter, TBinder

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> trees)
          Adds one or more Trees to the bound source.
 org.gcube.data.trees.data.Tree add(org.gcube.data.trees.data.Tree tree)
          Adds a Tree to the bound source.
 org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> add(URI locator)
          Adds one or more Trees to the bound source.
 org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> update(org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> deltas)
          Updates one or more Trees in the bound source.
 org.gcube.data.trees.data.Tree update(org.gcube.data.trees.data.Tree delta)
          Updates a tree in the bound source.
 org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> update(URI locator)
          Updates one or more Trees in the bound source.
 

Method Detail

add

org.gcube.data.trees.data.Tree add(org.gcube.data.trees.data.Tree tree)
                                   throws InvalidTreeException
Adds a Tree to the bound source.

Parameters:
tree - the tree
Returns:
a tree that models the outcome of adding the tree in input. If not otherwise documented, the outcome is the input tree with modifications made at the point of addition to the source, if any.
Throws:
InvalidTreeException - if the tree does not conform to the data type of the source or if it is invalid for addition
org.gcube.common.clients.exceptions.DiscoveryException - if the proxy is created in discovery mode but no service endpoints could be discovered
org.gcube.common.clients.exceptions.UnsupportedOperationException - if the bound source does not support the operation
org.gcube.common.clients.exceptions.UnsupportedRequestException - if the bound source does not support this particular request
org.gcube.common.clients.exceptions.ServiceException - if the call fails for any other error

add

org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> add(org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> trees)
Adds one or more Trees to the bound source.

Parameters:
trees - a Stream of Trees
Returns:
a Stream of added Trees
Throws:
org.gcube.common.clients.exceptions.DiscoveryException - if, in discovery mode, there is no service for the bound source
org.gcube.common.clients.exceptions.UnsupportedOperationException - if the bound source does not support the operation
org.gcube.common.clients.exceptions.UnsupportedRequestException - if the bound source does not support this particular request
org.gcube.common.clients.exceptions.ServiceException - if the call fails for any other error

add

org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> add(URI locator)
Adds one or more Trees to the bound source.

Parameters:
locator - a locator to a resultset of Trees
Returns:
a Stream of added Trees
Throws:
org.gcube.common.clients.exceptions.DiscoveryException - if, in discovery mode, there is no service for the bound source
org.gcube.common.clients.exceptions.UnsupportedOperationException - if the bound source does not support the operation
org.gcube.common.clients.exceptions.UnsupportedRequestException - if the bound source does not support this particular request
org.gcube.common.clients.exceptions.ServiceException - if the call fails for any other error

update

org.gcube.data.trees.data.Tree update(org.gcube.data.trees.data.Tree delta)
                                      throws InvalidTreeException,
                                             UnknownTreeException
Updates a tree in the bound source.

Parameters:
delta - the delta tree that captures the update
Returns:
a tree that models the outcome of updating the tree in input. If not otherwise documented, the outcome is the input tree with modifications made at the point of update, if any.
Throws:
UnknownTreeException - if the delta tree does not identify a tree in the source
InvalidTreeException - if the delta tree is invalid
org.gcube.common.clients.exceptions.DiscoveryException - if the proxy is created in discovery mode but no service endpoints could be discovered
org.gcube.common.clients.exceptions.UnsupportedOperationException - if the bound source does not support the operation
org.gcube.common.clients.exceptions.UnsupportedRequestException - if the bound source does not support this particular request
org.gcube.common.clients.exceptions.ServiceException - if the call fails for any other error

update

org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> update(org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> deltas)
Updates one or more Trees in the bound source.

Parameters:
deltas - a Stream of delta Trees
Returns:
a Stream of updated trees Trees
Throws:
org.gcube.common.clients.exceptions.DiscoveryException - if, in discovery mode, there is no service for the bound source
org.gcube.common.clients.exceptions.UnsupportedOperationException - if the bound source does not support the operation
org.gcube.common.clients.exceptions.UnsupportedRequestException - if the bound source does not support this particular request
org.gcube.common.clients.exceptions.ServiceException - if the call fails for any other error

update

org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> update(URI locator)
Updates one or more Trees in the bound source.

Parameters:
locator - a locator to a resultset of delta Trees
Returns:
a Stream of updated Trees
Throws:
org.gcube.common.clients.exceptions.DiscoveryException - if, in discovery mode, there is no service for the bound source
org.gcube.common.clients.exceptions.UnsupportedOperationException - if the bound source does not support the operation
org.gcube.common.clients.exceptions.UnsupportedRequestException - if the bound source does not support this particular request
org.gcube.common.clients.exceptions.ServiceException - if the call fails for any other error


Copyright © 2013. All Rights Reserved.