org.gcube.data.tml.proxies
Class DefaultTWriter

java.lang.Object
  extended by org.gcube.data.tml.proxies.DefaultTWriter
All Implemented Interfaces:
TWriter

public class DefaultTWriter
extends Object
implements TWriter


Constructor Summary
DefaultTWriter(org.gcube.common.clients.delegates.ProxyDelegate<TWriterStub> delegate)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTWriter

public DefaultTWriter(org.gcube.common.clients.delegates.ProxyDelegate<TWriterStub> delegate)
Method Detail

add

public org.gcube.data.trees.data.Tree add(org.gcube.data.trees.data.Tree tree)
                                   throws InvalidTreeException
Description copied from interface: TWriter
Adds a Tree to the bound source.

Specified by:
add in interface TWriter
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

add

public org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> add(org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> trees)
Description copied from interface: TWriter
Adds one or more Trees to the bound source.

Specified by:
add in interface TWriter
Parameters:
trees - a Stream of Trees
Returns:
a Stream of added Trees

add

public org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> add(URI locator)
Description copied from interface: TWriter
Adds one or more Trees to the bound source.

Specified by:
add in interface TWriter
Parameters:
locator - a locator to a resultset of Trees
Returns:
a Stream of added Trees

update

public org.gcube.data.trees.data.Tree update(org.gcube.data.trees.data.Tree delta)
                                      throws InvalidTreeException,
                                             UnknownTreeException
Description copied from interface: TWriter
Updates a tree in the bound source.

Specified by:
update in interface TWriter
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:
InvalidTreeException - if the delta tree is invalid
UnknownTreeException - if the delta tree does not identify a tree in the source

update

public org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> update(org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> deltas)
Description copied from interface: TWriter
Updates one or more Trees in the bound source.

Specified by:
update in interface TWriter
Parameters:
deltas - a Stream of delta Trees
Returns:
a Stream of updated trees Trees

update

public org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> update(URI locator)
Description copied from interface: TWriter
Updates one or more Trees in the bound source.

Specified by:
update in interface TWriter
Parameters:
locator - a locator to a resultset of delta Trees
Returns:
a Stream of updated Trees


Copyright © 2013. All Rights Reserved.