de.fho.jump.pirol.utilities.attributes
Class AttributeInfo

java.lang.Object
  extended by de.fho.jump.pirol.utilities.attributes.AttributeInfo
All Implemented Interfaces:
java.lang.Comparable

public class AttributeInfo
extends java.lang.Object
implements java.lang.Comparable

Class to store all information for a given attribute, so it can easily passed to e.g. to methods of the FeatureCollectionTools

Version:
$Rev: 1559 $
Author:
Ole Rahn

FH Osnabrück - University of Applied Sciences Osnabrück,
Project: PIROL (2005),
Subproject: Daten- und Wissensmanagement
See Also:
de.fho.jump.pirol.utilities.FeatureCollectionTools

Field Summary
protected  java.lang.String attributeName
           
protected  AttributeType attributeType
           
protected  int dataBaseId
          For attributes that have been loaded from the DB
protected  int index
          attribute's index in a (given?)
protected  java.lang.Object nullValue
           
protected  java.lang.String uniqueAttributeName
           
protected  java.lang.String unitIdentifier
           
 
Constructor Summary
AttributeInfo(AttributeType attributeType, java.lang.String attributeName)
           
AttributeInfo(AttributeType attributeType, java.lang.String attributeName, java.lang.Object nullValue)
           
AttributeInfo(java.lang.String attributeName, java.lang.Object nullValue)
           
 
Method Summary
static FeatureSchema attributeInfoArray2FeatureSchema(AttributeInfo[] attributeInfos)
          convenient method to convert an AttributeInfo array into a FeatureSchema
 int compareTo(java.lang.Object theOtherObject)
          In order for this to work, the attribute indices of this AttributeInfo object and of the other one has to be set, correctly!
 java.lang.String getAttributeName()
           
 AttributeType getAttributeType()
           
 int getDataBaseId()
           
 int getIndex()
           
 java.lang.Object getNullValue()
           
 java.lang.String getUniqueAttributeName()
           
 java.lang.String getUnitIdentifier()
           
static AttributeInfo[] schema2AttributeInfoArray(FeatureSchema fs)
          convenient method to convert a FeatureSchema into an AttributeInfo array
 void setAttributeName(java.lang.String attributeName)
           
 void setAttributeType(AttributeType attributeType)
           
 void setDataBaseId(int dataBaseId)
           
 void setIndex(int index)
           
 void setNullValue(java.lang.Object nullValue)
           
 void setUniqueAttributeName(java.lang.String uniqueAttributeName)
           
 void setUnitIdentifier(java.lang.String unitIdentifier)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

attributeType

protected AttributeType attributeType

attributeName

protected java.lang.String attributeName

uniqueAttributeName

protected java.lang.String uniqueAttributeName

unitIdentifier

protected java.lang.String unitIdentifier

nullValue

protected java.lang.Object nullValue

dataBaseId

protected int dataBaseId
For attributes that have been loaded from the DB


index

protected int index
attribute's index in a (given?) FeatureSchema

Constructor Detail

AttributeInfo

public AttributeInfo(AttributeType attributeType,
                     java.lang.String attributeName,
                     java.lang.Object nullValue)

AttributeInfo

public AttributeInfo(AttributeType attributeType,
                     java.lang.String attributeName)

AttributeInfo

public AttributeInfo(java.lang.String attributeName,
                     java.lang.Object nullValue)
Method Detail

getAttributeName

public java.lang.String getAttributeName()

getAttributeType

public AttributeType getAttributeType()

getIndex

public int getIndex()

setIndex

public void setIndex(int index)

getNullValue

public java.lang.Object getNullValue()

getUniqueAttributeName

public java.lang.String getUniqueAttributeName()

setUniqueAttributeName

public void setUniqueAttributeName(java.lang.String uniqueAttributeName)

setAttributeName

public void setAttributeName(java.lang.String attributeName)

setAttributeType

public void setAttributeType(AttributeType attributeType)

setNullValue

public void setNullValue(java.lang.Object nullValue)

getUnitIdentifier

public java.lang.String getUnitIdentifier()

setUnitIdentifier

public void setUnitIdentifier(java.lang.String unitIdentifier)

schema2AttributeInfoArray

public static AttributeInfo[] schema2AttributeInfoArray(FeatureSchema fs)
convenient method to convert a FeatureSchema into an AttributeInfo array

Parameters:
fs - the FeatureSchema
Returns:
an array of AttributeInfos matching the FeatureSchema

attributeInfoArray2FeatureSchema

public static FeatureSchema attributeInfoArray2FeatureSchema(AttributeInfo[] attributeInfos)
convenient method to convert an AttributeInfo array into a FeatureSchema

Parameters:
attributeInfos - an array of AttributeInfos matching wanted in the FeatureSchema
Returns:
the desired FeatureSchema

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(java.lang.Object theOtherObject)
In order for this to work, the attribute indices of this AttributeInfo object and of the other one has to be set, correctly!

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
theOtherObject -
Returns:
see Comparable for

getDataBaseId

public int getDataBaseId()

setDataBaseId

public void setDataBaseId(int dataBaseId)