|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gcube.contentmanagement.gcubedocumentlibrary.io.BaseReader
org.gcube.contentmanagement.gcubedocumentlibrary.io.ViewReader
public class ViewReader
A Reader
that uses a predefined Projection
to view any other Projection
s that is used
to constrain the properties of the documents in the target collection. In this sense, the view defines a view over
the target collection and for all retrieval requests.
Constructor Summary | |
---|---|
ViewReader(Projection<?,?> f,
Reader r)
Creates an instance with a given view and a DocumentReader . |
Method Summary | ||
---|---|---|
java.lang.String |
collectionID()
Returns the identifier of the target collection. |
|
|
get(java.util.Iterator<java.lang.String> ids,
Projection<?,?> p)
Retrieves a stream of proxies of document descriptions in the target collections. |
|
|
get(Projection<?,?> p)
Retrieves a stream of proxies of document descriptions in the target collection. |
|
GCubeDocument |
get(java.lang.String id,
Projection<?,?> p)
Returns a proxy of a document description in the target collection. |
|
|
resolve(java.util.Iterator<java.net.URI> uris,
Projection<EL,?> p)
Retrieves a stream of proxies of elements of document descriptions in the target collection. |
|
|
resolve(java.net.URI uri,
Projection<EL,?> p)
Retrieves a proxy of an element of a document description in the target collection. |
|
Projection<?,?> |
view()
Returns the view definition used by this reader. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ViewReader(Projection<?,?> f, Reader r)
DocumentReader
.
f
- the Projection
that acts as the view for the view.r
- the DocumentReader
to which retrieval requests are dispatched after filteringMethod Detail |
---|
public java.lang.String collectionID()
public GCubeDocument get(java.lang.String id, Projection<?,?> p) throws InvalidProjectionException, UnknownDocumentException, DiscoveryException, GCUBEException, java.lang.Exception
id
- the identifier of the description.p
- a projection over the inner elements of the description.
UnknownDocumentException
- if a description with the given identifier and matching the given projection is unknown in the target collection.
DiscoveryException
- if the operation could not be completed due to collection discovery errors.
GCUBEException
- if the operation could not be completed due to other forms of remote errors.
java.lang.Exception
- if the operation could not be completed due to local errors.
InvalidProjectionException
public Projection<?,?> view()
publicget(java.util.Iterator<java.lang.String> ids, Projection<?,?> p) throws InvalidProjectionException, DiscoveryException, GCUBEException, java.lang.Exception
ids
- an Iterator
over the identifiers of the descriptions.p
- a projection over the inner elements of the descriptions.
RemoteIterator
over the description proxies.
DiscoveryException
- if the operation could not be completed due to service discovery errors.
GCUBEException
- if the operation could not be completed due to other forms of remote errors.
java.lang.Exception
- if the operation could not be completed due to local errors.
InvalidProjectionException
publicget(Projection<?,?> p) throws InvalidProjectionException, GCUBEException, java.lang.Exception
p
- a projection over the inner elements of the descriptions.
RemoteIterator
over the proxies of the descriptions.
GCUBEException
- if the operation could not be completed due to other forms of remote errors.
java.lang.Exception
- if the operation could not be completed due to local errors.
InvalidProjectionException
public <EL extends GCubeInnerElement> EL resolve(java.net.URI uri, Projection<EL,?> p) throws java.lang.IllegalArgumentException, InvalidProjectionException, UnknownDocumentException, DiscoveryException, GCUBEException, java.lang.Exception
EL
- the type of the element.uri
- the content URI of the element.p
- a projection over the element.
java.lang.IllegalArgumentException
- if the URI is not a content URI, or if it does not refers to a description in the target collection.
UnknownDocumentException
- if the URI does not identify an element that matches the given projection.
DiscoveryException
- if the operation could not be completed due to collection discovery errors.
GCUBEException
- if the operation could not be completed due to other forms of remote errors.
java.lang.Exception
- if the operation could not be completed due to local errors.
InvalidProjectionException
public <EL extends GCubeInnerElement>resolve(java.util.Iterator<java.net.URI> uris, Projection<EL,?> p) throws DiscoveryException, GCUBEException, java.lang.Exception
EL
- the type of the elements.uris
- an Iterator
over the content URIs of the elements.p
- the projection over the elements.
RemoteIterator
over the proxies of the elements.
DiscoveryException
- if the operation could not be completed due to collection discovery errors.
GCUBEException
- if the operation could not be completed due to other forms of remote errors.
java.lang.Exception
- if the operation could not be completed due to local errors.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |