Package uk.ac.starlink.vo
Class ColumnMeta
java.lang.Object
uk.ac.starlink.vo.ColumnMeta
Represents column metadata from a TableSet document.
- Since:
- 21 Jan 2011
- Author:
- Mark Taylor
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionArray size, normally in the form of a VOTable arraysize attribute.Returns the datatype for this column.Returns this column's description.Returns a map of additional non-standard metadata items for this column.String[]
getFlags()
Returns a list of strings corresponding to flags that are set on this column.getName()
Returns this column's name.getUcd()
Returns a UCD associated with this column.getUnit()
Returns this column's unit string.getUtype()
Returns a Utype associated with this column.getXtype()
Extended type, normally as for a VOTable xtype attribute.boolean
Convenience function to find out if a given flag value is present.boolean
Indicates whether this column is declared indexed.boolean
Indicates whether this column is declared nullable.boolean
Indicates whether this column is declared primary.boolean
Indicates whether this column is declared principal.boolean
isStd()
Indicates whether this column is declared standard.toString()
Returns this column's name.
-
Constructor Details
-
ColumnMeta
protected ColumnMeta()Constructor.
-
-
Method Details
-
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
Returns this column's description.- Returns:
- text description
-
getUnit
Returns this column's unit string.- Returns:
- unit
-
getUcd
Returns a UCD associated with this column.- Returns:
- ucd
-
getUtype
Returns a Utype associated with this column.- Returns:
- utype
-
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
Array size, normally in the form of a VOTable arraysize attribute.- Returns:
- arraysize string
-
getXtype
Extended type, normally as for a VOTable xtype attribute.- Returns:
- xtype
-
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. Available from both TAP_SCHEMA and VODataService metadata.- Returns:
- true iff one of the flag values is "indexed"
-
isPrimary
public boolean isPrimary()Indicates whether this column is declared primary. Only available from VODataService metadata.- Returns:
- true iff one of the flag values is "primary"
-
isNullable
public boolean isNullable()Indicates whether this column is declared nullable. Only available from VODataService metadata.- Returns:
- true iff one of the flag values is "nullable"
-
isPrincipal
public boolean isPrincipal()Indicates whether this column is declared principal. Only available from TAP_SCHEMA metadata.- Returns:
- true iff one of the flag values is "principal"
-
isStd
public boolean isStd()Indicates whether this column is declared standard. Only available from TAP_SCHEMA metadata.- Returns:
- true iff one of the flag values is "std"
-
getExtras
Returns a map of additional non-standard metadata items for this column.- Returns:
- extras map
-
hasFlag
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
Returns this column's name.
-