|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gcube.contentmanagement.contentmanager.stubs.model.predicates.TreePredicate
public class TreePredicate
An implementation of Predicate
for InnerNode
s.
Constructor Summary | |
---|---|
TreePredicate(java.util.List<EdgePredicate> predicates)
Creates and instance with a list of EdgePredicate s. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
LeafPredicate<?,?> |
getIdPredicate()
Returns the predicate on the node identifier. |
EdgePredicate |
getPredicate(javax.xml.namespace.QName label)
Returns a predicate with a given label, if one exists. |
java.util.List<EdgePredicate> |
getPredicates()
Return the predicates. |
int |
hashCode()
|
boolean |
matches(Node n)
Indicates whether a node matches a predicate. |
void |
prune(Node n)
Prunes a node of all the descendants that are not required to match the predicate. |
void |
setIdPredicate(LeafPredicate<?,?> idp)
Set a predicate on the node identifier. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TreePredicate(java.util.List<EdgePredicate> predicates)
EdgePredicate
s.
predicates
- the predicatesMethod Detail |
---|
public boolean matches(Node n)
matches
in interface Predicate
n
- the node.
true
if it does, false
otherwise.public void prune(Node n) throws java.lang.Exception
prune
in interface Predicate
n
- the node.
java.lang.Exception
- if the node does not match the predicate.public java.util.List<EdgePredicate> getPredicates()
public EdgePredicate getPredicate(javax.xml.namespace.QName label)
label
- the label.
null
.public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void setIdPredicate(LeafPredicate<?,?> idp)
idp
- the predicate.public LeafPredicate<?,?> getIdPredicate()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |