|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gcube.contentmanagement.gcubedocumentlibrary.streams.dsl.Streams
public class Streams
An embedded language for manipulation of streams based on Iterator
s, RemoteIterator
s, and
result sets.
Field Summary | |
---|---|
static boolean |
CONTINUE
An alias for true to improve legibility of fault handling policies. |
static IFaultPolicy<java.lang.RuntimeException> |
FAILFAST_POLICY
The IFaultPolicy that fails at iteration errors. |
static IFaultPolicy<java.lang.RuntimeException> |
IGNORE_POLICY
The IFaultPolicy that ignores iteration errors. |
static |
PASSTHROUGH_PARSER
|
static IFaultPolicy<java.lang.Exception> |
RETHROW_POLICY
The IFaultPolicy that propagates iteration errors. |
static boolean |
STOP
An alias for false to improve legibility of fault handling policies. |
static |
URI_PARSER
|
Constructor Summary | |
---|---|
Streams()
|
Method Summary | ||
---|---|---|
static |
alternativesIn(
Converts a RemoteIterator over GCubeDocument s into a RemoteIterator over GCubeAlternative s. |
|
static java.util.Iterator<GCubeAlternative> |
alternativesIn(java.util.Iterator<GCubeDocument> docs)
Converts a standard Iterator over GCubeDocument s into a standard Iterator over GCubeAlternative s. |
|
static |
alternativesIn(java.net.URI locator)
Converts a result set of into a RemoteIterator over GCubeAlternative . |
|
static |
annotationsIn(
Converts a RemoteIterator over GCubeDocument s into a RemoteIterator over GCubeAnnotation s. |
|
static java.util.Iterator<GCubeAnnotation> |
annotationsIn(java.util.Iterator<GCubeDocument> docs)
Converts a standard Iterator over GCubeDocument s into a standard Iterator over GCubeAnnotation s. |
|
static |
annotationsIn(java.net.URI locator)
Converts a result set of into a RemoteIterator over GCubeAnnotation . |
|
static
|
convert(
Converts a RemoteIterator into an Iterator using the IGNORE_POLICY for faults. |
|
static
|
convert(java.util.Iterator<T> it)
Converts an Iterator in a RemoteIterator . |
|
static |
documentsIn(
Converts a RemoteIterator over strings into a RemoteIterator over GCubeDocument s. |
|
static |
documentsIn(java.net.URI locator)
Converts a result set of into a RemoteIterator over GCubeDocument s. |
|
static
|
group(
group clause for an RemoteIterator . |
|
static
|
group(java.util.Iterator<FROM> it)
group clause for an Iterator . |
|
static |
metadataIn(
Converts a RemoteIterator over GCubeDocument s into a RemoteIterator over GCubeMetadata s. |
|
static java.util.Iterator<GCubeMetadata> |
metadataIn(java.util.Iterator<GCubeDocument> docs)
Converts a standard Iterator over GCubeDocument s into a standard Iterator over GCubeMetadata s. |
|
static |
metadataIn(java.net.URI locator)
Converts a result set of into a RemoteIterator over GCubeMetadata . |
|
static |
partsIn(
Converts a RemoteIterator over GCubeDocument s into a RemoteIterator over GCubePart s. |
|
static java.util.Iterator<GCubePart> |
partsIn(java.util.Iterator<GCubeDocument> docs)
Converts a standard Iterator over GCubeDocument s into a standard Iterator over GCubePart s. |
|
static |
partsIn(java.net.URI locator)
Converts a result set of into a RemoteIterator over GCubePart . |
|
static |
payloadsIn(java.net.URI locator)
Converts a result set into a RemoteIterator . |
|
static
|
pipe(
pipe clause for an RemoteIterator . |
|
static
|
pipe(java.util.Iterator<FROM> it)
pipe clause for an Iterator . |
|
static
|
unfold(
unfold clause for an RemoteIterator . |
|
static
|
unfold(java.util.Iterator<FROM> it)
unfold clause for an Iterator . |
|
static |
urisIn(java.net.URI locator,
int timeout)
Converts a result set into a RemoteIterator of URI s. |
|
static
|
urisOf(
Converts an RemoteIterator of GCubeElement s into a WithClause with which
clients can generate Iterator s or RemoteIterator s over the elements' URI s. |
|
static
|
urisOf(java.util.Iterator<E> iterator)
Converts an Iterator of GCubeElement s into a WithClause with which
clients can generate Iterator s or RemoteIterator s over the elements' URI s. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final IFaultPolicy<java.lang.RuntimeException> IGNORE_POLICY
IFaultPolicy
that ignores iteration errors.
public static final IFaultPolicy<java.lang.RuntimeException> FAILFAST_POLICY
IFaultPolicy
that fails at iteration errors.
public static final IFaultPolicy<java.lang.Exception> RETHROW_POLICY
IFaultPolicy
that propagates iteration errors.
public static boolean CONTINUE
true
to improve legibility of fault handling policies.
public static boolean STOP
false
to improve legibility of fault handling policies.
public staticPASSTHROUGH_PARSER
public staticURI_PARSER
Constructor Detail |
---|
public Streams()
Method Detail |
---|
public staticpayloadsIn(java.net.URI locator) throws java.lang.Exception
RemoteIterator
.
locator
- the result set locator.
java.lang.Exception
- if the conversion failed.public staticurisIn(java.net.URI locator, int timeout) throws java.lang.Exception
RemoteIterator
of URI
s.
locator
- the result set locator.timeout
- the read timeout, in seconds.
java.lang.Exception
- if the conversion failed.public static <E extends GCubeElement> WithClause<E,java.net.URI> urisOf(java.util.Iterator<E> iterator)
Iterator
of GCubeElement
s into a WithClause
with which
clients can generate Iterator
s or RemoteIterator
s over the elements' URI
s.
locator
- the element iterator.
WithClause
.public static <E extends GCubeElement> WithClause<E,java.net.URI> urisOf(iterator)
RemoteIterator
of GCubeElement
s into a WithClause
with which
clients can generate Iterator
s or RemoteIterator
s over the elements' URI
s.
locator
- the element iterator.
WithClause
.public staticdocumentsIn(java.net.URI locator) throws java.lang.Exception
RemoteIterator
over GCubeDocument
s.
locator
- the result set locator.
java.lang.Exception
- if the conversion failed.public staticdocumentsIn( it) throws java.lang.Exception
RemoteIterator
over strings into a RemoteIterator
over GCubeDocument
s.
locator
- the iterator over strings.
GCubeDocument
s.
java.lang.Exception
- if the conversion failed.public staticmetadataIn(java.net.URI locator) throws java.lang.Exception
RemoteIterator
over GCubeMetadata
.
locator
- the result set locator.
java.lang.Exception
- if the conversion failed.public staticmetadataIn( docs) throws java.lang.Exception
RemoteIterator
over GCubeDocument
s into a RemoteIterator
over GCubeMetadata
s.
locator
- the iterator over GCubeDocument
s.
GCubeMetadata
s.
java.lang.Exception
- if the conversion failed.public static java.util.Iterator<GCubeMetadata> metadataIn(java.util.Iterator<GCubeDocument> docs) throws java.lang.Exception
Iterator
over GCubeDocument
s into a standard Iterator
over GCubeMetadata
s.
locator
- the iterator over GCubeDocument
s.
GCubeMetadata
s.
java.lang.Exception
- if the conversion failed.public staticannotationsIn(java.net.URI locator) throws java.lang.Exception
RemoteIterator
over GCubeAnnotation
.
locator
- the result set locator.
java.lang.Exception
- if the conversion failed.public staticannotationsIn( docs) throws java.lang.Exception
RemoteIterator
over GCubeDocument
s into a RemoteIterator
over GCubeAnnotation
s.
locator
- the iterator over GCubeDocument
s.
GCubeAnnotation
s.
java.lang.Exception
- if the conversion failed.public static java.util.Iterator<GCubeAnnotation> annotationsIn(java.util.Iterator<GCubeDocument> docs) throws java.lang.Exception
Iterator
over GCubeDocument
s into a standard Iterator
over GCubeAnnotation
s.
locator
- the iterator over GCubeDocument
s.
GCubeAnnotation
s.
java.lang.Exception
- if the conversion failed.public staticalternativesIn(java.net.URI locator) throws java.lang.Exception
RemoteIterator
over GCubeAlternative
.
locator
- the result set locator.
java.lang.Exception
- if the conversion failed.public staticalternativesIn( docs) throws java.lang.Exception
RemoteIterator
over GCubeDocument
s into a RemoteIterator
over GCubeAlternative
s.
locator
- the iterator over GCubeDocument
s.
GCubeAlternative
s.
java.lang.Exception
- if the conversion failed.public static java.util.Iterator<GCubeAlternative> alternativesIn(java.util.Iterator<GCubeDocument> docs) throws java.lang.Exception
Iterator
over GCubeDocument
s into a standard Iterator
over GCubeAlternative
s.
locator
- the iterator over GCubeDocument
s.
GCubeAlternative
s.
java.lang.Exception
- if the conversion failed.public staticpartsIn(java.net.URI locator) throws java.lang.Exception
RemoteIterator
over GCubePart
.
locator
- the result set locator.
java.lang.Exception
- if the conversion failed.public staticpartsIn( docs) throws java.lang.Exception
RemoteIterator
over GCubeDocument
s into a RemoteIterator
over GCubePart
s.
locator
- the iterator over GCubeDocument
s.
GCubePart
s.
java.lang.Exception
- if the conversion failed.public static java.util.Iterator<GCubePart> partsIn(java.util.Iterator<GCubeDocument> docs) throws java.lang.Exception
Iterator
over GCubeDocument
s into a standard Iterator
over GCubePart
s.
locator
- the iterator over GCubeDocument
s.
GCubePart
s.
java.lang.Exception
- if the conversion failed.public static <FROM> ThroughClause<FROM> pipe(java.util.Iterator<FROM> it)
pipe
clause for an Iterator
.
FROM
- the type of the objects iterated over.it
- the iterator.
public static <FROM> ThroughClause<FROM> pipe(rit)
pipe
clause for an RemoteIterator
.
FROM
- the type of the objects iterated over.it
- the iterator.
public static <FROM> InClause<FROM> group(java.util.Iterator<FROM> it)
group
clause for an Iterator
.
FROM
- the type of the objects iterated over.it
- the iterator.
public static <FROM> InClause<FROM> group(rit)
group
clause for an RemoteIterator
.
FROM
- the type of the objects iterated over.it
- the iterator.
public static <FROM> UnfoldThroughClause<FROM> unfold(java.util.Iterator<FROM> it)
unfold
clause for an Iterator
.
FROM
- the type of the objects iterated over.it
- the iterator.
public static <FROM> UnfoldThroughClause<FROM> unfold(rit)
unfold
clause for an RemoteIterator
.
FROM
- the type of the objects iterated over.it
- the iterator.
public static <T> WithLocalClause<T,T> convert(rit)
RemoteIterator
into an Iterator
using the IGNORE_POLICY
for faults.
T
- the type of the iterators.rit
- the RemoteIterator
.
Iterator
.public static <T>convert(java.util.Iterator<T> it)
Iterator
in a RemoteIterator
.
T
- the type of the iterators.it
- the Iterator
.
RemoteIterator
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |