Java Doc for NodeImpl.java in  » Database-JDBC-Connection-Pool » octopus » org » enhydra » xml » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database JDBC Connection Pool » octopus » org.enhydra.xml 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.enhydra.xml.NodeImpl

All known Subclasses:   org.enhydra.xml.AttrImpl,  org.enhydra.xml.ElementImpl,  org.enhydra.xml.CharacterDataImpl,
NodeImpl
public class NodeImpl implements Node,NodeList(Code)

author:
   Tweety
author:
   A class representing a node in a meta-data tree, which implements
author:
   the
author:
  

Namespaces are ignored in this implementation. The terms "tag
author:
   name" and "node name" are always considered to be synonymous.
version:
   1.0



Field Summary
protected  NodeImplfirstChild
     The first (leftmost) child node of this node, or null if this node is a leaf node.
protected  NodeImpllastChild
     The last (rightmost) child node of this node, or null if this node is a leaf node.
protected  NodeImplnextSibling
     The next (right) sibling node of this node, or null if this node is its parent's last child node.
protected  StringnodeName
     The name (tag) of the node as a String.
protected  StringnodeValue
     The value of the node as a String.
protected  intnumChildren
     The number of child nodes.
protected  DocumentownerDocument
     Owner document.
protected  NodeImplparent
     The parent node of this node, or null if this node forms the root of its own tree.
protected  NodeImplpreviousSibling
     The previous (left) sibling node of this node, or null if this node is its parent's first child node.
protected  shorttype
     The type of the node as a short.

Constructor Summary
public  NodeImpl()
     Constructs an empty NodeImpl.
public  NodeImpl(NodeImpl node)
     Constructs a NodeImpl from the given node, without creating entire children subtree.
public  NodeImpl(Node node)
    
public  NodeImpl(Node node, boolean deep)
     Constructs an NodeImpl from a given node, as a Node, and deep as boolean.
public  NodeImpl(Document ownerDoc, String name)
     Constructs a NodeImpl from the given document owner and node name.
public  NodeImpl(Document ownerDoc, String nodeName, short type)
     Constructs an NodeImpl from a given document owner, node name and node type.
public  NodeImpl(Document ownerDoc, String nodeName, short type, String value)
     Constructs an NodeImpl from a given document owner, node name, node type and node value.

Method Summary
public  NodeappendChild(Node newChild)
     Adds the node newChild to the end of the list of children of this node.
Parameters:
  newChild - the Node to insert.
protected  voidbeginToString(StringBuffer sb, Indent indent)
     Method beginToString should be redefined in extended classes. Each type of node has its own beginToString and endToString.
protected  voidcheckNode(Node node)
     Check that the node is either null or an NodeImpl.
public  NodecloneNode(boolean deep)
     Returns a duplicate of this node.
public  shortcompareDocumentPosition(Node other)
    
protected  voidendToString(StringBuffer sb, Indent indent)
     Method endToString should be redefined in extended classes. Each type of node has its own beginToString and endToString.
public  NamedNodeMapgetAttributes()
     Returns all attribute nodes of this node.
public  StringgetBaseURI()
    
public  NodeListgetChildNodes()
     Returns all child nodes of this node, or null if the node has no children.
public  ObjectgetFeature(String feature, String version)
    
public  NodegetFirstChild()
     Returns the first child of this node, or null if the node has no children.
public  NodegetLastChild()
     Returns the last child of this node, or null if the node has no children.
public  intgetLength()
     Returns number of child nodes.
public  StringgetLocalName()
     Equivalent to getNodeName.
public  StringgetNamespaceURI()
    
public  NodegetNextSibling()
     Returns the next sibling of this node, or null if the node has no next sibling.
public  StringgetNodeName()
     Returns the name associated with this node.
public  shortgetNodeType()
     Returns the node type.
public  StringgetNodeValue()
     Returns the value associated with this node.
public  DocumentgetOwnerDocument()
     Returns null, since NodeImpls do not belong to any Document.
public  NodegetParentNode()
     Returns the parent of this node.
public  StringgetPrefix()
     Returns null, since namespaces are not supported.
public  NodegetPreviousSibling()
     Returns the previous sibling of this node, or null if this node has no previous sibling.
public  StringgetTextContent()
    
