uk.ac.starlink.vo
Class Ri1RegistryQuery

java.lang.Object
  extended by uk.ac.starlink.vo.Ri1RegistryQuery
All Implemented Interfaces:
RegistryQuery

public class Ri1RegistryQuery
extends 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
static String AG_REG
          Endpoint for primary AstroGrid registry.
static String AG_REG2
          Endpoint for secondary AstroGrid registry.
static String EUROVO_REG
          Endpoint for Euro-VO registry.
static int RECORD_BUFFER_SIZE
          Default maximum number of registry entries retrieved at once.
static String[] REGISTRIES
          List of likely registries.
static ValueInfo REGISTRY_INFO
          Description of metadata item describing registry location.
static ValueInfo TEXT_INFO
          Description of metadata item describing query text.
static String VAO_REG
          Endpoint for VAO registry.
 
Constructor Summary
Ri1RegistryQuery(SoapClient soapClient, String text)
          Constructs a new query object from a SOAP client and a query.
Ri1RegistryQuery(String endpoint, String text)
          Constructs a new query object from a registry URL and a query.
 
Method Summary
static 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.
 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 RegResources.
 URL getRegistry()
          Returns the registry URL.
static String[] getSearchableRegistries(String regUrl)
          Searches the given registry access URL to find a list of full searchable registry access URLs.
 String getText()
          Returns the query text.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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 ValueInfo REGISTRY_INFO
Description of metadata item describing registry location.


TEXT_INFO

public static final ValueInfo TEXT_INFO
Description of metadata item describing query text.


AG_REG

public static final String AG_REG
Endpoint for primary AstroGrid registry.


AG_REG2

public static final String AG_REG2
Endpoint for secondary AstroGrid registry.


VAO_REG

public static final String VAO_REG
Endpoint for VAO registry.


EUROVO_REG

public static final String EUROVO_REG
Endpoint for Euro-VO registry.


REGISTRIES

public static final String[] REGISTRIES
List of likely registries.

Constructor Detail

Ri1RegistryQuery

public Ri1RegistryQuery(SoapClient soapClient,
                        String text)
Constructs a new query object from a SOAP client and a query.

Parameters:
soapClient - SOAP client
text - ADQL WHERE clause for the registry query

Ri1RegistryQuery

public Ri1RegistryQuery(String endpoint,
                        String text)
Constructs a new query object from a registry URL and a query.

Parameters:
endpoint - registry endpoint URL
text - ADQL WHERE clause for the registry query
Method Detail

getQueryIterator

public Iterator<RegResource> getQueryIterator()
                                       throws IOException
Description copied from interface: RegistryQuery
Executes the query described by this object and returns an Iterator over 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.

Specified by:
getQueryIterator in interface RegistryQuery
Returns:
iterator over RegResources
Throws:
IOException

getQueryResources

public RegResource[] getQueryResources()
                                throws IOException
Description copied from interface: RegistryQuery
Executes the query described by this object and returns the result as an array of RegResources.

Specified by:
getQueryResources in interface RegistryQuery
Returns:
resource list
Throws:
IOException

getText

public String getText()
Description copied from interface: RegistryQuery
Returns the query text.

Specified by:
getText in interface RegistryQuery
Returns:
query

getRegistry

public URL getRegistry()
Description copied from interface: RegistryQuery
Returns the registry URL.

Specified by:
getRegistry in interface RegistryQuery
Returns:
url

getMetadata

public 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 a StarTable resulting from the execution of this query.

Specified by:
getMetadata in interface RegistryQuery

getSearchableRegistries

public static String[] getSearchableRegistries(String regUrl)
                                        throws 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:
IOException

toString

public String toString()
Overrides:
toString in class Object

getAdqlWhere

public static 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


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.