Source Code Cross Referenced for NamedNodeMapImpl.java in  » Web-Server » Rimfaxe-Web-Server » com » rimfaxe » xml » compatibility » 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 » com.rimfaxe.xml.compatibility 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package com.rimfaxe.xml.compatibility;
002:
003:        import org.w3c.dom.NamedNodeMap;
004:        import org.w3c.dom.Node;
005:        import org.w3c.dom.DOMException;
006:        import java.util.*;
007:
008:        /**
009:         * Wrapper around set of {@link org.w3c.dom.Attr}s.
010:
011:         <blockquote><small> Copyright (C) 2002 Hewlett-Packard Company.
012:         This file is part of Sparta, an XML Parser, DOM, and XPath library.
013:         This library is free software; you can redistribute it and/or
014:         modify it under the terms of the <a href="doc-files/LGPL.txt">GNU
015:         Lesser General Public License</a> as published by the Free Software
016:         Foundation; either version 2.1 of the License, or (at your option)
017:         any later version.  This library is distributed in the hope that it
018:         will be useful, but WITHOUT ANY WARRANTY; without even the implied
019:         warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
020:         PURPOSE. </small></blockquote>
021:         @version  $Date: 2003/01/27 23:30:58 $  $Revision: 1.2 $
022:         @author Eamonn O'Brien-Strain
023:         @author Sergio Marti
024:         * add Observer pattern
025:         * @stereotype container
026:         */
027:
028:        public class NamedNodeMapImpl implements  NamedNodeMap {
029:
030:            NamedNodeMapImpl(ElementImpl wrapperElement) {
031:                wrapperElement_ = wrapperElement;
032:                com.rimfaxe.xml.xmlreader.Element spartanElement = wrapperElement
033:                        .getSpartanElement();
034:                Map orderHack = new TreeMap();
035:                for (Enumeration i = spartanElement.getAttributeNames(); i
036:                        .hasMoreElements();) {
037:                    String name = (String) i.nextElement();
038:                    String value = spartanElement.getAttribute(name);
039:                    AttrImpl attr = new AttrImpl(wrapperElement, name, value);
040:                    //vector_.add( attr );
041:                    orderHack.put(name, attr);
042:                    dict_.put(name, attr);
043:                }
044:                //This is a hack to get the same order as Xerces for easier
045:                //diff testing
046:                for (Iterator i = orderHack.keySet().iterator(); i.hasNext();)
047:                    vector_.addElement(orderHack.get(i.next()));
048:            }
049:
050:            public int getLength() {
051:                return dict_.size();
052:            }
053:
054:            public Node getNamedItem(String name) {
055:                return (AttrImpl) dict_.get(name);
056:            }
057:
058:            public Node getNamedItemNS(String parm1, String parm2) {
059:                /**@todo: Implement this org.w3c.dom.NamedNodeMap method*/
060:                throw new Error("not implemented: getNamedItemNS");
061:            }
062:
063:            public Node item(int i) {
064:                return (AttrImpl) vector_.elementAt(i);
065:            }
066:
067:            public Node removeNamedItem(String name) throws DOMException {
068:                wrapperElement_.removeAttribute(name);
069:                vector_.removeElement(dict_.get(name));
070:                return (Node) dict_.remove(name);
071:            }
072:
073:            public Node removeNamedItemNS(String parm1, String parm2)
074:                    throws DOMException {
075:                /**@todo: Implement this org.w3c.dom.NamedNodeMap method*/
076:                throw new Error("not implemented: removeNamedItemNS");
077:            }
078:
079:            public Node setNamedItem(Node parm1) throws DOMException {
080:                /**@todo: Implement this org.w3c.dom.NamedNodeMap method*/
081:                throw new Error("not implemented: setNamedItem");
082:            }
083:
084:            public Node setNamedItemNS(Node parm1) throws DOMException {
085:                /**@todo: Implement this org.w3c.dom.NamedNodeMap method*/
086:                throw new Error("not implemented: setNamedItemNS");
087:            }
088:
089:            /** @associates AttrImpl */
090:            private final Map dict_ = new HashMap();
091:            private final Vector vector_ = new Vector();
092:            private final ElementImpl wrapperElement_;
093:        }
094:
095:        // $Log: NamedNodeMapImpl.java,v $
096:        // Revision 1.2  2003/01/27 23:30:58  yuhongx
097:        // Replaced Hashtable with HashMap.
098:        //
099:        // Revision 1.1.1.1  2002/08/19 05:04:16  eobrain
100:        // import from HP Labs internal CVS
101:        //
102:        // Revision 1.8  2002/08/19 00:39:07  eob
103:        // Tweak javadoc comment.
104:        //
105:        // Revision 1.7  2002/08/18 05:45:54  eob
106:        // Add copyright and other formatting and commenting in preparation for
107:        // release to SourceForge.
108:        //
109:        // Revision 1.6  2002/06/21 00:33:06  eob
110:        // Make work with old JDK 1.1.*
111:        //
112:        // Revision 1.5  2002/03/26 05:23:21  eob
113:        // Comment change only
114:        //
115:        // Revision 1.4  2002/02/01 22:01:16  eob
116:        // Comment change only.
117:        //
118:        // Revision 1.3  2002/01/05 21:31:30  eob
119:        // Add hack to get same order as Xerces.
120:        //
121:        // Revision 1.2  2002/01/05 08:06:19  eob
122:        // Implement remove
123:        //
124:        // Revision 1.1  2002/01/04 19:44:37  eob
125:        // initial
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.