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>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) Implementation of the characters() procedure overwriting the DefaultHandler interface.voiddoctypeDecl(String name, String publicId, String systemId) voidCalling this procedure signals the end of the XML document.voidendElement(String uri, String local, String raw) voidregisterConvention(String convention, ICMLModule conv) voidvoidstartElement(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, warningMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
charactersin interfaceContentHandler- Overrides:
charactersin 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:
endDocumentin interfaceContentHandler- Overrides:
endDocumentin classDefaultHandler
-
endElement
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler
-
startDocument
public void startDocument()- Specified by:
startDocumentin interfaceContentHandler- Overrides:
startDocumentin classDefaultHandler
-
startElement
- Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler
-