org.xmlcml.cml
Interface CMLBase

All Known Subinterfaces:
AbstractAngle, AbstractAtom, AbstractAtomRef, AbstractBond, AbstractBuiltinContainer, AbstractStringVal, Angle, Atom, AtomArray, Bond, BondArray, CML, Crystal, Electron, Execute, Feature, FloatArray, FloatMatrix, FloatVal, Formula, HasExecute, IntegerArray, IntegerVal, Link, List, Molecule, NumericVal, Reaction, Sequence, StringArray, StringVal, Torsion
All Known Implementing Classes:
CMLBaseImpl

public interface CMLBase
extends PMRElement, HasTitle, HasDictRef, HasId, HasConvention

The base class for all elementObjects mentioned in the CML DTD.

Any CML element may have attributes:

and convenience get/set methods are provided for all, through the interfaces HasTitle, HasId and HasConvention.

An element (FOO) subclassed from a CMLBase may be constructed in the following ways:


Field Summary
static int ANGLE
           
static int ATOM
           
static int ATOMARRAY
           
static int BOND
           
static int BONDARRAY
           
static java.lang.String BUILTIN
          "builtin" attribute name
static int CML
           
static int CRYSTAL
           
static int ELECTRON
           
static int ELEMENT_COUNT
           
static java.lang.String[] ELEMENT_NAMES
           
static int EXECUTE
           
static int FEATURE
           
static int FLOAT
           
static int FLOAT_TYPE
           
static int FLOATARRAY
           
static int FLOATMATRIX
           
static int FORMULA
           
static int INTEGER
           
static int INTEGER_TYPE
           
static int INTEGERARRAY
           
static int LINK
           
static int LIST
           
static int MOLECULE
           
static java.lang.String PACKAGE_NAME
           
static int REACTION
           
static int SEQUENCE
           
static int STRING
           
static int STRING_TYPE
           
static int STRINGARRAY
           
static int TORSION
           
static int UNK
           
static int UNK_ELEM
           
static int 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
 
Method Summary
 void addValidity(CMLValidity validity)
          potentially subclassable to determine whether an element has valid attributes and content.
 void debug(java.io.Writer w)
          output debug info to Writer and return String equivalent (e.g.
 boolean isValid()
          convenience to avoid analysing Validity
 void processDOM()
          carries out class-specific processing for subclasses of PMRElement.
 void updateDOM()
           
 
Methods inherited from interface uk.co.demon.ursus.dom.PMRElement
appendTo, getValidity, processDescendants, setProcessFlag, setTagName
 
Methods inherited from interface org.xmlcml.cml.HasTitle
getTitle, setTitle, updateDOMHasTitle
 
Methods inherited from interface org.xmlcml.cml.HasDictRef
getDictRef, setDictRef, updateDOMHasDictRef
 
Methods inherited from interface org.xmlcml.cml.HasId
getId, setId, updateDOMHasId
 
Methods inherited from interface org.xmlcml.cml.HasConvention
getConventionName, setConventionName, updateDOMHasConvention
 
Methods inherited from interface org.w3c.dom.Element
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS
 

Field Detail

PACKAGE_NAME

public static final java.lang.String PACKAGE_NAME

UNK_ELEM

public static final int UNK_ELEM

ELEMENT_NAMES

public static final java.lang.String[] ELEMENT_NAMES

UNK

public static final int UNK

ANGLE

public static final int ANGLE

ATOM

public static final int ATOM

ATOMARRAY

public static final int ATOMARRAY

BOND

public static final int BOND

BONDARRAY

public static final int BONDARRAY

CML

public static final int CML

CRYSTAL

public static final int CRYSTAL

ELECTRON

public static final int ELECTRON

EXECUTE

public static final int EXECUTE

FEATURE

public static final int FEATURE

FLOAT

public static final int FLOAT

FLOATARRAY

public static final int FLOATARRAY

FLOATMATRIX

public static final int FLOATMATRIX

FORMULA

public static final int FORMULA

INTEGER

public static final int INTEGER

INTEGERARRAY

public static final int INTEGERARRAY

LINK

public static final int LINK

LIST

public static final int LIST

MOLECULE

public static final int MOLECULE

REACTION

public static final int REACTION

SEQUENCE

public static final int SEQUENCE

STRING

public static final int STRING

STRINGARRAY

public static final int STRINGARRAY

TORSION

public static final int TORSION

ELEMENT_COUNT

public static final int ELEMENT_COUNT

BUILTIN

public static final java.lang.String BUILTIN
"builtin" attribute name

UNKNOWN

public static final int UNKNOWN

STRING_TYPE

public static final int STRING_TYPE

FLOAT_TYPE

public static final int FLOAT_TYPE

INTEGER_TYPE

public static final int INTEGER_TYPE
Method Detail

addValidity

public void addValidity(CMLValidity validity)
potentially subclassable to determine whether an element has valid attributes and content.
Returns:
boolean truue by default

isValid

public boolean isValid()
convenience to avoid analysing Validity

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()
Parameters:
Writer - w Writer to output to
Returns:
the String equivalent

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
Specified by:
processDOM in interface PMRElement

updateDOM

public void updateDOM()
               throws CMLException