public  ObjectgetUserData(String key)
    
public  booleanhasAttributes()
     Returns true, if this node has attributes, otherwise false.
public  booleanhasChildNodes()
     Returns true if this node has child nodes.
protected  voidinitNodeImplChildren(Node node)
     Creates the children subtree and adds to this node.
public  NodeinsertBefore(Node newChild, Node refChild)
     Inserts the node newChild before the existing child node refChild.
public  booleanisDefaultNamespace(String namespaceURI)
    
public  booleanisEqualNode(Node arg)
    
public  booleanisSameNode(Node other)
    
public  booleanisSupported(String feature, String version)
     Returns false since DOM features are not supported.
public  Nodeitem(int index)
     Returns child node with the given index.
public  StringlookupNamespaceURI(String prefix)
    
public  StringlookupPrefix(String namespaceURI)
    
protected  NodenewCommentInstance(Node node)
     Creates new instance of the CommentImpl class.
Parameters:
  node - , as a Node.
protected  NodenewDefaultInstance(Node node)
     Creates new instance of the NodeImpl class.
Parameters:
  node - , as a Node.
protected  NodenewElementInstance(Node node)
     Creates new instance of the ElementImpl class.
Parameters:
  node - , as a Node.
protected  NodenewTextInstance(Node node)
     Creates new instance of the TextImpl class.
Parameters:
  node - , as a Node.
public  voidnormalize()
     Does nothing, since NodeImpls do not contain Text children.
public  NoderemoveChild(Node oldChild)
     Removes the child node indicated by oldChild from the list of children, and returns it.
Parameters:
  oldChild - the Node to be removed.
public  NodereplaceChild(Node newChild, Node oldChild)
     Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node.
Parameters:
  newChild - the Node to insert.
Parameters:
  oldChild - the Node to be replaced.
public  voidsetNodeValue(String nodeValue)
     Sets the node value of this node.
public  voidsetPrefix(String prefix)
     Does nothing, since namespaces are not supported.
public  voidsetTextContent(String textContent)
    
public  ObjectsetUserData(String key, Object data, UserDataHandler handler)
    
public  StringtoString()
     Returns String representation of this node.
public  StringtoString(String tab)
     Returns String representation of this node.
Parameters:
  tab - tab for node indentation.

Field Detail
firstChild
protected NodeImpl firstChild(Code)
The first (leftmost) child node of this node, or null if this node is a leaf node.



lastChild
protected NodeImpl lastChild(Code)
The last (rightmost) child node of this node, or null if this node is a leaf node.



nextSibling
protected NodeImpl nextSibling(Code)
The next (right) sibling node of this node, or null if this node is its parent's last child node.



nodeName
protected String nodeName(Code)
The name (tag) of the node as a String.



nodeValue
protected String nodeValue(Code)
The value of the node as a String.



numChildren
protected int numChildren(Code)
The number of child nodes.



ownerDocument
protected Document ownerDocument(Code)
Owner document.



parent
protected NodeImpl parent(Code)
The parent node of this node, or null if this node forms the root of its own tree.



previousSibling
protected NodeImpl previousSibling(Code)
The previous (left) sibling node of this node, or null if this node is its parent's first child node.



type
protected short type(Code)
The type of the node as a short.




Constructor Detail
NodeImpl
public NodeImpl()(Code)
Constructs an empty NodeImpl.



NodeImpl
public NodeImpl(NodeImpl node)(Code)
Constructs a NodeImpl from the given node, without creating entire children subtree.
Parameters:
  node - , as a NodeImpl.



NodeImpl
public NodeImpl(Node node)(Code)
Constructs an NodeImpl from a given node (creates the children subtree too), as a Node
Parameters:
  node - , as a Node.



NodeImpl
public NodeImpl(Node node, boolean deep)(Code)
Constructs an NodeImpl from a given node, as a Node, and deep as boolean.
Parameters:
  node - , as a Node.
Parameters:
  deep - if true, recursively clone the subtreeunder the specified node; if false, clone only thenode itself.



NodeImpl
public NodeImpl(Document ownerDoc, String name)(Code)
Constructs a NodeImpl from the given document owner and node name.
Parameters:
  ownerDoc - the document owner of the node, as a Document.
Parameters:
  name - the name of the node, as a String.



