|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.ofai.gate.jape.JdmAttribute
public class JdmAttribute
THIS CLASS SHOULDN'T BE HERE. Please let's all ignore it, and maybe it will go away.
Implements the TIPSTER and GDM API for attributes.
Test code in testAttributes
class.
The JdmAttribute class would accept all java serialisable classes, all jdm classes and also all user-defined classes provided they implement the Serializable interface. This restriction is necessary since Jdm uses Java serialisation to ensure object persistency. However, making classes serialisable is usually quite straightforward.
Constructor Summary | |
---|---|
protected |
JdmAttribute()
|
|
JdmAttribute(JdmAttribute jdmAttr)
throws JdmException when the value isn't one of the types we know how to store, i.e., a serialisable or Jdm class. |
|
JdmAttribute(java.lang.String name,
java.lang.Object value)
Create a tuple for an attribute: (name, value, operator). |
|
JdmAttribute(java.lang.String name,
java.lang.Object value,
int operator)
Create a tuple that describes an attribute: (name, value, operator). |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getName()
|
int |
getOperator()
|
java.lang.Object |
getValue()
|
java.lang.String |
getValueType()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected JdmAttribute()
public JdmAttribute(java.lang.String name, java.lang.Object value)
This constructor should be called when the attribute is part of an annotation in the document. When the attribute is part of a constraint in a grammar, use JdmAttribute(name, value, operator).
name
- name of the attributevalue
- value of the attributepublic JdmAttribute(java.lang.String name, java.lang.Object value, int operator)
This constructor should be called when the attribute is part of a constraint in a grammar. When the attribute is part of an annotation in the document, use JdmAttribute(name, value);
name
- name of the attributevalue
- value of the attributeoperator
- see JapeConstants (EQUAL, NOT_EQUAL...)public JdmAttribute(JdmAttribute jdmAttr)
Method Detail |
---|
public java.lang.String getName()
public java.lang.Object getValue()
public java.lang.String getValueType()
public int getOperator()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |