org.jscience.ml.gedcom
Class GedcomOutputter

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.jscience.ml.gedcom.GedcomOutputter
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

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

A SAX ContentHandler that writes the events to standard output in GEDCOM format.

This class expects to receive the data in normalised form, that is, each contiguous piece of character data arrives in a single call of the characters() interface.


Constructor Summary
GedcomOutputter()
           
 
Method Summary
 void characters(char[] ch, int start, int length)
          Character data.
 void endDocument()
          End of the document.
 void endElement(java.lang.String prefix, java.lang.String ns, java.lang.String name)
          End of an element.
 void ignorableWhitespace(char[] ch, int start, int length)
          Ignore ignorable whitespace.
 void processingInstruction(java.lang.String target, java.lang.String data)
          Handle a processing instruction.
 void startDocument()
          Start of the document.
 void startElement(java.lang.String pref, java.lang.String ns, java.lang.String name, org.xml.sax.Attributes attributes)
          Start of an element.
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, error, fatalError, notationDecl, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GedcomOutputter

public GedcomOutputter()
Method Detail

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
Start of the document.

Specified by:
startDocument in interface org.xml.sax.ContentHandler
Overrides:
startDocument in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException - DOCUMENT ME!

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
End of the document.

Specified by:
endDocument in interface org.xml.sax.ContentHandler
Overrides:
endDocument in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException - DOCUMENT ME!

startElement

public void startElement(java.lang.String pref,
                         java.lang.String ns,
                         java.lang.String name,
                         org.xml.sax.Attributes attributes)
                  throws org.xml.sax.SAXException
Start of an element.

Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Parameters:
pref - DOCUMENT ME!
ns - DOCUMENT ME!
name - DOCUMENT ME!
attributes - DOCUMENT ME!
Throws:
org.xml.sax.SAXException - DOCUMENT ME!

endElement

public void endElement(java.lang.String prefix,
                       java.lang.String ns,
                       java.lang.String name)
                throws org.xml.sax.SAXException
End of an element.

Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler
Parameters:
prefix - DOCUMENT ME!
ns - DOCUMENT ME!
name - DOCUMENT ME!
Throws:
org.xml.sax.SAXException - DOCUMENT ME!

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
Character data.

Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler
Parameters:
ch - DOCUMENT ME!
start - DOCUMENT ME!
length - DOCUMENT ME!
Throws:
org.xml.sax.SAXException - DOCUMENT ME!

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
Ignore ignorable whitespace.

Specified by:
ignorableWhitespace in interface org.xml.sax.ContentHandler
Overrides:
ignorableWhitespace in class org.xml.sax.helpers.DefaultHandler
Parameters:
ch - DOCUMENT ME!
start - DOCUMENT ME!
length - DOCUMENT ME!

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
Handle a processing instruction.

Specified by:
processingInstruction in interface org.xml.sax.ContentHandler
Overrides:
processingInstruction in class org.xml.sax.helpers.DefaultHandler
Parameters:
target - DOCUMENT ME!
data - DOCUMENT ME!