org.xmlcml.cml
Class AtomArrayImpl

java.lang.Object
  |
  +--org.apache.xerces.dom.NodeImpl
        |
        +--org.apache.xerces.dom.ChildNode
              |
              +--org.apache.xerces.dom.ChildAndParentNode
                    |
                    +--org.apache.xerces.dom.ElementImpl
                          |
                          +--uk.co.demon.ursus.dom.AbstractElementImpl
                                |
                                +--uk.co.demon.ursus.dom.PMRElementImpl
                                      |
                                      +--org.xmlcml.cml.CMLBaseImpl
                                            |
                                            +--org.xmlcml.cml.AbstractBuiltinContainerImpl
                                                  |
                                                  +--org.xmlcml.cml.AbstractAtomImpl
                                                        |
                                                        +--org.xmlcml.cml.AtomArrayImpl

public class AtomArrayImpl
extends AbstractAtomImpl
implements AtomArray

See Also:
Serialized Form

Field Summary
protected  FloatArray[] builtinFloatArrays
           
protected  IntegerArray[] builtinIntegerArrays
           
protected  StringArray[] builtinStringArrays
           
protected  java.util.Hashtable nonBuiltinTable
           
 
Fields inherited from class org.xmlcml.cml.AbstractAtomImpl
count
 
Fields inherited from class org.xmlcml.cml.AbstractBuiltinContainerImpl
builtinValues, nonBuiltinTable
 
Fields inherited from class org.xmlcml.cml.CMLBaseImpl
conventionName, conventionTable, dictRef, id, title, validity
 
Fields inherited from class uk.co.demon.ursus.dom.PMRElementImpl
CLASSNAME, processFlag
 
Fields inherited from class uk.co.demon.ursus.dom.AbstractElementImpl
CLASSNAME
 
Fields inherited from class org.apache.xerces.dom.ElementImpl
attributes, name
 
Fields inherited from class org.apache.xerces.dom.ChildAndParentNode
changes, firstChild, nodeListIndex, nodeListLength, nodeListNode, ownerDocument
 
Fields inherited from class org.apache.xerces.dom.ChildNode
nextSibling, previousSibling
 
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.AbstractAtom
ATOM_BUILTIN_COUNT, ATOM_FLOATVAL_COUNT, ATOM_FLOATVAL_END, ATOM_FLOATVAL_START, ATOM_ID, ATOM_INTEGERVAL_COUNT, ATOM_INTEGERVAL_END, ATOM_INTEGERVAL_START, ATOM_PARITY_FLOAT, ATOM_PARITY_INT, ATOM_STRINGVAL_COUNT, ATOM_STRINGVAL_END, ATOM_STRINGVAL_START, ELEMENT_TYPE, FORMAL_CHARGE_FLOAT, FORMAL_CHARGE_INT, HYDROGEN_COUNT_FLOAT, HYDROGEN_COUNT_INT, ISOTOPE_FLOAT, ISOTOPE_INT, NON_HYDROGEN_COUNT_FLOAT, NON_HYDROGEN_COUNT_INT, OCCUPANCY, RESIDUE_ID, RESIDUE_TYPE, SMILESATOMS, SP, SP2, SP3, spTypeStrings, valences, X2, X3, XFRACT, Y2, Y3, YFRACT, Z3, ZFRACT
 
Fields inherited from interface org.xmlcml.cml.AbstractBuiltinContainer
NONUNIQUE, UNIQUE
 
Fields inherited from interface org.xmlcml.cml.HasCount
COUNT
 
Fields inherited from interface org.xmlcml.cml.CMLBase
ANGLE, ATOM, ATOMARRAY, BOND, BONDARRAY, BUILTIN, CML, CRYSTAL, ELECTRON, ELEMENT_COUNT, ELEMENT_NAMES, EXECUTE, FEATURE, FLOAT, FLOAT_TYPE, FLOATARRAY, FLOATMATRIX, FORMULA, INTEGER, INTEGER_TYPE, INTEGERARRAY, LINK, LIST, MOLECULE, PACKAGE_NAME, REACTION, SEQUENCE, STRING, STRING_TYPE, STRINGARRAY, TORSION, UNK, UNK_ELEM, UNKNOWN
 
Fields inherited from interface uk.co.demon.ursus.dom.PMRElement
CLASSNAME, LOCAL, QUALIFIED, UNIVERSAL
 
Fields inherited from interface org.xmlcml.cml.HasTitle
TITLE
 
Fields inherited from interface org.xmlcml.cml.HasDictRef
DICTREF
 
Fields inherited from interface org.xmlcml.cml.HasId
ID
 
Fields inherited from interface org.xmlcml.cml.HasConvention
CONVENTION
 
Fields inherited from interface uk.co.demon.ursus.dom.PMRNode
ATTRIBUTES, CONTENT, ELEMENTNAME, IDLIST, NESTED, NESTEDATTS, PACKAGENAME, PRETTY, SPLITFILES, STYLE, TAGGED, UNTAGGED, WHITESPACE, XMLCONTENT
 
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
 
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
AtomArrayImpl()
           
AtomArrayImpl(org.w3c.dom.Document document)
          new AtomArray in context
AtomArrayImpl(org.w3c.dom.Element element)
           
 
Method Summary
 void add(Atom atom)
          when an Atom is added then it is split over the various StringArrays
 AbstractBuiltinContainer createArrayElement(org.w3c.dom.Document document)
           
 void delete(Atom atom)
           
 void deleteNonBuiltinArray(java.lang.String name)
           
 Atom elementAt(int index)
          when an Atom is extracted then it is combined from the various StringArrays
 StringArray getBuiltinArray(int builtinId)
          this is slightly tricky/ucky since AtomArray is subclassed from Atom and StringArray from StringVal we can extract the array object as scalars and simply cast them
 StringArray getNonBuiltinArray(java.lang.String name)
           
 void processDOM()
          carries out class-specific processing for subclasses of PMRElement.
 boolean processImmediately()
          do not process on creation
 void setBuiltinArray(int builtinId, StringArray array)
           
 void setNonBuiltinArray(java.lang.String name, StringArray array)
           
 int size()
           
 void updateDOM()
           
 
