|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jmol.adapter.smarter.AtomSetCollectionReader
org.jmol.adapter.readers.xml.XmlReader
org.jmol.adapter.readers.xml.XmlCmlReader
public class XmlCmlReader
A CML2 Reader - If passed a bufferedReader (from a file or inline string), we generate a SAX parser and use callbacks to construct an AtomSetCollection. If passed a JSObject (from LiveConnect) we treat it as a JS DOM tree, and walk the tree, (using the same processing as the SAX parser) to construct the AtomSetCollection. symmetry added by Bob Hanson: setSpaceGroupName() setUnitCellItem() setFractionalCoordinates() setAtomCoord() applySymmetryAndSetTrajectory() "isotope" added 4/6/2009 Bob Hanson
Nested Class Summary | |
---|---|
(package private) class |
XmlCmlReader.CmlHandler
|
Nested classes/interfaces inherited from class org.jmol.adapter.readers.xml.XmlReader |
---|
XmlReader.DummyResolver, XmlReader.JmolXmlHandler |
Field Summary | |
---|---|
private Atom[] |
atomArray
|
private int |
atomCount
|
private Properties |
atomIdNames
|
private Bond[] |
bondArray
|
private int |
bondCount
|
private String |
cellParameterType
|
private boolean |
checkedSerial
|
protected int |
CML
state constants |
private String[] |
cmlImplementedAttributes
|
protected int |
CRYSTAL
state constants |
protected int |
CRYSTAL_SCALAR
state constants |
protected int |
CRYSTAL_SYMMETRY
state constants |
protected int |
CRYSTAL_SYMMETRY_TRANSFORM3
state constants |
private boolean |
embeddedCrystal
|
private boolean |
haveMolecule
|
private boolean |
isSerial
|
protected int |
LATTICE_VECTOR
state constants |
private int |
latticeVectorPtr
|
private String |
localSpaceGroupName
|
protected int |
MODULE
state constants |
private int |
moduleNestingLevel
|
protected int |
MOLECULE
state constants |
protected int |
MOLECULE_ATOM
state constants |
protected int |
MOLECULE_ATOM_ARRAY
state constants |
protected int |
MOLECULE_ATOM_BUILTIN
state constants |
protected int |
MOLECULE_ATOM_SCALAR
state constants |
protected int |
MOLECULE_BOND
state constants |
protected int |
MOLECULE_BOND_ARRAY
state constants |
protected int |
MOLECULE_BOND_BUILTIN
state constants |
protected int |
MOLECULE_FORMULA
state constants |
private int |
moleculeNesting
|
private int |
nModules
|
private boolean |
processing
|
private String |
scalarDictRef
|
private String |
scalarDictValue
|
private String |
scalarTitle
|
protected int |
START
state constants |
protected int |
state
the current state |
protected int |
SYMMETRY
state constants |
private int |
tokenCount
|
(package private) String[] |
tokens
|
Fields inherited from class org.jmol.adapter.readers.xml.XmlReader |
---|
atom, chars, implementedAttributes, keepChars, parent |
Constructor Summary | |
---|---|
XmlCmlReader()
|
Method Summary | |
---|---|
private void |
addAtom(Atom atom)
|
private void |
addNewBond(String a1,
String a2,
int order)
|
void |
applySymmetryAndSetTrajectory()
|
(package private) void |
breakOutAtomTokens(String str)
|
(package private) void |
breakOutBondTokens(String str)
|
(package private) void |
breakOutTokens(String str)
|
(package private) void |
checkAtomArrayLength(int newAtomCount)
|
(package private) void |
checkBondArrayLength(int newBondCount)
|
private void |
checkUnitCellItem(String[] tags,
String value)
|
private void |
createNewAtomSet(HashMap atts)
|
private void |
getDictRefValue(HashMap atts)
|
(package private) int |
parseBondToken(String str)
|
void |
processEndElement(String uri,
String name,
String qName)
|
void |
processStartElement(String uri,
String name,
String qName,
HashMap atts)
|
protected void |
processXml(XmlReader parent,
AtomSetCollection atomSetCollection,
BufferedReader reader,
netscape.javascript.JSObject DOMNode)
|
protected void |
processXml(XmlReader parent,
AtomSetCollection atomSetCollection,
BufferedReader reader,
XMLReader xmlReader)
|
Methods inherited from class org.jmol.adapter.readers.xml.XmlReader |
---|
initializeReader, parseReaderXML, readAtomSetCollectionFromDOM, setKeepChars |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private String[] cmlImplementedAttributes
private int atomCount
private Atom[] atomArray
private int bondCount
private Bond[] bondArray
private int tokenCount
String[] tokens
private int nModules
private int moduleNestingLevel
private boolean haveMolecule
private String localSpaceGroupName
private boolean processing
protected final int START
protected final int CML
protected final int CRYSTAL
protected final int CRYSTAL_SCALAR
protected final int CRYSTAL_SYMMETRY
protected final int CRYSTAL_SYMMETRY_TRANSFORM3
protected final int MOLECULE
protected final int MOLECULE_ATOM_ARRAY
protected final int MOLECULE_ATOM
protected final int MOLECULE_ATOM_SCALAR
protected final int MOLECULE_BOND_ARRAY
protected final int MOLECULE_BOND
protected final int MOLECULE_FORMULA
protected final int MOLECULE_ATOM_BUILTIN
protected final int MOLECULE_BOND_BUILTIN
protected final int MODULE
protected final int SYMMETRY
protected final int LATTICE_VECTOR
protected int state
private String scalarDictRef
private String scalarDictValue
private String scalarTitle
private String cellParameterType
private boolean checkedSerial
private boolean isSerial
private int moleculeNesting
private int latticeVectorPtr
private boolean embeddedCrystal
private Properties atomIdNames
Constructor Detail |
---|
XmlCmlReader()
Method Detail |
---|
protected void processXml(XmlReader parent, AtomSetCollection atomSetCollection, BufferedReader reader, XMLReader xmlReader)
processXml
in class XmlReader
protected void processXml(XmlReader parent, AtomSetCollection atomSetCollection, BufferedReader reader, netscape.javascript.JSObject DOMNode)
processXml
in class XmlReader
public void processStartElement(String uri, String name, String qName, HashMap atts)
processStartElement
in class XmlReader
private void addNewBond(String a1, String a2, int order)
private void getDictRefValue(HashMap atts)
public void processEndElement(String uri, String name, String qName)
processEndElement
in class XmlReader
private void checkUnitCellItem(String[] tags, String value)
private void addAtom(Atom atom)
int parseBondToken(String str)
void breakOutTokens(String str)
void breakOutAtomTokens(String str)
void checkAtomArrayLength(int newAtomCount)
void breakOutBondTokens(String str)
void checkBondArrayLength(int newBondCount)
private void createNewAtomSet(HashMap atts)
public void applySymmetryAndSetTrajectory()
applySymmetryAndSetTrajectory
in class AtomSetCollectionReader
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |