sqlBuf.append(" FROM ").append(translator.getTableName(tableDef,supportsSchema));
if(hasColumnIndex)
sqlBuf.append(" ORDER BY 1,12,2");
@@ -1254,6 +1354,21 @@ public class JDBCConnection implements DBConnection {
newColumn.setDBName(dbName);
newColumn.setIndex(colIndex);
// set the coordinate system if any is specified:
if(hasCoosys){
intindCoosys=12;
if(hasColumnIndex)
indCoosys++;
if(hasDBName)
indCoosys++;
StringcoosysId=rs.getString(indCoosys);
if(coosysId!=null){
newColumn.setCoosys(mapCoosys.get(coosysId));
if(logger!=null&&newColumn.getCoosys()==null)
logger.logDB(LogLevel.WARNING,this,"LOAD_TAP_SCHEMA","No coordinate system for the column \""+columnName+"\"! Cause: unknown coordinate system: \""+coosysId+"\".",null);
}
}
// add the new column inside its corresponding table:
* Let iterating over the list of all tables contained in a given {@link TAPMetadata} object.
*
@@ -870,6 +930,14 @@ public class TAPMetadata implements Iterable<TAPSchema>, VOSIResource, TAPResour
tables.addColumn("utype",newDBType(DBDatatype.VARCHAR),"UTYPE if table corresponds to a data model",null,null,null,false,false,true);
returntables;
caseCOOSYS:
TAPTablecoosys=newTAPTable(STDSchema.TAPSCHEMA+"."+STDTable.COOSYS,TableType.table,"List of coordinate systems published used this TAP service.",null);
coosys.addColumn("id",newDBType(DBDatatype.VARCHAR),"ID of the coordinate system definition.",null,null,null,true,true,false);
coosys.addColumn("equinox",newDBType(DBDatatype.VARCHAR),"Required to fix the equatorial or ecliptic systems (as e.g. \"J2000\" as the default \"eq_FK5\" or \"B1950\" as the default \"eq_FK4\").",null,null,null,false,false,false);
coosys.addColumn("epoch",newDBType(DBDatatype.VARCHAR),"Epoch of the positions (if necessary).",null,null,null,false,false,false);
returncoosys;
caseCOLUMNS:
TAPTablecolumns=newTAPTable(STDSchema.TAPSCHEMA+"."+STDTable.COLUMNS,TableType.table,"List of columns of all tables listed in TAP_SCHEMA.TABLES and published in this TAP service.",null);
columns.addColumn("column_index",newDBType(DBDatatype.INTEGER),"this index is used to recommend column ordering for clients",null,null,null,false,false,true);
@@ -885,6 +953,7 @@ public class TAPMetadata implements Iterable<TAPSchema>, VOSIResource, TAPResour
columns.addColumn("indexed",newDBType(DBDatatype.INTEGER),"an indexed column; 1 means true, 0 means false",null,null,null,false,false,true);
columns.addColumn("principal",newDBType(DBDatatype.INTEGER),"a principal column; 1 means true, 0 means false",null,null,null,false,false,true);
columns.addColumn("std",newDBType(DBDatatype.INTEGER),"a standard column; 1 means true, 0 means false",null,null,null,false,false,true);
columns.addColumn("coosys_id",newDBType(DBDatatype.VARCHAR),"ID of the used coordinate systems (if any).",null,null,null,false,false,false);
returncolumns;
caseKEYS:
@@ -961,11 +1030,18 @@ public class TAPMetadata implements Iterable<TAPSchema>, VOSIResource, TAPResour