Methods inherited from class org.xmlcml.cml.AbstractAtomImpl
getBuiltinCount, getBuiltinFloatValCount, getBuiltinFloatValNames, getBuiltinIntegerValCount, getBuiltinIntegerValNames, getBuiltinNames, getBuiltinStringValCount, getBuiltinStringValNames, getCount, getValidity, setCount, showBuiltinNames, updateDOMHasCount
 
Methods inherited from class org.xmlcml.cml.AbstractBuiltinContainerImpl
addBuiltinChildWithFloatValue, addBuiltinChildWithIntegerValue, addBuiltinChildWithStringValue, checkBuiltins, deleteNonBuiltinVal, getBuiltinChildElements, getBuiltinChildFloatValue, getBuiltinChildIntegerValue, getBuiltinChildStringValue, getBuiltinVal, getNonBuiltinVal, setBuiltinVal, setNonBuiltinVal
 
Methods inherited from class org.xmlcml.cml.CMLBaseImpl
addValidity, convertToSubclass, debug, getConventionName, getDictRef, getId, getSubClassedElement, getTitle, help, isValid, main, setConventionName, setDictRef, setId, setTitle, showElementNames, test1, updateDOMHasConvention, updateDOMHasConvention, updateDOMHasCount, updateDOMHasDictRef, updateDOMHasDictRef, updateDOMHasId, updateDOMHasId, updateDOMHasTitle, updateDOMHasTitle, updateDOMHasUnits
 
Methods inherited from class uk.co.demon.ursus.dom.PMRElementImpl
appendTo, initialise, processDescendants, setProcessFlag
 
Methods inherited from class uk.co.demon.ursus.dom.AbstractElementImpl
setTagName
 
Methods inherited from class org.apache.xerces.dom.ElementImpl
cloneNode, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getElementsByTagName, getElementsByTagNameNS, getNodeName, getNodeType, getTagName, hasAttribute, hasAttributeNS, normalize, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setReadOnly, setupDefaultAttributes, synchronizeData
 
Methods inherited from class org.apache.xerces.dom.ChildAndParentNode
changed, changes, getChildNodes, getFirstChild, getLastChild, getLength, getOwnerDocument, hasChildNodes, insertBefore, item, removeChild, replaceChild, synchronizeChildren, synchronizeChildren
 
Methods inherited from class org.apache.xerces.dom.ChildNode
getNextSibling, getParentNode, getPreviousSibling
 
Methods inherited from class org.apache.xerces.dom.NodeImpl
addEventListener, appendChild, dispatchEvent, finalize, getLocalName, getNamespaceURI, getNodeValue, getPrefix, getReadOnly, getUserData, removeEventListener, setNodeValue, setPrefix, setUserData, supports, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

builtinStringArrays

protected StringArray[] builtinStringArrays

builtinIntegerArrays

protected IntegerArray[] builtinIntegerArrays

builtinFloatArrays

protected FloatArray[] builtinFloatArrays

nonBuiltinTable

protected java.util.Hashtable nonBuiltinTable
Constructor Detail

AtomArrayImpl

public AtomArrayImpl()

AtomArrayImpl

public AtomArrayImpl(org.w3c.dom.Element element)

AtomArrayImpl

public AtomArrayImpl(org.w3c.dom.Document document)
new AtomArray in context
Method Detail

add

public void add(Atom atom)
when an Atom is added then it is split over the various StringArrays
Specified by:
add in interface AtomArray

size

public int size()
Specified by:
size in interface AtomArray

elementAt

public Atom elementAt(int index)
when an Atom is extracted then it is combined from the various StringArrays
Specified by:
elementAt in interface AtomArray

processImmediately

public boolean processImmediately()
do not process on creation

delete

public void delete(Atom atom)
Specified by:
delete in interface AtomArray

getBuiltinArray

public StringArray getBuiltinArray(int builtinId)
this is slightly tricky/ucky since AtomArray is subclassed from Atom and StringArray from StringVal we can extract the array object as scalars and simply cast them
Specified by:
getBuiltinArray in interface AtomArray

setBuiltinArray

public void setBuiltinArray(int builtinId,
                            StringArray array)
Specified by:
setBuiltinArray in interface AtomArray

getNonBuiltinArray

public StringArray getNonBuiltinArray(java.lang.String name)
Specified by:
getNonBuiltinArray in interface AtomArray

setNonBuiltinArray

public void setNonBuiltinArray(java.lang.String name,
                               StringArray array)
Specified by:
setNonBuiltinArray in interface AtomArray

deleteNonBuiltinArray

public void deleteNonBuiltinArray(java.lang.String name)
Specified by:
deleteNonBuiltinArray in interface AtomArray

createArrayElement

public AbstractBuiltinContainer createArrayElement(org.w3c.dom.Document document)
Specified by:
createArrayElement in interface AtomArray

processDOM

public void processDOM()
                throws CMLException
Description copied from interface: PMRElement
carries out class-specific processing for subclasses of PMRElement. The default for a generic PMRElement is no-op. Often creates an internal model
Overrides:
processDOM in class CMLBaseImpl
Tags copied from class: PMRElementImpl
Throws:
java.lang.Exception - these can be of many kinds and may include class-specific ones

updateDOM

public void updateDOM()
               throws CMLException
Overrides:
updateDOM in class AbstractAtomImpl