java.lang.Object
PMRDocumentImpl
org.xmlcml.cmlimpl.CMLDocumentImpl
org.xmlcml.noncml.NonCMLDocumentImpl
org.xmlcml.noncml.JMEImpl
- All Implemented Interfaces:
- org.xmlcml.cml.CMLDocument, org.w3c.dom.Document, org.xmlcml.cml.mvc.HasController, JME, org.w3c.dom.Node, NonCMLDocument
- public class JMEImpl
- extends NonCMLDocumentImpl
- implements JME
class to read and write JME files (Peter Ertl's applet)
| Fields inherited from class org.xmlcml.noncml.NonCMLDocumentImpl |
ATOM_FACTORY, atomParent, atomVector, BOND_FACTORY, bondParent, bondVector, bReader, convention, currentLine, DOCUMENT_FACTORY, inputCML, inputCMLMolecule, inputDescription2TypeTable, localDictionary, markLine, MOLECULE_FACTORY, natoms, nbonds, nextLine, nLine, nonCmlDoc, outputCML, outputCMLMolecule, outputDescription2TypeTable, parseFile, selector, SPACE40, SPACE80 |
| Fields inherited from interface org.xmlcml.noncml.NonCMLDocument |
CASTEP, CIF, CML, CMLARRAY, FORMAT, G94, GAMESS, INPUT_DESCRIPTIONS, INPUT_SUFFIXES, INPUT_TYPES, JCAMP, JME, MDLMOL, MIF, MMCIF, MOL2, MOPAC, MOPACIn, OUTPUT_DESCRIPTIONS, OUTPUT_SUFFIXES, OUTPUT_TYPES, PDB, PDBConect, SDF, SMILES, SWISS, TEST, VAMP, XML, XYZ |
| Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
| Methods inherited from class org.xmlcml.noncml.NonCMLDocumentImpl |
addDataItem, convertFile, convertList, createAndAddCMLElement, createAndAddMoleculeElement, createCMLDocument, createCMLDocument, createCMLDocument, createCMLElement, createMoleculeElement, getAndCheckVectors, getCurrentLine, getDictionary, getInputDescriptions, getInputSuffixes, getInputTypes, getMoleculeVector, getOutputDescriptions, getOutputSuffixes, getOutputTypes, getSelector, getSuffixFromType, getTypeFromFile, getTypesFromFile, makeDataItem, makeFileStem, outform, parse, peekLine, processLinks, readFortranReal, readNextLine, resetMark, setMark, setOutputCML, setOutputCMLMolecule, setParseFile, setSelector |
| Methods inherited from class org.xmlcml.cmlimpl.CMLDocumentImpl |
addTracer, arrayify, createCMLDocument, deArrayify, debug, debug, dereferenceDescendantLinks, dereferenceLinks, getController, getDictionaryFileName, getDictionaryName, getDictionaryNamespaceURI, getDictionaryPrefix, getMolecule, getMoleculeFactory, getMoleculeList, getMoleculeVector, hasLinkElements, isTrace, readXMLTest, removeTracer, setController, setMoleculeFactory, setTrace, test1, trace |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.xmlcml.cml.CMLDocument |
arrayify, deArrayify, debug, debug, dereferenceLinks, getMolecule, getMoleculeFactory, getMoleculeList, getMoleculeVector, hasLinkElements, parse, readXMLTest, setMoleculeFactory |
| Methods inherited from interface org.w3c.dom.Document |
adoptNode, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, getDoctype, getDocumentElement, getDocumentURI, getDomConfig, getElementById, getElementsByTagName, getElementsByTagNameNS, getImplementation, getInputEncoding, getStrictErrorChecking, getXmlEncoding, getXmlStandalone, getXmlVersion, importNode, normalizeDocument, renameNode, setDocumentURI, setStrictErrorChecking, setXmlStandalone, setXmlVersion |
| Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData |
serialTable
java.util.Hashtable serialTable
JMEImpl
public JMEImpl()
JMEImpl
public JMEImpl(java.io.BufferedReader bReader,
java.lang.String id)
throws java.lang.Exception
- Convenience: form a JME object from a local file
JMEImpl
public JMEImpl(org.xmlcml.cml.CMLMolecule outputCMLMolecule)
- form a JME object from a CML file
parse
public void parse(java.io.BufferedReader bReader)
throws java.io.IOException,
org.xmlcml.cml.CMLException
- Description copied from interface:
NonCMLDocument
- input from a Reader. If the String value is to be input, use a StringReader.
This could be used after a default constructor either immediately
or with some additional customisation and may be used in
the class constructors. Note that parse(URL) is inherited from CMLDocument
- Specified by:
parse in interface NonCMLDocument- Specified by:
parse in class NonCMLDocumentImpl
readHeader
void readHeader(java.util.StringTokenizer st)
throws java.io.IOException,
org.xmlcml.cml.CMLException
readAtoms
void readAtoms(java.util.StringTokenizer st)
throws java.io.IOException,
org.xmlcml.cml.CMLException
readBonds
void readBonds(java.util.StringTokenizer st)
throws java.io.IOException,
org.xmlcml.cml.CMLException
readFooter
void readFooter(java.util.StringTokenizer st)
throws java.io.IOException,
org.xmlcml.cml.CMLException
jmeBondOrder
public static int jmeBondOrder(java.lang.String cmlCode)
- translates "CML" codes into jme numbers
cmlBondOrder
public static java.lang.String cmlBondOrder(int molNumber)
- translates jme bond orders into JUMBO-MOL orders
jmeBondStereo
public static int jmeBondStereo(java.lang.String cmlCode)
- translates JUMBO-MOL codes into jme numbers
cmlBondStereo
public static java.lang.String cmlBondStereo(int molNumber)
- translates jme numbers into JUMBO-MOL codes
output
public java.lang.String output(java.io.Writer writer)
throws org.xmlcml.cml.CMLException,
java.io.IOException
- outputs CMLMolecule as a JME
- Specified by:
output in interface NonCMLDocument- Specified by:
output in class NonCMLDocumentImpl
writeHeader
public java.lang.String writeHeader(java.io.Writer writer)
throws org.xmlcml.cml.CMLException,
java.io.IOException
writeAtoms
public java.lang.String writeAtoms(java.io.Writer writer)
throws org.xmlcml.cml.CMLException,
java.io.IOException
writeBonds
public java.lang.String writeBonds(java.io.Writer writer)
throws org.xmlcml.cml.CMLException,
java.io.IOException
writeFooter
public java.lang.String writeFooter(java.io.Writer writer)
throws org.xmlcml.cml.CMLException,
java.io.IOException
main
public static void main(java.lang.String[] args)