|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gate.jape.PatternElement | +--gate.jape.BasicPatternElement
A pattern element within curly braces. Has a set of Constraint, which all must be satisfied at whatever position the element is being matched at.
Field Summary | |
private com.objectspace.jgl.Array |
constraints1
A set of Constraint. |
private Constraint[] |
constraints2
A set of Constraint. |
private com.objectspace.jgl.HashMap |
constraintsMap
A map of constraint annot type to constraint. |
private static boolean |
DEBUG
Debug flag |
private int |
lastFailurePoint
Cache of the last position we failed at (-1 when none). |
private AnnotationSet |
matchedAnnots
The set of annotations we have matched. |
Fields inherited from class gate.jape.PatternElement |
matchHistory |
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, SINGLE_SPAN_BINDING |
Constructor Summary | |
BasicPatternElement()
Construction. |
Method Summary | |
void |
addConstraint(Constraint newConstraint)
Add a constraint. |
Object |
clone()
Need cloning for processing of macro references. |
void |
finish()
Finish: replace dynamic data structures with Java arrays; called after parsing. |
Constraint[] |
getConstraints()
|
AnnotationSet |
getMatchedAnnots()
Access to the annotations that have been matched. |
boolean |
matches(Document doc,
int position,
MutableInteger newPosition)
Does this element match the document at this position? |
void |
reset()
Reset: clear last failure point and matched annotations list. |
void |
rollback(int arity)
Multilevel rollback of the annotation cache. |
String |
shortDesc()
Returns a short description. |
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 com.objectspace.jgl.Array constraints1
private Constraint[] constraints2
private com.objectspace.jgl.HashMap constraintsMap
private int lastFailurePoint
private AnnotationSet matchedAnnots
Constructor Detail |
public BasicPatternElement()
Method Detail |
public AnnotationSet getMatchedAnnots()
getMatchedAnnots
in class PatternElement
public Object clone()
PatternElement.clone()
clone
in class PatternElement
public void addConstraint(Constraint newConstraint)
public void finish()
public void reset()
reset
in class PatternElement
public void rollback(int arity)
rollback
in class PatternElement
public boolean matches(Document doc, int position, MutableInteger newPosition)
public String toString()
toString
in class Object
public String toString(String pad)
toString
in class PatternElement
public String shortDesc()
public Constraint[] getConstraints()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |