public class RegTapRegistryQuery extends Object implements RegistryQuery
Modifier and Type | Field and Description |
---|---|
static ValueInfo |
ADQL_INFO
Description of metadata item describing query text.
|
static String |
AIP_REG
TAP base URL for GAVO registry hosted at AIP.
|
static String |
ARI_REG
TAP base URL for GAVO registry hosted at ARI Heidelberg.
|
static String |
EUROVO_REG
TAP base URL for Euro-VO registry, currently hosted at ESAC.
|
static String |
GAVO_REG
TAP base URL for high-availablity GAVO registry (DNS pointer).
|
static String |
INAF_REG
TAP base URL for INAF registry (not sure if this is permanent).
|
static String |
PARIS_REG
TAP base URL for registry hosted at ObsPM, synced with GAVO.
|
static String[] |
REGISTRIES
List of known registry TAP base URLs.
|
static ValueInfo |
REGISTRY_INFO
Description of metadata item describing registry location.
|
static String |
STSCI_REG
TAP base URL for STScI/VAO registry.
|
Constructor and Description |
---|
RegTapRegistryQuery(TapService tapService,
Ivoid[] standardIds,
String adqlWhere)
Constructs a query which will return RegResource lists for
registry resource records with two optional restrictions:
(a) restricted to a given service type, and
(b) restricted by some free-form ADQL.
|
Modifier and Type | Method and Description |
---|---|
static String |
getAdqlCondition(ResourceField field,
String keyword,
boolean hasSubjectsTable)
Returns text that can be used as part of a WHERE clause to supply
to this class that tests for a keyword in a given RR field.
|
DescribedValue[] |
getMetadata()
Returns a set of DescribedValue objects which characterise this query.
|
Iterator<RegResource> |
getQueryIterator()
Executes the query described by this object and returns an
Iterator over
RegResource objects. |
RegResource[] |
getQueryResources()
Executes the query described by this object and returns the result as
an array of
RegResource s. |
URL |
getRegistry()
Returns the registry URL.
|
static String[] |
getSearchableRegistries(TapService regtapService)
Queries a given registry for searchable registries suitable for
use with this class.
|
String |
getText()
Returns the query text.
|
public static final String GAVO_REG
public static final String ARI_REG
public static final String AIP_REG
public static final String PARIS_REG
public static final String EUROVO_REG
public static final String STSCI_REG
public static final String INAF_REG
public static final String[] REGISTRIES
public static final ValueInfo REGISTRY_INFO
public static final ValueInfo ADQL_INFO
public RegTapRegistryQuery(TapService tapService, Ivoid[] standardIds, String adqlWhere)
adqlWhere
text has to be written
with some knowledge of the internals of this class, for instance
what columns are available.tapService
- TAP service hosting relational registrystandardIds
- possible case-insensitive values for RR
standard_id
field,
or null if not restricted by serviceadqlWhere
- text to be ANDed with existing ADQL WHERE clause,
or null for no further restrictionpublic DescribedValue[] getMetadata()
RegistryQuery
StarTable
resulting from the execution
of this query.getMetadata
in interface RegistryQuery
public URL getRegistry()
RegistryQuery
getRegistry
in interface RegistryQuery
public String getText()
RegistryQuery
getText
in interface RegistryQuery
public RegResource[] getQueryResources() throws IOException
RegistryQuery
RegResource
s.getQueryResources
in interface RegistryQuery
IOException
public Iterator<RegResource> getQueryIterator() throws IOException
RegistryQuery
RegResource
objects.
Note that the iterator's next
method may throw the
unchecked exception
RegistryQueryException
with a cause
indicating the underlying error in case of a registry access problem.getQueryIterator
in interface RegistryQuery
RegResource
sIOException
public static String getAdqlCondition(ResourceField field, String keyword, boolean hasSubjectsTable)
Note that this code currently works by identifying known ResourceFields, so unknown ResourceFields will return null.
field
- field whose content is to be testedkeyword
- value to test againsthasSubjectsTable
- true iff the rr.res_subject table is
available for the query
(hack; if not it assumes the res_subjects
field is available)public static String[] getSearchableRegistries(TapService regtapService) throws IOException
regtapService
- TAP service description of
bootstrap relational registryIOException
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.