Package uk.ac.starlink.topcat.vizier
Class CatalogSaxHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
uk.ac.starlink.topcat.vizier.CatalogSaxHandler
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
SAX content handler which can make sense of a VizieR query for catalogues.
The stream expected is of the kind you get if you make a query like
.../viz-bin/?votable&-meta
to vizier (as at Nov 2009).
May 2010: .../viz-bin?votable&-meta=t
gives information
about sub-tables too.- Since:
- 4 nov 2009
- Author:
- Mark Taylor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] ch, int start, int length) void
endElement
(String uri, String localName, String qName) protected abstract void
gotCatalog
(VizierCatalog cat) Called when a catalogue has been obtained from the SAX stream.void
startElement
(String uri, String localName, String qName, Attributes atts) Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
CatalogSaxHandler
public CatalogSaxHandler(boolean includeObsolete) Constructor.- Parameters:
includeObsolete
- true to include all results, false to omit older versions of the same catalog
-
-
Method Details
-
gotCatalog
Called when a catalogue has been obtained from the SAX stream.- Parameters:
cat
- newly acquired catlogue- Throws:
SAXException
-
characters
public void characters(char[] ch, int start, int length) - Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
-
startElement
- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
- Throws:
SAXException
-