Java Doc for AttributeCollectionImpl.java in  » XML » saxonb » net » sf » saxon » om » 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 » saxonb » net.sf.saxon.om 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   net.sf.saxon.om.AttributeCollectionImpl

AttributeCollectionImpl
final public class AttributeCollectionImpl implements Attributes,AttributeCollection(Code)
AttributeCollectionImpl is an implementation of both the SAX2 interface Attributes and the Saxon equivalent AttributeCollection.

As well as providing the information required by the SAX2 interface, an AttributeCollection can hold type information (as needed to support the JAXP 1.3 javax.xml.validation.ValidatorHandler interface), and location information for debugging. The location information is used in the case of attributes on a result tree to identify the location in the query or stylesheet from which they were generated.



Field Summary
final public static  AttributeCollectionEMPTY_ATTRIBUTE_COLLECTION
    

Constructor Summary
public  AttributeCollectionImpl(NamePool pool)
     Create an empty attribute list.

Method Summary
public  voidaddAttribute(int nameCode, int typeCode, String value, int locationId, int properties)
     Add an attribute to an attribute list.
public  voidclear()
     Clear the attribute list.
public  voidcompact()
    
public  intgetIndex(String qname)
     Get the index of an attribute, from its lexical QName
Parameters:
  qname - The lexical QName of the attribute.
public  intgetIndex(String uri, String localname)
     Get the index of an attribute (by name).
Parameters:
  uri - The namespace uri of the attribute.
Parameters:
  localname - The local name of the attribute.
public  intgetIndexByFingerprint(int fingerprint)
     Get the index, given the fingerprint.
public  intgetLength()
     Return the number of attributes in the list.
public  intgetLineNumber(int index)
     Get the line number part of the location of an attribute, at a given index.

Attribute location information is not available from a SAX parser, so this method is not useful for getting the location of an attribute in a source document.

public  StringgetLocalName(int index)
     Get the local name of an attribute (by position).
Parameters:
  index - The position of the attribute in the list.
public  intgetLocationId(int index)
     Get the locationID of an attribute (by position)
Parameters:
  index - The position of the attribute in the list.
public  intgetNameCode(int index)
     Get the namecode of an attribute (by position).
Parameters:
  index - The position of the attribute in the list.
public  StringgetPrefix(int index)
     Get the prefix of the name of an attribute (by position).
Parameters:
  index - The position of the attribute in the list.
public  intgetProperties(int index)
     Get the properties of an attribute (by position)
Parameters:
  index - The position of the attribute in the list.
public  StringgetQName(int index)
     Get the lexical QName of an attribute (by position).
Parameters:
  index - The position of the attribute in the list.
public  StringgetSystemId(int index)
     Get the systemId part of the location of an attribute, at a given index.

Attribute location information is not available from a SAX parser, so this method is not useful for getting the location of an attribute in a source document.

public  StringgetType(int index)
     Get the type of an attribute (by position).
public  StringgetType(String uri, String localname)
     Get the type of an attribute (by name).
Parameters:
  uri - The namespace uri of the attribute.
Parameters:
  localname - The local name of the attribute.
public  StringgetType(String name)
     Get the type of an attribute (by lexical QName).
Parameters:
  name - The lexical QName of the attribute.
public  intgetTypeAnnotation(int index)
     Get the namecode of an attribute (by position).
Parameters:
  index - The position of the attribute in the list.
public  StringgetURI(int index)
     Get the namespace URI of an attribute (by position).
Parameters:
  index - The position of the attribute in the list.
public  StringgetValue(int index)
     Get the value of an attribute (by position).
Parameters:
  index - The position of the attribute in the list.
public  StringgetValue(String uri, String localname)
     Get the value of an attribute (by name).
Parameters:
  uri - The namespace uri of the attribute.
Parameters:
  localname - The local name of the attribute.
public  StringgetValue(String name)
     Get the value of an attribute (by lexical QName).
Parameters:
  name - The attribute name (a lexical QName).The prefix must match the prefix originally used.
public  StringgetValueByFingerprint(int fingerprint)
    
public  booleanisId(int index)
    
public  voidsetAttribute(int index, int nameCode, int typeCode, String value, int locationId, int properties)
     Set (overwrite) an attribute in the attribute list.
public  voidsetLocationProvider(LocationProvider provider)
     Set the location provider.

Field Detail
EMPTY_ATTRIBUTE_COLLECTION
final public static AttributeCollection EMPTY_ATTRIBUTE_COLLECTION(Code)




Constructor Detail
AttributeCollectionImpl
public AttributeCollectionImpl(NamePool pool)(Code)
Create an empty attribute list.




Method Detail
addAttribute
public void addAttribute(int nameCode, int typeCode, String value, int locationId, int properties)(Code)
Add an attribute to an attribute list. The parameters correspond to the parameters of the net.sf.saxon.event.Receiver.attribute(intintCharSequenceintint) method. There is no check that the name of the attribute is distinct from other attributes already in the collection: this check must be made by the caller.
Parameters:
  nameCode - Integer representing the attribute name.
Parameters:
  typeCode - The attribute type code
Parameters:
  value - The attribute value (must not be null)
Parameters:
  locationId - Identifies the attribtue location.
Parameters:
  properties - Attribute properties



clear
public void clear()(Code)
Clear the attribute list. This removes the values but doesn't free the memory used. free the memory, use clear() then compact().



compact
public void compact()(Code)
Compact the attribute list to avoid wasting memory



getIndex
public int getIndex(String qname)(Code)
Get the index of an attribute, from its lexical QName
Parameters:
  qname - The lexical QName of the attribute. The prefix must match. The index position of the attribute



getIndex
public int getIndex(String uri, String localname)(Code)
Get the index of an attribute (by name).
Parameters:
  uri - The namespace uri of the attribute.
Parameters:
  localname - The local name of the attribute. The index position of the attribute



getIndexByFingerprint
public int getIndexByFingerprint(int fingerprint)(Code)
Get the index, given the fingerprint. Return -1 if not found.



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



getLineNumber
public int getLineNumber(int index)(Code)
Get the line number part of the location of an attribute, at a given index.

Attribute location information is not available from a SAX parser, so this method is not useful for getting the location of an attribute in a source document. However, in a Saxon result document, the location information represents the location in the stylesheet of the instruction used to generate this attribute, which is useful for debugging.


Parameters:
  index - the required attribute the line number of the location of the attribute



getLocalName
public String getLocalName(int index)(Code)
Get the local name of an attribute (by position).
Parameters:
  index - The position of the attribute in the list. The local name of the attribute as a string, or null if thereis no attribute at that position.



getLocationId
public int getLocationId(int index)(Code)
Get the locationID of an attribute (by position)
Parameters:
  index - The position of the attribute in the list. The location identifier of the attribute. This can be suppliedto a net.sf.saxon.event.LocationProvider in order to obtain theactual system identifier and line number of the relevant location



getNameCode
public int getNameCode(int index)(Code)
Get the namecode of an attribute (by position).
Parameters:
  index - The position of the attribute in the list. The display name of the attribute as a string, or null if thereis no attribute at that position.



getPrefix
public String getPrefix(int index)(Code)
Get the prefix of the name of an attribute (by position).
Parameters:
  index - The position of the attribute in the list. The prefix of the attribute name as a string, or null if thereis no attribute at that position. Returns "" for an attribute thathas no prefix.



getProperties
public int getProperties(int index)(Code)
Get the properties of an attribute (by position)
Parameters:
  index - The position of the attribute in the list. The properties of the attribute. This is a setof bit-settings defined in class net.sf.saxon.event.ReceiverOptions. Themost interesting of these is {net.sf.saxon.event.ReceiverOptions.DEFAULTED_ATTRIBUTE,which indicates an attribute that was added to an element as a result of schema validation.



getQName
public String getQName(int index)(Code)
Get the lexical QName of an attribute (by position).
Parameters:
  index - The position of the attribute in the list. The lexical QName of the attribute as a string, or null if thereis no attribute at that position.



getSystemId
public String getSystemId(int index)(Code)
Get the systemId part of the location of an attribute, at a given index.

Attribute location information is not available from a SAX parser, so this method is not useful for getting the location of an attribute in a source document. However, in a Saxon result document, the location information represents the location in the stylesheet of the instruction used to generate this attribute, which is useful for debugging.


Parameters:
  index - the required attribute the systemId of the location of the attribute



getType
public String getType(int index)(Code)
Get the type of an attribute (by position). This is a SAX2 method, so it gets the type name as a DTD attribute type, mapped from the schema type code.
Parameters:
  index - The position of the attribute in the list. The attribute type as a string ("NMTOKEN" for anenumeration, and "CDATA" if no declaration wasread), or null if there is no attribute atthat position.



getType
public String getType(String uri, String localname)(Code)
Get the type of an attribute (by name).
Parameters:
  uri - The namespace uri of the attribute.
Parameters:
  localname - The local name of the attribute. The index position of the attribute



getType
public String getType(String name)(Code)
Get the type of an attribute (by lexical QName).
Parameters:
  name - The lexical QName of the attribute. The attribute type as a string (e.g. "NMTOKEN", or"CDATA" if no declaration was read).



getTypeAnnotation
public int getTypeAnnotation(int index)(Code)
Get the namecode of an attribute (by position).
Parameters:
  index - The position of the attribute in the list. The type annotation, as the fingerprint of the type name.The bit net.sf.saxon.om.NodeInfo.IS_DTD_TYPE represents a DTD-derived type.



getURI
public String getURI(int index)(Code)
Get the namespace URI of an attribute (by position).
Parameters:
  index - The position of the attribute in the list. The local name of the attribute as a string, or null if thereis no attribute at that position.



getValue
public String getValue(int index)(Code)
Get the value of an attribute (by position).
Parameters:
  index - The position of the attribute in the list. The attribute value as a string, or null ifthere is no attribute at that position.



getValue
public String getValue(String uri, String localname)(Code)
Get the value of an attribute (by name).
Parameters:
  uri - The namespace uri of the attribute.
Parameters:
  localname - The local name of the attribute. The index position of the attribute



getValue
public String getValue(String name)(Code)
Get the value of an attribute (by lexical QName).
Parameters:
  name - The attribute name (a lexical QName).The prefix must match the prefix originally used. This method is defined in SAX, but isnot recommended except where the prefix is null.



getValueByFingerprint
public String getValueByFingerprint(int fingerprint)(Code)
Get the attribute value using its fingerprint



isId
public boolean isId(int index)(Code)
Determine whether a given attribute has the is-ID property set



setAttribute
public void setAttribute(int index, int nameCode, int typeCode, String value, int locationId, int properties)(Code)
Set (overwrite) an attribute in the attribute list. The parameters correspond to the parameters of the net.sf.saxon.event.Receiver.attribute(intintCharSequenceintint) method.
Parameters:
  index - Identifies the entry to be replaced
Parameters:
  nameCode - Integer representing the attribute name.
Parameters:
  typeCode - The attribute type code
Parameters:
  value - The attribute value (must not be null)
Parameters:
  locationId - Identifies the attribtue location.
Parameters:
  properties - Attribute properties



setLocationProvider
public void setLocationProvider(LocationProvider provider)(Code)
Set the location provider. This must be set if the methods getSystemId() and getLineNumber() are to be used to get location information for an attribute.



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.