|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.XMLFilterImpl
uk.ac.starlink.vo.DalResultXMLFilter
public class DalResultXMLFilter
SAX filter which ignores any tables in a VOTable document, except those in a RESOURCE which has type="results". This is suitable for getting the basic table from the result of an SIA or SSA service. Under some circumstances the results can come with a large amount of non-result information (for instance massive numbers of small footprint tables from http://www.stecf.org/hst-vo/hst_ssa?), which can have a very serious impact on performance when trying to build a DOM. So if all you are interested in is the results table which the SIA/SSA protocol says has to be there, using this filter can save a lot of unnecessary processing.
In many cases, you can just use the getDalResultTable(uk.ac.starlink.votable.VOElementFactory, org.xml.sax.InputSource)
utility method.
Constructor Summary | |
---|---|
DalResultXMLFilter(XMLReader parent,
Namespacing namespacing)
Constructor. |
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
|
void |
endElement(String namespaceURI,
String localName,
String qName)
|
void |
endPrefixMapping(String prefix)
|
static StarTable |
getDalResultTable(VOElementFactory vofact,
InputSource inSrc)
Utility method which can return the single results table from a DAL-type response. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
|
static VOElement |
parseDalResult(VOElementFactory vofact,
InputSource inSrc)
Utility method which uses an instance of this class to turn a SAX InputSource into a DOM. |
void |
processingInstruction(String target,
String data)
|
void |
skippedEntity(String name)
|
void |
startElement(String namespaceURI,
String localName,
String qName,
Attributes atts)
|
void |
startPrefixMapping(String prefix,
String uri)
|
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl |
---|
endDocument, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, notationDecl, parse, parse, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, startDocument, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DalResultXMLFilter(XMLReader parent, Namespacing namespacing)
parent
- parent SAX readernamespacing
- VOTable namespacing policy to employMethod Detail |
---|
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException
startElement
in interface ContentHandler
startElement
in class XMLFilterImpl
SAXException
public void endElement(String namespaceURI, String localName, String qName) throws SAXException
endElement
in interface ContentHandler
endElement
in class XMLFilterImpl
SAXException
public void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping
in interface ContentHandler
startPrefixMapping
in class XMLFilterImpl
SAXException
public void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping
in interface ContentHandler
endPrefixMapping
in class XMLFilterImpl
SAXException
public void characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
characters
in class XMLFilterImpl
SAXException
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
ignorableWhitespace
in interface ContentHandler
ignorableWhitespace
in class XMLFilterImpl
SAXException
public void processingInstruction(String target, String data) throws SAXException
processingInstruction
in interface ContentHandler
processingInstruction
in class XMLFilterImpl
SAXException
public void skippedEntity(String name) throws SAXException
skippedEntity
in interface ContentHandler
skippedEntity
in class XMLFilterImpl
SAXException
public static VOElement parseDalResult(VOElementFactory vofact, InputSource inSrc) throws IOException
vofact
- factory which can generate VOTable DOMsinSrc
- source of the SAX stream
IOException
public static StarTable getDalResultTable(VOElementFactory vofact, InputSource inSrc) throws IOException
vofact
- factory which can generate VOTable DOMsinSrc
- source of the SAX stream
IOException
- in case of error, including an ERROR-valued
QUERY_STATUS in the response, or no suitable table found
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |