Skip to content
Snippets Groups Projects
Commit 8f95d727 authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Improvements on XML models inheritance

parent fca053a6
No related branches found
No related tags found
No related merge requests found
Showing
with 235 additions and 313 deletions
...@@ -71,7 +71,7 @@ public class Column extends ChildEntity<Table> { ...@@ -71,7 +71,7 @@ public class Column extends ChildEntity<Table> {
String type = null; String type = null;
if (tapSchema.getName().equals(parentSchema.getName())) { if (tapSchema.getName().equals(parentSchema.getName())) {
TableModel tableModel = tapSchema.getTapSchemaModel().get(parentTable.getName()); TableModel tableModel = tapSchema.getTapSchemaModel().getTable(parentTable.getName());
type = tableModel.get(getName()).getType(); type = tableModel.get(getName()).getType();
} }
......
...@@ -59,11 +59,11 @@ public class Table extends ChildEntity<Schema> implements EntitiesContainer<Colu ...@@ -59,11 +59,11 @@ public class Table extends ChildEntity<Schema> implements EntitiesContainer<Colu
private TableModel getModel() { private TableModel getModel() {
if (tapSchema.getName().equals(parentSchema.getName())) { if (tapSchema.getName().equals(parentSchema.getName())) {
return tapSchema.getTapSchemaModel().get(simpleName); return tapSchema.getTapSchemaModel().getTable(simpleName);
} }
if (tapSchema.isHasObscore() && parentSchema.getName().equals("ivoa") if (tapSchema.isHasObscore() && parentSchema.getName().equals("ivoa")
&& simpleName.equals("obscore")) { && simpleName.equals("obscore")) {
return tapSchema.getIvoaSchemaModel().get(simpleName); return tapSchema.getIvoaSchemaModel().getTable(simpleName);
} }
return null; return null;
} }
......
...@@ -660,7 +660,7 @@ public class TapSchema implements EntitiesContainer<Schema>, Serializable { ...@@ -660,7 +660,7 @@ public class TapSchema implements EntitiesContainer<Schema>, Serializable {
} }
public final TableModel getTableModel(String tableName) { public final TableModel getTableModel(String tableName) {
return getTapSchemaModel().getTables().get(tableName); return getTapSchemaModel().getTable(tableName);
} }
public Map<String, Object> getSchemaMetadata(String schemaName) { public Map<String, Object> getSchemaMetadata(String schemaName) {
...@@ -697,11 +697,11 @@ public class TapSchema implements EntitiesContainer<Schema>, Serializable { ...@@ -697,11 +697,11 @@ public class TapSchema implements EntitiesContainer<Schema>, Serializable {
private void fillColumnProperties(SchemaModel schemaModel, String schemaName) { private void fillColumnProperties(SchemaModel schemaModel, String schemaName) {
// check only on std, but valid also for principal (it depends on TS version) // check only on std, but valid also for principal (it depends on TS version)
boolean useIntegerAsBool = getTapSchemaModel().get(COLUMNS_TABLE).get(Column.STD_KEY).getJavaType() == Integer.class; boolean useIntegerAsBool = getTapSchemaModel().getTable(COLUMNS_TABLE).get(Column.STD_KEY).getJavaType() == Integer.class;
Schema schema = getChild(schemaName); Schema schema = getChild(schemaName);
schema.setValue(DESCRIPTION_KEY, schemaModel.getDescription()); schema.setValue(DESCRIPTION_KEY, schemaModel.getDescription());
for (TableModel tableModel : schemaModel.getTables().values()) { for (TableModel tableModel : schemaModel.getTables()) {
Table table = schema.getChild(tableModel.getName()); Table table = schema.getChild(tableModel.getName());
table.setValue(DESCRIPTION_KEY, tableModel.getDescription()); table.setValue(DESCRIPTION_KEY, tableModel.getDescription());
for (ColumnModel propertyModel : tableModel.getColumns()) { for (ColumnModel propertyModel : tableModel.getColumns()) {
......
...@@ -142,7 +142,7 @@ public abstract class DBBrokerTemplate implements DBBroker { ...@@ -142,7 +142,7 @@ public abstract class DBBrokerTemplate implements DBBroker {
execute(getCreateDatabaseQuery(tapSchemaName), conn); execute(getCreateDatabaseQuery(tapSchemaName), conn);
for (TableModel tableModel : tapSchemaModel.getTables().values()) { for (TableModel tableModel : tapSchemaModel.getTables()) {
createTable(tapSchemaName, tableModel, conn); createTable(tapSchemaName, tableModel, conn);
} }
...@@ -174,7 +174,7 @@ public abstract class DBBrokerTemplate implements DBBroker { ...@@ -174,7 +174,7 @@ public abstract class DBBrokerTemplate implements DBBroker {
public void createIvoaSchemaStructure(SchemaModel ivoaSchemaModel) throws SQLException { public void createIvoaSchemaStructure(SchemaModel ivoaSchemaModel) throws SQLException {
try (Connection conn = dataSource.getConnection()) { try (Connection conn = dataSource.getConnection()) {
execute(getCreateDatabaseQuery(ivoaSchemaModel.getName()), conn); execute(getCreateDatabaseQuery(ivoaSchemaModel.getName()), conn);
for (TableModel tableModel : ivoaSchemaModel.getTables().values()) { for (TableModel tableModel : ivoaSchemaModel.getTables()) {
createTable(ivoaSchemaModel.getName(), tableModel, conn); createTable(ivoaSchemaModel.getName(), tableModel, conn);
} }
} }
...@@ -681,11 +681,11 @@ public abstract class DBBrokerTemplate implements DBBroker { ...@@ -681,11 +681,11 @@ public abstract class DBBrokerTemplate implements DBBroker {
} }
for (SchemaModel tapSchemaModel : SchemaModels.getTapSchemaModels()) { for (SchemaModel tapSchemaModel : SchemaModels.getTapSchemaModels()) {
if (match(tapSchemaModel.get(TapSchema.SCHEMAS_TABLE), schemasColumns) if (match(tapSchemaModel.getTable(TapSchema.SCHEMAS_TABLE), schemasColumns)
&& match(tapSchemaModel.get(TapSchema.TABLES_TABLE), tablesColumns) && match(tapSchemaModel.getTable(TapSchema.TABLES_TABLE), tablesColumns)
&& match(tapSchemaModel.get(TapSchema.COLUMNS_TABLE), columnsColumns) && match(tapSchemaModel.getTable(TapSchema.COLUMNS_TABLE), columnsColumns)
&& match(tapSchemaModel.get(TapSchema.KEYS_TABLE), keyColumns) && match(tapSchemaModel.getTable(TapSchema.KEYS_TABLE), keyColumns)
&& match(tapSchemaModel.get(TapSchema.KEY_COLUMNS_TABLE), keyColumnsColumns)) { && match(tapSchemaModel.getTable(TapSchema.KEY_COLUMNS_TABLE), keyColumnsColumns)) {
return tapSchemaModel.getVersion(); return tapSchemaModel.getVersion();
} }
} }
......
...@@ -156,6 +156,7 @@ public class MySQLDBBroker extends DBBrokerTemplate { ...@@ -156,6 +156,7 @@ public class MySQLDBBroker extends DBBrokerTemplate {
boolean first = true; boolean first = true;
for (ColumnModel cm : tableModel.getColumns()) { for (ColumnModel cm : tableModel.getColumns()) {
if (cm.isMandatory()) {
if (!first) { if (!first) {
querySb.append(",\n"); querySb.append(",\n");
} }
...@@ -176,6 +177,7 @@ public class MySQLDBBroker extends DBBrokerTemplate { ...@@ -176,6 +177,7 @@ public class MySQLDBBroker extends DBBrokerTemplate {
querySb.append(" NOT NULL"); querySb.append(" NOT NULL");
} }
} }
}
querySb.append(")"); querySb.append(")");
......
...@@ -70,6 +70,7 @@ public class PostgresDBBroker extends DBBrokerTemplate { ...@@ -70,6 +70,7 @@ public class PostgresDBBroker extends DBBrokerTemplate {
boolean first = true; boolean first = true;
for (ColumnModel cm : tableModel.getColumns()) { for (ColumnModel cm : tableModel.getColumns()) {
if (cm.isMandatory()) {
if (!first) { if (!first) {
querySb.append(",\n"); querySb.append(",\n");
} }
...@@ -90,6 +91,7 @@ public class PostgresDBBroker extends DBBrokerTemplate { ...@@ -90,6 +91,7 @@ public class PostgresDBBroker extends DBBrokerTemplate {
querySb.append(" NOT NULL"); querySb.append(" NOT NULL");
} }
} }
}
querySb.append(")"); querySb.append(")");
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
package it.inaf.ia2.tsm.model; package it.inaf.ia2.tsm.model;
import java.io.Serializable; import java.io.Serializable;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlTransient; import javax.xml.bind.annotation.XmlTransient;
...@@ -57,7 +58,7 @@ public class ColumnModel implements Serializable { ...@@ -57,7 +58,7 @@ public class ColumnModel implements Serializable {
mandatory = true; mandatory = true;
} }
@XmlElement(name = "name") @XmlAttribute(name = "name")
public String getName() { public String getName() {
return name; return name;
} }
......
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
package it.inaf.ia2.tsm.model; package it.inaf.ia2.tsm.model;
import java.io.Serializable; import java.io.Serializable;
import java.util.HashMap; import java.util.ArrayList;
import java.util.Map; import java.util.List;
import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElements; import javax.xml.bind.annotation.XmlElements;
...@@ -39,15 +39,16 @@ public class SchemaModel implements Serializable { ...@@ -39,15 +39,16 @@ public class SchemaModel implements Serializable {
private static final long serialVersionUID = 1087876778125446000L; private static final long serialVersionUID = 1087876778125446000L;
private final Map<String, TableModel> tables; private final List<TableModel> tables;
private String name; private String name;
private String version; private String version;
private String extendsFrom; private String extendsFrom;
private String description; private String description;
private String datatypeType;
public SchemaModel() { public SchemaModel() {
tables = new HashMap<>(); tables = new ArrayList<>();
} }
@XmlAttribute(name = "name") @XmlAttribute(name = "name")
...@@ -89,11 +90,25 @@ public class SchemaModel implements Serializable { ...@@ -89,11 +90,25 @@ public class SchemaModel implements Serializable {
@XmlElements({ @XmlElements({
@XmlElement(name = "table") @XmlElement(name = "table")
}) })
public Map<String, TableModel> getTables() { public List<TableModel> getTables() {
return tables; return tables;
} }
public TableModel get(String tableName) { public TableModel getTable(String tableName) {
return tables.get(tableName); for (TableModel table : tables) {
if (tableName.equals(table.getName())) {
return table;
}
}
return null;
}
@XmlAttribute(name = "datatype")
public String getDatatypeType() {
return datatypeType;
}
public void setDatatypeType(String datatypeType) {
this.datatypeType = datatypeType;
} }
} }
...@@ -89,7 +89,7 @@ public class SchemaModels { ...@@ -89,7 +89,7 @@ public class SchemaModels {
} }
public static TableModel getTapSchemaTableModel(String tableName, String version) { public static TableModel getTapSchemaTableModel(String tableName, String version) {
return getTapSchemaModel(version).getTables().get(tableName); return getTapSchemaModel(version).getTable(tableName);
} }
private static List<String> getAvailableVersions(Map<String, SchemaModel> schemaModels) { private static List<String> getAvailableVersions(Map<String, SchemaModel> schemaModels) {
......
...@@ -28,7 +28,6 @@ import java.util.List; ...@@ -28,7 +28,6 @@ import java.util.List;
import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElements; import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlTransient;
/** /**
* *
......
...@@ -99,8 +99,12 @@ public class XMLMerger { ...@@ -99,8 +99,12 @@ public class XMLMerger {
private Element checkElement(Element inheritedParent, Element child) { private Element checkElement(Element inheritedParent, Element child) {
Element inheritedElement = null;
String name = child.getAttribute("name"); String name = child.getAttribute("name");
Element inheritedElement = findElementByNameAttribute(inheritedParent, name); if (name != null && !name.isEmpty()) {
inheritedElement = findElementByNameAttribute(inheritedParent, name);
}
if (child.getNodeName().equals("remove")) { if (child.getNodeName().equals("remove")) {
if (inheritedElement != null) { if (inheritedElement != null) {
......
...@@ -23,46 +23,40 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ...@@ -23,46 +23,40 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
--> -->
<schema name="tap_schema" version="1.0-IA2" extends="1.0"> <schema name="tap_schema" version="1.0-IA2" extends="1.0">
<table name="schemas"> <table name="schemas">
<column> <column name="schemaID">
<name>schemaID</name>
<type>BIGINT</type> <type>BIGINT</type>
<updatable>true</updatable> <updatable>true</updatable>
<standard>false</standard> <standard>false</standard>
</column> </column>
</table> </table>
<table name="tables"> <table name="tables">
<column> <column name="tableID">
<name>tableID</name>
<type>BIGINT</type> <type>BIGINT</type>
<updatable>true</updatable> <updatable>true</updatable>
<standard>false</standard> <standard>false</standard>
</column> </column>
</table> </table>
<table name="columns"> <table name="columns">
<column> <column name="columnID">
<name>columnID</name>
<type>BIGINT</type> <type>BIGINT</type>
<updatable>true</updatable> <updatable>true</updatable>
<standard>false</standard> <standard>false</standard>
</column> </column>
<column> <column name="id">
<name>id</name>
<type>INTEGER</type> <type>INTEGER</type>
<updatable>true</updatable> <updatable>true</updatable>
<standard>false</standard> <standard>false</standard>
</column> </column>
</table> </table>
<table name="keys"> <table name="keys">
<column> <column name="keyID">
<name>keyID</name>
<type>BIGINT</type> <type>BIGINT</type>
<updatable>true</updatable> <updatable>true</updatable>
<standard>false</standard> <standard>false</standard>
</column> </column>
</table> </table>
<table name="key_columns"> <table name="key_columns">
<column> <column name="key_columnID">
<name>key_columnID</name>
<type>BIGINT</type> <type>BIGINT</type>
<updatable>true</updatable> <updatable>true</updatable>
<standard>false</standard> <standard>false</standard>
......
...@@ -21,10 +21,9 @@ You should have received a copy of the GNU General Public License along with ...@@ -21,10 +21,9 @@ 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 this program; if not, write to the Free Software Foundation, Inc., 51
Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
--> -->
<schema name="tap_schema" version="1.0" description="a special schema to describe a TAP tableset"> <schema name="tap_schema" version="1.0" description="a special schema to describe a TAP tableset" datatype="ADQL">
<table name="schemas" description="description of schemas in this tableset"> <table name="schemas" description="description of schemas in this tableset">
<column> <column name="schema_name">
<name>schema_name</name>
<type>VARCHAR</type> <type>VARCHAR</type>
<size>64</size> <size>64</size>
<updatable>false</updatable> <updatable>false</updatable>
...@@ -33,16 +32,14 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ...@@ -33,16 +32,14 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<description>schema name for reference to TAP_SCHEMA.schemas</description> <description>schema name for reference to TAP_SCHEMA.schemas</description>
<standard>true</standard> <standard>true</standard>
</column> </column>
<column> <column name="utype">
<name>utype</name>
<type>VARCHAR</type> <type>VARCHAR</type>
<size>255</size> <size>255</size>
<updatable>true</updatable> <updatable>true</updatable>
<description>lists the utypes of schemas in the tableset</description> <description>lists the utypes of schemas in the tableset</description>
<standard>true</standard> <standard>true</standard>
</column> </column>
<column> <column name="description">
<name>description</name>
<type>VARCHAR</type> <type>VARCHAR</type>
<size>255</size> <size>255</size>
<updatable>true</updatable> <updatable>true</updatable>
...@@ -51,8 +48,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ...@@ -51,8 +48,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</column> </column>
</table> </table>
<table name="tables" description="description of tables in this tableset"> <table name="tables" description="description of tables in this tableset">
<column> <column name="schema_name">
<name>schema_name</name>
<type>VARCHAR</type> <type>VARCHAR</type>
<size>64</size> <size>64</size>
<updatable>false</updatable> <updatable>false</updatable>
...@@ -61,8 +57,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ...@@ -61,8 +57,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<description>the schema this table belongs to</description> <description>the schema this table belongs to</description>
<standard>true</standard> <standard>true</standard>
</column> </column>
<column> <column name="table_name">
<name>table_name</name>
<type>VARCHAR</type> <type>VARCHAR</type>
<size>128</size> <size>128</size>
<updatable>false</updatable> <updatable>false</updatable>
...@@ -71,8 +66,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ...@@ -71,8 +66,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<description>the fully qualified table name</description> <description>the fully qualified table name</description>
<standard>true</standard> <standard>true</standard>
</column> </column>
<column> <column name="table_type">
<name>table_type</name>
<size>8</size> <size>8</size>
<type>VARCHAR</type> <type>VARCHAR</type>
<updatable>false</updatable> <updatable>false</updatable>
...@@ -80,16 +74,14 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ...@@ -80,16 +74,14 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<description>one of: table view</description> <description>one of: table view</description>
<standard>true</standard> <standard>true</standard>
</column> </column>
<column> <column name="utype">
<name>utype</name>
<type>VARCHAR</type> <type>VARCHAR</type>
<size>255</size> <size>255</size>
<updatable>true</updatable> <updatable>true</updatable>
<description>lists the utype of tables in the tableset</description> <description>lists the utype of tables in the tableset</description>
<standard>true</standard> <standard>true</standard>
</column> </column>
<column> <column name="description">
<name>description</name>
<type>VARCHAR</type> <type>VARCHAR</type>
<size>255</size> <size>255</size>
<updatable>true</updatable> <updatable>true</updatable>
...@@ -98,8 +90,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ...@@ -98,8 +90,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</column> </column>
</table> </table>
<table name="columns" description="description of columns in this tableset"> <table name="columns" description="description of columns in this tableset">
<column> <column name="table_name">
<name>table_name</name>
<required>true</required> <required>true</required>
<type>VARCHAR</type> <type>VARCHAR</type>
<size>128</size> <size>128</size>
...@@ -109,8 +100,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ...@@ -109,8 +100,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<description>the table this column belongs to</description> <description>the table this column belongs to</description>
<standard>true</standard> <standard>true</standard>
</column> </column>
<column> <column name="column_name">
<name>column_name</name>
<required>true</required> <required>true</required>
<type>VARCHAR</type> <type>VARCHAR</type>
<size>64</size> <size>64</size>
...@@ -120,8 +110,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ...@@ -120,8 +110,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<description>the column name</description> <description>the column name</description>
<standard>true</standard> <standard>true</standard>
</column> </column>
<column> <column name="datatype">
<name>datatype</name>
<type>VARCHAR</type> <type>VARCHAR</type>
<size>64</size> <size>64</size>
<updatable>true</updatable> <updatable>true</updatable>
...@@ -129,48 +118,42 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ...@@ -129,48 +118,42 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<description>lists the ADQL datatype of columns in the tableset</description> <description>lists the ADQL datatype of columns in the tableset</description>
<standard>true</standard> <standard>true</standard>
</column> </column>
<column> <column name="size">
<name>size</name>
<type>INTEGER</type> <type>INTEGER</type>
<updatable>false</updatable> <updatable>false</updatable>
<key>size</key> <key>size</key>
<description>lists the size of variable-length columns in the tableset</description> <description>lists the size of variable-length columns in the tableset</description>
<standard>true</standard> <standard>true</standard>
</column> </column>
<column> <column name="description">
<name>description</name>
<type>VARCHAR</type> <type>VARCHAR</type>
<size>255</size> <size>255</size>
<updatable>true</updatable> <updatable>true</updatable>
<description>describes the columns in the tableset</description> <description>describes the columns in the tableset</description>
<standard>true</standard> <standard>true</standard>
</column> </column>
<column> <column name="utype">
<name>utype</name>
<type>VARCHAR</type> <type>VARCHAR</type>
<size>255</size> <size>255</size>
<updatable>true</updatable> <updatable>true</updatable>
<description>lists the utypes of columns in the tableset</description> <description>lists the utypes of columns in the tableset</description>
<standard>true</standard> <standard>true</standard>
</column> </column>
<column> <column name="unit">
<name>unit</name>
<type>VARCHAR</type> <type>VARCHAR</type>
<size>64</size> <size>64</size>
<updatable>true</updatable> <updatable>true</updatable>
<description>lists the unit used for column values in the tableset</description> <description>lists the unit used for column values in the tableset</description>
<standard>true</standard> <standard>true</standard>
</column> </column>
<column> <column name="ucd">
<name>ucd</name>
<type>VARCHAR</type> <type>VARCHAR</type>
<size>64</size> <size>64</size>
<updatable>true</updatable> <updatable>true</updatable>
<description>lists the UCDs of columns in the tableset</description> <description>lists the UCDs of columns in the tableset</description>
<standard>true</standard> <standard>true</standard>
</column> </column>
<column> <column name="indexed">
<name>indexed</name>
<type>INTEGER</type> <type>INTEGER</type>
<updatable>false</updatable> <updatable>false</updatable>
<nullable>false</nullable> <nullable>false</nullable>
...@@ -179,8 +162,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ...@@ -179,8 +162,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<description>an indexed column; 1 means true, 0 means false</description> <description>an indexed column; 1 means true, 0 means false</description>
<standard>true</standard> <standard>true</standard>
</column> </column>
<column> <column name="principal">
<name>principal</name>
<type>INTEGER</type> <type>INTEGER</type>
<updatable>true</updatable> <updatable>true</updatable>
<nullable>false</nullable> <nullable>false</nullable>
...@@ -188,8 +170,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ...@@ -188,8 +170,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<description>a principal column; 1 means true, 0 means false</description> <description>a principal column; 1 means true, 0 means false</description>
<standard>true</standard> <standard>true</standard>
</column> </column>
<column> <column name="std">
<name>std</name>
<type>INTEGER</type> <type>INTEGER</type>
<updatable>true</updatable> <updatable>true</updatable>
<nullable>false</nullable> <nullable>false</nullable>
...@@ -199,16 +180,14 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ...@@ -199,16 +180,14 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</column> </column>
</table> </table>
<table name="keys" description="description of foreign keys in this tableset"> <table name="keys" description="description of foreign keys in this tableset">
<column> <column name="key_id">
<name>key_id</name>
<type>VARCHAR</type> <type>VARCHAR</type>
<size>64</size> <size>64</size>
<updatable>true</updatable> <updatable>true</updatable>
<description>unique key to join to TAP_SCHEMA.key_columns</description> <description>unique key to join to TAP_SCHEMA.key_columns</description>
<standard>true</standard> <standard>true</standard>
</column> </column>
<column> <column name="from_table">
<name>from_table</name>
<type>VARCHAR</type> <type>VARCHAR</type>
<size>128</size> <size>128</size>
<updatable>false</updatable> <updatable>false</updatable>
...@@ -216,8 +195,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ...@@ -216,8 +195,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<description>the table with the foreign key</description> <description>the table with the foreign key</description>
<standard>true</standard> <standard>true</standard>
</column> </column>
<column> <column name="target_table">
<name>target_table</name>
<type>VARCHAR</type> <type>VARCHAR</type>
<size>128</size> <size>128</size>
<updatable>false</updatable> <updatable>false</updatable>
...@@ -225,16 +203,14 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ...@@ -225,16 +203,14 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<description>the table with the primary key</description> <description>the table with the primary key</description>
<standard>true</standard> <standard>true</standard>
</column> </column>
<column> <column name="description">
<name>description</name>
<type>VARCHAR</type> <type>VARCHAR</type>
<size>255</size> <size>255</size>
<updatable>true</updatable> <updatable>true</updatable>
<description>describes keys in the tableset</description> <description>describes keys in the tableset</description>
<standard>true</standard> <standard>true</standard>
</column> </column>
<column> <column name="utype">
<name>utype</name>
<type>VARCHAR</type> <type>VARCHAR</type>
<size>255</size> <size>255</size>
<updatable>true</updatable> <updatable>true</updatable>
...@@ -243,16 +219,14 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ...@@ -243,16 +219,14 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</column> </column>
</table> </table>
<table name="key_columns" description="description of foreign key columns in this tableset"> <table name="key_columns" description="description of foreign key columns in this tableset">
<column> <column name="key_id">
<name>key_id</name>
<type>VARCHAR</type> <type>VARCHAR</type>
<size>64</size> <size>64</size>
<updatable>true</updatable> <updatable>true</updatable>
<description>key to join to TAP_SCHEMA.keys</description> <description>key to join to TAP_SCHEMA.keys</description>
<standard>true</standard> <standard>true</standard>
</column> </column>
<column> <column name="from_column">
<name>from_column</name>
<type>VARCHAR</type> <type>VARCHAR</type>
<size>64</size> <size>64</size>
<updatable>false</updatable> <updatable>false</updatable>
...@@ -260,8 +234,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ...@@ -260,8 +234,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<description>column in the from_table</description> <description>column in the from_table</description>
<standard>true</standard> <standard>true</standard>
</column> </column>
<column> <column name="target_column">
<name>target_column</name>
<type>VARCHAR</type> <type>VARCHAR</type>
<size>64</size> <size>64</size>
<updatable>false</updatable> <updatable>false</updatable>
......
...@@ -21,39 +21,34 @@ You should have received a copy of the GNU General Public License along with ...@@ -21,39 +21,34 @@ 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 this program; if not, write to the Free Software Foundation, Inc., 51
Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
--> -->
<schema name="tap_schema" version="1.1" extends="1.0"> <schema name="tap_schema" version="1.1" extends="1.0" datatype="VOTable">
<table name="tables"> <table name="tables">
<column> <column name="table_index">
<name>table_index</name>
<type>INTEGER</type> <type>INTEGER</type>
<updatable>true</updatable> <updatable>true</updatable>
<standard>true</standard> <standard>true</standard>
</column> </column>
</table> </table>
<table name="columns"> <table name="columns">
<column> <column name="arraysize">
<name>arraysize</name>
<type>VARCHAR</type> <type>VARCHAR</type>
<updatable>false</updatable> <updatable>false</updatable>
<key>arraysize</key> <key>arraysize</key>
<size>255</size> <size>255</size>
<standard>true</standard> <standard>true</standard>
</column> </column>
<column> <column name="xtype">
<name>xtype</name>
<type>VARCHAR</type> <type>VARCHAR</type>
<updatable>true</updatable> <updatable>true</updatable>
<size>255</size> <size>255</size>
<standard>true</standard> <standard>true</standard>
</column> </column>
<column> <column name="column_index">
<name>column_index</name>
<type>INTEGER</type> <type>INTEGER</type>
<updatable>true</updatable> <updatable>true</updatable>
<standard>true</standard> <standard>true</standard>
</column> </column>
<column> <column name="indexed">
<name>indexed</name>
<type>BOOLEAN</type> <type>BOOLEAN</type>
<updatable>false</updatable> <updatable>false</updatable>
<nullable>false</nullable> <nullable>false</nullable>
...@@ -62,8 +57,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ...@@ -62,8 +57,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<description>an indexed column</description> <description>an indexed column</description>
<standard>true</standard> <standard>true</standard>
</column> </column>
<column> <column name="principal">
<name>principal</name>
<type>BOOLEAN</type> <type>BOOLEAN</type>
<updatable>true</updatable> <updatable>true</updatable>
<nullable>false</nullable> <nullable>false</nullable>
...@@ -71,8 +65,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ...@@ -71,8 +65,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<description>a principal column</description> <description>a principal column</description>
<standard>true</standard> <standard>true</standard>
</column> </column>
<column> <column name="std">
<name>std</name>
<type>BOOLEAN</type> <type>BOOLEAN</type>
<updatable>true</updatable> <updatable>true</updatable>
<nullable>false</nullable> <nullable>false</nullable>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment