Java Doc for XMLAttrList.java in  » Web-Server » Rimfaxe-Web-Server » org » apache » xerces » framework » 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 » Web Server » Rimfaxe Web Server » org.apache.xerces.framework 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.xerces.framework.XMLAttrList

XMLAttrList
final public class XMLAttrList implements AttributeList(Code)
An instance of this class is used to represent the set of attributes for an element that are either directly specified or provided through a default value in the grammar for the document. XMLAttrList carries the attributes associated with an element from the scanner up to the application level (via the SAX AtributeList). Because all the attributes are bundled up together before being presented to the application, we don't have a way to build up an attribute value from pieces, most notably entity references.

There is typically one instance of this class for each instance of a parser. The parser may either use this object to hold the attributes of a single element, calling releaseAttrList() before each new element, or it may use this object to hold the attributes of all of the elements in the document.

To start saving a new set of attributes, the startAttrList() method is called, returning a handle for the attribute list. All addAttr() calls will be added to the set until a call is made to endAttrList(). A handle of -1 is used to indicate that there are no attributes in the set.

When an attribute is added to the set, the type of the attribute and an indicator of whether it was specified explicitly or through a default is provided.

The attributes in the set may be accessed either through the getFirstAttr() and getNextAttr() iteration interface, or the getAttributeList() method may be used to access the attribute list through the SAX AttributeList interface.
version:
   $Id: XMLAttrList.java,v 1.10 2001/07/20 17:26:10 lmartin Exp $




Constructor Summary
public  XMLAttrList(StringPool stringPool)
    

Method Summary
public  intaddAttr(int attrName, int attValue, int attType, boolean specified, boolean search)
    
public  intaddAttr(QName attribute, int attValue, int attType, boolean specified, boolean search)
     Add an attribute to the current set.
Parameters:
  attrName - The name of the attribute, an index in the string pool.
Parameters:
  attValue - The value of the attribute, an index in the string pool.
Parameters:
  attType - The type of the attribute, an index in the string pool.
Parameters:
  specified - true if the attribute is specified directly; otherwisefalse is the attribute is provided through a default.
Parameters:
  search - true if the list should be searched for a duplicate.
public  int[]endAttrList()
     Terminate the current set of attributes.
public  intgetAttType(int attrIndex)
     Get the type of the attribute
Parameters:
  attrIndex - The index of the attribute.
public  intgetAttValue(int attrIndex)
     Get the value of the attribute
Parameters:
  attrIndex - The index of the attribute.
public  intgetAttrLocalpart(int attrIndex)
     Return the localpart of the attribute.
public  intgetAttrName(int attrIndex)
     Get the name of the attribute
Parameters:
  attrIndex - The index of the attribute.
public  intgetAttrPrefix(int attrIndex)
     Get the prefix of the attribute.
public  intgetAttrURI(int attrIndex)
     Return the uri of the attribute.
public  AttributeListgetAttributeList(int attrListHandle)
     Setup this instance to respond as an AttributeList implementation.
public  intgetFirstAttr(int attrListHandle)
     Get the first attribute in the attribute list.
Parameters:
  attrListHandle - The attribute list handle.
public  intgetLength()
     Return the number of attributes in this list.

The SAX parser may provide attributes in any arbitrary order, regardless of the order in which they were declared or specified.

public  StringgetLocalpart(int i)
     Return the local part of an attribute in this list (by position).
public  StringgetName(int i)
     Return the name of an attribute in this list (by position).

The names must be unique: the SAX parser shall not include the same attribute twice.

public  intgetNextAttr(int attrIndex)
     Get the next attribute in the attribute list.
Parameters:
  attrIndex - The attribute index.
public  StringgetPrefix(int i)
     Return the prefix of an attribute in this list (by position).
public  StringgetType(int i)
     Return the type of an attribute in the list (by position).

The attribute type is one of the strings "CDATA", "ID", "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES", or "NOTATION" (always in upper case).

If the parser has not read a declaration for the attribute, or if the parser does not report attribute types, then it must return the value "CDATA" as stated in the XML 1.0 Recommentation (clause 3.3.3, "Attribute-Value Normalization").

For an enumerated attribute that is not a notation, the parser will report the type as "NMTOKEN".


Parameters:
  i - The index of the attribute in the list (starting at 0).
public  StringgetType(String name)
     Return the type of an attribute in the list (by name).

The return value is the same as the return value for getType(int).

If the attribute name has a namespace prefix in the document, the application must include the prefix here.


Parameters:
  name - The name of the attribute.
public  StringgetURI(int i)
     Returns the URI of an attribute in this list (by position).
public  StringgetValue(int i)
     Return the value of an attribute in the list (by position).

If the attribute value is a list of tokens (IDREFS, ENTITIES, or NMTOKENS), the tokens will be concatenated into a single string separated by whitespace.


Parameters:
  i - The index of the attribute in the list (starting at 0).
public  StringgetValue(String name)
     Return the value of an attribute in the list (by name).

The return value is the same as the return value for getValue(int).

If the attribute name has a namespace prefix in the document, the application must include the prefix here.


Parameters:
  i - The index of the attribute in the list.
public  booleanisSpecified(int attrIndex)
     Was the attribute explicitly supplied or was it provided through a default?
Parameters:
  attrIndex - The index of the attribute.
public  voidreleaseAttrList(int attrListHandle)
     Make the resources of the current attribute list available for reuse.
public  voidreset(StringPool stringPool)
     Reset this instance to an "empty" state.
public  voidsetAttType(int attrIndex, int attTypeIndex)
     Sets the type of the attribute.
public  voidsetAttValue(int attrIndex, int attrValue)
     Sets the value of the attribute.
public  voidsetAttrURI(int attrIndex, int uri)
     Sets the uri of the attribute.
public  intstartAttrList()
     Start a new set of attributes.


Constructor Detail
XMLAttrList
public XMLAttrList(StringPool stringPool)(Code)
Constructor
Parameters:
  stringPool - The string pool instance to use.




Method Detail
addAttr
public int addAttr(int attrName, int attValue, int attType, boolean specified, boolean search) throws Exception(Code)



addAttr
public int addAttr(QName attribute, int attValue, int attType, boolean specified, boolean search) throws Exception(Code)
Add an attribute to the current set.
Parameters:
  attrName - The name of the attribute, an index in the string pool.
Parameters:
  attValue - The value of the attribute, an index in the string pool.
Parameters:
  attType - The type of the attribute, an index in the string pool.
Parameters:
  specified - true if the attribute is specified directly; otherwisefalse is the attribute is provided through a default.
Parameters:
  search - true if the list should be searched for a duplicate. The index of this attribute; or -1 is search was trueand attrName was already present.



endAttrList
public int[] endAttrList()(Code)
Terminate the current set of attributes.



getAttType
public int getAttType(int attrIndex)(Code)
Get the type of the attribute
Parameters:
  attrIndex - The index of the attribute. The type of the attribute, an index in the string pool.



getAttValue
public int getAttValue(int attrIndex)(Code)
Get the value of the attribute
Parameters:
  attrIndex - The index of the attribute. The value of the attribute, an index in the string pool.



getAttrLocalpart
public int getAttrLocalpart(int attrIndex)(Code)
Return the localpart of the attribute.



getAttrName
public int getAttrName(int attrIndex)(Code)
Get the name of the attribute
Parameters:
  attrIndex - The index of the attribute. The name of the attribute, an index in the string pool.



getAttrPrefix
public int getAttrPrefix(int attrIndex)(Code)
Get the prefix of the attribute.



getAttrURI
public int getAttrURI(int attrIndex)(Code)
Return the uri of the attribute.



getAttributeList
public AttributeList getAttributeList(int attrListHandle)(Code)
Setup this instance to respond as an AttributeList implementation. This instance as an AttributeList.



getFirstAttr
public int getFirstAttr(int attrListHandle)(Code)
Get the first attribute in the attribute list.
Parameters:
  attrListHandle - The attribute list handle. The index of the first attribute in the specifiedattribute list or -1 if the handle is invalid.



getLength
public int getLength()(Code)
Return the number of attributes in this list.

The SAX parser may provide attributes in any arbitrary order, regardless of the order in which they were declared or specified. The number of attributes may be zero.

The number of attributes in the list.



getLocalpart
public String getLocalpart(int i)(Code)
Return the local part of an attribute in this list (by position).



getName
public String getName(int i)(Code)
Return the name of an attribute in this list (by position).

The names must be unique: the SAX parser shall not include the same attribute twice. Attributes without values (those declared #IMPLIED without a value specified in the start tag) will be omitted from the list.

If the attribute name has a namespace prefix, the prefix will still be attached.


Parameters:
  i - The index of the attribute in the list (starting at 0). The name of the indexed attribute, or nullif the index is out of range.
See Also:   XMLAttrList.getLength



getNextAttr
public int getNextAttr(int attrIndex)(Code)
Get the next attribute in the attribute list.
Parameters:
  attrIndex - The attribute index. The index of the next attribute after attrIndex inthe same attribute list or -1 if there is no next index.



getPrefix
public String getPrefix(int i)(Code)
Return the prefix of an attribute in this list (by position).



getType
public String getType(int i)(Code)
Return the type of an attribute in the list (by position).

The attribute type is one of the strings "CDATA", "ID", "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES", or "NOTATION" (always in upper case).

If the parser has not read a declaration for the attribute, or if the parser does not report attribute types, then it must return the value "CDATA" as stated in the XML 1.0 Recommentation (clause 3.3.3, "Attribute-Value Normalization").

For an enumerated attribute that is not a notation, the parser will report the type as "NMTOKEN".


Parameters:
  i - The index of the attribute in the list (starting at 0). The attribute type as a string, ornull if the index is out of range.
See Also:   XMLAttrList.getLength
See Also:   XMLAttrList.getType(java.lang.String)



getType
public String getType(String name)(Code)
Return the type of an attribute in the list (by name).

The return value is the same as the return value for getType(int).

If the attribute name has a namespace prefix in the document, the application must include the prefix here.


Parameters:
  name - The name of the attribute. The attribute type as a string, or null if nosuch attribute exists.
See Also:   XMLAttrList.getType(int)



getURI
public String getURI(int i)(Code)
Returns the URI of an attribute in this list (by position).



getValue
public String getValue(int i)(Code)
Return the value of an attribute in the list (by position).

If the attribute value is a list of tokens (IDREFS, ENTITIES, or NMTOKENS), the tokens will be concatenated into a single string separated by whitespace.


Parameters:
  i - The index of the attribute in the list (starting at 0). The attribute value as a string, ornull if the index is out of range.
See Also:   XMLAttrList.getLength
See Also:   XMLAttrList.getValue(java.lang.String)



getValue
public String getValue(String name)(Code)
Return the value of an attribute in the list (by name).

The return value is the same as the return value for getValue(int).

If the attribute name has a namespace prefix in the document, the application must include the prefix here.


Parameters:
  i - The index of the attribute in the list. The attribute value as a string, or null ifno such attribute exists.
See Also:   XMLAttrList.getValue(int)



isSpecified
public boolean isSpecified(int attrIndex)(Code)
Was the attribute explicitly supplied or was it provided through a default?
Parameters:
  attrIndex - The index of the attribute. true if the attribute was specified directly; otherwisefalse is the attribute was provided through a default.



releaseAttrList
public void releaseAttrList(int attrListHandle)(Code)
Make the resources of the current attribute list available for reuse.
Parameters:
  The - attribute list handle.



reset
public void reset(StringPool stringPool)(Code)
Reset this instance to an "empty" state.
Parameters:
  stringPool - The string pool instance to use.



setAttType
public void setAttType(int attrIndex, int attTypeIndex)(Code)
Sets the type of the attribute.



setAttValue
public void setAttValue(int attrIndex, int attrValue)(Code)
Sets the value of the attribute.



setAttrURI
public void setAttrURI(int attrIndex, int uri)(Code)
Sets the uri of the attribute.



startAttrList
public int startAttrList()(Code)
Start a new set of attributes. The handle for the new set of attributes.



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.