| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | VO data types | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | VO data types | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This review of the data types defined in the VO specifications was initially done for my own benefit, to help me understand how the different methods for describing data types in the VO fitted together. The review looks specifically at the relationships between types, attributes and columns, particularly those with similar names in different standards and how they relate to each other. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | This review is based on the follwoing specifications: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | This review is based on the following specifications: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
VODataServiceThe VODataService specification defines an XML schema for describing data collections and the services that access them. The data types defined in VODataService are intended to be used to describe the data in VO data sets and the services and protocols used to access them.DataTypeSection 3.5 (Data Parameters) of the VODataService specification defines the DataType XML element. DataType includes the following attributes:
DataType =arraysizeSection 3.5 (Data Parameters) of the VODataService specification defines thearraysize attribute.
The specification text describes the arraysize attribute as follows:
ArrayShapeSection 3.5 (Data Parameters) of the VODataService specification defines the ArrayShape restriction, which sets the syntax for thearraysize attribute.
The specification text describes the ArrayShape as follows:
<!-- - this definition is taken from the VOTable arrayDEF type --> <xs:simpleType name="ArrayShape"> <xs:annotation> <xs:documentation> An expression of a the shape of a multi-dimensional array of the form LxNxM... where each value between gives the integer length of the array along a dimension. An asterisk (*) as the last dimension of the shape indicates that the length of the last axis is variable or undetermined. </xs:documentation> </xs:annotation> <xs:restriction base="xs:token"> <xs:pattern value="([0-9]+x)*[0-9]*[*]?"/> </xs:restriction> </xs:simpleType>As the comment in the XML schema suggests, the ArrayShape string syntax is similar to, but not explicitly related to, the arrayDEF string format defined in the VOTable specification. The ArrayShape string syntax is used in several places in the VODataService XML schema to define the content of arraysize attributes on elements derived from
DataType, including VOTableType and
TAPType.
The ArrayShape string syntax is not used directly in any of the other VO specifications.
DataType =delimSection 3.5 (Data Parameters) of the VODataService specification defines thedelim attribute.
The specification text describes the delim attribute as follows:
delim attribute as a single white space.
<xs:attribute name="delim" type="xs:string" default=" ">The specification text and comments in the XML schema encourages applications to allow optional spaces before and after the delimiter (e.g. "1, 5" when delim=","). However, this is not explicitly encoded in the XML schema itself. The delim attribute is not referred to by any of the other VO specifications.
All the other VO specifications use white space as the delimiter,
either explicitly defined in the specification text, or by implication
in the examples.
The definitions for arrays and complex numbers in the VOTable specification explicitly declares white space as the delimiter.
DataType =extendedTypeSection 3.5 (Data Parameters) of the VODataService specification defines theextendedType attribute.
The specification text describes the extendedType attribute as follows:
extendedType attribute
is functionally equivalent to the xtype attribute defined in the VOTable specification.
However, as far as we can tell, this is not explicitly stated anywhere, and there in no mapping defined between the
(extendedType | extendedSchema ) attribute pair defined in VODataService
and the (xtype with prefix) attribute defined in the VOTable specification.
The VODataService specification does not provide an example of how the extendedType attribute could be used.
The extendedType attribute is not referred to in any of the other VO specifications.
DataType =extendedSchemaSection 3.5 (Data Parameters) of the VODataService specification defines theextendedType attribute.
The specification text describes the extendedType attribute as follows:
extendedSchema attribute would be used.
The extendedSchema attribute is not used in the VODataService specification.
The extendedSchema attribute is not used in any of the other VO specifications.
TableDataTypeSection 3.5.3 (Table Column Data Types) of the VODataService specification defines the TableDataType XML element. TableDataType extends the DataType element. The XML schema describes TableDataType as:
VOTableTypeSection 3.5.3 (Table Column Data Types) of the VODataService specification defines the VOTableType XML element The VOTableType XML element extends the DataType element. The VOTableType XML element inherits the following attributes from DataType:
char with arraysize="*" .
In order to support strings with unicode characters it may be clearer to explicitly state ASCII
strings should be represented by a data type of char with arraysize="*" and Unicode strings
should be represented by a data type of unicodeChar and arraysize="*" .
Note - the bibliography reference to the VOTable specification explicitly refers to
version 1.2 (20091130) of
the specification, which has since been superceded by
version 1.3 (20130920).
TAPDataTypeThe TAPDataType element is not explicitly described in the text of the VODataService specification. The VODataService XML schema describes TAPDataType as follows:.
TAPTypeSection 3.5.3 (Table Column Data Types) of the VODataService specification defines the TAPType XML element. The TAPType element inherits the following attributes from DataType:
TAP_SCHEMA types
and VOTable types in the TAP specification.
VARCHAR , the text does not say whether this should use a
size or an arraysize attribute.
Note - the TAPType element name reflects the historical situation where
the data types were originally defined in the TAP specification.
The data type definitions have since been moved to the ADQL specification,
but for backward compatibility the XML element name has not been changed.
TAPType =sizeSection 3.5.3 (Table Column Data Types) of the VODataService specification defines thesize attribute.
Technically, size is an attribute of the abstract TAPDataType parent element,
which is then inherited by the TAPType element.
The text describing for the TAPType element describes the size attribute as follows:
CHAR and BINARY values are not arrays of values and have an inherent 'size' property, which is distinct from the 'arraysize' property.
In the discussion that follows, the VODataService specification cites the following two examples as equivalent:
<dataType xsi:type="vs:VOTableType" arraysize="*"> char </dataType> <dataType xsi:type="vs:TAPType"> VARCHAR </dataType>A third example describes a fixed length string, using the size rather than the arraysize attribute
<dataType xsi:type="vs:TAPType" size="8" > CHAR </dataType>However, the VODataService specification does not explicitly explain the difference between the folllowing examples: <dataType xsi:type="vs:TAPType" size="8" > CHAR </dataType> <dataType xsi:type="vs:TAPType" arraysize="8" > CHAR </dataType>The comments in the XML schema for TAPDataType describes the size attribute as follows:
size attribute and the
size column in TAP_SCHEMA .
In the currenet version of the TAP specification the corresponding size column is described as :
size column as follows :
size column back to TAPDataType in the VODataService specification.
VODataService Table... TBDVODataService TableSet... TBDVOTableThe VOTable specification defines an XML based serialization format for exchanging tabular data in the VO.VOTable data typesSection 2.1 (Primitives) of the VOTable specification defines a core set of primitive data types. The following table descibes the types, their semantic meaning, the corresponding FITS data type and the size in bytes:
VOTable serializationSection 6 (Definitions of Primitive Datatypes) of the VOTable specification describes theBINARY , BINARY2 and TABLEDATA serializations of each of the primative data types.
VOTable =booleanCase insensitive long form:
VOTable =bitArray of bits, padded to fit into bytes.VOTable =unsignedByte8 bit (unsigned) integers, 0 to 255.VOTable =short16 bit signed integers, -32768 to 32767.VOTable =int32 bit signed integers, -2147483648 to 2147483647.VOTable =long64 bit signed integers, -9223372036854775808 to 9223372036854775807.VOTable =floatANSI/IEEE-754 32-bit floating point numbers.VOTable =doubleANSI/IEEE-754 64-bit double precision floating point numbers.VOTable =charASCII (7-bit) characters.VOTable =unicodeCharThe description for theBINARY serialization of unicodeChar defines it as Unicode (UCS-2) fixed width 2-byte characters.
TABLEDATA serialization includes an example showing how a unicodeChar that is outside the ASCII character
set can be represented in an XML document by using a numeric character reference (NCR).
TABLEDATA data may be problematic,
<?xml version=“1.0” encoding=“utf-8”?>as this would mean the VOTable document would be able to contain complex multibyte characters that are beyond the range of the UCS-2 fixed-width character set. It may be better to specify the character encoding for VOTable documents as UCS-2 ,
<?xml version=“1.0” encoding=“ucs-2”?>This would make the the TABLEDATA serialization equivalent to the BINARY serialization,
and require numeric character references for all characters outside the UCS-2 two byte
fixed size.
Note - There is a paragraph needed to link this section and the section describing the different MIME types
and how they would effect the serialization of unicodeChar strings.
Note - since 2005 it is no longer possible to encode all of the mandatory components defined in the official
GB 18030-2005 character set of the People's Republic of China
in a fixed width 2 byte character set. Support for the GB 18030-2005 character set is officially
required for all software products sold in the PRC.
VOTable =floatComplexThe description for theBINARY serialization of floatComplex defines it as a pair of 32-bit, single precision, floating point numbers.
TABLEDATA serialization of floatComplex defines it as a pair of floating point numbers separated by white space.
TABLEDATA serialization to white space, regardless of the delim attribute
set in the VODataService description of the source data table.
VOTable =doubleComplexThe description for theBINARY serialization of doubleComplex defines it as a pair of 64-bit, double precision, floating point numbers.
TABLEDATA serialization of floatComplex defines it as a pair of floating point numbers separated by white space.
TABLEDATA serialization to white space, regardless of the delim attribute
set in the VODataService description of the source data table.
VOTable =xtypeSection 4.3 (Extended Datatype)) of the VOTable specification describes thextype attribute as bridging the gap between
the FITS based primitive VOTableTypes and the data types
used to express TAP ADQL
database queries and their results.
The VOTable specification does not define a definitive list of standard xtype values.
Section 3.3 (Literal Values) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | of the DALI specification suggests that services use a prefis for non-standard xtype values. However, the DALI specification does not define a definitive list of standard xtype values. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | of the DALI specification suggests that services should use a prefix for non-standard xtype values. The DALI specification does define a number of types, including POINT, CIRCLE and POLYGON. However it does not declare a specific list of standard xtype values which do not need prefixes. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | However, the specification does not explicitly state that the | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | The VOTable specification does not explicitly state that the | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
VOTable xtype attribute
is related to the
TAP_SCHEMA xtype column
used in TAP_SCHEMA metadata tables,
or the
VODataService extendedType attribute
that is used in the
TAP /tables
VOSI response.
VOTable =timestampThe VOTable specification cites an example of using thextype attribute to describe a timestamp value.
timestamp values should be
represented using xtype .
VOTable arraysSection 2.2 of the VOTable specification uses a number of examples to show how a combination ofdatatype and arraysize attributes can be used to describe
arrays of values in the metadata for a FIELD.
Section 5.1 of the
VOTable specification describes the TABLEDATA serialization of arrays as follows:
<TABLE> <FIELD name="aString" datatype="char" arraysize="10"/> <FIELD name="aShort" datatype="short"/> <FIELD name="varInts" datatype="int" arraysize="*"/> <FIELD name="Floats" datatype="float"arraysize="3"/> <DATA><TABLEDATA> <TR> <TD>Apple</TD> <TD/> <TD>1 2 4 8 16</TD> <TD>1.62 4.56 3.44</TD> </TR> <TR> <TD>Orange</TD> <TD>15</TD> <TD>23 -11 9</TD> <TD>2.33 4.66 9.53</TD> </TR> </TABLEDATA></DATA> </TABLE> VOTable =delimThe VOTable specification does not include anything to describe the delimiter for arrays of values.VOTable Field... TBDVOTable =arraysizeThe text of the VOTable specification does not explicitly define thearraysize attribute.
The XML specification for the arraysize attribute
does not apply a restriction to the content of the attribute.
<xs:complexType name="Field"> .... <xs:attribute name="arraysize" type="xs:string"/> .... </xs:complexType>The VOTable specification does not link the VOTable arraysize attribute with the DataType
arraysize attribute defined in the VODataService
specification.
VOTable =arrayDEFThe VOTable XML schema defines the arrayDEF syntax restriction as follows:<xs:simpleType name="arrayDEF"> <xs:restriction base="xs:token"> <xs:pattern value="([0-9]+x)*[0-9]*[*]?(s\W)?"/> </xs:restriction> </xs:simpleType>However, the arrayDEF syntax restriction is not used in the definition of the arraysize attribute:
<xs:complexType name="Field"> .... <xs:attribute name="arraysize" type="xs:string"/> .... </xs:complexType>This means that the content of the VOTable arraysize
attribute is unrestricted, and may contain any string.
In contrast, the VODataService does restrict the
content of the of the DataType arraysize
attrribute, with the ArrayShape restriction.
This means it is possible to create a value for arraysize
that is valid in VOTable but is not valid in
the VOSI /tables
response, which uses the ArrayShape syntax restriction
defined in the VODataService schema.
The only reference to the arrayDEF syntax restriction
in the other VO specifications is a comment in the definition of the
ArrayShape in the VODataService schema.
The text of the VOTable specification does not link the
arrayDEF string syntax with the ArrayShape string
syntax defined in the VODataService schema.
The arrayDEF string syntax is not used anywhere else in VOTable XML schema.
The arrayDEF string syntax is not used in any of the other VO specifications.
Arrays of Variable-Length StringsAppendix A.3 (Arrays of Variable-Length Strings) refers to the Substring Array convention, described in an appendix of the FITS specification. The text in this specification suggests that a similar convention could be used in VOTable.
<xs:simpleType name="arrayDEF"> <xs:restriction base="xs:token"> <xs:pattern value="([0-9]+x)*[0-9]*[*]?(s\W)?"/> </xs:restriction> </xs:simpleType>However, because VOTable arrayDEF and VODataService ArrayShape are not directly linked, adding support for this to VOTable makes it is possible to create a value for arraysize
that is valid in VOTable but is not valid in
the VOSI /tables
response, which uses the ArrayShape syntax restriction
defined in the VODataService schema.
MIME typeSection 8 (MIME type) describes the format of MIME types that can be used to describe a VOTable document. The text includes the following set of examples:
charset parameter is not supplied,
then default of US-ASCII is assumed.
This may conflict with the discussion of the unicodeChar data type,
which assumes that the default charset is UTF-8 .
The specification does not go into details about how changing the MIME type charset
could change the way that strings of unicodeChar are serialized.
DALIThe DALI specification defines the base web service interface common to all Data Access Layer (DAL) services.DALI tablesSection 2.6 (VOSI-tables) of the DALI specification refers to the VOSI-tables web resource, defined by the Grid and Web Wervices working group.DALI typesSection 3.3 (Literal values) of the DALI specification specifies how a number of data types should be expressed by DALI services. Note that although the following data types and the rules for representing them may be used for literal values in parameters passed to DALI services, these definitions are also referred to by other VO specifications to describe how to represent data values in VOTable results, VOSI/tables responses
and TAP_SCHEMA metadata tables.
This may mean that 'Literal values' might not be the most appropriate title for this section.
DALI NumbersSection 3.3.1 (Numbers) refers to the VOTable specification.
BINARY , BINARY2 or TABLEDATA
apply in which situations.
DALI BooleanSection 3.3.2 (Boolean) refers to part 2 of the W3C XML schema specification. This results in a slightly different definition of how boolean values should be expressed compared to the definition given in the VOTable specification.DALI TimestampSection 3.3.3 (Timestamp) defines three representations for date and time values as follows:
timestamp for
the [#VoTableXtype][xtype] attrbute.
<FIELD datatype="char", arraysize="*", xtype="timestamp"> Note - the specification text includes the following:
DALI IntervalSection 3.3.4 (Interval) defines how to represent numeric intervals as pairs of numeric values. The specification describes how to represent numeric intervals in the metadata for a VOTable FIELD, by settingarraysize to 2 and using interval for the xtype attrbute.
<FIELD datatype="short", arraysize="2", xtype="interval"> <FIELD datatype="int", arraysize="2", xtype="interval"> <FIELD datatype="long", arraysize="2", xtype="interval"> .... <FIELD datatype="float", arraysize="2", xtype="interval"> <FIELD datatype="double", arraysize="2", xtype="interval">All of the examples shown in the specification text use space as the delimiter. However, the specification does not explicity define a delimiter, nor does it refer to the delim attribute
defined in VODataService.
DALI Time Interval (proposed)PROPOSED The version (1.1) of the DALI specification does not describe how to represent time intervals. Given that we have already usedtimestamp and interval to cover the separate cases,
we will need to define a new xtype value to describe an interval
of timestamps.
We propose timestamp-interval as the
xtype value to represent intervals of timestamps.
Given that timestamp is serialized as an array of characters,
and given the way that the geometric types, Point,
Circle, and Polygon are represented.
Following a similar patten, an Interval of
Timestamps should probably be reprsented as a space delimited
sequence of two Timestamps.
<FIELD datatype="char", arraysize="*", xtype="timestamp-interval">For example: 1970-01-01T00:00:00.000Z 2017-08-16T17:12:54.621Z DALI PointSection 3.3.5 (Point) of the DALI specification defines how to represent a geometric point as an array of two floating point numbers.<FIELD ... datatype="float" arraysize="2" xtype="point"> .... <FIELD ... datatype="double" arraysize="2" xtype="point">The specification text states that the usual representation is to use longitude and latitude values in spherical coordinates. The text also implies that other coordinate systems can be used:
12.3 45.6The specification does not explicity define a delimiter, nor does it refer to the delim attribute
defined in VODataService.
DALI CircleSection 3.3.6 (Circle) of the DALI specification defines how to represent a circle as an array of three floating point numbers.<FIELD ... datatype="float" arraysize="3" xtype="circle"> ... <FIELD ... datatype="double" arraysize="3" xtype="circle">The specification text implies that the usual representation is to use longitude, latitude and radius in spherical coordinates. However, the text does not show how to a specifiy a different coordinate system. The example shown in the specification text uses space as the delimiter: 12.3 45.6 0.5The specification does not explicity define a delimiter, nor does it refer to the delim attribute
defined in VODataService.
Note - the text in the current version (1.1) repeats the same range restriction twice.
DALI PolygonSection 3.3.7 (Polygon) of the DALI specification defines how to represent a polygon as an array of floating point numbers.<FIELD ... datatype="float" arraysize="*" xtype="polygon"> .... <FIELD ... datatype="double" arraysize="*" xtype="polygon">Note that the polygon is modelled as a one-dimensional array of numbers, rather than a two-dimensional array of pairs of numbers. <FIELD ... datatype="float" arraysize="2,*" xtype="polygon">The text of the specification implies that the usual representation is to use spherical coordinates. However, the text does not show how to a specifiy a different coordinate system. The example shown in the specification text uses space as the delimiter: 10.0 10.0 10.2 10.0 10.2 10.2 10.0 10.2However, the specification does not explicity define a delimiter, nor does it refer to the delim attribute
defined in VODataService.
DALI RESPONSEFORMATSection 3.4.3 (RESPONSEFORMAT) of the DALI specification describes theRESPONSEFORMAT parameter that enables a client to request different
MIME types and response formats from a DALI service.
... TDB
Note - need to cross reference this with charset from the VOTable MIME types.
VOSIThe VOSI specification defines a number of web service interface methods and resources that are common to all of the VO services.VOSI =/tablesSection 3.3 (Table metadata) of the VOSI specification describes a resource that describes the content of database tables accessible from a VO service. The VOSI Tables XML schema imports the Table and TableSet elements from the VODataService specification. The VOSI Tables XML schema inherits both the VOTableType and TAPType elements from the VODataService specification, along with their attributes. The VOTableType and TAPType elements inherit the following attributes from DataType:
vs:TAP rather than vs:TAPType for the xsi:type attribute.
<column> <name>cfhtlsID </name> <dataType xsi:type="vs:TAP" size="30">adql:VARCHAR</dataType> </column>Note - the examples given in the text of the VOSI specification use a prefix for the adql:VARCHAR data type, which is not a valid value for
a TAPType data type.
TAPThe TAP specification describes the Table Access Protocol web service.TAP =/tablesSection 2.5 (/tables) of the TAP specification describes the/tables resource.
The text in the current version (WD-TAP-1.1-20170707)
of the specification refers to the VODataService specification
for details of the /tables resource content.
However, the content, and more importantly, the behaviour, of the
VOSI /tables resource
is described in
Section 3.3 (Table metadata)
of the VOSI specification.
Which does then import the Table and TableSet
XML elements from the VODataService specification.
The text of the specification recommends using VOTableType rather than TAPType,
but it does not explicitly exclude the use of TAPType.
adql:VARCHAR data type:
<column> <name>cfhtlsID </name> <dataType xsi:type="vs:TAP" size="30">adql:VARCHAR</dataType> </column>In addition, the text of the VODataService specification cites the following two examples as equivalent: <dataType xsi:type="vs:VOTableType" arraysize="*"> char </dataType> .... <dataType xsi:type="vs:TAPType"> VARCHAR </dataType>and a third example describes a fixed length string, using size
rather than arraysize :
<dataType xsi:type="vs:TAPType" size="8" > CHAR </dataType>Which conflicts with both the recomendation to use VOTableType rather than TAPType in TAP /tables and the advisory
regarding the planned obsolescence of the TAP_SCHEMA
size column in future versions of the
TAP specification.
Section 4 (TAP_SCHEMA)
of the TAP specification
describes the |
column name | datatype | arraysize | xtype | not-null |
table_name | char | * | null | true |
column_name | char | * | null | true |
datatype | char | * | null | true |
arraysize | char | * | null | false |
xtype | char | * | null | false |
"size" | int | 1 | null | false |
description | char | * | null | false |
utype | char | * | null | false |
unit | char | * | null | false |
ucd | char | * | null | false |
indexed | boolean | 1 | null | true |
principal | boolean | 1 | null | true |
std | boolean | 1 | null | true |
column_index | int | 1 | null | false |
datatype
,
arraysize
and
xtype
to descibe the type of a database column.
TAP_SCHEMA.columns.datatype
TAP_SCHEMA.columns.datatype
to use the data types defined in the VOTable specification.
Datatype | Meaning | FITS | Bytes |
boolean |
Logical | L | 1 |
bit |
Bit | X | * |
unsignedByte |
Byte (0 to 255) | B | 1 |
short |
Short Integer | I | 2 |
int |
Integer | J | 4 |
long |
Long integer | K | 8 |
char |
ASCII Character | A | 1 |
unicodeChar |
Unicode Character | 2 | |
float |
Floating point | E | 4 |
double |
Double | D | 8 |
floatComplex |
Float Complex | C | 8 |
doubleComplex |
Double Complex | M | 16 |
/tables
resource defined in
Section 2.5 (/tables)
of the TAP specification
is based on the VOSI /tables
resource,
which in turn, uses the Table and TableSet
data type elements from the VODataService specification.
The VOTableType defines a similar set of data types to VOTable,
albeit defined in a separate list in a separate specification:
boolean
bit
unsignedByte
short
int
long
char
unicodeChar
float
double
floatComplex
doubleComplex
BOOLEAN
SMALLINT
INTEGER
BIGINT
REAL
DOUBLE
TIMESTAMP
CHAR
VARCHAR
BINARY
VARBINARY
POINT
REGION
CLOB
BLOB
/tables
response,
but the same data type would not be valid in the corresponding
TAP_SCHEMA datatype
.
<column> <name>cfhtlsID </name> <dataType xsi:type="vs:TapType" size="30">VARCHAR</dataType> </column>TBD - link to the actual data in live TAP services.
arraysize
column as "the length of variable length datatypes".
arraysize
syntax.
<xs:simpleType name="arrayDEF"> <xs:restriction base="xs:token"> <xs:pattern value="([0-9]+x)*[0-9]*[*]?(s\W)?"/> </xs:restriction> </xs:simpleType>However, the arrayDEF restriction is not actually used in the definition of the VOTable Field
arraysize
attribute.
<xs:complexType name="Field"> .... <xs:attribute name="arraysize" type="xs:string"/> .... </xs:complexType>The VODataService ArrayShape syntax restriction, used in both the VOTableType and the TAPType elements defined in the VODataService XML schema does not include support for the the FTS Substring Array convention:
<xs:simpleType name="ArrayShape"> <xs:restriction base="xs:token"> <xs:pattern value="([0-9]+x)*[0-9]*[*]?"/> </xs:restriction> </xs:simpleType> <xs:complexType name="VOTableType"> <xs:simpleContent> <xs:restriction base="vs:TableDataType"> .... <xs:attribute name="arraysize" type="vs:ArrayShape" default="1"/> .... </xs:restriction> </xs:simpleContent> </xs:complexType> <xs:complexType name="TAPType"> .... <xs:simpleContent> <xs:restriction base="vs:TAPDataType"> .... <xs:attribute name="arraysize" type="vs:ArrayShape" default="1"/> .... </xs:restriction> </xs:simpleContent> </xs:complexType>This means that whether you use the 'no restriction' definition of the VOTable
arraysize
attribute,
or the VOTable arrayDEF restriction,
it is possible to construct a string that would be valid in
TAP_SCHEMA arraysize
but would not be valid in the
VODataService ArrayShape
restriction used in the corresponding
TAP /tables
VOSI response.
xtype
column
is related to the
VOTable xtype
attribute
used in
VOTable results,
or the
VODataService extendedType
attribute
that is used in the
TAP /tables
VOSI response.
size
column is kept for backwards compatibility and will be removed in the next major
version of the TAP specification.
<--