Package uk.ac.starlink.vo
Class ColumnMeta
- java.lang.Object
-
- uk.ac.starlink.vo.ColumnMeta
-
public class ColumnMeta extends java.lang.ObjectRepresents column metadata from a TableSet document.- Since:
- 21 Jan 2011
- Author:
- Mark Taylor
- See Also:
- IVOA VODataService Recommendation, IVOA TAP Recommendation
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedColumnMeta()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetArraysize()Array size, normally in the form of a VOTable arraysize attribute.java.lang.StringgetDataType()Returns the datatype for this column.java.lang.StringgetDescription()Returns this column's description.java.util.Map<java.lang.String,java.lang.Object>getExtras()Returns a map of additional non-standard metadata items for this column.java.lang.String[]getFlags()Returns a list of strings corresponding to flags that are set on this column.java.lang.StringgetName()Returns this column's name.java.lang.StringgetUcd()Returns a UCD associated with this column.java.lang.StringgetUnit()Returns this column's unit string.java.lang.StringgetUtype()Returns a Utype associated with this column.java.lang.StringgetXtype()Extended type, normally as for a VOTable xtype attribute.booleanhasFlag(java.lang.String flagTxt)Convenience function to find out if a given flag value is present.booleanisIndexed()Indicates whether this column is declared indexed.booleanisNullable()Indicates whether this column is declared nullable.booleanisPrimary()Indicates whether this column is declared primary.java.lang.StringtoString()Returns this column's name.
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns this column's name. This is a string suitable for unadorned insertion into an ADQL query, so syntactically it must match ADQL's<column_name>, hence<identifier>production (a<regular_identifier>without quotes or a<delimited_identifer>including quotes). It should not be quoted or otherwise adjusted for use in an ADQL query.- Returns:
- name suitable for use in ADQL
-
getDescription
public java.lang.String getDescription()
Returns this column's description.- Returns:
- text description
-
getUnit
public java.lang.String getUnit()
Returns this column's unit string.- Returns:
- unit
-
getUcd
public java.lang.String getUcd()
Returns a UCD associated with this column.- Returns:
- ucd
-
getUtype
public java.lang.String getUtype()
Returns a Utype associated with this column.- Returns:
- utype
-
getDataType
public java.lang.String getDataType()
Returns the datatype for this column. This may be an ADQL data type (TAP 1.0 sec 2.5) or a vs:TAPType or vs:VOTableType (VODataService 1.1 sec 3.5.3).- Returns:
- datatype
-
getArraysize
public java.lang.String getArraysize()
Array size, normally in the form of a VOTable arraysize attribute.- Returns:
- arraysize string
-
getXtype
public java.lang.String getXtype()
Extended type, normally as for a VOTable xtype attribute.- Returns:
- xtype
-
getFlags
public java.lang.String[] getFlags()
Returns a list of strings corresponding to flags that are set on this column. This list is in principle open (according to VODataService) but VODataService mentions the values "indexed", "primary", "nullable", while TAP_SCHEMA.columns defines "principal", "indexed" and "std".- Returns:
- array of flag strings set
-
isIndexed
public boolean isIndexed()
Indicates whether this column is declared indexed.- Returns:
- true iff one of the flag values is "indexed"
-
isPrimary
public boolean isPrimary()
Indicates whether this column is declared primary.- Returns:
- true iff one of the flag values is "primary"
-
isNullable
public boolean isNullable()
Indicates whether this column is declared nullable.- Returns:
- true iff one of the flag values is "nullable"
-
getExtras
public java.util.Map<java.lang.String,java.lang.Object> getExtras()
Returns a map of additional non-standard metadata items for this column.- Returns:
- extras map
-
hasFlag
public boolean hasFlag(java.lang.String flagTxt)
Convenience function to find out if a given flag value is present.- Parameters:
flagTxt- flag value to query- Returns:
- true iff one of the flag values is equal to
flagTxt
-
toString
public java.lang.String toString()
Returns this column's name.- Overrides:
toStringin classjava.lang.Object- Returns:
- name
-
-