Package uk.ac.starlink.vo
Class Ri1RegistryQuery
- java.lang.Object
-
- uk.ac.starlink.vo.Ri1RegistryQuery
-
- All Implemented Interfaces:
RegistryQuery
public class Ri1RegistryQuery extends java.lang.Object implements RegistryQuery
RegistryQuery implementation using the SOAP Registry Interface 1.0 mechanism.- Since:
- 4 Jan 2005
- Author:
- Mark Taylor (Starlink)
- See Also:
- Registry Interface 1.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
AG_REG
Endpoint for primary AstroGrid registry.static java.lang.String
AG_REG2
Endpoint for secondary AstroGrid registry.static java.lang.String
EUROVO_REG
Endpoint for Euro-VO registry.static int
RECORD_BUFFER_SIZE
Default maximum number of registry entries retrieved at once.static java.lang.String[]
REGISTRIES
List of likely registries.static uk.ac.starlink.table.ValueInfo
REGISTRY_INFO
Description of metadata item describing registry location.static uk.ac.starlink.table.ValueInfo
TEXT_INFO
Description of metadata item describing query text.static java.lang.String
VAO_REG
Endpoint for VAO registry.
-
Constructor Summary
Constructors Constructor Description Ri1RegistryQuery(java.lang.String endpoint, java.lang.String text)
Constructs a new query object from a registry URL and a query.Ri1RegistryQuery(uk.ac.starlink.registry.SoapClient soapClient, java.lang.String text)
Constructs a new query object from a SOAP client and a query.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getAdqlWhere(Capability cap)
Returns an ADQL 1.0 WHERE clause which can be used to search for capabilities of the given type in the registry.uk.ac.starlink.table.DescribedValue[]
getMetadata()
Returns a set of DescribedValue objects which characterise this query.java.util.Iterator<RegResource>
getQueryIterator()
Executes the query described by this object and returns an Iterator overRegResource
objects.RegResource[]
getQueryResources()
Executes the query described by this object and returns the result as an array ofRegResource
s.java.net.URL
getRegistry()
Returns the registry URL.static java.lang.String[]
getSearchableRegistries(java.lang.String regUrl)
Searches the given registry access URL to find a list of full searchable registry access URLs.java.lang.String
getText()
Returns the query text.java.lang.String
toString()
-
-
-
Field Detail
-
RECORD_BUFFER_SIZE
public static int RECORD_BUFFER_SIZE
Default maximum number of registry entries retrieved at once. Increasing this number may improve performance, but beware: registry records can be large, and setting it high (even 100) can easily exhaust default heap memory with a single buffers-worth. This may be a consequence of poor memory usage in the registry classes or SOAP, or it may be fundamental - not sure.
-
REGISTRY_INFO
public static final uk.ac.starlink.table.ValueInfo REGISTRY_INFO
Description of metadata item describing registry location.
-
TEXT_INFO
public static final uk.ac.starlink.table.ValueInfo TEXT_INFO
Description of metadata item describing query text.
-
AG_REG
public static final java.lang.String AG_REG
Endpoint for primary AstroGrid registry.
-
AG_REG2
public static final java.lang.String AG_REG2
Endpoint for secondary AstroGrid registry.
-
VAO_REG
public static final java.lang.String VAO_REG
Endpoint for VAO registry.
-
EUROVO_REG
public static final java.lang.String EUROVO_REG
Endpoint for Euro-VO registry.
-
REGISTRIES
public static final java.lang.String[] REGISTRIES
List of likely registries.
-
-
Constructor Detail
-
Ri1RegistryQuery
public Ri1RegistryQuery(uk.ac.starlink.registry.SoapClient soapClient, java.lang.String text)
Constructs a new query object from a SOAP client and a query.- Parameters:
soapClient
- SOAP clienttext
- ADQL WHERE clause for the registry query
-
Ri1RegistryQuery
public Ri1RegistryQuery(java.lang.String endpoint, java.lang.String text)
Constructs a new query object from a registry URL and a query.- Parameters:
endpoint
- registry endpoint URLtext
- ADQL WHERE clause for the registry query
-
-
Method Detail
-
getQueryIterator
public java.util.Iterator<RegResource> getQueryIterator() throws java.io.IOException
Description copied from interface:RegistryQuery
Executes the query described by this object and returns an Iterator overRegResource
objects. Note that the iterator'snext
method may throw the unchecked exceptionRegistryQueryException
with a cause indicating the underlying error in case of a registry access problem.- Specified by:
getQueryIterator
in interfaceRegistryQuery
- Returns:
- iterator over
RegResource
s - Throws:
java.io.IOException
-
getQueryResources
public RegResource[] getQueryResources() throws java.io.IOException
Description copied from interface:RegistryQuery
Executes the query described by this object and returns the result as an array ofRegResource
s.- Specified by:
getQueryResources
in interfaceRegistryQuery
- Returns:
- resource list
- Throws:
java.io.IOException
-
getText
public java.lang.String getText()
Description copied from interface:RegistryQuery
Returns the query text.- Specified by:
getText
in interfaceRegistryQuery
- Returns:
- query
-
getRegistry
public java.net.URL getRegistry()
Description copied from interface:RegistryQuery
Returns the registry URL.- Specified by:
getRegistry
in interfaceRegistryQuery
- Returns:
- url
-
getMetadata
public uk.ac.starlink.table.DescribedValue[] getMetadata()
Description copied from interface:RegistryQuery
Returns a set of DescribedValue objects which characterise this query. These would be suitable for use in the parameter list of aStarTable
resulting from the execution of this query.- Specified by:
getMetadata
in interfaceRegistryQuery
-
getSearchableRegistries
public static java.lang.String[] getSearchableRegistries(java.lang.String regUrl) throws java.io.IOException
Searches the given registry access URL to find a list of full searchable registry access URLs.- Parameters:
regUrl
- registry to start with- Returns:
- array of registries which can be searched
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getAdqlWhere
public static java.lang.String getAdqlWhere(Capability cap)
Returns an ADQL 1.0 WHERE clause which can be used to search for capabilities of the given type in the registry. The WHERE token is not included- Parameters:
cap
- standard capability- Returns:
- ADQL search query
-
-