Package uk.ac.starlink.vo
Class TableMeta
- java.lang.Object
-
- uk.ac.starlink.vo.TableMeta
-
public class TableMeta extends java.lang.Object
Represents table metadata from a TableSet document. The scalar members are intended to be set by classes in this package near construction time. The columns and foreignKeys members may or may not be populated, depending on the source of the instance; check the documentation for the relevant factory class.- Since:
- 21 Jan 2011
- Author:
- Mark Taylor
- See Also:
- IVOA VODataService Recommendation
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TableMeta()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColumnMeta[]
getColumns()
Returns a list of the columns contained in this table.java.lang.String
getDescription()
Returns this table's description.java.util.Map<java.lang.String,java.lang.Object>
getExtras()
Returns a map of additional non-standard metadata items for this table.ForeignMeta[]
getForeignKeys()
Returns a list of the foreign keys associated with this table.java.lang.String
getName()
Returns this table's name.java.lang.String
getTitle()
Returns this table's human-readable title.java.lang.String
getType()
Returns this table's type.java.lang.String
getUtype()
Returns this table's Utype.void
setColumns(ColumnMeta[] columns)
Sets the columns contained in this table.void
setForeignKeys(ForeignMeta[] foreignKeys)
Sets the foreign keys associated with this table.java.lang.String
toString()
Returns this table's name.
-
-
-
Method Detail
-
getType
public java.lang.String getType()
Returns this table's type. TAP 1.0 TAP_SCHEMA.tables says this should be one of "table" or "view"; VODataService allows "output", "base_table", "view" or other values.- Returns:
- table type label
-
getName
public java.lang.String getName()
Returns this table's name. This is a string suitable for unadorned insertion into an ADQL query, so syntactically it must match ADQL's<table_name>
production. It should not be quoted, or have a schema name prepended, or be otherwise adjusted, for use in an ADQL query.- Returns:
- name suitable for use in ADQL
-
getTitle
public java.lang.String getTitle()
Returns this table's human-readable title. Note, this is supplied by VODataService, but not by TAP_SCHEMA.- Returns:
- human-readable title
-
getDescription
public java.lang.String getDescription()
Returns this table's description.- Returns:
- text description
-
getUtype
public java.lang.String getUtype()
Returns this table's Utype.- Returns:
- utype string
-
getExtras
public java.util.Map<java.lang.String,java.lang.Object> getExtras()
Returns a map of additional non-standard metadata items for this table.- Returns:
- extras map
-
getColumns
public ColumnMeta[] getColumns()
Returns a list of the columns contained in this table. If the result is null, nothing is known about the columns, and the list may need to be explicitly set.- Returns:
- columns contained in this table, or null
-
setColumns
public void setColumns(ColumnMeta[] columns)
Sets the columns contained in this table.- Parameters:
columns
- column list
-
getForeignKeys
public ForeignMeta[] getForeignKeys()
Returns a list of the foreign keys associated with this table. If the result is null, nothing is known about the foreign keys, and the list may need to be explicitly set.- Returns:
- foreign keys associated with this table, or null
-
setForeignKeys
public void setForeignKeys(ForeignMeta[] foreignKeys)
Sets the foreign keys associated with this table.- Parameters:
foreignKeys
- foreign key list
-
toString
public java.lang.String toString()
Returns this table's name.- Overrides:
toString
in classjava.lang.Object
- Returns:
- name
-
-