|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.data.trees.patterns.AbstractPattern
org.gcube.data.trees.patterns.TreePattern
public class TreePattern
| Constructor Summary | |
|---|---|
TreePattern(List<EdgePattern> patterns)
Creates and instance with a list of EdgePatterns. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
int |
hashCode()
|
boolean |
matches(Node n)
Indicates whether a node matches a pattern. |
EdgePattern |
pattern(QName label)
Returns a pattern with a given label, if one exists. |
List<EdgePattern> |
patterns()
Return the patterns. |
void |
prune(Node n)
Prunes a node of all the descendants that are not required to match the pattern. |
String |
toString()
|
| Methods inherited from class org.gcube.data.trees.patterns.AbstractPattern |
|---|
idPattern, setIdPattern |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TreePattern(List<EdgePattern> patterns)
EdgePatterns.
patterns - the patterns| Method Detail |
|---|
public boolean matches(Node n)
matches in interface Patternmatches in class AbstractPatternn - the node.
true if it does, false otherwise.
public void prune(Node n)
throws Exception
prune in interface Patternprune in class AbstractPatternn - the node.
Exception - if the node does not match the pattern.public List<EdgePattern> patterns()
public EdgePattern pattern(QName label)
label - the label.
null.public String toString()
toString in class Objectpublic int hashCode()
hashCode in class AbstractPatternpublic boolean equals(Object obj)
equals in class AbstractPattern
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||