|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gate.jape.LeftHandSide
The LHS of a CPSL rule. The pattern part. Has a ConstraintGroup and binding information that associates labels with ComplexPatternElements. Provides the Matcher interface.
Field Summary | |
private HashMap |
bindingTable
Mapping of binding names to ComplexPatternElements |
private ConstraintGroup |
constraintGroup
The constraint group making up this LHS. |
private static boolean |
DEBUG
Debug flag |
private boolean |
hasMatched
Flag for whether our last match was successful or not. |
Fields inherited from interface gate.jape.JapeConstants |
APPELT_STYLE, BRILL_STYLE, DEFAULT_PRIORITY, FIRST_STYLE, INDENT_PADDING, KLEENE_PLUS, KLEENE_QUERY, KLEENE_STAR, MULTI_SPAN_BINDING, NO_BINDING, NO_KLEENE_OP, ONCE_STYLE, SINGLE_SPAN_BINDING |
Constructor Summary | |
LeftHandSide(ConstraintGroup constraintGroup)
Construction from a ConstraintGroup |
Method Summary | |
void |
addBinding(String bindingName,
ComplexPatternElement binding,
HashSet bindingNameSet,
boolean macroRef)
Add a binding record. |
void |
finish()
Finish: replace dynamic data structures with Java arrays; called after parsing. |
AnnotationSet |
getBoundAnnots(String bindingName)
Get annotations via a binding name. |
ConstraintGroup |
getConstraintGroup()
Get the constraint group |
(package private) AnnotationSet |
getMatchedAnnots()
For debugging only. |
boolean |
hasMatched()
Was the last match successful? |
boolean |
matches(Document doc,
int position,
MutableInteger newPosition)
Does the LHS match the document at this position? |
void |
reset()
Clear the matched annotations cached in pattern elements. |
String |
toString()
Create a string representation of the object. |
String |
toString(String pad)
Create a string representation of the object. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private static final boolean DEBUG
private ConstraintGroup constraintGroup
private HashMap bindingTable
private boolean hasMatched
Constructor Detail |
public LeftHandSide(ConstraintGroup constraintGroup)
Method Detail |
public void addBinding(String bindingName, ComplexPatternElement binding, HashSet bindingNameSet, boolean macroRef) throws JapeException
public void finish()
finish
in interface Matcher
public AnnotationSet getBoundAnnots(String bindingName)
AnnotationSet getMatchedAnnots()
public void reset()
reset
in interface Matcher
public boolean hasMatched()
public boolean matches(Document doc, int position, MutableInteger newPosition)
matches
in interface Matcher
public String toString()
toString
in class Object
public String toString(String pad)
public ConstraintGroup getConstraintGroup()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |