net.beandocument
Class BeanBaseNode

java.lang.Object
  extended bynet.beandocument.BeanBaseNode
All Implemented Interfaces:
org.w3c.dom.Node
Direct Known Subclasses:
BeanAttribute, BeanDocument, BeanDocumentFragment, BeanElement

public abstract class BeanBaseNode
extends java.lang.Object
implements org.w3c.dom.Node

Base node implementation for all bean node stuff which is general for the DOM implementation

Author:
Jens Scheffler

Field Summary
protected  BeanDocument owner
          Owner document for this node
protected  BeanBaseNode parent
          parent element for this element instance
 
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
protected BeanBaseNode(BeanDocument owner, BeanBaseNode parent)
          Default Constructor
 
Method Summary
 org.w3c.dom.Node appendChild(org.w3c.dom.Node node)
          NOTE: This function is not implemented and therefore will just throw an exception!
 org.w3c.dom.Node cloneNode(boolean recursive)
          NOTE: This function is not implemented and therefore will just throw an exception!
protected  BeanElementFactory getElementFactory()
          Helper function to retrieve the current bean element factory instance
 java.lang.String getNamespaceURI()
          Retrieves the namespace of this node - will always be null since namespace support is not implemented
 org.w3c.dom.Node getNextSibling()
          Gets the next sibling in element context
 org.w3c.dom.Document getOwnerDocument()
          Retrieves the owner document of this element
 org.w3c.dom.Node getParentNode()
          Retrieves the parent element of this element
 java.lang.String getPrefix()
          Retrieves the namespace prefix of this node - will always return null since namespace support is not implemented
 org.w3c.dom.Node getPreviousSibling()
          Gets the previous sibling in element context
 org.w3c.dom.Node insertBefore(org.w3c.dom.Node newChild, org.w3c.dom.Node refChild)
          NOTE: This function is not implemented and therefore will just throw an exception!
 boolean isSupported(java.lang.String feature, java.lang.String version)
          Returns always false since no special features are implemented
 void normalize()
          Normalize the node - calls to this method will be ignored
 org.w3c.dom.Node removeChild(org.w3c.dom.Node node)
          NOTE: This function is not implemented and therefore will just throw an exception!
 org.w3c.dom.Node replaceChild(org.w3c.dom.Node newChild, org.w3c.dom.Node oldChild)
          NOTE: This function is not implemented and therefore will just throw an exception!
protected  void setNextSibling(BeanBaseNode element)
          Sets the next sibling when creating new elements
 void setNodeValue(java.lang.String value)
          NOTE: This function is not implemented and therefore will just throw an exception!
 void setPrefix(java.lang.String prefix)
          NOTE: This function is not implemented and therefore will just throw an exception!
protected  void setPreviousSibling(BeanBaseNode element)
          Sets the previous sibling when creating new elements
 
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.Node
getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNodeName, getNodeType, getNodeValue, hasAttributes, hasChildNodes
 

Field Detail

owner

protected BeanDocument owner
Owner document for this node


parent

protected final BeanBaseNode parent
parent element for this element instance

Constructor Detail

BeanBaseNode

protected BeanBaseNode(BeanDocument owner,
                       BeanBaseNode parent)
Default Constructor

Parameters:
owner - Owner document where this node belongs to
parent - Parent node of the new created node
Method Detail

appendChild

public final org.w3c.dom.Node appendChild(org.w3c.dom.Node node)
                                   throws org.w3c.dom.DOMException
NOTE: This function is not implemented and therefore will just throw an exception!

Specified by:
appendChild in interface org.w3c.dom.Node
Parameters:
node - Node to add - ignored by this implementation
Throws:
org.w3c.dom.DOMException - If method is called
See Also:
Node.appendChild(org.w3c.dom.Node)

cloneNode

public final org.w3c.dom.Node cloneNode(boolean recursive)
NOTE: This function is not implemented and therefore will just throw an exception!

Specified by:
cloneNode in interface org.w3c.dom.Node
Parameters:
recursive - Flag if depending nodes should be cloned recursive - ignored by this implementation
Returns:
(This function will never return normally)
Throws:
java.lang.IllegalArgumentException - If the method is called
See Also:
Node.cloneNode(boolean)

getNamespaceURI

public final java.lang.String getNamespaceURI()
Retrieves the namespace of this node - will always be null since namespace support is not implemented

Specified by:
getNamespaceURI in interface org.w3c.dom.Node
Returns:
null value
See Also:
Node.getNamespaceURI()

getPrefix

public final java.lang.String getPrefix()
Retrieves the namespace prefix of this node - will always return null since namespace support is not implemented

Specified by:
getPrefix in interface org.w3c.dom.Node
Returns:
null value
See Also:
Node.getPrefix()

