ValueInfo
public class ColumnInfo extends DefaultValueInfo
ValueInfo
interface) as well as additional miscellaneous metadata.
The miscellaneous, or auxiliary, metadata takes the form of a
list of DescribedValue
objects. It is the intention that
only one object in this list exists for each value name (as returned
by the DescribedValue.getName method. This restriction
is not guaranteed to be enforced however.Constructor | Description |
---|---|
ColumnInfo(java.lang.String name) |
Constructs a ColumnInfo object.
|
ColumnInfo(java.lang.String name,
java.lang.Class contentClass,
java.lang.String description) |
Constructs a new ColumnInfo object with a given name,
class and description.
|
ColumnInfo(ColumnInfo base) |
Constructs a ColumnInfo object which is a
copy of an existing one.
|
ColumnInfo(ValueInfo base) |
Constructs a new ColumnInfo based on a ValueInfo
object.
|
Modifier and Type | Method | Description |
---|---|---|
java.util.List |
getAuxData() |
Returns a list of auxiliary metadata
DescribedValue objects
pertaining to this column. |
DescribedValue |
getAuxDatum(ValueInfo vinfo) |
Gets an item of auxiliary metadata from its specification.
|
DescribedValue |
getAuxDatumByName(java.lang.String name) |
Gets an item of auxiliary metadata by its name.
|
java.lang.Object |
getAuxDatumValue(ValueInfo vinfo,
java.lang.Class clazz) |
Gets the value of an item of auxiliary metadata using its specification,
requiring a particular return type.
|
java.lang.Object |
getAuxDatumValueByName(java.lang.String name,
java.lang.Class clazz) |
Gets the value of an item of auxiliary metadata by its name,
requiring a particular return type.
|
void |
setAuxData(java.util.List auxData) |
Sets the list of auxiliary metadata items for this column.
|
void |
setAuxDatum(DescribedValue dval) |
Adds the given DescribedValue to the list of auxiliary metadata
for this object.
|
formatClass, formatShape, formatValue, generalise, getContentClass, getDescription, getDomainMappers, getElementSize, getName, getShape, getUCD, getUnitString, getUtype, isArray, isNullable, setContentClass, setDescription, setDomainMappers, setElementSize, setName, setNullable, setShape, setUCD, setUnitString, setUtype, toString, unformatShape, unformatString
public ColumnInfo(java.lang.String name)
name
- the name of the columnpublic ColumnInfo(ValueInfo base)
base
- the template ValueInfopublic ColumnInfo(java.lang.String name, java.lang.Class contentClass, java.lang.String description)
name
- the name applying to described valuescontentClass
- the class of which described values should be
instancesdescription
- a textual description of the described valuespublic ColumnInfo(ColumnInfo base)
base
- the template ColumnInfopublic java.util.List getAuxData()
DescribedValue
objects
pertaining to this column.
This is intended as a repository for metadata which is not
defined in the ValueInfo interface.public DescribedValue getAuxDatumByName(java.lang.String name)
name
- the name of an auxiliary metadata itempublic DescribedValue getAuxDatum(ValueInfo vinfo)
vinfo
- the data item to matchpublic java.lang.Object getAuxDatumValue(ValueInfo vinfo, java.lang.Class clazz)
getAuxDatum(uk.ac.starlink.table.ValueInfo)
but returns a non-null value
only if the named item exists and if its value is an instance of
the given type clazz.vinfo
- the data item to matchclazz
- required return typepublic java.lang.Object getAuxDatumValueByName(java.lang.String name, java.lang.Class clazz)
getAuxDatumByName(java.lang.String)
,
but returns a non-null value only if the named item exists,
and if its value is an instance of the given type clazz.name
- the name of an auxiliary metadata itemclazz
- required return typepublic void setAuxDatum(DescribedValue dval)
dval
- the new datum to addpublic void setAuxData(java.util.List auxData)
DescribedValue
objects.auxData
- a list of DescribedValue objectsCopyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.