org.gcube.data.trees.streams
Class TreeStreams

java.lang.Object
  extended by org.gcube.data.trees.streams.TreeStreams

public class TreeStreams
extends Object

Result set conversion facilities.

Author:
Fabio Simeoni

Nested Class Summary
static class TreeStreams.NodeParser
          A Generator that parses Nodes from their XML serialisation.
static class TreeStreams.NodeSerialiser
          A Generator that serialises Nodes to XML.
static class TreeStreams.TreeParser
          A Generator that parses Trees from their XML serialisation.
static class TreeStreams.TreeSerialiser
          A Generator that serialises Trees to XML.
 
Constructor Summary
TreeStreams()
           
 
Method Summary
static org.gcube.data.streams.Stream<Node> nodesIn(URI locator)
          Converts a Result Set with Nodes into a Stream.
static
<T> org.gcube.data.streams.dsl.publish.PublishRsWithClause<Node>
publishNodesIn(org.gcube.data.streams.Stream<Node> stream)
          Publishes a Stream of Nodes as a result set.
static
<T> org.gcube.data.streams.dsl.publish.PublishRsWithClause<Tree>
publishTreesIn(org.gcube.data.streams.Stream<Tree> stream)
          Publishes a Stream of Trees as a result set.
static org.gcube.data.streams.Stream<Tree> treesIn(URI locator)
          Converts a Result Set with Trees into a Stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeStreams

public TreeStreams()
Method Detail

treesIn

public static org.gcube.data.streams.Stream<Tree> treesIn(URI locator)
                                                   throws Exception
Converts a Result Set with Trees into a Stream.

Parameters:
locator - the Result Set locator
Returns:
the remote iterator
Throws:
Exception - if the conversion could not be performed

nodesIn

public static org.gcube.data.streams.Stream<Node> nodesIn(URI locator)
                                                   throws Exception
Converts a Result Set with Nodes into a Stream.

Parameters:
locator - the Result Set locator
Returns:
the stream
Throws:
Exception - if the conversion could not be performed

publishTreesIn

public static <T> org.gcube.data.streams.dsl.publish.PublishRsWithClause<Tree> publishTreesIn(org.gcube.data.streams.Stream<Tree> stream)
Publishes a Stream of Trees as a result set.

Type Parameters:
T - the type of the stream elements
Parameters:
stream - the iterator
Returns:
the next clause

publishNodesIn

public static <T> org.gcube.data.streams.dsl.publish.PublishRsWithClause<Node> publishNodesIn(org.gcube.data.streams.Stream<Node> stream)
Publishes a Stream of Nodes as a result set.

Type Parameters:
T - the type of stream elements
Parameters:
stream - the stream
Returns:
the next clause


Copyright © 2013. All Rights Reserved.