insertBefore

public final org.w3c.dom.Node insertBefore(org.w3c.dom.Node newChild,
                                           org.w3c.dom.Node refChild)
                                    throws org.w3c.dom.DOMException
NOTE: This function is not implemented and therefore will just throw an exception!

Specified by:
insertBefore in interface org.w3c.dom.Node
Parameters:
newChild - The node to insert - ignored by this implementation
refChild - The reference node, i.e., the node before which the new node must be inserted
Returns:
(This function will never return normally)
Throws:
org.w3c.dom.DOMException - If method is called
See Also:
Node.insertBefore(org.w3c.dom.Node, org.w3c.dom.Node)

isSupported

public final boolean isSupported(java.lang.String feature,
                                 java.lang.String version)
Returns always false since no special features are implemented

Specified by:
isSupported in interface org.w3c.dom.Node
Parameters:
feature - The name of the feature to test
version - This is the version number of the feature to test
Returns:
Always false
See Also:
Node.isSupported(java.lang.String, java.lang.String)

normalize

public final void normalize()
Normalize the node - calls to this method will be ignored

Specified by:
normalize in interface org.w3c.dom.Node
See Also:
Node.normalize()

getOwnerDocument

public org.w3c.dom.Document getOwnerDocument()
Retrieves the owner document of this element

Specified by:
getOwnerDocument in interface org.w3c.dom.Node
Returns:
Owned document of the element
See Also:
Node.getOwnerDocument()

removeChild

public final org.w3c.dom.Node removeChild(org.w3c.dom.Node node)
                                   throws org.w3c.dom.DOMException
NOTE: This function is not implemented and therefore will just throw an exception!

Specified by:
removeChild in interface org.w3c.dom.Node
Parameters:
node - The node to remove - ignored by this implementation
Returns:
(This function will never return normally)
Throws:
org.w3c.dom.DOMException - If method is called
See Also:
Node.removeChild(org.w3c.dom.Node)

replaceChild

public final org.w3c.dom.Node replaceChild(org.w3c.dom.Node newChild,
                                           org.w3c.dom.Node oldChild)
                                    throws org.w3c.dom.DOMException
NOTE: This function is not implemented and therefore will just throw an exception!

Specified by:
replaceChild in interface org.w3c.dom.Node
Parameters:
newChild - The node to insert - ignored by this implementation
oldChild - The node to remove - ignored by this implementation
Returns:
(This function will never return normally)
Throws:
org.w3c.dom.DOMException - If method is called
See Also:
Node.replaceChild(org.w3c.dom.Node, org.w3c.dom.Node)

setNodeValue

public void setNodeValue(java.lang.String value)
                  throws org.w3c.dom.DOMException
NOTE: This function is not implemented and therefore will just throw an exception!

Specified by:
setNodeValue in interface org.w3c.dom.Node
Parameters:
value - New value to set - ignored by this implementation
Throws:
org.w3c.dom.DOMException - If method is called
See Also:
Node.setNodeValue(java.lang.String)

setPrefix

public final void setPrefix(java.lang.String prefix)
                     throws org.w3c.dom.DOMException
NOTE: This function is not implemented and therefore will just throw an exception!

Specified by:
setPrefix in interface org.w3c.dom.Node
Parameters:
prefix - Prefix to set - ignored by this implementation
Throws:
org.w3c.dom.DOMException - If method is called
See Also:
Node.setPrefix(java.lang.String)

getElementFactory

protected BeanElementFactory getElementFactory()
Helper function to retrieve the current bean element factory instance

Returns:
Bean analyzer instance

getPreviousSibling

public org.w3c.dom.Node getPreviousSibling()
Gets the previous sibling in element context

Specified by:
getPreviousSibling in interface org.w3c.dom.Node
Returns:
Previous sibling in element context of this node
See Also:
Node.getPreviousSibling()

getNextSibling

public org.w3c.dom.Node getNextSibling()
Gets the next sibling in element context

Specified by:
getNextSibling in interface org.w3c.dom.Node
Returns:
Next sibling in element context of this node
See Also:
Node.getNextSibling()

setNextSibling

protected void setNextSibling(BeanBaseNode element)
Sets the next sibling when creating new elements

Parameters:
element - Element to set as next sibling

setPreviousSibling

protected void setPreviousSibling(BeanBaseNode element)
Sets the previous sibling when creating new elements

Parameters:
element - Element to set as next sibling

getParentNode

public org.w3c.dom.Node getParentNode()
Retrieves the parent element of this element

Specified by:
getParentNode in interface org.w3c.dom.Node
Returns:
Parent Element node
See Also:
Node.getParentNode()