|
||||||||||
| 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 Iterators, RemoteIterators, 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 GCubeDocuments into a RemoteIterator over GCubeAlternatives. |
|
static java.util.Iterator<GCubeAlternative> |
alternativesIn(java.util.Iterator<GCubeDocument> docs)
Converts a standard Iterator over GCubeDocuments into a standard Iterator over GCubeAlternatives. |
|
static |
alternativesIn(java.net.URI locator)
Converts a result set of into a RemoteIterator over GCubeAlternative. |
|
static |
annotationsIn(
Converts a RemoteIterator over GCubeDocuments into a RemoteIterator over GCubeAnnotations. |
|
static java.util.Iterator<GCubeAnnotation> |
annotationsIn(java.util.Iterator<GCubeDocument> docs)
Converts a standard Iterator over GCubeDocuments into a standard Iterator over GCubeAnnotations. |
|
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 GCubeDocuments. |
|
static |
documentsIn(java.net.URI locator)
Converts a result set of into a RemoteIterator over GCubeDocuments. |
|
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 GCubeDocuments into a RemoteIterator over GCubeMetadatas. |
|
static java.util.Iterator<GCubeMetadata> |
metadataIn(java.util.Iterator<GCubeDocument> docs)
Converts a standard Iterator over GCubeDocuments into a standard Iterator over GCubeMetadatas. |
|
static |
metadataIn(java.net.URI locator)
Converts a result set of into a RemoteIterator over GCubeMetadata. |
|
static |
partsIn(
Converts a RemoteIterator over GCubeDocuments into a RemoteIterator over GCubeParts. |
|
static java.util.Iterator<GCubePart> |
partsIn(java.util.Iterator<GCubeDocument> docs)
Converts a standard Iterator over GCubeDocuments into a standard Iterator over GCubeParts. |
|
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 URIs. |
|
static
|
urisOf(
Converts an RemoteIterator of GCubeElements into a WithClause with which
clients can generate Iterators or RemoteIterators over the elements' URIs. |
|
static
|
urisOf(java.util.Iterator<E> iterator)
Converts an Iterator of GCubeElements into a WithClause with which
clients can generate Iterators or RemoteIterators over the elements' URIs. |
|
| 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 URIs.
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 GCubeElements into a WithClause with which
clients can generate Iterators or RemoteIterators over the elements' URIs.
locator - the element iterator.
WithClause.public static <E extends GCubeElement> WithClause<E,java.net.URI> urisOf(iterator)
RemoteIterator of GCubeElements into a WithClause with which
clients can generate Iterators or RemoteIterators over the elements' URIs.
locator - the element iterator.
WithClause.public staticdocumentsIn(java.net.URI locator) throws java.lang.Exception
RemoteIterator over GCubeDocuments.
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 GCubeDocuments.
locator - the iterator over strings.
GCubeDocuments.
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 GCubeDocuments into a RemoteIterator over GCubeMetadatas.
locator - the iterator over GCubeDocuments.
GCubeMetadatas.
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 GCubeDocuments into a standard Iterator over GCubeMetadatas.
locator - the iterator over GCubeDocuments.
GCubeMetadatas.
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 GCubeDocuments into a RemoteIterator over GCubeAnnotations.
locator - the iterator over GCubeDocuments.
GCubeAnnotations.
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 GCubeDocuments into a standard Iterator over GCubeAnnotations.
locator - the iterator over GCubeDocuments.
GCubeAnnotations.
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 GCubeDocuments into a RemoteIterator over GCubeAlternatives.
locator - the iterator over GCubeDocuments.
GCubeAlternatives.
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 GCubeDocuments into a standard Iterator over GCubeAlternatives.
locator - the iterator over GCubeDocuments.
GCubeAlternatives.
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 GCubeDocuments into a RemoteIterator over GCubeParts.
locator - the iterator over GCubeDocuments.
GCubeParts.
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 GCubeDocuments into a standard Iterator over GCubeParts.
locator - the iterator over GCubeDocuments.
GCubeParts.
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 | |||||||||