|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.table.DefaultValueInfo
uk.ac.starlink.table.ColumnInfo
public class ColumnInfo
Contains information about a table column. This includes
a description of the values contained in it (as per the 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 Summary | |
---|---|
ColumnInfo(ColumnInfo base)
Constructs a ColumnInfo object which is a copy of an existing one. |
|
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(ValueInfo base)
Constructs a new ColumnInfo based on a ValueInfo object. |
Method Summary | |
---|---|
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. |
Methods inherited from class uk.ac.starlink.table.DefaultValueInfo |
---|
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, unformatString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
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 ColumnInfoMethod Detail |
---|
public 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 item
public DescribedValue getAuxDatum(ValueInfo vinfo)
vinfo
- the data item to match
public 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 type
public 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 type
public void setAuxDatum(DescribedValue dval)
dval
- the new datum to addpublic void setAuxData(java.util.List auxData)
DescribedValue
objects.
auxData
- a list of DescribedValue objects
|
Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |