|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gcube.contentmanagement.gcubedocumentlibrary.projections.BaseProjection<E,P,SELF>
E
- the type of GCubeElement
.P
- the of Property
.public abstract class BaseProjection<E extends GCubeElement,P extends Property,SELF extends BaseProjection<E,P,SELF>>
Partial implementation of Projection
.
Method Summary | |
---|---|
SELF |
allexcept(P property,
P... properties)
Behaves like etc() , except for one or more properties of this projection. |
java.util.Map<P,Predicate> |
constraints()
Returns all the include and filter constraints of the projection. |
boolean |
equals(java.lang.Object obj)
|
SELF |
etc()
Adds optional include constraints for all the properties of this projection which are not constrained yet. |
int |
hashCode()
|
boolean |
isConstrained(P p)
Indicates whether a given property has been constrained (include or filter). |
boolean |
isExcluded(P p)
Indicates whether a given property has been excluded from retrieval. |
boolean |
isFiltered(P p)
Indicates whether a given property has been filtered from retrieval. |
boolean |
isIncluded(P p)
Indicates whether a given property has been included for retrieval. |
boolean |
isOptional(P p)
Indicates whether a given property has been set as optional. |
TreePredicate |
predicate()
Returns a TreePredicate that characterises elements that match the projection. |
java.lang.String |
toString()
|
SELF |
where(P prop,
EdgePredicate ep)
Adds a filter constraint for a property. |
SELF |
where(P property,
P... properties)
Adds filter constraints for the existence of one or more properties. |
SELF |
where(P prop,
Predicate pred)
Adds a filter constraint for a property. |
SELF |
whereValue(P property,
java.lang.Object o)
Adds an filter equivalence constraint for a property based on the Object.toString() representation of an arbitrary object. |
SELF |
with(P prop,
EdgePredicate ep)
Adds an include constraint for a property. |
SELF |
with(P property,
P... properties)
Adds include constraints for the existence of one ore more properties. |
SELF |
with(P property,
Predicate p)
Adds an include constraint for a property. |
SELF |
withValue(P property,
java.lang.Object o)
Adds an include equivalence constraint for a property based on the Object.toString() representation of an arbitrary object. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.gcube.contentmanagement.gcubedocumentlibrary.projections.Projection |
---|
documentPredicate |
Method Detail |
---|
public SELF with(P property, P... properties)
the
- first property.properties
- the remaining properties.
public SELF withValue(P property, java.lang.Object o)
Object.toString()
representation of an arbitrary object.
property
- the constrained property.o
- the object the property must be equivalent to.
public SELF with(P property, Predicate p)
property
- the constrained property.p
- the constraint.
public SELF with(P prop, EdgePredicate ep) throws java.lang.IllegalArgumentException
property
- the constrained property.p
- the constraint, as an EdgePredicate
.
java.lang.IllegalStateException
- if the label of the EdgePredicate
does not match the name of the property.
java.lang.IllegalArgumentException
public SELF where(P property, P... properties)
the
- first property.properties
- the remaining properties.
public SELF whereValue(P property, java.lang.Object o)
Object.toString()
representation of an arbitrary object.
property
- the constrained property.o
- the object the property must be equivalent to.
public SELF where(P prop, Predicate pred)
property
- the constrained property.p
- the constraint.
public SELF where(P prop, EdgePredicate ep) throws java.lang.IllegalArgumentException
property
- the constrained property.p
- the constraint, as an EdgePredicate
.
java.lang.IllegalStateException
- if the label of the EdgePredicate
does not match the name of the property.
java.lang.IllegalArgumentException
public SELF etc()
public SELF allexcept(P property, P... properties)
etc()
, except for one or more properties of this projection. For these, it adds optional filter constraints
if and only if they are not constrained yet.
properties
- the properties.
public boolean isConstrained(P p)
p
- the property.
true
if the property has been constrained (include or filter).public boolean isFiltered(P p)
p
- the property.
true
if the property has been filtered.public boolean isIncluded(P p)
p
- the property.
true
if the property has been included.public boolean isOptional(P p)
p
- the property.
true
if the property has been set as optional.public boolean isExcluded(P p)
p
- the property.
true
if the property has been ignored.public java.util.Map<P,Predicate> constraints()
constraints
in interface Projection<E extends GCubeElement,P extends Property>
public TreePredicate predicate()
TreePredicate
that characterises elements that match the projection.
This method behaves like Projection.documentPredicate()
if the projection is defined over documents. It differs if it
is defined over inner elements.
predicate
in interface Projection<E extends GCubeElement,P extends Property>
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |