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.StringAG_REGEndpoint for primary AstroGrid registry.static java.lang.StringAG_REG2Endpoint for secondary AstroGrid registry.static java.lang.StringEUROVO_REGEndpoint for Euro-VO registry.static intRECORD_BUFFER_SIZEDefault maximum number of registry entries retrieved at once.static java.lang.String[]REGISTRIESList of likely registries.static uk.ac.starlink.table.ValueInfoREGISTRY_INFODescription of metadata item describing registry location.static uk.ac.starlink.table.ValueInfoTEXT_INFODescription of metadata item describing query text.static java.lang.StringVAO_REGEndpoint 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.StringgetAdqlWhere(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 overRegResourceobjects.RegResource[]getQueryResources()Executes the query described by this object and returns the result as an array ofRegResources.java.net.URLgetRegistry()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.StringgetText()Returns the query text.java.lang.StringtoString()
-
-
-
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:RegistryQueryExecutes the query described by this object and returns an Iterator overRegResourceobjects. Note that the iterator'snextmethod may throw the unchecked exceptionRegistryQueryExceptionwith a cause indicating the underlying error in case of a registry access problem.- Specified by:
getQueryIteratorin interfaceRegistryQuery- Returns:
- iterator over
RegResources - Throws:
java.io.IOException
-
getQueryResources
public RegResource[] getQueryResources() throws java.io.IOException
Description copied from interface:RegistryQueryExecutes the query described by this object and returns the result as an array ofRegResources.- Specified by:
getQueryResourcesin interfaceRegistryQuery- Returns:
- resource list
- Throws:
java.io.IOException
-
getText
public java.lang.String getText()
Description copied from interface:RegistryQueryReturns the query text.- Specified by:
getTextin interfaceRegistryQuery- Returns:
- query
-
getRegistry
public java.net.URL getRegistry()
Description copied from interface:RegistryQueryReturns the registry URL.- Specified by:
getRegistryin interfaceRegistryQuery- Returns:
- url
-
getMetadata
public uk.ac.starlink.table.DescribedValue[] getMetadata()
Description copied from interface:RegistryQueryReturns a set of DescribedValue objects which characterise this query. These would be suitable for use in the parameter list of aStarTableresulting from the execution of this query.- Specified by:
getMetadatain interfaceRegistryQuery
-
getSearchableRegistries
public static java.lang.String[] getSearchableRegistries(java.lang.String regUrl) throws java.io.IOExceptionSearches 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:
toStringin 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
-
-