org.gcube.data.tml.utils
Class TMStreams

java.lang.Object
  extended by org.gcube.data.tml.utils.TMStreams

public class TMStreams
extends Object

Result set conversion facilities.

Author:
Fabio Simeoni

Constructor Summary
TMStreams()
           
 
Method Summary
static org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> addedTreesIn(URI locator)
          Converts a result set of AddOutcomes into a Stream of added trees that throws faults in correspondence of remote addition failures.
static
<N extends org.gcube.data.trees.data.Node>
org.gcube.data.streams.Stream<N>
log(org.gcube.data.streams.Stream<N> stream)
          Pipes an Stream of Nodes through a logger.
static org.gcube.data.streams.Stream<org.gcube.data.tm.stubs.Path> pathsIn(URI locator)
          Converts a result set of Paths into a Stream.
static org.gcube.data.streams.dsl.publish.PublishRsWithClause<AddTreeOutcome> publishAddOutcomes(org.gcube.data.streams.Stream<AddTreeOutcome> stream)
          Publishes a Stream of AddTreeOutcomes.
static org.gcube.data.streams.dsl.publish.PublishRsWithClause<org.gcube.data.tm.stubs.Path> publishPathsIn(org.gcube.data.streams.Stream<org.gcube.data.tm.stubs.Path> stream)
          Publishes a Stream of Paths.
static org.gcube.data.streams.dsl.publish.PublishRsWithClause<UpdateTreeFailure> publishUpdateFailures(org.gcube.data.streams.Stream<UpdateTreeFailure> stream)
          Publishes a Stream of UpdateTreeFailures.
static org.gcube.data.streams.Stream<org.gcube.data.tm.stubs.UpdateFailure> updateFailuresIn(URI locator)
          Converts a result set of UpdateFailures into a Stream of Throwables.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TMStreams

public TMStreams()
Method Detail

log

public static <N extends org.gcube.data.trees.data.Node> org.gcube.data.streams.Stream<N> log(org.gcube.data.streams.Stream<N> stream)
Pipes an Stream of Nodes through a logger.

Parameters:
stream - the stream
Returns:
the logged stream

pathsIn

public static org.gcube.data.streams.Stream<org.gcube.data.tm.stubs.Path> pathsIn(URI locator)
Converts a result set of Paths into a Stream.

Parameters:
locator - the result set locator
Returns:
the stream

addedTreesIn

public static org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> addedTreesIn(URI locator)
Converts a result set of AddOutcomes into a Stream of added trees that throws faults in correspondence of remote addition failures.

Parameters:
locator - the result set locator
Returns:
the stream

updateFailuresIn

public static org.gcube.data.streams.Stream<org.gcube.data.tm.stubs.UpdateFailure> updateFailuresIn(URI locator)
Converts a result set of UpdateFailures into a Stream of Throwables.

Parameters:
locator - the result set locator
Returns:
the stream

publishPathsIn

public static org.gcube.data.streams.dsl.publish.PublishRsWithClause<org.gcube.data.tm.stubs.Path> publishPathsIn(org.gcube.data.streams.Stream<org.gcube.data.tm.stubs.Path> stream)
Publishes a Stream of Paths.

Parameters:
stream - the stream
Returns:
an ongoing publication sentence ready for further configuration

publishUpdateFailures

public static org.gcube.data.streams.dsl.publish.PublishRsWithClause<UpdateTreeFailure> publishUpdateFailures(org.gcube.data.streams.Stream<UpdateTreeFailure> stream)
Publishes a Stream of UpdateTreeFailures.

Parameters:
stream - the stream
Returns:
an ongoing publication sentence ready for further configuration

publishAddOutcomes

public static org.gcube.data.streams.dsl.publish.PublishRsWithClause<AddTreeOutcome> publishAddOutcomes(org.gcube.data.streams.Stream<AddTreeOutcome> stream)
Publishes a Stream of AddTreeOutcomes.

Parameters:
stream - the stream
Returns:
an ongoing publication sentence ready for further configuration


Copyright © 2012. All Rights Reserved.