| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.ivoa.registry.search.RegistrySearchClient
public class RegistrySearchClient
a registry search client class
| Field Summary | |
|---|---|
| static java.net.URL | defaultEndpointthe default registry endpoint to connect to. | 
| static short | LOOSE_COMPLIANCEAdapt silently to any service compliance errors when possible. | 
| protected  int | resIDBuffer | 
| protected  int | resRecordBuffer | 
| protected  SOAPSearchClient | service | 
| static short | STRICT_COMPLIANCEThrow an exception whenever the registry does not comply with the Registry Interface specification. | 
| protected  short | strictness | 
| static short | WARN_COMPLIANCEWarn about any service compliance errors with a message to standard error, but otherwise adapt when possible. | 
| Constructor Summary | |
|---|---|
| RegistrySearchClient()create a client configured to connect to the configured default registry | |
| RegistrySearchClient(java.net.URL endpointURL)create a client connected to a registry with the given endpoint URL | |
| Method Summary | |
|---|---|
|  short | getCompliance()Set the tolerance toward non-compliance with the Registry Interface standard. | 
|  VOResource | getIdentity()return the description of the registry. | 
|  int | getRecordBufferSize()return the size of the record buffer. | 
|  VOResource | getResource(java.lang.String ivoid)return the Resource description for a given identifier. | 
|  Identifiers | identifiersByADQL(java.lang.String adqlWhere)search for the resource identifiers whose descriptions match an ADQL query. | 
|  Identifiers | identifiersByKeywords(java.lang.String keywords,
                      boolean orThem)search for the resource identifiers whose descriptions contain specific keywords. | 
|  Records | searchByADQL(java.lang.String adqlWhere)search for the resource descriptions based on a detailed ADQL query | 
|  Records | searchByKeywords(java.lang.String keywords,
                 boolean orThem)search for resource descriptions containing specific keywords. | 
|  org.w3c.dom.Element | searchByXQuery(java.lang.String xquery)search for resource description information using XQuery. | 
|  void | setCaller(ServiceCaller c)set the SOAP ServiceCaller implementation to use. | 
|  void | setCompliance(short level)Set the tolerance toward non-compliance with the Registry Interface standard. | 
|  void | setRecordBufferSize(int size)return the size of the record buffer. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected int resRecordBuffer
protected int resIDBuffer
protected SOAPSearchClient service
protected short strictness
public static java.net.URL defaultEndpoint
public static final short LOOSE_COMPLIANCE
public static final short WARN_COMPLIANCE
public static final short STRICT_COMPLIANCE
| Constructor Detail | 
|---|
public RegistrySearchClient()
public RegistrySearchClient(java.net.URL endpointURL)
| Method Detail | 
|---|
public void setCompliance(short level)
public short getCompliance()
public int getRecordBufferSize()
public void setRecordBufferSize(int size)
public VOResource getIdentity()
                       throws RegistryAccessException
Note that all of the checked exceptions thrown by this method inherit from a common base class, RegistryAccessException.
RegistryServiceException - if the service encounters an error 
                           (i.e. on the server side).
RegistryCommException - if an unexpected protocol error is
                           encountered.
RegistryFormatException - if the response does not contain a
                           VOResource record.
RegistryAccessException
public VOResource getResource(java.lang.String ivoid)
                       throws IDNotFoundException,
                              RegistryAccessException
Note that all of the checked exceptions thrown by this method inherit from a common base class, RegistryAccessException.
ivoid - the IVOA Identifier to resolve
IDNotFoundException - if the service cannot match the given
                           ID to a description
RegistryServiceException - if the service encounters an error 
                           (i.e. on the server side).
RegistryCommException - if an unexpected protocol error is
                           encountered.
RegistryAccessException
public Records searchByKeywords(java.lang.String keywords,
                                boolean orThem)
                         throws RegistryServiceException,
                                RegistryFormatException,
                                RegistryCommException
Note that all of the checked exceptions thrown by this method inherit from a common base class, RegistryAccessException.
keywords - the list of keywords to search fororThem - if true, return records that contains at least one 
                       keyword; otherwise, return those that have all 
                       keywords.
RegistryServiceException - if the service encounters an error 
                           (i.e. on the server side).
RegistryFormatException - if the XML response is non-compliant
                           in some way.
RegistryCommException - if an unexpected protocol error is
                           encountered.
public Identifiers identifiersByKeywords(java.lang.String keywords,
                                         boolean orThem)
                                  throws RegistryServiceException,
                                         RegistryFormatException,
                                         RegistryCommException
Note that all of the checked exceptions thrown by this method inherit from a common base class, RegistryAccessException.
keywords - the list of keywords to search fororThem - if true, return records that contains at least one 
                       keyword; otherwise, return those that have all 
                       keywords.
RegistryServiceException - if the service encounters an error 
                           (i.e. on the server side).
RegistryFormatException - if the XML response is non-compliant
                           in some way.
RegistryCommException - if an unexpected protocol error is
                           encountered.
public Records searchByADQL(java.lang.String adqlWhere)
                     throws RegistryServiceException,
                            RegistryFormatException,
                            RegistryCommException,
                            ADQLSyntaxException
adqlWhere - the ADQL Where clause that constrains the search
ADQLSyntaxException - if a syntax error is detected in the 
                           input ADQL string.
RegistryServiceException - if the service encounters an error 
                           (i.e. on the server side).
RegistryFormatException - if the XML response is non-compliant
                           in some way.
RegistryCommException - if an unexpected protocol error is
                           encountered.
public Identifiers identifiersByADQL(java.lang.String adqlWhere)
                              throws RegistryServiceException,
                                     RegistryFormatException,
                                     RegistryCommException,
                                     ADQLSyntaxException
Note that all of the checked exceptions thrown by this method inherit from a common base class, RegistryAccessException.
adqlWhere - the ADQL Where clause that constrains the search
ADQLSyntaxException - if a syntax error is detected in the 
                           input ADQL string.
RegistryServiceException - if the service encounters an error 
                           (i.e. on the server side).
RegistryFormatException - if the XML response is non-compliant
                           in some way.
RegistryCommException - if an unexpected protocol error is
                           encountered.
public org.w3c.dom.Element searchByXQuery(java.lang.String xquery)
                                   throws RegistryServiceException,
                                          UnsupportedOperationException,
                                          RegistryCommException
Note that all of the checked exceptions thrown by this method inherit from a common base class, RegistryAccessException.
String - the XQuery stored as a string.
RegistryServiceException - if the service encounters an error 
                           (i.e. on the server side).
RegistryFormatException - if the XML response is non-compliant
                           in some way.
RegistryCommException - if an unexpected protocol error is
                           encountered.
UnsupportedOperationExceptionpublic void setCaller(ServiceCaller c)
c - the caller objectServiceCaller| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||