java.lang.Object
PMRElementImpl
org.xmlcml.cmlimpl.CMLBaseImpl
org.xmlcml.cmlimpl.jumbo3.JUMBOBaseImpl
- All Implemented Interfaces:
- org.xmlcml.cml.AbstractBase, org.xmlcml.cml.AttributeConvention, org.xmlcml.cml.AttributeDictRef, org.xmlcml.cml.AttributeId, org.xmlcml.cml.AttributeTitle, org.w3c.dom.Element, org.w3c.dom.Node
- public abstract class JUMBOBaseImpl
- extends org.xmlcml.cmlimpl.CMLBaseImpl
The base class for all elementObjects mentioned in the CML
DTD.
Any CML element may have attributes:
- title
- id
- dictRef
- convention
and convenience get/set methods are provided for all, through
the interfaces AttributeTitle, AttributeId and AttributeConvention.
An element (FOO) subclassed from a AbstractBase may be constructed in the
following ways:
- FOO(). Creates a new empty element with null values of the
attributes. Required for newInstance(), but use carefully since
it has no tagName and no document associated with it.
- FOO(String tagName, Document document). Creates an empty
element with null attribute names.
- FOO(org.w3c.dom.Element element). Creates a subclassed Element with
the same attribute values as the input Element. Used when a DOM has
been created with non-CML-aware software. The routine
makeAndProcessSubclass(Element element) will replace the current Element
with the appropriate CML subclass.
- FOO(String title, String id, String dictRef, String conventionName).
Makes subclassed Element and sets attribute values.
| Fields inherited from interface org.xmlcml.cml.AbstractBase |
ANGLE, ATOM, ATOMARRAY, ATOMPARITY, BOND, BONDARRAY, BONDSTEREO, BUILTIN, CML, CML_PREFIX, CRYSTAL, ELECTRON, ELEMENT_COUNT, ELEMENT_NAMES, EXECUTE, FEATURE, FLOAT, FLOAT_TYPE, FLOATARRAY, FLOATMATRIX, FORMULA, INTEGER, INTEGER_TYPE, INTEGERARRAY, LINK, LIST, MOLECULE, NAMESPACE_URI, PACKAGE_NAME, REACTION, SEQUENCE, STRING, STRING_TYPE, STRINGARRAY, TORSION, UNK, UNK_ELEM, UNKNOWN |
| 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.cmlimpl.CMLBaseImpl |
addToThisLog, addTracer, buildXMLTest, convertChildrenToSubclass, copyAndExtractCommonAttributes, createDefaultTreeStyle, debug, debug, getClassTagName, getCMLBaseImpl, getConventionName, getDefaultPrefix, getDictionaryEntry, getDictRef, getDisplay, getId, getMessageBodies, getMessageCodes, getStringValue, getTableCellEditor, getTableCellEditor, getTableCellRenderer, getTableCellRenderer, getTitle, getTreeStyle, help, isTrace, main, processDOM, processDOM, processDOMHasConvention, processDOMHasConvention, processDOMHasCount, processDOMHasDictRef, processDOMHasDictRef, processDOMHasId, processDOMHasId, processDOMHasSize, processDOMHasTitle, processDOMHasTitle, processDOMHasUnits, readXMLTest, removeTracer, setConventionName, setDictionaryEntryPanel, setDictRef, setId, setTitle, setTrace, setTreeStyle, showDictionaryEntry, showElementNames, test1, trace, updateDOM, updateDOM, updateDOMFromVector, updateDOMHasConvention, updateDOMHasConvention, updateDOMHasCount, updateDOMHasDictRef, updateDOMHasDictRef, updateDOMHasId, updateDOMHasId, updateDOMHasSize, updateDOMHasTitle, updateDOMHasTitle, updateDOMHasUnits |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.w3c.dom.Element |
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS |
| 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 |
JUMBOBaseImpl
public JUMBOBaseImpl()
- create a Node WITHOUT tagName OR document. Use with care
JUMBOBaseImpl
public JUMBOBaseImpl(java.lang.String tagName,
org.w3c.dom.Document document)
- used when creating new nodes in a DOM
JUMBOBaseImpl
public JUMBOBaseImpl(org.w3c.dom.Element element)
- used when analysing a DOM
JUMBOBaseImpl
public JUMBOBaseImpl(java.lang.String tagName,
org.w3c.dom.Document document,
java.lang.String title,
java.lang.String id,
java.lang.String dictRef,
java.lang.String conventionName)
convertToSubclass
public static PMRElement convertToSubclass(org.w3c.dom.Element element)
throws java.lang.Exception
- recursively process all nodes. Assumes we have built a DOM
and all Nodes are of type Element. They need to be converted
to PMRElement or a subclass of it
getSubClassedElement
public static PMRElement getSubClassedElement(java.lang.String name,
org.xmlcml.cml.CMLDocument cmlDocument)
throws java.lang.Exception
- create a PMRElement (usually a AbstractBase) and processDOM() it.