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


java.lang.Object
   org.apache.xerces.dom.NamedNodeMapImpl

All known Subclasses:   org.apache.xerces.dom.AttributeMap,
NamedNodeMapImpl
public class NamedNodeMapImpl implements NamedNodeMap,Serializable(Code)
NamedNodeMaps represent collections of Nodes that can be accessed by name. Entity and Notation nodes are stored in NamedNodeMaps attached to the DocumentType. Attributes are placed in a NamedNodeMap attached to the elem they're related too. However, because attributes require more work, such as firing mutation events, they are stored in a subclass of NamedNodeMapImpl.

Only one Node may be stored per name; attempting to store another will replace the previous value.

NOTE: The "primary" storage key is taken from the NodeName attribute of the node. The "secondary" storage key is the namespaceURI and localName, when accessed by DOM level 2 nodes. All nodes, even DOM Level 2 nodes are stored in a single Vector sorted by the primary "nodename" key.

NOTE: item()'s integer index does _not_ imply that the named nodes must be stored in an array; that's only an access method. Note too that these indices are "live"; if someone changes the map's contents, the indices associated with nodes may change.


since:
   PR-DOM-Level-1-19980818.



Field Summary
final protected static  shortCHANGED
    
final protected static  shortHASDEFAULTS
    
final protected static  shortREADONLY
    
protected  shortflags
    
protected  Vectornodes
     Nodes.
protected  NodeImplownerNode
    
final static  longserialVersionUID
     Serialization version.

Constructor Summary
protected  NamedNodeMapImpl(NodeImpl ownerNode)
     Constructs a named node map.

Method Summary
final  booleanchanged()
    
final  voidchanged(boolean value)
    
protected  voidcloneContent(NamedNodeMapImpl srcmap)
    
public  NamedNodeMapImplcloneMap(NodeImpl ownerNode)
     Cloning a NamedNodeMap is a DEEP OPERATION; it always clones all the nodes contained in the map.
protected  intfindNamePoint(String name, int start)
     Subroutine: Locate the named item, or the point at which said item should be added.
protected  intfindNamePoint(String namespaceURI, String name)
     This findNamePoint is for DOM Level 2 Namespaces.
public  intgetLength()
     Report how many nodes are currently stored in this NamedNodeMap.
public  NodegetNamedItem(String name)
     Retrieve a node by name.
public  NodegetNamedItemNS(String namespaceURI, String localName)
     Introduced in DOM Level 2.
 booleangetReadOnly()
     Internal subroutine returns this NodeNameMap's (shallow) readOnly value.
final  booleanhasDefaults()
    
final  voidhasDefaults(boolean value)
    
final  booleanisReadOnly()
    
final  voidisReadOnly(boolean value)
    
public  Nodeitem(int index)
     Retrieve an item from the map by 0-based index.
Parameters:
  index - Which item to retrieve.
public  NoderemoveNamedItem(String name)
    
public  NoderemoveNamedItemNS(String namespaceURI, String name)
     Introduced in DOM Level 2.
public  NodesetNamedItem(Node arg)
     Adds a node using its nodeName attribute. As the nodeName attribute is used to derive the name which the node must be stored under, multiple nodes of certain types (those that have a "special" string value) cannot be stored as the names would clash.
public  NodesetNamedItemNS(Node arg)
     Adds a node using its namespaceURI and localName.
See Also:   org.w3c.dom.NamedNodeMap.setNamedItem If the new Node replaces an existing node the replaced Node is returned,otherwise null is returned.
 voidsetOwnerDocument(CoreDocumentImpl doc)
    
 voidsetReadOnly(boolean readOnly, boolean deep)
     Internal subroutine to allow read-only Nodes to make their contained NamedNodeMaps readonly too.

Field Detail
CHANGED
final protected static short CHANGED(Code)



HASDEFAULTS
final protected static short HASDEFAULTS(Code)



READONLY
final protected static short READONLY(Code)



flags
protected short flags(Code)



nodes
protected Vector nodes(Code)
Nodes.



ownerNode
protected NodeImpl ownerNode(Code)



serialVersionUID
final static long serialVersionUID(Code)
Serialization version.




Constructor Detail
NamedNodeMapImpl
protected NamedNodeMapImpl(NodeImpl ownerNode)(Code)
Constructs a named node map.




Method Detail
changed
final boolean changed()(Code)



changed
final void changed(boolean value)(Code)



cloneContent
protected void cloneContent(NamedNodeMapImpl srcmap)(Code)



cloneMap
public NamedNodeMapImpl cloneMap(NodeImpl ownerNode)(Code)
Cloning a NamedNodeMap is a DEEP OPERATION; it always clones all the nodes contained in the map.



