|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectelectric.xml.Node
electric.xml.Child
Child is the abstract root of all nodes that have a parent, and includes method for adding/inserting siblings
Field Summary | |
protected Parent |
parent
|
Fields inherited from class electric.xml.Node |
list, next, prev |
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 electric.xml.IXMLConstants |
ATTLIST_START, ATTLIST_STOP, CDATA, CDATA_START, CDATA_STOP, CLOSE_TAG, COLON, COMMENT_START, COMMENT_STOP, DOCTYPE_START, DOCTYPE_STOP, ELEMENTDECL_START, ELEMENTDECL_STOP, ENCODING, ENTITYDECL_START, ENTITYDECL_STOP, ID, ID_CASE, INSTRUCTION_START, INSTRUCTION_STOP, NEGATIVE_INFINITY, NOT_A_NUMBER, NOTATIONDECL_START, NOTATIONDECL_STOP, NULL, OPEN_TAG, POSITIVE_INFINITY, PUBLIC, SPECIALS, STANDALONE, SUBSTITUTES, SYSTEM, UNDEFINED, VERSION, XML, XML_NAMESPACE, XMLDECL_START, XMLDECL_STOP, XMLNS, XMLNS_NAMESPACE |
Fields inherited from interface electric.xml.IDOMConstants |
CDATA_SECTION_NAME, COMMENT_NAME, CORE, DOCUMENT_FRAGMENT_NAME, DOCUMENT_NAME, HIERARCHY_REQUEST_ERR, TEXT_NAME |
Constructor Summary | |
protected |
Child()
Construct a Child with no parent. |
|
Child(Parent parent)
Construct a Child with the specified parent. |
Method Summary | |
abstract java.lang.Object |
clone()
Return a clone of this Node. |
org.w3c.dom.Node |
cloneNode(boolean deep)
Return a duplicate of this node, i.e., serve as a generic copy constructor for nodes. |
ByteArray |
getByteArray()
Write myself with no indentation to a ByteArray and return the ByteArray. |
ByteArray |
getByteArray(boolean expandEmptyElements)
Write myself with no indentation to a ByteArray and return the ByteArray. |
ByteArray |
getByteArray(NodeWriter nodeWriter)
|
byte[] |
getBytes()
Write myself with no indentation to a byte array and then return the byte array. |
byte[] |
getBytes(boolean expandEmptyElements)
Write myself with no indentation to a byte array and then return the byte array. |
byte[] |
getBytes(java.lang.String xmlString)
|
Document |
getDocument()
Return my parent's document, or null if I have no parent. |
Child |
getNextSiblingChild()
Return my next sibling, or null if I have none. |
org.w3c.dom.Document |
getOwnerDocument()
Return the Document object associated with this node. |
Parent |
getParent()
Return my parent. |
org.w3c.dom.Node |
getParentNode()
Return the parent of this node. |
Child |
getPreviousSiblingChild()
Return my previous sibling, or null if I have none. |
Element |
getRoot()
Return my parent's root, or null if I have no parent. |
void |
replaceWith(Child child)
Replace myself with the specified Child. |
Child |
setNextSiblingChild(Child child)
Set my next sibling to be the specified child. |
void |
setParent(Parent parent)
Set my parent. |
Child |
setPreviousSiblingChild(Child child)
Set my previous sibling to be the specified child. |
java.lang.String |
toString()
Write myself to a String, starting with indent level 0, and then return the String. |
java.lang.String |
toString(int indent)
Write myself to a String, starting at the specified indent level, and then return the String. |
void |
write(java.io.File file)
Write myself, starting at indent level 0, to the specified File. |
void |
write(java.io.OutputStream stream)
Write myself, starting at indent level 0, to the specified OutputStream. |
void |
write(java.io.Writer writer)
Write myself, starting at indent level 0, to the specified Writer. |
Methods inherited from class electric.xml.Node |
appendChild, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNextSiblingNode, getNode, getNode, getNodeName, getNodes, getNodeType, getNodeValue, getPrefix, getPreviousSibling, getPreviousSiblingNode, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, read, remove, removeChild, replaceChild, setNextSiblingNode, setNodeValue, setPrefix, setPreviousSiblingNode, size, write |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Parent parent
Constructor Detail |
protected Child()
public Child(Parent parent)
parent
- The parent.Method Detail |
public java.lang.String toString()
public java.lang.String toString(int indent)
indent
- The initial indent level.public abstract java.lang.Object clone()
public void setParent(Parent parent)
parent
- The new parent value.public Parent getParent()
public void replaceWith(Child child)
child
- The Child.public Child getNextSiblingChild()
public Child setNextSiblingChild(Child child)
child
- The child to add
public Child getPreviousSiblingChild()
public Child setPreviousSiblingChild(Child child)
child
- The child to add
public Document getDocument()
public Element getRoot()
public void write(java.io.Writer writer) throws java.io.IOException
writer
- The Writer.
java.io.IOException
- If an I/O exception occurs.public void write(java.io.File file) throws java.io.IOException
file
- The File to write to.
java.io.IOException
- If an I/O exception occurs.public void write(java.io.OutputStream stream) throws java.io.IOException
stream
- The OutputStream to write to.
java.io.IOException
- If an I/O exception occurs.public ByteArray getByteArray() throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
public ByteArray getByteArray(boolean expandEmptyElements) throws java.io.UnsupportedEncodingException
expandEmptyElements
- Expand empty elements?
java.io.UnsupportedEncodingException
public ByteArray getByteArray(NodeWriter nodeWriter) throws java.io.UnsupportedEncodingException
nodeWriter
- The NodeWriter.
java.io.UnsupportedEncodingException
public byte[] getBytes(java.lang.String xmlString) throws java.io.UnsupportedEncodingException
xmlString
-
java.io.UnsupportedEncodingException
public byte[] getBytes() throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
public byte[] getBytes(boolean expandEmptyElements) throws java.io.UnsupportedEncodingException
expandEmptyElements
- Expand empty elements?
java.io.UnsupportedEncodingException
public org.w3c.dom.Node cloneNode(boolean deep)
cloneNode
in interface org.w3c.dom.Node
cloneNode
in class Node
deep
- If true, recursively clone the subtree under the specified node;
if false, clone only the node itself (and its attributes, if it is an Element).public org.w3c.dom.Document getOwnerDocument()
getOwnerDocument
in interface org.w3c.dom.Node
getOwnerDocument
in class Node
public org.w3c.dom.Node getParentNode()
getParentNode
in interface org.w3c.dom.Node
getParentNode
in class Node
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |