public class Attribute extends DataObjectDescription implements DSTableFieldIFace
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CUSTOMUNIT
unit type for custom units
|
static java.lang.String |
STANDARDUNIT
unit type for standard stmml units
|
dataType, definition, id, missingValueCode, name
Constructor and Description |
---|
Attribute(java.lang.String id,
java.lang.String name,
java.lang.String type)
Construct a Attribute.
|
Attribute(java.lang.String id,
java.lang.String name,
java.lang.String type,
java.lang.String description)
Construct a Attribute.
|
Attribute(java.lang.String id,
java.lang.String name,
java.lang.String type,
java.lang.String description,
java.lang.String unit,
Domain dom)
Construct a Attribute.
|
Attribute(java.lang.String id,
java.lang.String name,
java.lang.String label,
java.lang.String definition,
java.lang.String unit,
java.lang.String unitType,
java.lang.String dataType,
java.lang.String measurementScale,
Domain dom)
Constructor for extra local params
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
asLegalDbFieldName(java.lang.String attributeName)
Given an attribute name, return a legal database field name.
|
Domain |
getDomain()
Returns the domain.
|
java.lang.String |
getLabel()
accessor method
|
java.lang.String |
getMeasurementScale()
accessor method
|
java.lang.String |
getUnit()
Return the unit for this Attribute
|
java.lang.String |
getUnitType()
accessor method
|
java.lang.String |
toXml()
Serialize the data item in XML format.
|
addMissingValueCode, appendElement, equals, getDataType, getDefinition, getId, getMissingValueCode, getName, setDataType, setDefinition, setId, setMissingValueCode, setName, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addMissingValueCode, getDataType, getMissingValueCode, getName, setMissingValueCode
public static java.lang.String STANDARDUNIT
public static java.lang.String CUSTOMUNIT
public Attribute(java.lang.String id, java.lang.String name, java.lang.String type)
public Attribute(java.lang.String id, java.lang.String name, java.lang.String type, java.lang.String description)
public Attribute(java.lang.String id, java.lang.String name, java.lang.String type, java.lang.String description, java.lang.String unit, Domain dom)
public Attribute(java.lang.String id, java.lang.String name, java.lang.String label, java.lang.String definition, java.lang.String unit, java.lang.String unitType, java.lang.String dataType, java.lang.String measurementScale, Domain dom)
name
- the name of the attributelabel
- the label of the attributedefinition
- the definition of the attributeunit
- the unit of the attributeunitType
- the type of the attribute. defined by STANDARDUNIT or
CUSTOMUNITstorageType
- the data type of the attributemeasurementScale
- the scale of the attributeprecision
- the number of precise numbers to the right of the decimalpublic java.lang.String getUnit()
public java.lang.String getLabel()
public java.lang.String getUnitType()
public java.lang.String getMeasurementScale()
public java.lang.String toXml()
public static java.lang.String asLegalDbFieldName(java.lang.String attributeName)
attributeName
- the attribute name