Java Doc for ElementContext.java in  » XML » stax-utils » javanet » staxutils » helpers » 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 » XML » stax utils » javanet.staxutils.helpers 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javanet.staxutils.SimpleNamespaceContext
      javanet.staxutils.helpers.ElementContext

ElementContext
public class ElementContext extends SimpleNamespaceContext (Code)
Encapsulates access to contextual element information, such as the element name, attributes, and namespaces. This class is useful for recording element information in a stack to keep track of the current element c[position in a document.
author:
   Christian Niles
version:
   $Revision: 1.1 $



Constructor Summary
public  ElementContext(QName name)
     Constructs a new ElementContext with the provided name and no enclosing context.
public  ElementContext(QName name, boolean isEmpty)
     Constructs a new ElementContext with the provided name and empty value, and no enclosing context.
public  ElementContext(QName name, NamespaceContext context)
     Constructs a new ElementContext with the provided name and namespace context.
public  ElementContext(QName name, ElementContext parent)
     Constructs a new ElementContext with the provided name and enclosing context.
public  ElementContext(QName name, ElementContext parent, boolean isEmpty)
     Constructs a new ElementContext with the provided name and enclosing context.

Method Summary
public  StringBufferappendPath(StringBuffer buffer)
     Appends the current context path to a StringBuffer .
Parameters:
  buffer - The buffer to which to append the context path.
public  intattributeCount()
     Returns the number of attributes defined in this context.
public  booleanattributeExists(QName name)
     Determines if an attribute with the specified name exists in this context.
Parameters:
  name - The name of the attribute.
public  IteratorattributeNames()
     Returns an Iterator over the names of all attributes defined in this context.
public  StringgetAttribute(int idx)
     Returns the value of the idxth attribute defined on the context.
Parameters:
  idx - The zero-based index of the attribute value to retrieve.
public  StringgetAttribute(QName name)
     Returns the value of a named attribute.
Parameters:
  name - The name of the attribute value to retrieve.
public  QNamegetAttributeName(int idx)
     Returns the name of the idxth attribute defined on the context.
Parameters:
  idx - The zero-based index of the attribute name to retrieve.
public  intgetDepth()
     Determines the number of enclosing contexts.
public  QNamegetName()
     Returns the qualified name associated with the context.
public  StringgetNamespacePrefix(int idx)
     Returns the prefix of the idxth namespace declaration defined in this context.
Parameters:
  idx - The index of the namespace prefix to return.
public  StringgetNamespaceURI(int idx)
     Returns the URI of the idxth namespace declaration defined in this context.
Parameters:
  idx - The index of the namespace URI to return.
public  ElementContextgetParentContext()
     Returns a reference to the enclosing ElementContext.
public  StringgetPath()
     Returns the current context path.
public  booleanisEmpty()
     Whether this context represents an emtpy element.
public  booleanisReadOnly()
     Whether this context may be edited or not.
public  booleanisRoot()
     Determines if this context has an enclosing context or not.
public  intnamespaceCount()
     Determines the number of namespaces declared in this context.
public  ElementContextnewSubContext(QName name)
     Constructs a new child ElementContext with the specified name.
Parameters:
  name - The name associated with the child context.
public  ElementContextnewSubContext(QName name, boolean isEmpty)
     Constructs a new child ElementContext with the specified name and empty value.
Parameters:
  name - The name associated with the child context.
Parameters:
  isEmpty - Whether the child context represents an empty element.
public  voidputAttribute(QName name, String value)
     Adds an attribute to the context with the specified name and value.
public  voidputNamespace(String prefix, String nsURI)
     Adds a namespace declaration to this context with the specified prefix and namespace uri.
public  voidsetReadOnly()
     Prevents any further additions to this context.
public  StringtoString()
    


Constructor Detail
ElementContext
public ElementContext(QName name)(Code)
Constructs a new ElementContext with the provided name and no enclosing context.
Parameters:
  name - The element name.



ElementContext
public ElementContext(QName name, boolean isEmpty)(Code)
Constructs a new ElementContext with the provided name and empty value, and no enclosing context.
Parameters:
  name - The element name.
Parameters:
  isEmpty - Whether the element is an empty element or not.



ElementContext
public ElementContext(QName name, NamespaceContext context)(Code)
Constructs a new ElementContext with the provided name and namespace context.
Parameters:
  name - The element name.
Parameters:
  context - The enclosing namespace context.



ElementContext
public ElementContext(QName name, ElementContext parent)(Code)
Constructs a new ElementContext with the provided name and enclosing context.
Parameters:
  name - The element name.
Parameters:
  parent - The enclosing element context.



ElementContext
public ElementContext(QName name, ElementContext parent, boolean isEmpty)(Code)
Constructs a new ElementContext with the provided name and enclosing context.
Parameters:
  name - The element name.
Parameters:
  parent - The enclosing element context.
Parameters:
  isEmpty - Whether the element is an empty element or not.




Method Detail
appendPath
public StringBuffer appendPath(StringBuffer buffer)(Code)
Appends the current context path to a StringBuffer .
Parameters:
  buffer - The buffer to which to append the context path. The provided buffer.



attributeCount
public int attributeCount()(Code)
Returns the number of attributes defined in this context. The number of attributes defined in the context.



attributeExists
public boolean attributeExists(QName name)(Code)
Determines if an attribute with the specified name exists in this context.
Parameters:
  name - The name of the attribute. true if an attribute with the specified name has beendefined in this context, false otherwise.



attributeNames
public Iterator attributeNames()(Code)
Returns an Iterator over the names of all attributes defined in this context. The returned iterator will not support the Iterator.remove operation. An Iterator over the names of all attributes defined in thiscontext.



getAttribute
public String getAttribute(int idx)(Code)
Returns the value of the idxth attribute defined on the context.
Parameters:
  idx - The zero-based index of the attribute value to retrieve. The value of the idxth attribute defined onthe context.
throws:
  IndexOutOfBoundsException - If the index is out of bounds.



getAttribute
public String getAttribute(QName name)(Code)
Returns the value of a named attribute.
Parameters:
  name - The name of the attribute value to retrieve. The value of the named attribute, or null.



getAttributeName
public QName getAttributeName(int idx)(Code)
Returns the name of the idxth attribute defined on the context.
Parameters:
  idx - The zero-based index of the attribute name to retrieve. The name of the idxth attribute defined onthe context.
throws:
  IndexOutOfBoundsException - If the index is out of bounds.



getDepth
public int getDepth()(Code)
Determines the number of enclosing contexts. The number of enclosing contexts.



getName
public QName getName()(Code)
Returns the qualified name associated with the context. The qualified name of the context.



getNamespacePrefix
public String getNamespacePrefix(int idx)(Code)
Returns the prefix of the idxth namespace declaration defined in this context.
Parameters:
  idx - The index of the namespace prefix to return. The prefix of the idxth namespace declarationdefined in this context.
throws:
  IndexOutOfBoundsException - If the index is out of bounds.



getNamespaceURI
public String getNamespaceURI(int idx)(Code)
Returns the URI of the idxth namespace declaration defined in this context.
Parameters:
  idx - The index of the namespace URI to return. The URI of the idxth namespace declarationdefined in this context.
throws:
  IndexOutOfBoundsException - If the index is out of bounds.



getParentContext
public ElementContext getParentContext()(Code)
Returns a reference to the enclosing ElementContext. The enclosing context, or null.



getPath
public String getPath()(Code)
Returns the current context path. A string representing the context path.



isEmpty
public boolean isEmpty()(Code)
Whether this context represents an emtpy element. Empty contexts may not enclose any other contexts. true if this context represents an emtpy element,false otherwise.



isReadOnly
public boolean isReadOnly()(Code)
Whether this context may be edited or not. true if no additional modifications may be made to thiscontext, false otherwise.



isRoot
public boolean isRoot()(Code)
Determines if this context has an enclosing context or not. true if this context is the root context and has noenclosing context, false otherwise.



namespaceCount
public int namespaceCount()(Code)
Determines the number of namespaces declared in this context. The number of namespaces declared in this context.



newSubContext
public ElementContext newSubContext(QName name)(Code)
Constructs a new child ElementContext with the specified name.
Parameters:
  name - The name associated with the child context. The newly constructed child context.
throws:
  IllegalStateException - If this context is empty.



newSubContext
public ElementContext newSubContext(QName name, boolean isEmpty)(Code)
Constructs a new child ElementContext with the specified name and empty value.
Parameters:
  name - The name associated with the child context.
Parameters:
  isEmpty - Whether the child context represents an empty element. The newly constructed child context.
throws:
  IllegalStateException - If this context is empty.



putAttribute
public void putAttribute(QName name, String value)(Code)
Adds an attribute to the context with the specified name and value.
Parameters:
  name - The attribute name.
Parameters:
  value - The attribute value.
throws:
  IllegalStateException - If the context is read-only.



putNamespace
public void putNamespace(String prefix, String nsURI)(Code)
Adds a namespace declaration to this context with the specified prefix and namespace uri.
Parameters:
  prefix - The namespace prefix.
Parameters:
  nsURI - The namespace uri.



setReadOnly
public void setReadOnly()(Code)
Prevents any further additions to this context.



toString
public String toString()(Code)

See Also:   ElementContext.getPath()



Fields inherited from javanet.staxutils.SimpleNamespaceContext
protected Map namespaces(Code)(Java Doc)
protected NamespaceContext parent(Code)(Java Doc)

Methods inherited from javanet.staxutils.SimpleNamespaceContext
public int getDeclaredPrefixCount()(Code)(Java Doc)
public Iterator getDeclaredPrefixes()(Code)(Java Doc)
public String getNamespaceURI(String prefix)(Code)(Java Doc)
public NamespaceContext getParent()(Code)(Java Doc)
public String getPrefix(String nsURI)(Code)(Java Doc)
public Iterator getPrefixes()(Code)(Java Doc)
public Iterator getPrefixes(String nsURI)(Code)(Java Doc)
public boolean isPrefixDeclared(String prefix)(Code)(Java Doc)
public boolean isRootContext()(Code)(Java Doc)
public String setDefaultNamespace(String nsURI)(Code)(Java Doc)
public void setParent(NamespaceContext parent)(Code)(Java Doc)
public String setPrefix(String prefix, String nsURI)(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.