Package org.openscience.cdk.io.cml
Class CMLHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.openscience.cdk.io.cml.CMLHandler
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
- Direct Known Subclasses:
EventCMLHandler
SAX2 implementation for CML XML fragment reading. CML Core is supported
as well is the CRML module.
Data is stored into the Chemical Document Object which is passed when instantiating this class. This makes it possible that programs that do not use CDK for internal data storage, use this CML library.
- Author:
- Egon Willighagen <egonw@sci.kun.nl>
- Source code:
- main
- Belongs to CDK module:
- io
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] ch, int start, int length) Implementation of the characters() procedure overwriting the DefaultHandler interface.void
doctypeDecl
(String name, String publicId, String systemId) void
Calling this procedure signals the end of the XML document.void
endElement
(String uri, String local, String raw) void
registerConvention
(String convention, ICMLModule conv) void
void
startElement
(String uri, String local, String raw, Attributes atts) Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
CMLHandler
Constructor for the CMLHandler.- Parameters:
chemFile
- The document in which data is stored
-
-
Method Details
-
registerConvention
-
characters
public void characters(char[] ch, int start, int length) Implementation of the characters() procedure overwriting the DefaultHandler interface.- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
- Parameters:
ch
- characters to handle
-
doctypeDecl
- Throws:
Exception
-
endDocument
public void endDocument()Calling this procedure signals the end of the XML document.- Specified by:
endDocument
in interfaceContentHandler
- Overrides:
endDocument
in classDefaultHandler
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
-
startDocument
public void startDocument()- Specified by:
startDocument
in interfaceContentHandler
- Overrides:
startDocument
in classDefaultHandler
-
startElement
- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
-