gistoolkit.features
Class AttributeType

java.lang.Object
  extended bygistoolkit.features.AttributeType

public class AttributeType
extends java.lang.Object

This class keeps a record of the type of object that the column represents. There are a set of types that are known to the toolkit, these have names like STRING, INTEGER, FLOAT, TIMESTAMP, and BOOLEAN. Additional types can be added by giving them a new type name. An editor should be provided for these types as well.


Field Summary
static java.lang.String BOOLEAN
          The type used for boolean, or true/false data.
static java.lang.String FLOAT
          The type used for floating point data.
static java.lang.String INTEGER
          The type used for integer data, or number data not including a decimal point.
static java.lang.String STRING
          The type used for string data, or character data, mapps to Char, Varchar, etc.
static java.lang.String TIMESTAMP
          The type used for date and time information.
static java.lang.String UNKNOWN
          The type used for Types that are unknown to this toolkit
 
Constructor Summary
AttributeType(java.lang.String inName)
          Creates new AttributeType with the given name and no lengths.
AttributeType(java.lang.String inName, int inLength)
          Creates new AttributeType with the given name and length.
AttributeType(java.lang.String inName, int inLength, int inAuxLength)
          Creates new AttributeType with the given name and lengths.
 
Method Summary
 int getAuxLength()
          This is an additional nength.
 int getLength()
          This is the maximum length of the attribute.
 java.lang.String getType()
          Return the type of this attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STRING

public static final java.lang.String STRING
The type used for string data, or character data, mapps to Char, Varchar, etc.

See Also:
Constant Field Values

INTEGER

public static final java.lang.String INTEGER
The type used for integer data, or number data not including a decimal point. The length is applied to this value. if -1 is given for the length, then the length is ignored.

See Also:
Constant Field Values

FLOAT

public static final java.lang.String FLOAT
The type used for floating point data. These are represented as doubles, and floats. The length is applied to the portion before the decimal point, and the aux length is applied to the portion after. If -1 is given for any one of the lengths, then the lengths are ignored.

See Also:
Constant Field Values

TIMESTAMP

public static final java.lang.String TIMESTAMP
The type used for date and time information.

See Also:
Constant Field Values

BOOLEAN

public static final java.lang.String BOOLEAN
The type used for boolean, or true/false data.

See Also:
Constant Field Values

UNKNOWN

public static final java.lang.String UNKNOWN
The type used for Types that are unknown to this toolkit

See Also:
Constant Field Values
Constructor Detail

AttributeType

public AttributeType(java.lang.String inName)
Creates new AttributeType with the given name and no lengths.


AttributeType

public AttributeType(java.lang.String inName,
                     int inLength)
Creates new AttributeType with the given name and length.


AttributeType

public AttributeType(java.lang.String inName,
                     int inLength,
                     int inAuxLength)
Creates new AttributeType with the given name and lengths.

Method Detail

getType

public java.lang.String getType()
Return the type of this attribute. May be one of the known types, or a type provided by the datasource.


getLength

public int getLength()
This is the maximum length of the attribute. Many data storage techniques enforce a maximum length on attrubyte types.


getAuxLength

public int getAuxLength()
This is an additional nength. There are occasionally two lengths required to represent an attribute. If a -1 is returned, it should be ignored.