org.xmlcml.cml
Class CMLDocumentImpl

java.lang.Object
  |
  +--org.apache.xerces.dom.NodeImpl
        |
        +--org.apache.xerces.dom.ParentNode
              |
              +--org.apache.xerces.dom.DocumentImpl
                    |
                    +--uk.co.demon.ursus.dom.AbstractDocumentImpl
                          |
                          +--uk.co.demon.ursus.dom.PMRDocumentImpl
                                |
                                +--org.xmlcml.cml.CMLDocumentImpl
Direct Known Subclasses:
NonCMLDocumentImpl

public class CMLDocumentImpl
extends PMRDocumentImpl
implements CMLDocument

The base class for any CML Document objects

See Also:
Serialized Form

Fields inherited from class uk.co.demon.ursus.dom.AbstractDocumentImpl
DEFAULT_PARSER_NAME, docElement
 
Fields inherited from class org.apache.xerces.dom.DocumentImpl
allowGrammarAccess, docElement, docType, errorChecking, identifiers, iterators, kidOK, ranges, treeWalkers, userData
 
Fields inherited from class org.apache.xerces.dom.ParentNode
changes, firstChild, nodeListIndex, nodeListLength, nodeListNode, ownerDocument
 
Fields inherited from class org.apache.xerces.dom.NodeImpl
ELEMENT_DEFINITION_NODE, FIRSTCHILD, flags, IGNORABLEWS, MUTATION_AGGREGATE, MUTATION_ALL, MUTATION_LOCAL, MUTATION_NONE, MUTATIONEVENTS, OWNED, ownerNode, READONLY, SETVALUE, SPECIFIED, SYNCCHILDREN, SYNCDATA
 
Fields inherited from interface org.xmlcml.cml.CMLDocument
PACKAGE_NAME
 
Fields inherited from interface uk.co.demon.ursus.dom.PMRDocument
PACKAGENAME
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Constructor Summary
CMLDocumentImpl()
          create an Empty Document
 
Method Summary
static CMLDocument createCMLDocument(java.lang.String urlString)
          create from file and subclass using SAX; the default CMLDOMSAXBuilder determines the subclassing
static CMLDocument createCMLDocument(java.lang.String urlString, CMLDOMSAXBuilder domBuilder)
          create from file and subclass using SAX; the CMLDOMSAXBuilder determines the subclassing
 void debug(java.io.Writer w)
          output debug info to Writer and return String equivalent (e.g.
 Molecule getMolecule()
          returns the first Molecule in the document or null if none
static void main(java.lang.String[] args)
           
static void test1(java.lang.String inFile)
           
 
Methods inherited from class uk.co.demon.ursus.dom.PMRDocumentImpl
createDocument, createDocument, testBuild, testRead
 
Methods inherited from class org.apache.xerces.dom.DocumentImpl
adoptNode, clone, cloneNode, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createDocumentType, createElement, createElementDefinition, createElementNS, createEntity, createEntityReference, createEvent, createNodeIterator, createNodeIterator, createNotation, createProcessingInstruction, createRange, createTextNode, createTreeWalker, createTreeWalker, getDoctype, getDocumentElement, getElementById, getElementsByTagName, getElementsByTagNameNS, getErrorChecking, getIdentifier, getIdentifiers, getImplementation, getNodeIterators, getNodeName, getNodeType, getOwnerDocument, getRanges, getTreeWalkers, getUserData, importNode, insertBefore, isKidOK, isXMLName, putIdentifier, removeChild, removeIdentifier, removeTreeWalker, setErrorChecking, setUserData
 
Methods inherited from class org.apache.xerces.dom.ParentNode
changed, changes, getChildNodes, getFirstChild, getLastChild, getLength, hasChildNodes, item, normalize, replaceChild, setReadOnly, synchronizeChildren, synchronizeChildren
 
Methods inherited from class org.apache.xerces.dom.NodeImpl
addEventListener, appendChild, dispatchEvent, finalize, getAttributes, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getParentNode, getPrefix, getPreviousSibling, getReadOnly, getUserData, removeEventListener, setNodeValue, setPrefix, setUserData, supports, synchronizeData, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CMLDocumentImpl

public CMLDocumentImpl()
create an Empty Document
Method Detail

createCMLDocument

public static CMLDocument createCMLDocument(java.lang.String urlString,
                                            CMLDOMSAXBuilder domBuilder)
                                     throws java.lang.Exception
create from file and subclass using SAX; the CMLDOMSAXBuilder determines the subclassing

createCMLDocument

public static CMLDocument createCMLDocument(java.lang.String urlString)
                                     throws java.lang.Exception
create from file and subclass using SAX; the default CMLDOMSAXBuilder determines the subclassing

getMolecule

public Molecule getMolecule()
Description copied from interface: CMLDocument
returns the first Molecule in the document or null if none
Specified by:
getMolecule in interface CMLDocument
Tags copied from interface: CMLDocument
Returns:
Molecule the molecule

debug

public void debug(java.io.Writer w)
           throws java.io.IOException
output debug info to Writer and return String equivalent (e.g. with new StringWriter()
Specified by:
debug in interface CMLDocument
Parameters:
Writer - w Writer to output to
Returns:
the String equivalent

test1

public static void test1(java.lang.String inFile)
                  throws java.lang.Exception

main

public static void main(java.lang.String[] args)