Jet.Pat
Class PatternSet

java.lang.Object
  extended byJet.Pat.PatternSet

public class PatternSet
extends java.lang.Object

a set of pattern-action rules which are applied together when processing a document.


Field Summary
static int limit
          applies the rules in the PatternSet to the specified span of the document.
 InternalPatternNode rootNode
           
 
Constructor Summary
PatternSet()
          creates an empty PatternSet (with no rules)
 
Method Summary
 void addRule(PatternRule rule)
          adds a rule to a PatternSet
 void apply(Document doc)
          applies the rules in the PatternSet to the entire document.
 void apply(Document doc, Span span)
           
 void makePatternGraph(PatternCollection collection)
          converts the set of rules in this pattern set into a graph.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rootNode

public InternalPatternNode rootNode

limit

public static int limit
applies the rules in the PatternSet to the specified span of the document.

Constructor Detail

PatternSet

public PatternSet()
creates an empty PatternSet (with no rules)

Method Detail

addRule

public void addRule(PatternRule rule)
adds a rule to a PatternSet


makePatternGraph

public void makePatternGraph(PatternCollection collection)
converts the set of rules in this pattern set into a graph. Once the rules have been converted to a graph, they can be applied to a document using the apply method.


apply

public void apply(Document doc)
applies the rules in the PatternSet to the entire document.


apply

public void apply(Document doc,
                  Span span)