GATE
Version 3.1-2270

gate.creole.ml
Class Attribute

java.lang.Object
  extended by gate.creole.ml.Attribute
All Implemented Interfaces:
Serializable

public class Attribute
extends Object
implements Serializable

Describes an attribute associated to a ML instance.

See Also:
Serialized Form

Field Summary
static int BOOLEAN
           
static int NOMINAL
           
static int NUMERIC
           
 
Constructor Summary
Attribute()
           
Attribute(org.jdom.Element jdomElement)
           
 
Method Summary
 String getFeature()
           
 String getName()
           
 int getPosition()
           
 String getType()
           
 List getValues()
           
 double getWeighting()
           
 boolean isClass()
           
static List parseSeries(org.jdom.Element jdomElement)
          This method is a clone of gate.creole.mi.Attribute.parseSerie method with minor changes to make it compatible with ML API.
 int semanticType()
          This method reports whether the attribute is nominal, numeric or boolean.
 void setClass(boolean isClass)
           
 void setFeature(String feature)
           
 void setName(String name)
           
 void setPosition(int position)
           
 void setType(String type)
           
 void setValues(List values)
           
 void setWeighting(double weighting)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NOMINAL

public static final int NOMINAL
See Also:
Constant Field Values

NUMERIC

public static final int NUMERIC
See Also:
Constant Field Values

BOOLEAN

public static final int BOOLEAN
See Also:
Constant Field Values
Constructor Detail

Attribute

public Attribute(org.jdom.Element jdomElement)
          throws GateException
Throws:
GateException

Attribute

public Attribute()
Method Detail

toString

public String toString()
Overrides:
toString in class Object

parseSeries

public static List parseSeries(org.jdom.Element jdomElement)
                        throws GateException
This method is a clone of gate.creole.mi.Attribute.parseSerie method with minor changes to make it compatible with ML API. It basically given an attribute element first locates all required variable and creates multiple attributes for the given RANGE.

Throws:
GateException

isClass

public boolean isClass()

setName

public void setName(String name)

getName

public String getName()

setType

public void setType(String type)

getType

public String getType()

setFeature

public void setFeature(String feature)

getFeature

public String getFeature()

setWeighting

public void setWeighting(double weighting)

getWeighting

public double getWeighting()

getValues

public List getValues()

getPosition

public int getPosition()

setClass

public void setClass(boolean isClass)

setValues

public void setValues(List values)

setPosition

public void setPosition(int position)

semanticType

public int semanticType()
This method reports whether the attribute is nominal, numeric or boolean.

Returns:
Attribute.NOMINAL, Attribute.NUMERIC or Attribute.BOOLEAN

GATE
Version 3.1-2270