findNamePoint
protected int findNamePoint(String name, int start)(Code)
Subroutine: Locate the named item, or the point at which said item should be added.
Parameters:
  name - Name of a node to look up. If positive or zero, the index of the found item.If negative, index of the appropriate point at which to insertthe item, encoded as -1-index and hence reconvertable by subtractingit from -1. (Encoding because I don't want to recompare the stringsbut don't want to burn bytes on a datatype to hold a flagged value.)



findNamePoint
protected int findNamePoint(String namespaceURI, String name)(Code)
This findNamePoint is for DOM Level 2 Namespaces.



getLength
public int getLength()(Code)
Report how many nodes are currently stored in this NamedNodeMap. Caveat: This is a count rather than an index, so the highest-numbered node at any time can be accessed via item(getLength()-1).



getNamedItem
public Node getNamedItem(String name)(Code)
Retrieve a node by name.
Parameters:
  name - Name of a node to look up.



getNamedItemNS
public Node getNamedItemNS(String namespaceURI, String localName)(Code)
Introduced in DOM Level 2.

Retrieves a node specified by local name and namespace URI.
Parameters:
  namespaceURI - The namespace URI of the node to retrieve.When it is null or an empty string, thismethod behaves like getNamedItem.
Parameters:
  localName - The local name of the node to retrieve. Node A Node (of any type) with the specified name, or null if the specifiedname did not identify any node in the map.




getReadOnly
boolean getReadOnly()(Code)
Internal subroutine returns this NodeNameMap's (shallow) readOnly value.



hasDefaults
final boolean hasDefaults()(Code)



hasDefaults
final void hasDefaults(boolean value)(Code)



isReadOnly
final boolean isReadOnly()(Code)



isReadOnly
final void isReadOnly(boolean value)(Code)



item
public Node item(int index)(Code)
Retrieve an item from the map by 0-based index.
Parameters:
  index - Which item to retrieve. Note that indices are just anenumeration of the current contents; they aren't guaranteed to bestable, nor do they imply any promises about the order of theNamedNodeMap's contents. In other words, DO NOT assume either thatindex(i) will always refer to the same entry, or that there is anystable ordering of entries... and be prepared for double-reportingor skips as insertion and deletion occur.



removeNamedItem
public Node removeNamedItem(String name) throws DOMException(Code)



removeNamedItemNS
public Node removeNamedItemNS(String namespaceURI, String name) throws DOMException(Code)
Introduced in DOM Level 2.

Removes a node specified by local name and namespace URI.
Parameters:
  namespaceURI - The namespace URI of the node to remove.When it is null or an empty string, thismethod behaves like removeNamedItem.
Parameters:
  The - local name of the node to remove. Node The node removed from the map if a node with sucha local name and namespace URI exists.
throws:
  NOT_FOUND_ERR - : Raised if there is no node namedname in the map.




setNamedItem
public Node setNamedItem(Node arg) throws DOMException(Code)
Adds a node using its nodeName attribute. As the nodeName attribute is used to derive the name which the node must be stored under, multiple nodes of certain types (those that have a "special" string value) cannot be stored as the names would clash. This is seen as preferable to allowing nodes to be aliased.
See Also:   org.w3c.dom.NamedNodeMap.setNamedItem If the new Node replaces an existing node the replaced Node is returned,otherwise null is returned.
Parameters:
  arg - A node to store in a named node map. The node will later beaccessible using the value of the namespaceURI and localNameattribute of the node. If a node with those namespace URI andlocal name is already present in the map, it is replaced by the newone.
exception:
  org.w3c.dom.DOMException - The exception description.



setNamedItemNS
public Node setNamedItemNS(Node arg) throws DOMException(Code)
Adds a node using its namespaceURI and localName.
See Also:   org.w3c.dom.NamedNodeMap.setNamedItem If the new Node replaces an existing node the replaced Node is returned,otherwise null is returned.
Parameters:
  arg - A node to store in a named node map. The node will later beaccessible using the value of the namespaceURI and localNameattribute of the node. If a node with those namespace URI andlocal name is already present in the map, it is replaced by the newone.



setOwnerDocument
void setOwnerDocument(CoreDocumentImpl doc)(Code)
NON-DOM set the ownerDocument of this node, and the attributes it contains



setReadOnly
void setReadOnly(boolean readOnly, boolean deep)(Code)
Internal subroutine to allow read-only Nodes to make their contained NamedNodeMaps readonly too. I expect that in fact the shallow version of this operation will never be
Parameters:
  readOnly - boolean true to make read-only, false to permit editing.
Parameters:
  deep - boolean true to pass this request along to the containednodes, false to only toggle the NamedNodeMap itself. I expect thatthe shallow version of this operation will never be used, but I wantto design it in now, while I'm thinking about it.



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.