NodeImpl
public NodeImpl(Document ownerDoc, String nodeName, short type)(Code)
Constructs an NodeImpl from a given document owner, node name and node type.
Parameters:
  ownerDoc - the document owner of the node, as a Document.
Parameters:
  nodeName - the name of the node, as a String.
Parameters:
  type - the type of the node, as a short.



NodeImpl
public NodeImpl(Document ownerDoc, String nodeName, short type, String value)(Code)
Constructs an NodeImpl from a given document owner, node name, node type and node value.
Parameters:
  ownerDoc - the document owner of the node, as a Document.
Parameters:
  nodeName - the name of the node, as a String.
Parameters:
  type - the type of the node, as a short.
Parameters:
  value - the value of the node, as a String.




Method Detail
appendChild
public Node appendChild(Node newChild)(Code)
Adds the node newChild to the end of the list of children of this node.
Parameters:
  newChild - the Node to insert. the node added.
exception:
  IllegalArgumentException - if newChild isnull.



beginToString
protected void beginToString(StringBuffer sb, Indent indent)(Code)
Method beginToString should be redefined in extended classes. Each type of node has its own beginToString and endToString. This was added to support writing of the xml file. The Element type of node: it writes the beginning tag, then calls the child's toString, and then writes the ending tag.
Parameters:
  sb - string buffer to add resulting string.
Parameters:
  indent - used in formating the output.



checkNode
protected void checkNode(Node node) throws DOMException(Code)
Check that the node is either null or an NodeImpl.
Parameters:
  node - , as a Node.
exception:
  DOMException - if node is not an instance of NodeImpl.



cloneNode
public Node cloneNode(boolean deep)(Code)
Returns a duplicate of this node. The duplicate node has no parent (getParentNode returns null). If a shallow clone is being performed (deep is false), the new node will not have any children or siblings. If a deep clone is being performed, the new node will form the root of a complete cloned subtree.
Parameters:
  deep - if true, recursively clone the subtreeunder the specified node; if false, clone only thenode itself. the duplicate node.



compareDocumentPosition
public short compareDocumentPosition(Node other) throws DOMException(Code)



endToString
protected void endToString(StringBuffer sb, Indent indent)(Code)
Method endToString should be redefined in extended classes. Each type of node has its own beginToString and endToString. This was added to support writing of the xml file. The Element type of node: it writes the beginning tag, then calls the child's toString, and then writes the ending tag.
Parameters:
  sb - string buffer to add resulting string.
Parameters:
  indent - used in formating the output.



getAttributes
public NamedNodeMap getAttributes()(Code)
Returns all attribute nodes of this node. all attribute nodes of this node.



getBaseURI
public String getBaseURI()(Code)



getChildNodes
public NodeList getChildNodes()(Code)
Returns all child nodes of this node, or null if the node has no children. all child nodes of this node, as a Node, ornull.



getFeature
public Object getFeature(String feature, String version)(Code)



getFirstChild
public Node getFirstChild()(Code)
Returns the first child of this node, or null if the node has no children. the first child, as a Node, ornull



getLastChild
public Node getLastChild()(Code)
Returns the last child of this node, or null if the node has no children. the last child, as a Node, ornull.



getLength
public int getLength()(Code)
Returns number of child nodes. all number of child nodes.



getLocalName
public String getLocalName()(Code)
Equivalent to getNodeName. the node name, as a String.



getNamespaceURI
public String getNamespaceURI() throws DOMException(Code)
null, since namespaces are not supported.
throws:
  DOMException -



getNextSibling
public Node getNextSibling()(Code)
Returns the next sibling of this node, or null if the node has no next sibling. the next sibling, as a Node, ornull.



getNodeName
public String getNodeName()(Code)
Returns the name associated with this node. the name, as a String.



getNodeType
public short getNodeType()(Code)
Returns the node type. the short value node type.



getNodeValue
public String getNodeValue()(Code)
Returns the value associated with this node. the node value, as a String.



getOwnerDocument
public Document getOwnerDocument()(Code)
Returns null, since NodeImpls do not belong to any Document. document owner as Document.



