Package uk.ac.starlink.registry
Class BasicRegistryClient
- java.lang.Object
-
- uk.ac.starlink.registry.AbstractRegistryClient<BasicResource>
-
- uk.ac.starlink.registry.BasicRegistryClient
-
public class BasicRegistryClient extends AbstractRegistryClient<BasicResource>
RegistryClient concrete subclass which turns registry queries into BasicResource elements.This class is implemented using an ad-hoc XPath-like mechanism for accumulating items of interest from the SAX stream, while ignoring anything else. It works well, and is fast. However there are certainly other, probably more flexible and better, ways of doing similar things. Probably there are libraries that can help with this sort of thing.
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Constructor Description BasicRegistryClient(SoapClient soapClient)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.xml.sax.ContentHandler
createResourceHandler(ResourceSink<BasicResource> sink)
Returns a SAX ContentHandler which can parse a VOResources element and feed items of some type R to a ResourceSink object.-
Methods inherited from class uk.ac.starlink.registry.AbstractRegistryClient
getEndpoint, getResourceIterator, getResourceList
-
-
-
-
Constructor Detail
-
BasicRegistryClient
public BasicRegistryClient(SoapClient soapClient)
Constructor.- Parameters:
soapClient
- object which performs SOAP communications
-
-
Method Detail
-
createResourceHandler
protected org.xml.sax.ContentHandler createResourceHandler(ResourceSink<BasicResource> sink)
Description copied from class:AbstractRegistryClient
Returns a SAX ContentHandler which can parse a VOResources element and feed items of some type R to a ResourceSink object. R presumably represents a resource.- Specified by:
createResourceHandler
in classAbstractRegistryClient<BasicResource>
- Parameters:
sink
- receiver of resource objects- Returns:
- new resource handler
-
-