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:
    `org.xml.sax.ContentHandler`, `org.xml.sax.DTDHandler`, `org.xml.sax.EntityResolver`, `org.xml.sax.ErrorHandler`

      public abstract class CatalogSaxHandler
      extends org.xml.sax.helpers.DefaultHandler

  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
    Constructor | Description
    --- | ---
    `CatalogSaxHandler​(boolean includeObsolete)` | Constructor.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `characters​(char[] ch, int start, int length)` |
    `void` | `endElement​(java.lang.String uri, java.lang.String localName, java.lang.String qName)` |
    `protected abstract void` | `gotCatalog​(VizierCatalog cat)` | Called when a catalogue has been obtained from the SAX stream.
    `void` | `startElement​(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.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`

- - ### Constructor Detail

    - #### CatalogSaxHandler

          public CatalogSaxHandler​(boolean includeObsolete)

      Constructor.
      Parameters:
        `includeObsolete` - true to include all results, false to omit older versions of the same catalog

  - ### Method Detail

    - #### gotCatalog

          protected abstract void gotCatalog​(VizierCatalog cat)
                                      throws org.xml.sax.SAXException

      Called when a catalogue has been obtained from the SAX stream.
      Parameters:
        `cat` - newly acquired catlogue
      Throws:
        `org.xml.sax.SAXException`

    - #### characters

          public void characters​(char[] ch,
                                 int start,
                                 int length)

      Specified by:
        `characters` in interface `org.xml.sax.ContentHandler`
      Overrides:
        `characters` in class `org.xml.sax.helpers.DefaultHandler`

    - #### startElement

          public void startElement​(java.lang.String uri,
                                   java.lang.String localName,
                                   java.lang.String qName,
                                   org.xml.sax.Attributes atts)

      Specified by:
        `startElement` in interface `org.xml.sax.ContentHandler`
      Overrides:
        `startElement` in class `org.xml.sax.helpers.DefaultHandler`

    - #### endElement

          public void endElement​(java.lang.String uri,
                                 java.lang.String localName,
                                 java.lang.String qName)
                          throws org.xml.sax.SAXException

      Specified by:
        `endElement` in interface `org.xml.sax.ContentHandler`
      Overrides:
        `endElement` in class `org.xml.sax.helpers.DefaultHandler`
      Throws:
        `org.xml.sax.SAXException`

Copyright © 2003-2018 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.