uk.co.demon.ursus.dom
Class PMRElementImpl

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
Direct Known Subclasses:
CMLBaseImpl, STElementImpl, ValidityImpl

public class PMRElementImpl
extends AbstractElementImpl
implements PMRElement

See Also:
Serialized Form

Field Summary
static java.lang.String CLASSNAME
           
protected  boolean 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 uk.co.demon.ursus.dom.PMRElement
CLASSNAME, LOCAL, QUALIFIED, UNIVERSAL
 
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
PMRElementImpl()
          should not make an isolated PMRElement
PMRElementImpl(org.w3c.dom.Element element)
          make a subclassed Element, in context, destroying the original node
PMRElementImpl(org.w3c.dom.Element element, org.w3c.dom.Document toDocument)
          makes a new Element from an existing Element in new document context Adds attributes but not children
PMRElementImpl(java.lang.String tagName, org.w3c.dom.Document document)
          have to make an element in conjunction with a document
PMRElementImpl(java.lang.String tagName, org.w3c.dom.Element element)
          makes a new Element from an existing Element (ElementNode).
 
Method Summary
 void appendTo(org.w3c.dom.Node parentNode)
          appends this node to a parent.
 Validity getValidity()
          allows subclasses to decide whether the node is valid (default true)
protected  void initialise()
           
 void processDescendants()
          process an element.
 void processDOM()
          process an element.
 void setProcessFlag(boolean processFlag)
          set flag indicating element is to be processed.
 
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

processFlag

protected boolean processFlag

CLASSNAME

public static final java.lang.String CLASSNAME
Constructor Detail

PMRElementImpl

public PMRElementImpl()
should not make an isolated PMRElement

PMRElementImpl

public PMRElementImpl(java.lang.String tagName,
                      org.w3c.dom.Document document)
have to make an element in conjunction with a document

PMRElementImpl

public PMRElementImpl(java.lang.String tagName,
                      org.w3c.dom.Element element)
makes a new Element from an existing Element (ElementNode). Adds attributes, but NOT children

PMRElementImpl

public PMRElementImpl(org.w3c.dom.Element element,
                      org.w3c.dom.Document toDocument)
makes a new Element from an existing Element in new document context Adds attributes but not children

PMRElementImpl

public PMRElementImpl(org.w3c.dom.Element element)
make a subclassed Element, in context, destroying the original node
Method Detail

initialise

protected void initialise()

processDescendants

public void processDescendants()
                        throws java.lang.Exception
process an element. The function is class-specific and the default is noop. This may be called immediately after an element has been created, when the default is to recursively process descendants, in post-order (i.e. children processed before parents
Specified by:
processDescendants in interface PMRElement

processDOM

public void processDOM()
                throws java.lang.Exception
process an element. After processing, processFlag is set to false.
Specified by:
processDOM in interface PMRElement
Throws:
java.lang.Exception - these can be of many kinds and may include class-specific ones

setProcessFlag

public void setProcessFlag(boolean processFlag)
set flag indicating element is to be processed. elements with flag setAfter processDOM() has been called, flag is et to false. Caller is responsible for when and where process() is called.
Specified by:
setProcessFlag in interface PMRElement
Parameters:
boolean - process if true, process element

appendTo

public void appendTo(org.w3c.dom.Node parentNode)
appends this node to a parent. This allows a subclass to decide whether it can do this operation
Specified by:
appendTo in interface PMRElement

getValidity

public Validity getValidity()
allows subclasses to decide whether the node is valid (default true)
Specified by:
getValidity in interface PMRElement