jsdai.xml
Class InstanceWriter

java.lang.Object
  extended byjsdai.lang.JsdaiLangAccessor
      extended byjsdai.xml.InstanceWriter
All Implemented Interfaces:
org.xml.sax.ContentHandler

public abstract class InstanceWriter
extends JsdaiLangAccessor
implements org.xml.sax.ContentHandler

This class is a way to write (create) JSDAI population from XML parsing events. It acts as XML contents handler and can be used in any environment which generates XML parsing events (eg. XML text file parsing).


Method Summary
 void characters(char[] charArray, int start, int length)
          Accepts notification about character events.
 void endDocument()
          Accepts notification about document end events.
 void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)
          Accepts notification about element end events.
 void endPrefixMapping(java.lang.String prefix)
          Skips notification about prefix mapping end events.
 void ignorableWhitespace(char[] charArray, int start, int length)
          Skips notification about ignorable whitespace events.
 void processingInstruction(java.lang.String target, java.lang.String data)
          Skits notification about processing instruction events.
 void setDocumentLocator(org.xml.sax.Locator locator)
          Ignores the document locator.
 void skippedEntity(java.lang.String name)
          Skips notification about skipped entity events.
 void startDocument()
          Accepts notification about document start events.
 void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attr)
          Accepts notification about element start events.
 void startPrefixMapping(java.lang.String prefix, java.lang.String uri)
          Skips notification about prefix mapping start events.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes attr)
                  throws org.xml.sax.SAXException
Accepts notification about element start events.

Specified by:
startElement in interface org.xml.sax.ContentHandler
Parameters:
namespaceURI - The namespace URI. Namespace processing has to be enabled in XML reader
localName - The local name (without prefix)
qName - The ignored qualified name (can be null)
attr - The attributes attached to the element
Throws:
org.xml.sax.SAXException - if SAX error occurs

endElement

public void endElement(java.lang.String namespaceURI,
                       java.lang.String localName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
Accepts notification about element end events.

Specified by:
endElement in interface org.xml.sax.ContentHandler
Parameters:
namespaceURI - The namespace URI. Namespace processing has to be enabled in XML reader
localName - The local name (without prefix)
qName - The ignored qualified name (can be null)
Throws:
org.xml.sax.SAXException - if SAX error occurs

characters

public void characters(char[] charArray,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
Accepts notification about character events.

Specified by:
characters in interface org.xml.sax.ContentHandler
Parameters:
charArray - The characters from the XML document.
start - The start position in the array.
length - The number of characters to read from the array.
Throws:
org.xml.sax.SAXException - if SAX error occurs

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
Accepts notification about document start events.

Specified by:
startDocument in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException - if SAX error occurs

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
Accepts notification about document end events.

Specified by:
endDocument in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException - if SAX error occurs

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
                           throws org.xml.sax.SAXException
Skits notification about processing instruction events.

Specified by:
processingInstruction in interface org.xml.sax.ContentHandler
Parameters:
target - The processing instruction target.
data - The processing instruction data.
Throws:
org.xml.sax.SAXException

startPrefixMapping

public void startPrefixMapping(java.lang.String prefix,
                               java.lang.String uri)
                        throws org.xml.sax.SAXException
Skips notification about prefix mapping start events.

Specified by:
startPrefixMapping in interface org.xml.sax.ContentHandler
Parameters:
prefix - The Namespace prefix being declared.
uri - The Namespace URI the prefix is mapped to.
Throws:
org.xml.sax.SAXException

endPrefixMapping

public void endPrefixMapping(java.lang.String prefix)
                      throws org.xml.sax.SAXException
Skips notification about prefix mapping end events.

Specified by:
endPrefixMapping in interface org.xml.sax.ContentHandler
Parameters:
prefix - The Namespace prefix being declared.
Throws:
org.xml.sax.SAXException - if an error occurs

setDocumentLocator

public void setDocumentLocator(org.xml.sax.Locator locator)
Ignores the document locator.

Specified by:
setDocumentLocator in interface org.xml.sax.ContentHandler
Parameters:
locator - The document locator

ignorableWhitespace

public void ignorableWhitespace(char[] charArray,
                                int start,
                                int length)
                         throws org.xml.sax.SAXException
Skips notification about ignorable whitespace events.

Specified by:
ignorableWhitespace in interface org.xml.sax.ContentHandler
Parameters:
charArray - The characters from the XML document.
start - The start position in the array.
length - The number of characters to read from the array.
Throws:
org.xml.sax.SAXException

skippedEntity

public void skippedEntity(java.lang.String name)
                   throws org.xml.sax.SAXException
Skips notification about skipped entity events.

Specified by:
skippedEntity in interface org.xml.sax.ContentHandler
Parameters:
name - The name of the skipped entity.
Throws:
org.xml.sax.SAXException

Copyright © LKSoftWare GmbH, 1999-2008