|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.vo.TapSchemaInterrogator
public class TapSchemaInterrogator
Interrogates the TAP_SCHEMA tables from a TAP service to acquire table metadata information. In the current implementation, synchronous queries are used.
Constructor Summary | |
---|---|
TapSchemaInterrogator(URL serviceUrl)
Constructs an interrogator with a default maxrec limit. |
|
TapSchemaInterrogator(URL serviceUrl,
int maxrec)
Constructs an interrogator with a given maxrec limit. |
Method Summary | |
---|---|
protected TapQuery |
createTapQuery(String adql)
Constructs a TAP query for a given ADQL string. |
protected StarTable |
executeQuery(TapQuery tq)
Performs an ADQL TAP query to this interrogator's service. |
static void |
main(String[] args)
|
SchemaMeta[] |
queryMetadata()
Returns an array of SchemaMeta objects describing the tables available from the service. |
Map<String,List<ColumnMeta>> |
readColumns()
Queries the TAP_SCHEMA.columns table to get a list of all columns. |
Map<String,List<ForeignMeta>> |
readForeignKeys(Map<String,List<ForeignMeta.Link>> lMap)
Queries the TAP_SCHEMA.keys table to get a list of all foreign keys. |
Map<String,List<ForeignMeta.Link>> |
readForeignLinks()
Queries the TAP_SCHEMA.key_columns table to get a list of all foreign key links. |
List<SchemaMeta> |
readSchemas(Map<String,List<TableMeta>> tMap,
boolean addOrphans)
Queries the TAP_SCHEMA.schemas table to get a list of all schemas. |
Map<String,List<TableMeta>> |
readTables(Map<String,List<ColumnMeta>> cMap,
Map<String,List<ForeignMeta>> fMap)
Queries the TAP_SCHEMA.tables table to get a list of all tables. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TapSchemaInterrogator(URL serviceUrl)
serviceUrl
- TAP base service URLpublic TapSchemaInterrogator(URL serviceUrl, int maxrec)
serviceUrl
- TAP base service URLmaxrec
- maximum number of records to retrieve per queryMethod Detail |
---|
public SchemaMeta[] queryMetadata() throws IOException
IOException
public Map<String,List<ForeignMeta.Link>> readForeignLinks() throws IOException
IOException
public Map<String,List<ForeignMeta>> readForeignKeys(Map<String,List<ForeignMeta.Link>> lMap) throws IOException
lMap
- map of known links keyed by key_id,
as returned by readForeignLinks()
;
entries are removed as used
IOException
public Map<String,List<ColumnMeta>> readColumns() throws IOException
IOException
public Map<String,List<TableMeta>> readTables(Map<String,List<ColumnMeta>> cMap, Map<String,List<ForeignMeta>> fMap) throws IOException
cMap
- map of known columns keyed by table name,
as returned by readColumns()
;
entries are removed as usedfMap
- map of known foreign keys keyed by table name,
as returned by readForeignKeys
;
entries are removed as used
IOException
public List<SchemaMeta> readSchemas(Map<String,List<TableMeta>> tMap, boolean addOrphans) throws IOException
tMap
- map of known tables keyed by schema name,
as returned by readTables(java.util.Map>, java.util.Map>)
;
entries are removed as usedaddOrphans
- if true, schema entries are faked for any schemas
referenced in the table map which are not read
from the database table; if false, those tables
will be retained in the table map on exit
IOException
protected TapQuery createTapQuery(String adql)
adql
- query text
protected StarTable executeQuery(TapQuery tq) throws IOException
tq
- tap query
IOException
public static void main(String[] args) throws IOException
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |