|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.beandocument.BeanBaseNode
net.beandocument.BeanDocument
Wraps a Java bean into a pseudo XML document instance.
This document implementation can be used by the
class
which is able to construct new instances of the document by using a simple bean.
BeanDocumentBuilder
BeanDocumentBuilder.getDocument(Object)
Field Summary | |
protected BeanElementFactory |
elementFactory
Element factory to use for creating new child nodes |
Fields inherited from class net.beandocument.BeanBaseNode |
owner, parent |
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 |
BeanDocument(BeanElementFactory elementFactory,
java.lang.Object bean)
Creates a new document based on the given bean |
Method Summary | |
org.w3c.dom.Attr |
createAttribute(java.lang.String name)
NOTE: This function is not implemented and therefore will just throw an exception! |
org.w3c.dom.Attr |
createAttributeNS(java.lang.String namespace,
java.lang.String name)
NOTE: This function is not implemented and therefore will just throw an exception! |
org.w3c.dom.CDATASection |
createCDATASection(java.lang.String content)
NOTE: This function is not implemented and therefore will just throw an exception! |
org.w3c.dom.Comment |
createComment(java.lang.String content)
NOTE: This function is not implemented and therefore will just throw an exception! |
org.w3c.dom.DocumentFragment |
createDocumentFragment()
Creates a new document fragment |
org.w3c.dom.Element |
createElement(java.lang.String name)
NOTE: This function is not implemented and therefore will just throw an exception! |
org.w3c.dom.Element |
createElementNS(java.lang.String namespace,
java.lang.String name)
NOTE: This function is not implemented and therefore will just throw an exception! |
org.w3c.dom.EntityReference |
createEntityReference(java.lang.String name)
NOTE: This function is not implemented and therefore will just throw an exception! |
org.w3c.dom.ProcessingInstruction |
createProcessingInstruction(java.lang.String target,
java.lang.String data)
NOTE: This function is not implemented and therefore will just throw an exception! |
org.w3c.dom.Text |
createTextNode(java.lang.String text)
NOTE: This function is not implemented and therefore will just throw an exception! |
org.w3c.dom.NamedNodeMap |
getAttributes()
Retrieves all attributes of the current document This will always return null since the document itself has not attributes |
org.w3c.dom.NodeList |
getChildNodes()
Retrieves all child nodes of the current element |
org.w3c.dom.DocumentType |
getDoctype()
Returns null as document type - beans to not define a specific document type |
org.w3c.dom.Element |
getDocumentElement()
Returns the bean documents root element |
org.w3c.dom.Element |
getElementById(java.lang.String id)
Tries to retrieve the element with the given ID - this feature is not implemented! |
org.w3c.dom.NodeList |
getElementsByTagName(java.lang.String name)
NOTE: This functionality is not implemented since it could lead to infinite crawls. |
org.w3c.dom.NodeList |
getElementsByTagNameNS(java.lang.String namespace,
java.lang.String name)
NOTE: This functionality is not implemented since it could lead to infinite crawls. |
org.w3c.dom.Node |
getFirstChild()
Returns the first child of the document - which matches the root element |
org.w3c.dom.DOMImplementation |
getImplementation()
NOTE: This function is not implemented and therefore will just throw an exception! |
org.w3c.dom.Node |
getLastChild()
Returns the last child of the document - which matches the root element |
java.lang.String |
getLocalName()
Retrieves the local name - since Document has no name, will always return null |
org.w3c.dom.Node |
getNextSibling()
Retrieves the next sibling - since Document itself has no siblings, will always return null |
java.lang.String |
getNodeName()
Returns the name of the Document node, always the fixed "#document" value |
short |
getNodeType()
Returns node type of this instance |
java.lang.String |
getNodeValue()
Retrieves the node value - since Document itself has no value, will always return null |
org.w3c.dom.Document |
getOwnerDocument()
Retrieves the owner document - since Document itself is a document, will always return null |
org.w3c.dom.Node |
getParentNode()
Retrieves the parent node - since Document has no parent, will always return null |
org.w3c.dom.Node |
getPreviousSibling()
Retrieves the previous sibling - since Document itself has no siblings, will always return null |
boolean |
hasAttributes()
Boolean value if the document has attributes |
boolean |
hasChildNodes()
Boolean value if the document has child nodes |
org.w3c.dom.Node |
importNode(org.w3c.dom.Node node,
boolean recursive)
NOTE: This function is not implemented and therefore will just throw an exception! |
Methods inherited from class net.beandocument.BeanBaseNode |
appendChild, cloneNode, getElementFactory, getNamespaceURI, getPrefix, insertBefore, isSupported, normalize, removeChild, replaceChild, setNextSibling, setNodeValue, setPrefix, setPreviousSibling |
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 |
appendChild, cloneNode, getNamespaceURI, getPrefix, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix |
Field Detail |
protected final BeanElementFactory elementFactory
Constructor Detail |
protected BeanDocument(BeanElementFactory elementFactory, java.lang.Object bean)
elementFactory
- Element factory to use for all child elementsbean
- Java bean to create the document instance fromMethod Detail |
public org.w3c.dom.Attr createAttribute(java.lang.String name) throws org.w3c.dom.DOMException
createAttribute
in interface org.w3c.dom.Document
name
- Name of the attribute to create - ignored by this implementation
org.w3c.dom.DOMException
- If method is calledDocument.createAttribute(java.lang.String)
public org.w3c.dom.Attr createAttributeNS(java.lang.String namespace, java.lang.String name) throws org.w3c.dom.DOMException
createAttributeNS
in interface org.w3c.dom.Document
namespace
- Namespace for the attribute to create - ignored by this implementationname
- Name of the attribute to create - ignored by this implementation
org.w3c.dom.DOMException
- If method is calledDocument.createAttributeNS(java.lang.String, java.lang.String)
public org.w3c.dom.CDATASection createCDATASection(java.lang.String content) throws org.w3c.dom.DOMException
createCDATASection
in interface org.w3c.dom.Document
content
- New content of the CDATA section which should be created - ignored by this implementation
org.w3c.dom.DOMException
- If method is calledDocument.createCDATASection(java.lang.String)
public org.w3c.dom.Comment createComment(java.lang.String content)
createComment
in interface org.w3c.dom.Document
content
- New content of the comment section which should be created - ignored by this implementation
java.lang.IllegalArgumentException
- If the method is calledDocument.createComment(java.lang.String)
public org.w3c.dom.DocumentFragment createDocumentFragment()
createDocumentFragment
in interface org.w3c.dom.Document
Document.createDocumentFragment()
public org.w3c.dom.Element createElement(java.lang.String name) throws org.w3c.dom.DOMException
createElement
in interface org.w3c.dom.Document
name
- New element name which should be created - ignored by this implementation
org.w3c.dom.DOMException
- If method is calledDocument.createElement(java.lang.String)
public org.w3c.dom.Element createElementNS(java.lang.String namespace, java.lang.String name) throws org.w3c.dom.DOMException
createElementNS
in interface org.w3c.dom.Document
namespace
- Namespace for the element to create - ignored by this implementationname
- New element name which should be created - ignored by this implementation
org.w3c.dom.DOMException
- If method is calledDocument.createElementNS(java.lang.String, java.lang.String)
public org.w3c.dom.EntityReference createEntityReference(java.lang.String name) throws org.w3c.dom.DOMException
createEntityReference
in interface org.w3c.dom.Document
name
- New entity reference name which should be created - ignored by this implementation
org.w3c.dom.DOMException
- If method is calledDocument.createEntityReference(java.lang.String)
public org.w3c.dom.ProcessingInstruction createProcessingInstruction(java.lang.String target, java.lang.String data) throws org.w3c.dom.DOMException
createProcessingInstruction
in interface org.w3c.dom.Document
target
- New processing instruction target - ignored by this implementationdata
- Data for processing instruction - ignored by this implementation
org.w3c.dom.DOMException
- If method is calledDocument.createProcessingInstruction(java.lang.String, java.lang.String)
public org.w3c.dom.Text createTextNode(java.lang.String text)
createTextNode
in interface org.w3c.dom.Document
text
- New text to use for node - ignored by this implementation
java.lang.IllegalArgumentException
- If the method is calledDocument.createTextNode(java.lang.String)
public org.w3c.dom.NamedNodeMap getAttributes()
getAttributes
in interface org.w3c.dom.Node
Node.getAttributes()
public org.w3c.dom.NodeList getChildNodes()
getChildNodes
in interface org.w3c.dom.Node
Node.getChildNodes()
public org.w3c.dom.DocumentType getDoctype()
getDoctype
in interface org.w3c.dom.Document
Document.getDoctype()
public org.w3c.dom.Element getDocumentElement()
getDocumentElement
in interface org.w3c.dom.Document
Document.getDocumentElement()
public org.w3c.dom.Element getElementById(java.lang.String id)
getElementById
in interface org.w3c.dom.Document
id
- ID to search for in the given document
Document.getElementById(java.lang.String)
public org.w3c.dom.NodeList getElementsByTagName(java.lang.String name)
getElementsByTagName
in interface org.w3c.dom.Document
name
- Tag name to search for in the document
Document.getElementsByTagName(java.lang.String)
public org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String namespace, java.lang.String name)
getElementsByTagNameNS
in interface org.w3c.dom.Document
namespace
- Namespace to search for in the documentname
- Tag name to search for in the document
Document.getElementsByTagNameNS(java.lang.String, java.lang.String)
public org.w3c.dom.Node getFirstChild()
getFirstChild
in interface org.w3c.dom.Node
Node.getFirstChild()
public org.w3c.dom.DOMImplementation getImplementation()
getImplementation
in interface org.w3c.dom.Document
java.lang.IllegalArgumentException
- If the method is calledDocument.getImplementation()
public org.w3c.dom.Node getLastChild()
getLastChild
in interface org.w3c.dom.Node
Node.getLastChild()
public java.lang.String getLocalName()
getLocalName
in interface org.w3c.dom.Node
Node.getLocalName()
public org.w3c.dom.Node getNextSibling()
getNextSibling
in interface org.w3c.dom.Node
getNextSibling
in class BeanBaseNode
Node.getNextSibling()
public java.lang.String getNodeName()
getNodeName
in interface org.w3c.dom.Node
Node.getNodeName()
public short getNodeType()
getNodeType
in interface org.w3c.dom.Node
Node.getNodeType()
public java.lang.String getNodeValue() throws org.w3c.dom.DOMException
getNodeValue
in interface org.w3c.dom.Node
org.w3c.dom.DOMException
- (Not really, just returns null)Node.getNodeValue()
public org.w3c.dom.Document getOwnerDocument()
getOwnerDocument
in interface org.w3c.dom.Node
getOwnerDocument
in class BeanBaseNode
Node.getOwnerDocument()
public org.w3c.dom.Node getParentNode()
getParentNode
in interface org.w3c.dom.Node
getParentNode
in class BeanBaseNode
Node.getParentNode()
public org.w3c.dom.Node getPreviousSibling()
getPreviousSibling
in interface org.w3c.dom.Node
getPreviousSibling
in class BeanBaseNode
Node.getPreviousSibling()
public boolean hasAttributes()
hasAttributes
in interface org.w3c.dom.Node
Node.hasAttributes()
public boolean hasChildNodes()
hasChildNodes
in interface org.w3c.dom.Node
Node.hasChildNodes()
public org.w3c.dom.Node importNode(org.w3c.dom.Node node, boolean recursive) throws org.w3c.dom.DOMException
importNode
in interface org.w3c.dom.Document
node
- Node to import - ignored by this implementationrecursive
- flag if the node should be imported recursively - ignored by this implementation
org.w3c.dom.DOMException
- If method is calledDocument.importNode(org.w3c.dom.Node, boolean)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |