gate.jape
Class JdmAttribute

java.lang.Object
  extended by gate.jape.JdmAttribute
All Implemented Interfaces:
Serializable

public class JdmAttribute
extends Object
implements Serializable

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.

Author:
Kalina Bontcheva
See Also:
Serialized Form

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(String name, Object value)
          throws JdmException when the value isn't one of the types we know how to store, i.e., a serialisable or Jdm class.
 
Method Summary
 boolean equals(Object obj)
           
 String getName()
           
 Object getValue()
           
 String getValueType()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JdmAttribute

protected JdmAttribute()

JdmAttribute

public JdmAttribute(String name,
                    Object value)
throws JdmException when the value isn't one of the types we know how to store, i.e., a serialisable or Jdm class.


JdmAttribute

public 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.

Method Detail

getName

public String getName()

getValue

public Object getValue()

getValueType

public String getValueType()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object