getParentNode
public Node getParentNode()(Code)
Returns the parent of this node. A null value indicates that the node is the root of its own tree. To add a node to an existing tree, use one of the insertBefore, replaceChild, or appendChild methods. the parent, as a Node.
See Also:   NodeImpl.insertBefore
See Also:   NodeImpl.replaceChild
See Also:   NodeImpl.appendChild



getPrefix
public String getPrefix()(Code)
Returns null, since namespaces are not supported. null.
See Also:   NodeImpl.setPrefix



getPreviousSibling
public Node getPreviousSibling()(Code)
Returns the previous sibling of this node, or null if this node has no previous sibling. the previous sibling, as a Node, ornull.



getTextContent
public String getTextContent() throws DOMException(Code)



getUserData
public Object getUserData(String key)(Code)



hasAttributes
public boolean hasAttributes()(Code)
Returns true, if this node has attributes, otherwise false. true if node has attributes, otherwise false..



hasChildNodes
public boolean hasChildNodes()(Code)
Returns true if this node has child nodes. true if this node has children.



initNodeImplChildren
protected void initNodeImplChildren(Node node)(Code)
Creates the children subtree and adds to this node. (this part had to be splited from the constructor)
Parameters:
  node - a Node.



insertBefore
public Node insertBefore(Node newChild, Node refChild)(Code)
Inserts the node newChild before the existing child node refChild. If refChild is null, insert newChild at the end of the list of children.
Parameters:
  newChild - the Node to insert.
Parameters:
  refChild - the reference Node. the node being inserted.
exception:
  IllegalArgumentException - if newChild isnull.



isDefaultNamespace
public boolean isDefaultNamespace(String namespaceURI)(Code)



isEqualNode
public boolean isEqualNode(Node arg)(Code)



isSameNode
public boolean isSameNode(Node other)(Code)



isSupported
public boolean isSupported(String feature, String version)(Code)
Returns false since DOM features are not supported. false.
Parameters:
  feature - a String, which is ignored.
Parameters:
  version - a String, which is ignored.



item
public Node item(int index)(Code)
Returns child node with the given index. child node with the given index.
Parameters:
  index - represents index



lookupNamespaceURI
public String lookupNamespaceURI(String prefix)(Code)



lookupPrefix
public String lookupPrefix(String namespaceURI)(Code)



newCommentInstance
protected Node newCommentInstance(Node node)(Code)
Creates new instance of the CommentImpl class.
Parameters:
  node - , as a Node. Node new instance of the CommentImpl class.



newDefaultInstance
protected Node newDefaultInstance(Node node)(Code)
Creates new instance of the NodeImpl class.
Parameters:
  node - , as a Node. Node new instance of the NodeImpl class.



newElementInstance
protected Node newElementInstance(Node node)(Code)
Creates new instance of the ElementImpl class.
Parameters:
  node - , as a Node. Node new instance of the ElementImpl class.



newTextInstance
protected Node newTextInstance(Node node)(Code)
Creates new instance of the TextImpl class.
Parameters:
  node - , as a Node. Node new instance of the TextImpl class.



normalize
public void normalize()(Code)
Does nothing, since NodeImpls do not contain Text children.



removeChild
public Node removeChild(Node oldChild)(Code)
Removes the child node indicated by oldChild from the list of children, and returns it.
Parameters:
  oldChild - the Node to be removed. the node removed.
exception:
  IllegalArgumentException - if oldChild isnull.



replaceChild
public Node replaceChild(Node newChild, Node oldChild)(Code)
Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node.
Parameters:
  newChild - the Node to insert.
Parameters:
  oldChild - the Node to be replaced. the node replaced.
exception:
  IllegalArgumentException - if newChild isnull.



setNodeValue
public void setNodeValue(String nodeValue)(Code)
Sets the node value of this node.
Parameters:
  nodeValue - new node value, as a String.



setPrefix
public void setPrefix(String prefix)(Code)
Does nothing, since namespaces are not supported.
Parameters:
  prefix - a String, which is ignored.
See Also:   NodeImpl.getPrefix



setTextContent
public void setTextContent(String textContent) throws DOMException(Code)



setUserData
public Object setUserData(String key, Object data, UserDataHandler handler)(Code)



toString
public String toString()(Code)
Returns String representation of this node. String representation of this node.



toString
public String toString(String tab)(Code)
Returns String representation of this node.
Parameters:
  tab - tab for node indentation. String representation of this node.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.