apollo.dataadapter.das.simple
Class DASSequenceContentHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by apollo.dataadapter.das.simple.DASSequenceContentHandler
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class DASSequenceContentHandler
extends org.xml.sax.helpers.DefaultHandler

I am the ContentHandler used when SimpleDASServer parses the result of a 'dna' call to a das data source (passing in dsn and segment).

I am DAS 1.0 compliant.

During the parse, I create a list, stored on myself, of the returned sequences. This list is retrieved by calling getSequences after the parse is complete

Author:
Vivek Iyer
See Also:
apollo.dataadapter.das.simple.SimpleDASServer#getEntrySequences

Field Summary
 DASDsn dsn
           
 DASSegment[] segments
           
 DASServerI server
           
 
Constructor Summary
DASSequenceContentHandler()
           
DASSequenceContentHandler(DASServerI theServer, DASDsn theDsn, DASSegment[] theSegments)
           
 
Method Summary
 void characters(char[] text, int start, int length)
           
 void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qualifiedName)
           
 java.util.List getSequences()
           
 void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qualifiedName, org.xml.sax.Attributes attributes)
           
 
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
 

Field Detail

server

public DASServerI server

segments

public DASSegment[] segments

dsn

public DASDsn dsn
Constructor Detail

DASSequenceContentHandler

public DASSequenceContentHandler()

DASSequenceContentHandler

public DASSequenceContentHandler(DASServerI theServer,
                                 DASDsn theDsn,
                                 DASSegment[] theSegments)
Method Detail

getSequences

public java.util.List getSequences()

startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String localName,
                         java.lang.String qualifiedName,
                         org.xml.sax.Attributes attributes)
                  throws org.xml.sax.SAXException
Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

endElement

public void endElement(java.lang.String namespaceURI,
                       java.lang.String localName,
                       java.lang.String qualifiedName)
                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

characters

public void characters(char[] text,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException