|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgate.jape.Constraint
public class Constraint
An individual annotation/attribute/value expression. It doesn't extend PatternElement, even though it has to "match", because a set of Constraint must be applied together in order to avoid doing separate selectAnnotations calls for each one.
Field Summary |
---|
Fields inherited from interface gate.jape.JapeConstants |
---|
ALL_STYLE, 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 | |
---|---|
Constraint(String annotType)
Construction from annot type string |
|
Constraint(String annotType,
ArrayList attrsArray)
Construction from annot type and array of attributes |
|
Constraint(String annotType,
FeatureMap attrs)
Construction from annot type and attribute sequence |
Method Summary | |
---|---|
void |
addAttribute(JdmAttribute attr)
Add an attribute. |
void |
addAttribute(String name,
Object value)
Create and add an attribute. |
Object |
clone()
Need cloning for processing of macro references. |
boolean |
equals(Object other)
Returns a boolean value indicating whether this Constraint is equivalent to the given Constraint. |
void |
finish()
Finish: replace dynamic data structures with Java arrays; called after parsing. |
String |
getAnnotType()
Get the type of annnotation we're looking for. |
JdmAttribute[] |
getAttributeArray()
Get the attributes that must be present on the matched annotation. |
FeatureMap |
getAttributeSeq()
Get the attributes that must be present on the matched annotation. |
int |
hashCode()
Returns an integer hash code for this object. |
boolean |
isNegated()
Access to negation flag. |
void |
negate()
Set negation. |
String |
shortDesc()
|
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 |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Constraint(String annotType)
public Constraint(String annotType, FeatureMap attrs)
public Constraint(String annotType, ArrayList attrsArray)
Method Detail |
---|
public void negate()
public boolean isNegated()
public String getAnnotType()
public FeatureMap getAttributeSeq()
public JdmAttribute[] getAttributeArray()
public void addAttribute(JdmAttribute attr)
public void addAttribute(String name, Object value)
public Object clone()
PatternElement.clone()
clone
in class Object
public boolean equals(Object other)
Object.equals()
.
equals
in class Object
public int hashCode()
hashCode
in class Object
public void finish()
public String toString()
toString
in class Object
public String toString(String pad)
public String shortDesc()
|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |