Java Doc for ElementImpl.java in  » J2EE » Enhydra-Application-Framework » 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 » J2EE » Enhydra Application Framework » org.enhydra.xml 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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

All known Subclasses:   org.enhydra.xml.HashMapElement,
ElementImpl
public class ElementImpl extends NodeImpl implements Element(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
final public static  intMASK_NAME
     Name character mask.
final public static  intMASK_NAME_START
     Name start character mask.
protected  HashMapattributes
     A HashMap of AttrImpl nodes representing attributes.

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

Method Summary
protected  voidbeginToString(StringBuffer sb, Indent indent)
     Method beginToString for this class writes the xml begining tag string and all attributes.
public  NodecloneNode(boolean deep)
     Returns a duplicate of this node.
public  shortcompareDocumentPosition(Node arg0)
    
protected  voidendToString(StringBuffer sb, Indent indent)
     Method endToString for this class writes the xml ending tag string.
public  StringgetAttribute(String name)
     Returns the value of the attribute with given name.
Parameters:
  name - name of attribute.
public  StringgetAttributeNS(String namespaceURI, String localName)
     Equivalent to getAttribute(localName).
public  AttrgetAttributeNode(String name)
     Returns attribute value with given name of this node.
Parameters:
  name - name of attribute.
public  AttrgetAttributeNodeNS(String namespaceURI, String localName)
     Equivalent to getAttributeNode(localName).
public  NamedNodeMapgetAttributes()
     Returns all attribute nodes of this node.
public  StringgetBaseURI()
    
public  NodeListgetElementsByTagName(String name)
     Returns all Element nodes with given name, searching by all sub nodes from this node.
Parameters:
  name - tag name.
public  NodeListgetElementsByTagNameNS(String namespaceURI, String localName)
     Equivalent to getElementsByTagName(localName).
public  ObjectgetFeature(String arg0, String arg1)
    
public  StringgetNamespaceURI()
    
public  TypeInfogetSchemaTypeInfo()
    
public  StringgetTagName()
     Returns tag name of this node.
public  StringgetTextContent()
    
public  ObjectgetUserData(String arg0)
    
public  booleanhasAttribute(String name)
     Returns true, if this node has attribute with given name, otherwise false.
public  booleanhasAttributeNS(String namespaceURI, String localName)
     Equivalent to hasAttribute(localName).
public  booleanhasAttributes()
     Returns true, if this node has attributes, otherwise false.
public  booleanhasElementChildNodes()
     Returns true if this node has children nodes.
public  NodeinsertBefore(Node newChild, Node refChild)
     Inserts the node newChild before the existing child node refChild.
public  booleanisDefaultNamespace(String arg0)
    
public  booleanisEqualNode(Node arg0)
    
public  booleanisSameNode(Node arg0)
    
public static  booleanisValidName(String name)
    
public  StringlookupNamespaceURI(String arg0)
    
public  StringlookupPrefix(String arg0)
    
public static  ElementnewInstance(Document document)
     Creates new instance of ElementImpl from a given document as a Document.
Parameters:
  document - document.
public  voidremoveAttribute(String name)
     Removes attribute with the given name.
public  voidremoveAttributeNS(String namespaceURI, String localName)
     Equivalent to removeAttribute(localName).
public  AttrremoveAttributeNode(Attr oldAttr)
     Remove attribute from this node.
Parameters:
  oldAttr - attribute that will be removed.
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  voidsetAttribute(String name, String value)
     To the name attribute set value to value.
public  voidsetAttributeNS(String namespaceURI, String qualifiedName, String value)
     Equivalent to setAttribute(qualifiedName, value).
public  AttrsetAttributeNode(Attr newAttr)
     Add new attribute to this node.
Parameters:
  newAttr - new attribute.
public  AttrsetAttributeNodeNS(Attr newAttr)
     Equivalent to setAttributeNode(newAttr).
public  voidsetIdAttribute(String arg0, boolean arg1)
    
public  voidsetIdAttributeNS(String arg0, String arg1, boolean arg2)
    
public  voidsetIdAttributeNode(Attr arg0, boolean arg1)
    
public  voidsetTextContent(String arg0)
    
public  ObjectsetUserData(String arg0, Object arg1, UserDataHandler arg2)
    

Field Detail
MASK_NAME
final public static int MASK_NAME(Code)
Name character mask.



MASK_NAME_START
final public static int MASK_NAME_START(Code)
Name start character mask.



attributes
protected HashMap attributes(Code)
A HashMap of AttrImpl nodes representing attributes.




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



ElementImpl
public ElementImpl(ElementImpl element)(Code)
Constructs a ElementImpl from the given node, without creating entire children subtree. element, as a ElementImpl.



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



ElementImpl
protected ElementImpl(Document ownerDoc, String nodeName, short type, String value)(Code)
Constructs an ElementImpl with the 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.



ElementImpl
public ElementImpl(Node node)(Code)
Constructs an ElementImpl from a given node (creates the children subtree too), as a Node node, as a Node.



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




Method Detail
beginToString
protected void beginToString(StringBuffer sb, Indent indent)(Code)
Method beginToString for this class writes the xml begining tag string and all attributes.
Parameters:
  sb - string buffer to add resulting string.
Parameters:
  indent - used in formating the output.



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 arg0) throws DOMException(Code)



endToString
protected void endToString(StringBuffer sb, Indent indent)(Code)
Method endToString for this class writes the xml ending tag string.
Parameters:
  sb - string buffer to add resulting string.
Parameters:
  indent - used in formating the output.



getAttribute
public String getAttribute(String name)(Code)
Returns the value of the attribute with given name.
Parameters:
  name - name of attribute. value of attribute.



getAttributeNS
public String getAttributeNS(String namespaceURI, String localName)(Code)
Equivalent to getAttribute(localName).
See Also:   ElementImpl.setAttributeNS



getAttributeNode
public Attr getAttributeNode(String name)(Code)
Returns attribute value with given name of this node.
Parameters:
  name - name of attribute. value of attribute.



getAttributeNodeNS
public Attr getAttributeNodeNS(String namespaceURI, String localName)(Code)
Equivalent to getAttributeNode(localName).
See Also:   ElementImpl.setAttributeNodeNS



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



getBaseURI
public String getBaseURI()(Code)



getElementsByTagName
public NodeList getElementsByTagName(String name)(Code)
Returns all Element nodes with given name, searching by all sub nodes from this node.
Parameters:
  name - tag name. all Element vith given name as NodeList.



getElementsByTagNameNS
public NodeList getElementsByTagNameNS(String namespaceURI, String localName)(Code)
Equivalent to getElementsByTagName(localName).



getFeature
public Object getFeature(String arg0, String arg1)(Code)



getNamespaceURI
public String getNamespaceURI()(Code)



getSchemaTypeInfo
public TypeInfo getSchemaTypeInfo()(Code)



getTagName
public String getTagName()(Code)
Returns tag name of this node. tag name of this node as a String.



getTextContent
public String getTextContent() throws DOMException(Code)



getUserData
public Object getUserData(String arg0)(Code)



hasAttribute
public boolean hasAttribute(String name)(Code)
Returns true, if this node has attribute with given name, otherwise false. true if node has given attribute, otherwise false..



hasAttributeNS
public boolean hasAttributeNS(String namespaceURI, String localName)(Code)
Equivalent to hasAttribute(localName).



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



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



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 arg0)(Code)



isEqualNode
public boolean isEqualNode(Node arg0)(Code)



isSameNode
public boolean isSameNode(Node arg0)(Code)



isValidName
public static boolean isValidName(String name)(Code)
Check to see if a string is a valid Name according to [5] in the XML 1.0 Recommendation
Parameters:
  name - string to check true if name is a valid Name



lookupNamespaceURI
public String lookupNamespaceURI(String arg0)(Code)



lookupPrefix
public String lookupPrefix(String arg0)(Code)



newInstance
public static Element newInstance(Document document)(Code)
Creates new instance of ElementImpl from a given document as a Document.
Parameters:
  document - document. new Element node as a root of the Document.



removeAttribute
public void removeAttribute(String name)(Code)
Removes attribute with the given name.
Parameters:
  name - attribute name.



removeAttributeNS
public void removeAttributeNS(String namespaceURI, String localName)(Code)
Equivalent to removeAttribute(localName).



removeAttributeNode
public Attr removeAttributeNode(Attr oldAttr)(Code)
Remove attribute from this node.
Parameters:
  oldAttr - attribute that will be removed. old attribute as AttrImpl.



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.



setAttribute
public void setAttribute(String name, String value)(Code)
To the name attribute set value to value.
Parameters:
  name - attribute value.
Parameters:
  value - new attribute value.



setAttributeNS
public void setAttributeNS(String namespaceURI, String qualifiedName, String value)(Code)
Equivalent to setAttribute(qualifiedName, value).
See Also:   ElementImpl.getAttributeNS



setAttributeNode
public Attr setAttributeNode(Attr newAttr) throws DOMException(Code)
Add new attribute to this node.
Parameters:
  newAttr - new attribute. new attribute as AttrImpl.



setAttributeNodeNS
public Attr setAttributeNodeNS(Attr newAttr)(Code)
Equivalent to setAttributeNode(newAttr).
See Also:   ElementImpl.getAttributeNodeNS



setIdAttribute
public void setIdAttribute(String arg0, boolean arg1) throws DOMException(Code)



setIdAttributeNS
public void setIdAttributeNS(String arg0, String arg1, boolean arg2) throws DOMException(Code)



setIdAttributeNode
public void setIdAttributeNode(Attr arg0, boolean arg1) throws DOMException(Code)



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



setUserData
public Object setUserData(String arg0, Object arg1, UserDataHandler arg2)(Code)



Fields inherited from org.enhydra.xml.NodeImpl
protected NodeImpl firstChild(Code)(Java Doc)
protected NodeImpl lastChild(Code)(Java Doc)
protected NodeImpl nextSibling(Code)(Java Doc)
protected String nodeName(Code)(Java Doc)
protected String nodeValue(Code)(Java Doc)
protected int numChildren(Code)(Java Doc)
protected Document ownerDocument(Code)(Java Doc)
protected NodeImpl parent(Code)(Java Doc)
protected NodeImpl previousSibling(Code)(Java Doc)
protected short type(Code)(Java Doc)

Methods inherited from org.enhydra.xml.NodeImpl
public Node appendChild(Node newChild)(Code)(Java Doc)
protected void beginToString(StringBuffer sb, Indent indent)(Code)(Java Doc)
public Node cloneNode(boolean deep)(Code)(Java Doc)
public short compareDocumentPosition(Node arg0) throws DOMException(Code)(Java Doc)
protected void endToString(StringBuffer sb, Indent indent)(Code)(Java Doc)
public NamedNodeMap getAttributes()(Code)(Java Doc)
public String getBaseURI()(Code)(Java Doc)
public NodeList getChildNodes()(Code)(Java Doc)
public Object getFeature(String arg0, String arg1)(Code)(Java Doc)
public Node getFirstChild()(Code)(Java Doc)
public Node getLastChild()(Code)(Java Doc)
public int getLength()(Code)(Java Doc)
public String getLocalName()(Code)(Java Doc)
public String getNamespaceURI()(Code)(Java Doc)
public Node getNextSibling()(Code)(Java Doc)
public String getNodeName()(Code)(Java Doc)
public short getNodeType()(Code)(Java Doc)
public String getNodeValue()(Code)(Java Doc)
public Document getOwnerDocument()(Code)(Java Doc)
public Node getParentNode()(Code)(Java Doc)
public String getPrefix()(Code)(Java Doc)
public Node getPreviousSibling()(Code)(Java Doc)
public String getTextContent() throws DOMException(Code)(Java Doc)
public Object getUserData(String arg0)(Code)(Java Doc)
public boolean hasAttributes()(Code)(Java Doc)
public boolean hasChildNodes()(Code)(Java Doc)
protected void initNodeImplChildren(Node node)(Code)(Java Doc)
public Node insertBefore(Node newChild, Node refChild)(Code)(Java Doc)
public boolean isDefaultNamespace(String arg0)(Code)(Java Doc)
public boolean isEqualNode(Node arg0)(Code)(Java Doc)
public boolean isSameNode(Node arg0)(Code)(Java Doc)
public boolean isSupported(String feature, String version)(Code)(Java Doc)
public Node item(int index)(Code)(Java Doc)
public String lookupNamespaceURI(String arg0)(Code)(Java Doc)
public String lookupPrefix(String arg0)(Code)(Java Doc)
protected Node newCommentInstance(Node node)(Code)(Java Doc)
protected Node newDefaultInstance(Node node)(Code)(Java Doc)
protected Node newElementInstance(Node node)(Code)(Java Doc)
protected Node newTextInstance(Node node)(Code)(Java Doc)
public void normalize()(Code)(Java Doc)
public Node removeChild(Node oldChild)(Code)(Java Doc)
public Node replaceChild(Node newChild, Node oldChild)(Code)(Java Doc)
public void setNodeValue(String nodeValue)(Code)(Java Doc)
public void setPrefix(String prefix)(Code)(Java Doc)
public void setTextContent(String arg0) throws DOMException(Code)(Java Doc)
public Object setUserData(String arg0, Object arg1, UserDataHandler arg2)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public String toString(String tab)(Code)(Java Doc)

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.