Class AttributeInfo
- java.lang.Object
-
- de.fho.jump.pirol.utilities.attributes.AttributeInfo
-
- All Implemented Interfaces:
Comparable
public class AttributeInfo extends Object implements 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$
- Author:
- Ole Rahn
FH Osnabrück - University of Applied Sciences Osnabrück,
Project: PIROL (2005),
Subproject: Daten- und Wissensmanagement - See Also:
FeatureCollectionTools
-
-
Field Summary
Fields Modifier and Type Field Description protected StringattributeNameprotected AttributeTypeattributeTypeprotected intdataBaseIdFor attributes that have been loaded from the DBprotected intindexattribute's index in a (given?) FeatureSchemaprotected ObjectnullValueprotected StringuniqueAttributeNameprotected StringunitIdentifier
-
Constructor Summary
Constructors Constructor Description AttributeInfo(AttributeType attributeType, String attributeName)AttributeInfo(AttributeType attributeType, String attributeName, Object nullValue)AttributeInfo(String attributeName, Object nullValue)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FeatureSchemaattributeInfoArray2FeatureSchema(AttributeInfo[] attributeInfos)convenient method to convert an AttributeInfo array into a FeatureSchemaintcompareTo(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!StringgetAttributeName()AttributeTypegetAttributeType()intgetDataBaseId()intgetIndex()ObjectgetNullValue()StringgetUniqueAttributeName()StringgetUnitIdentifier()static AttributeInfo[]schema2AttributeInfoArray(FeatureSchema fs)convenient method to convert a FeatureSchema into an AttributeInfo arrayvoidsetAttributeName(String attributeName)voidsetAttributeType(AttributeType attributeType)voidsetDataBaseId(int dataBaseId)voidsetIndex(int index)voidsetNullValue(Object nullValue)voidsetUniqueAttributeName(String uniqueAttributeName)voidsetUnitIdentifier(String unitIdentifier)StringtoString()
-
-
-
Field Detail
-
attributeType
protected AttributeType attributeType
-
attributeName
protected String attributeName
-
uniqueAttributeName
protected String uniqueAttributeName
-
unitIdentifier
protected String unitIdentifier
-
nullValue
protected 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, String attributeName, Object nullValue)
-
AttributeInfo
public AttributeInfo(AttributeType attributeType, String attributeName)
-
-
Method Detail
-
getAttributeName
public String getAttributeName()
-
getAttributeType
public AttributeType getAttributeType()
-
getIndex
public int getIndex()
-
setIndex
public void setIndex(int index)
-
getNullValue
public Object getNullValue()
-
getUniqueAttributeName
public String getUniqueAttributeName()
-
setUniqueAttributeName
public void setUniqueAttributeName(String uniqueAttributeName)
-
setAttributeName
public void setAttributeName(String attributeName)
-
setAttributeType
public void setAttributeType(AttributeType attributeType)
-
setNullValue
public void setNullValue(Object nullValue)
-
getUnitIdentifier
public String getUnitIdentifier()
-
setUnitIdentifier
public void setUnitIdentifier(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
-
compareTo
public int compareTo(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:
compareToin interfaceComparable- Parameters:
theOtherObject- the other Object- Returns:
- see
Comparablefor
-
getDataBaseId
public int getDataBaseId()
-
setDataBaseId
public void setDataBaseId(int dataBaseId)
-
-