public class CutTreePattern extends TreePattern
Pattern in which prune(Node) removes all the edges of matching nodes, not only those that are not required for matching.
This pattern minimises the amount of matching data returned by prune(Node) when the properties of the data are not
required for further processing (e.g. when matching elements need only to be counted).
| Constructor and Description |
|---|
CutTreePattern(List<EdgePattern> ps)
Creates an instance with a list of
EdgePatterns. |
| Modifier and Type | Method and Description |
|---|---|
void |
prune(Node n)
Removes all the edges of a nodes that matches the pattern, not only those that are not required for matching.
|
String |
toString() |
equals, hashCode, matches, pattern, patternsidPattern, setIdPatternpublic CutTreePattern(List<EdgePattern> ps)
EdgePatterns.ps - the patternspublic void prune(Node n) throws Exception
prune in interface Patternprune in class TreePatternn - the node.Exception - if the node does not match the pattern.public String toString()
TreePatterntoString in class TreePatternCopyright © 2017. All Rights Reserved.