org.gcube.data.trees.patterns
Class CutTreePattern
java.lang.Object
org.gcube.data.trees.patterns.AbstractPattern
org.gcube.data.trees.patterns.TreePattern
org.gcube.data.trees.patterns.CutTreePattern
- All Implemented Interfaces:
- Serializable, Pattern
public class CutTreePattern
- extends TreePattern
A 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).
- Author:
- Fabio Simeoni
- See Also:
- Serialized Form
|
Method Summary |
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()
|
CutTreePattern
public CutTreePattern(List<EdgePattern> ps)
- Creates an instance with a list of
EdgePatterns.
- Parameters:
ps - the patterns
prune
public void prune(Node n)
throws Exception
- Removes all the edges of a nodes that matches the pattern, not only those that are not required for matching.
- Specified by:
prune in interface Pattern- Overrides:
prune in class TreePattern
- Parameters:
n - the node.
- Throws:
Exception - if the node does not match the pattern.
toString
public String toString()
- Description copied from class:
TreePattern
-
- Overrides:
toString in class TreePattern
Copyright © 2013. All Rights Reserved.