|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.votable.TableContentHandler
uk.ac.starlink.vo.DalResultStreamer
public class DalResultStreamer
SAX table handler for processing VOTable documents returned from DAL services. The result table has to be in a type="results" RESOURCE following DAL rules. The QUERY_STATUS INFO elements are understood, and a table marked with error status causes an exception to be thrown by the SAX parser. A successful parse streams the table data to a supplied sink.
Constructor Summary | |
---|---|
DalResultStreamer(TableSink sink)
Constructor. |
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
|
void |
endElement(String namespaceURI,
String localName,
String qName)
|
void |
endTable()
Called when there are no more rows to be transmitted. |
boolean |
getOverflow()
Indicates whether the DAL result was marked as overflowing (with QUERY_STATUS INFO). |
void |
rowData(Object[] row)
Called when a row has been read. |
void |
startElement(String namespaceURI,
String localName,
String qName,
Attributes atts)
|
void |
startTable(StarTable meta)
Called when a table is about to be transmitted. |
static boolean |
streamResultTable(InputSource saxsrc,
TableSink sink)
Streams a DAL result table from a SAX source to a table sink. |
Methods inherited from class uk.ac.starlink.votable.TableContentHandler |
---|
endDocument, endPrefixMapping, getLocator, getReadHrefTables, getTableHandler, ignorableWhitespace, processingInstruction, setDocumentLocator, setReadHrefTables, setTableHandler, skippedEntity, startDocument, startPrefixMapping |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DalResultStreamer(TableSink sink)
sink
- table destinationMethod Detail |
---|
public boolean getOverflow()
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException
startElement
in interface ContentHandler
startElement
in class TableContentHandler
SAXException
public void endElement(String namespaceURI, String localName, String qName) throws SAXException
endElement
in interface ContentHandler
endElement
in class TableContentHandler
SAXException
public void characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
characters
in class TableContentHandler
SAXException
public void startTable(StarTable meta) throws SAXException
TableHandler
StarTable.getRowCount()
); if it is not known, the row count
should be -1. However, this object should not attempt to read
any of meta's cell data.
The data to be transmitted in subsequent calls of acceptRow must match the metadata transmitted in this call in the same way that rows of a StarTable must match its own metadata (number and content clases of columns etc).
startTable
in interface TableHandler
meta
- metadata object
SAXException
public void rowData(Object[] row) throws SAXException
TableHandler
rowData
in interface TableHandler
row
- array of data objects representing a row in the
current table
SAXException
public void endTable() throws SAXException
TableHandler
endTable
in interface TableHandler
SAXException
public static boolean streamResultTable(InputSource saxsrc, TableSink sink) throws IOException, SAXException
saxsrc
- SAX event sourcesink
- table destination
IOException
SAXException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |