Skip to content
tap_schema-1.xml 10.3 KiB
Newer Older
<?xml version="1.0" encoding="UTF-8"?>
<!--
_____________________________________________________________________________

INAF - OATS National Institute for Astrophysics - Astronomical Observatory of
Trieste INAF - IA2 Italian Center for Astronomical Archives
_____________________________________________________________________________

Copyright (C) 2016 Istituto Nazionale di Astrofisica

This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License Version 3 as published by the
Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.

You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 51
Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-->
<tap_schema version="1.0" description="a special schema to describe a TAP tableset">
    <table name="schemas" description="description of schemas in this tableset">
        <add>
            <property>
                <name>schema_name</name>
                <type>java.lang.String</type>
                <size>64</size>
                <updatable>false</updatable>
                <nullable>false</nullable>
                <key>schema_name</key>
                <description>schema name for reference to TAP_SCHEMA.schemas</description>
            </property>
            <property>
                <name>utype</name>
                <type>java.lang.String</type>
                <size>255</size>
                <updatable>true</updatable>
                <description>lists the utypes of schemas in the tableset</description>
            </property>
            <property>
                <name>description</name>
                <type>java.lang.String</type>
                <size>255</size>
                <updatable>true</updatable>
                <description>describes schemas in the tableset</description>
            </property>
        </add>
    </table>
    <table name="tables" description="description of tables in this tableset">
        <add>
            <property>
                <name>schema_name</name>
                <type>java.lang.String</type>
                <size>64</size>
                <updatable>false</updatable>
                <nullable>false</nullable>
                <key>schema_name</key>
                <description>the schema this table belongs to</description>
            </property>
            <property>
                <name>table_name</name>
                <type>java.lang.String</type>
                <size>128</size>
                <updatable>false</updatable>
                <nullable>false</nullable>
                <key>table_name</key>
                <description>the fully qualified table name</description>
            </property>
            <property>
                <name>table_type</name>
                <size>8</size>
                <type>java.lang.String</type>
                <updatable>false</updatable>
                <key>table_type</key>
                <description>one of: table view</description>
            </property>
            <property>
                <name>utype</name>
                <type>java.lang.String</type>
                <size>255</size>
                <updatable>true</updatable>
                <description>lists the utype of tables in the tableset</description>
            </property>
            <property>
                <name>description</name>
                <type>java.lang.String</type>
                <size>255</size>
                <updatable>true</updatable>
                <description>describes tables in the tableset</description>             
            </property>
        </add>
    </table>
    <table name="columns" description="description of columns in this tableset">
        <add>
            <property>
                <name>table_name</name>
                <required>true</required>
                <type>java.lang.String</type>
                <size>128</size>
                <updatable>false</updatable>
                <nullable>false</nullable>
                <key>table_name</key>
                <description>the table this column belongs to</description>
            </property>
            <property>
                <name>column_name</name>
                <required>true</required>
                <type>java.lang.String</type>
                <size>64</size>
                <updatable>false</updatable>
                <nullable>false</nullable>
                <key>column_name</key>
                <description>the column name</description>
            </property>
            <property>
                <name>datatype</name>
                <type>java.lang.String</type>
                <size>64</size>
                <updatable>false</updatable>
                <key>datatype</key>
                <description>lists the ADQL datatype of columns in the tableset</description>
            </property>
            <property>
                <name>size</name>
                <type>java.lang.Integer</type>
                <updatable>false</updatable>
                <key>size</key>
                <description>lists the size of variable-length columns in the tableset</description>
            </property>
            <property>
                <name>description</name>
                <type>java.lang.String</type>
                <size>255</size>
                <updatable>true</updatable> 
                <description>describes the columns in the tableset</description>  
            </property>
            <property>
                <name>utype</name>
                <type>java.lang.String</type>
                <size>255</size>
                <updatable>true</updatable>
                <description>lists the utypes of columns in the tableset</description>
            </property>
            <property>
                <name>unit</name>
                <type>java.lang.String</type>
                <size>64</size>
                <updatable>true</updatable>
                <description>lists the unit used for column values in the tableset</description>
            </property>
            <property>
                <name>ucd</name>
                <type>java.lang.String</type>
                <size>64</size>
                <updatable>true</updatable>
                <description>lists the UCDs of columns in the tableset</description>
            </property>
            <property>
                <name>indexed</name>
                <type>java.lang.Integer</type>
                <updatable>false</updatable>
                <nullable>false</nullable>
                <description>an indexed column; 1 means true, 0 means false</description>
            </property>
            <property>
                <name>principal</name>
                <type>java.lang.Integer</type>
                <updatable>true</updatable>
                <nullable>false</nullable>
                <default-value>0</default-value>
                <description>a principal column; 1 means true, 0 means false</description>   
            </property>
            <property>
                <name>std</name>
                <type>java.lang.Integer</type>
                <updatable>true</updatable>
                <nullable>false</nullable>
                <default-value>0</default-value>
                <description>a standard column; 1 means true, 0 means false</description>  
            </property>
        </add>
    </table>
    <table name="keys" description="description of foreign keys in this tableset">
        <add>
            <property>
                <name>key_id</name>
                <type>java.lang.String</type>
                <size>64</size>
                <updatable>true</updatable>
                <description>unique key to join to TAP_SCHEMA.key_columns</description>
            </property>
            <property>
                <name>from_table</name>
                <type>java.lang.String</type>
                <size>128</size>
                <updatable>false</updatable>
                <key>from_table</key>
                <description>the table with the foreign key</description>
            </property>
            <property>
                <name>target_table</name>
                <type>java.lang.String</type>
                <size>128</size>
                <updatable>false</updatable>
                <key>target_table</key>
                <description>the table with the primary key</description>
            </property>
            <property>
                <name>description</name>
                <type>java.lang.String</type>
                <size>255</size>
                <updatable>true</updatable>
                <description>describes keys in the tableset</description>
            </property>
            <property>
                <name>utype</name>
                <type>java.lang.String</type>
                <size>255</size>
                <updatable>true</updatable>
                <description>lists the utype of keys in the tableset</description>
            </property>
        </add>
    </table>
    <table name="key_columns" description="description of foreign key columns in this tableset">
        <add>
            <property>
                <name>key_id</name>
                <type>java.lang.String</type>
                <size>64</size>
                <updatable>true</updatable>
                <description>key to join to TAP_SCHEMA.keys</description>
            </property>
            <property>
                <name>from_column</name>
                <type>java.lang.String</type>
                <size>64</size>
                <updatable>false</updatable>
                <key>from_column</key>
                <description>column in the from_table</description>
            </property>
            <property>
                <name>target_column</name>
                <type>java.lang.String</type>
                <size>64</size>
                <updatable>false</updatable>
                <key>target_column</key>
                <description>column in the target_table</description>
            </property>
        </add>
    </table>
</tap_schema>