uk.ac.starlink.votable.soap
Class AxisTableDeserializer

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.apache.axis.message.SOAPHandler
          extended by org.apache.axis.encoding.DeserializerImpl
              extended by uk.ac.starlink.votable.soap.AxisTableDeserializer
All Implemented Interfaces:
Serializable, javax.xml.rpc.encoding.Deserializer, org.apache.axis.encoding.Callback, ContentHandler, DTDHandler, EntityResolver, ErrorHandler, TableHandler

public class AxisTableDeserializer
extends org.apache.axis.encoding.DeserializerImpl
implements TableHandler

Custom deserializer for VOTables. The serialized stream is assumed to be a valid VOTABLE element containing a RESOURCE element containing a TABLE element.

The implementation of this class is tailored to various ill-documented idiosyncracies of AXIS's deserialization machinery. Tinker at your peril.

Since:
23 Mar 2005
Author:
Mark Taylor (Starlink)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.axis.encoding.DeserializerImpl
componentsReadyFlag, defaultType, id, isEnded, isHref, isNil, log, targets, value
 
Fields inherited from class org.apache.axis.message.SOAPHandler
myElement
 
Constructor Summary
AxisTableDeserializer(StoragePolicy storagePolicy)
          Constructor.
 
Method Summary
 boolean componentsReady()
           
 void endTable()
          Called when there are no more rows to be transmitted.
 Object getValue()
           
 void onEndElement(String namespace, String localName, org.apache.axis.encoding.DeserializationContext context)
           
 org.apache.axis.message.SOAPHandler onStartChild(String namespace, String localName, String prefix, Attributes atts, org.apache.axis.encoding.DeserializationContext context)
           
 void rowData(Object[] row)
          Called when a row has been read.
 void startTable(StarTable meta)
          Called when a table is about to be transmitted.
 void valueComplete()
           
 
Methods inherited from class org.apache.axis.encoding.DeserializerImpl
addChildDeserializer, endElement, getDefaultType, getMechanismType, getValue, getValueTargets, moveValueTargets, onStartElement, registerValueTarget, removeValueTargets, setChildValue, setDefaultType, setValue, setValue, startElement
 
Methods inherited from class org.apache.axis.message.SOAPHandler
characters, makeNewElement, onEndChild
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AxisTableDeserializer

public AxisTableDeserializer(StoragePolicy storagePolicy)
Constructor.

Parameters:
storagePolicy - policy for storing streamed table data
Method Detail

onStartChild

public org.apache.axis.message.SOAPHandler onStartChild(String namespace,
                                                        String localName,
                                                        String prefix,
                                                        Attributes atts,
                                                        org.apache.axis.encoding.DeserializationContext context)
                                                 throws SAXException
Overrides:
onStartChild in class org.apache.axis.encoding.DeserializerImpl
Throws:
SAXException

onEndElement

public void onEndElement(String namespace,
                         String localName,
                         org.apache.axis.encoding.DeserializationContext context)
                  throws SAXException
Overrides:
onEndElement in class org.apache.axis.encoding.DeserializerImpl
Throws:
SAXException

startTable

public void startTable(StarTable meta)
Description copied from interface: TableHandler
Called when a table is about to be transmitted. This call will occur somewhere between matched DATA element startElement 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).

Specified by:
startTable in interface TableHandler
Parameters:
meta - metadata object

rowData

public void rowData(Object[] row)
             throws SAXException
Description copied from interface: TableHandler
Called when a row has been read. This method will be called between matched startTable and endTable calls.

Specified by:
rowData in interface TableHandler
Parameters:
row - array of data objects representing a row in the current table
Throws:
SAXException

endTable

public void endTable()
              throws SAXException
Description copied from interface: TableHandler
Called when there are no more rows to be transmitted.

Specified by:
endTable in interface TableHandler
Throws:
SAXException

getValue

public Object getValue()
Overrides:
getValue in class org.apache.axis.encoding.DeserializerImpl

componentsReady

public boolean componentsReady()
Overrides:
componentsReady in class org.apache.axis.encoding.DeserializerImpl

valueComplete

public void valueComplete()
                   throws SAXException
Overrides:
valueComplete in class org.apache.axis.encoding.DeserializerImpl
Throws:
SAXException


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.