public class DalResultStreamer extends TableContentHandler implements TableHandler
| Constructor and Description |
|---|
DalResultStreamer(TableSink sink)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
endDocument, endPrefixMapping, getLocator, getReadHrefTables, getTableHandler, ignorableWhitespace, processingInstruction, setDocumentLocator, setReadHrefTables, setTableHandler, skippedEntity, startDocument, startPrefixMappingpublic DalResultStreamer(TableSink sink)
sink - table destinationpublic boolean getOverflow()
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException
startElement in interface ContentHandlerstartElement in class TableContentHandlerSAXExceptionpublic void endElement(String namespaceURI, String localName, String qName) throws SAXException
endElement in interface ContentHandlerendElement in class TableContentHandlerSAXExceptionpublic void characters(char[] ch,
int start,
int length)
throws SAXException
characters in interface ContentHandlercharacters in class TableContentHandlerSAXExceptionpublic void startTable(StarTable meta) throws SAXException
TableHandlerstartElement and endElement calls.
The metadata argument signals column and table metadata
argument about the table whose rows are about to be transmitted.
If the number of rows that will be transmitted via subsequent
calls to rowData is known, this value should be made
available as the row count of metadata
(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 TableHandlermeta - metadata objectSAXExceptionpublic void rowData(Object[] row) throws SAXException
TableHandlerstartTable and endTable calls.rowData in interface TableHandlerrow - array of data objects representing a row in the
current tableSAXExceptionpublic void endTable()
throws SAXException
TableHandlerendTable in interface TableHandlerSAXExceptionpublic static boolean streamResultTable(InputSource saxsrc, TableSink sink) throws IOException, SAXException
saxsrc - SAX event sourcesink - table destinationIOExceptionSAXExceptionCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.