org.gcube.data.trees.patterns
Interface Pattern

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractPattern, AnyPattern, BoolPattern, CalendarPattern, CutTreePattern, DatePattern, LeafPattern, NumPattern, TextPattern, TreePattern, URIPattern

public interface Pattern
extends Serializable

A Pattern over a Node.

Author:
Fabio Simeoni

Method Summary
 boolean matches(Node n)
          Indicates whether a node matches a pattern.
 void prune(Node n)
          Prunes a node of all the descendants that are not required to match the pattern.
 

Method Detail

matches

boolean matches(Node n)
Indicates whether a node matches a pattern.

Parameters:
n - the node.
Returns:
true if it does, false otherwise.

prune

void prune(Node n)
           throws Exception
Prunes a node of all the descendants that are not required to match the pattern.

Parameters:
n - the node.
Throws:
Exception - if the node does not match the pattern.


Copyright © 2013. All Rights Reserved.