Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.openscience.miniJmol
Class CMLHandler  view CMLHandler download CMLHandler.java

java.lang.Object
  extended byorg.xml.sax.HandlerBase
      extended byorg.openscience.miniJmol.CMLHandler
All Implemented Interfaces:
org.xml.sax.DocumentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class CMLHandler
extends org.xml.sax.HandlerBase


Field Summary
private  int ANGLE
           
private  int ATOM
           
private  int ATOMARRAY
           
private  int BOND
           
private  int BONDARRAY
           
private  java.lang.String BUILTIN
           
private  ChemFrame cf
           
private  java.util.Vector cfs
           
private  int COORDINATE2
           
private  int COORDINATE3
           
private  int CRYSTAL
           
private  int CurrentElement
           
private  int ELECTRON
           
private  java.util.Vector elid
           
private  java.util.Vector elsym
           
private  int FEATURE
           
private  int FLOAT
           
private  int FLOATARRAY
           
private  int FLOATMATRIX
           
private  int frameNo
           
private  int INTEGER
           
private  int INTEGERARRAY
           
private  int LINK
           
private  int LIST
           
private  int MOLECULE
           
private  int REACTION
           
private  int SEQUENCE
           
private  int STRING
           
private  int STRINGARRAY
           
private  java.lang.String SYSTEMID
           
private  int TORSION
           
private  int UNKNOWN
           
private  java.util.Vector x3
           
private  java.util.Vector y3
           
private  java.util.Vector z3
           
 
Constructor Summary
CMLHandler()
           
 
Method Summary
 void characters(char[] ch, int start, int length)
          Receive notification of character data inside an element.
 void doctypeDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId)
           
 void endDocument()
          Receive notification of the end of the document.
 void endElement(java.lang.String name)
          Receive notification of the end of an element.
 void error(java.lang.String message, java.lang.String systemId, int line, int column)
           
 void notify(java.lang.String message, java.lang.String systemId, int line, int column)
           
 java.util.Vector returnChemFrames()
           
private  void setCurrentElement(java.lang.String name)
           
 void startDocument()
          Receive notification of the beginning of the document.
 void startElement(java.lang.String name, org.xml.sax.AttributeList atts)
          Receive notification of the start of an element.
private  java.lang.String toString(char[] ch, int start, int length)
           
 void warn(java.lang.String s)
           
 void warning(org.xml.sax.SAXParseException e)
          Receive notification of a parser warning.
 
Methods inherited from class org.xml.sax.HandlerBase
error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, unparsedEntityDecl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNKNOWN

private final int UNKNOWN
See Also:
Constant Field Values

STRING

private final int STRING
See Also:
Constant Field Values

LINK

private final int LINK
See Also:
Constant Field Values

FLOAT

private final int FLOAT
See Also:
Constant Field Values

INTEGER

private final int INTEGER
See Also:
Constant Field Values

STRINGARRAY

private final int STRINGARRAY
See Also:
Constant Field Values

FLOATARRAY

private final int FLOATARRAY
See Also:
Constant Field Values

INTEGERARRAY

private final int INTEGERARRAY
See Also:
Constant Field Values

FLOATMATRIX

private final int FLOATMATRIX
See Also:
Constant Field Values

COORDINATE2

private final int COORDINATE2
See Also:
Constant Field Values

COORDINATE3

private final int COORDINATE3
See Also:
Constant Field Values

ANGLE

private final int ANGLE
See Also:
Constant Field Values

TORSION

private final int TORSION
See Also:
Constant Field Values

LIST

private final int LIST
See Also:
Constant Field Values

MOLECULE

private final int MOLECULE
See Also:
Constant Field Values

ATOM

private final int ATOM
See Also:
Constant Field Values

ATOMARRAY

private final int ATOMARRAY
See Also:
Constant Field Values

BOND

private final int BOND
See Also:
Constant Field Values

BONDARRAY

private final int BONDARRAY
See Also:
Constant Field Values

ELECTRON

private final int ELECTRON
See Also:
Constant Field Values

REACTION

private final int REACTION
See Also:
Constant Field Values

CRYSTAL

private final int CRYSTAL
See Also:
Constant Field Values

SEQUENCE

private final int SEQUENCE
See Also:
Constant Field Values

FEATURE

private final int FEATURE
See Also:
Constant Field Values

SYSTEMID

private final java.lang.String SYSTEMID
See Also:
Constant Field Values

CurrentElement

private int CurrentElement

BUILTIN

private java.lang.String BUILTIN

cf

private ChemFrame cf

cfs

private java.util.Vector cfs

frameNo

private int frameNo

elsym

private java.util.Vector elsym

elid

private java.util.Vector elid

x3

private java.util.Vector x3

y3

private java.util.Vector y3

z3

private java.util.Vector z3
Constructor Detail

CMLHandler

public CMLHandler()
Method Detail

startDocument

public void startDocument()
Description copied from class: org.xml.sax.HandlerBase
Receive notification of the beginning of the document.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the beginning of a document (such as allocating the root node of a tree or creating an output file).


endDocument

public void endDocument()
Description copied from class: org.xml.sax.HandlerBase
Receive notification of the end of the document.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the beginning of a document (such as finalising a tree or closing an output file).


returnChemFrames

public java.util.Vector returnChemFrames()

doctypeDecl

public void doctypeDecl(java.lang.String name,
                        java.lang.String publicId,
                        java.lang.String systemId)
                 throws java.lang.Exception

startElement

public void startElement(java.lang.String name,
                         org.xml.sax.AttributeList atts)
                  throws org.xml.sax.SAXException
Description copied from class: org.xml.sax.HandlerBase
Receive notification of the start of an element.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the start of each element (such as allocating a new tree node or writing output to a file).


endElement

public void endElement(java.lang.String name)
Description copied from class: org.xml.sax.HandlerBase
Receive notification of the end of an element.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of each element (such as finalising a tree node or writing output to a file).


characters

public void characters(char[] ch,
                       int start,
                       int length)
Description copied from class: org.xml.sax.HandlerBase
Receive notification of character data inside an element.

By default, do nothing. Application writers may override this method to take specific actions for each chunk of character data (such as adding the data to a node or buffer, or printing it to a file).


setCurrentElement

private void setCurrentElement(java.lang.String name)

error

public void error(java.lang.String message,
                  java.lang.String systemId,
                  int line,
                  int column)
           throws java.lang.Exception

notify

public void notify(java.lang.String message,
                   java.lang.String systemId,
                   int line,
                   int column)

warn

public void warn(java.lang.String s)

toString

private java.lang.String toString(char[] ch,
                                  int start,
                                  int length)

warning

public void warning(org.xml.sax.SAXParseException e)
             throws org.xml.sax.SAXException
Description copied from class: org.xml.sax.HandlerBase
Receive notification of a parser warning.

The default implementation does nothing. Application writers may override this method in a subclass to take specific actions for each warning, such as inserting the message in a log file or printing it to the console.