Source Code Cross Referenced for NotationImpl.java in  » Database-DBMS » Ozone-1.1 » org » ozoneDB » xml » 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 » Database DBMS » Ozone 1.1 » org.ozoneDB.xml.dom 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * org/ozone-db/xml/dom/NotationImpl.java
003:         *
004:         * The contents of this file are subject to the OpenXML Public
005:         * License Version 1.0; you may not use this file except in compliance
006:         * with the License. You may obtain a copy of the License at
007:         * http://www.openxml.org/license.html
008:         *
009:         * THIS SOFTWARE IS DISTRIBUTED ON AN "AS IS" BASIS WITHOUT WARRANTY
010:         * OF ANY KIND, EITHER EXPRESSED OR IMPLIED. THE INITIAL DEVELOPER
011:         * AND ALL CONTRIBUTORS SHALL NOT BE LIABLE FOR ANY DAMAGES AS A
012:         * RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
013:         * DERIVATIVES. SEE THE LICENSE FOR THE SPECIFIC LANGUAGE GOVERNING
014:         * RIGHTS AND LIMITATIONS UNDER THE LICENSE.
015:         *
016:         * The Initial Developer of this code under the License is Assaf Arkin.
017:         * Portions created by Assaf Arkin are Copyright (C) 1998, 1999.
018:         * All Rights Reserved.
019:         */
020:
021:        /**
022:         * Changes for Persistent DOM running with ozone are
023:         * Copyright 1999 by SMB GmbH. All rights reserved.
024:         */package org.ozoneDB.xml.dom;
025:
026:        import org.w3c.dom.*;
027:
028:        /**
029:         * Implements a notation. A notation node merely associates the notation's
030:         * name with its system and/or public identifiers. The notation has no contents.
031:         * This node is immutable.
032:         * <P>
033:         * Notes:
034:         * <OL>
035:         * <LI>Node type is {@link org.w3c.dom.Node#NOTATION_NODE}
036:         * <LI>Node does not support childern
037:         * <LI>Node does not have a value
038:         * <LI>Node only accessible from {@link org.w3c.dom.DocumentType}
039:         * </OL>
040:         *
041:         *
042:         * @version $Revision: 1.1 $ $Date: 2001/12/18 11:03:24 $
043:         * @author <a href="mailto:arkin@trendline.co.il">Assaf Arkin</a>
044:         * @see org.w3c.dom.Notation
045:         * @see NodeImpl
046:         */
047:        public final class NotationImpl extends NodeImpl implements 
048:                NotationProxy {
049:
050:            final static long serialVersionUID = 1;
051:
052:            public short getNodeType() {
053:                return NOTATION_NODE;
054:            }
055:
056:            public final void setNodeValue(String value) {
057:                throw new DOMExceptionImpl(DOMException.NO_DATA_ALLOWED_ERR,
058:                        "This node type does not support values.");
059:            }
060:
061:            public String getPublicId() {
062:                return _publicID;
063:            }
064:
065:            public void setPublicId(String publicID) {
066:                _publicID = publicID;
067:            }
068:
069:            public String getSystemId() {
070:                return _systemID;
071:            }
072:
073:            public void setSystemId(String systemID) {
074:                _systemID = systemID;
075:            }
076:
077:            public synchronized boolean equals(Object other) {
078:                NotationProxy otherX;
079:                boolean equal;
080:
081:                // Test for node equality (this covers notation name and all its children)
082:                // and then test for specific notation qualities. Either both public id's
083:                // are null, or they are not null and equal. Same thing with system id.
084:                if (super .equals(other)) {
085:                    otherX = (NotationProxy) other;
086:                    return (this .getPublicId() == null
087:                            && otherX.getPublicId() == null || this 
088:                            .getPublicId() != null
089:                            && this .getPublicId().equals(otherX.getPublicId()))
090:                            && (this .getSystemId() == null
091:                                    && otherX.getSystemId() == null || this 
092:                                    .getSystemId() != null
093:                                    && this .getSystemId().equals(
094:                                            otherX.getSystemId()));
095:                }
096:                return false;
097:            }
098:
099:            public final Object clone() {
100:                TextProxy clone = null;
101:                try {
102:                    clone = (TextProxy) database().createObject(
103:                            TextImpl.class.getName());
104:                    clone.init(_ownerDocument, getNodeValue());
105:                    cloneInto((NodeProxy) clone, true);
106:                } catch (Exception except) {
107:                    throw new DOMExceptionImpl(DOMExceptionImpl.PDOM_ERR,
108:                            except.getMessage());
109:                }
110:                return clone;
111:            }
112:
113:            public final Node cloneNode(boolean deep) {
114:                TextProxy clone = null;
115:                try {
116:                    clone = (TextProxy) database().createObject(
117:                            TextImpl.class.getName());
118:                    clone.init(_ownerDocument, getNodeValue());
119:                    cloneInto((NodeProxy) clone, deep);
120:                } catch (Exception except) {
121:                    throw new DOMExceptionImpl(DOMExceptionImpl.PDOM_ERR,
122:                            except.getMessage());
123:                }
124:                return clone;
125:            }
126:
127:            public String toString() {
128:                String name;
129:
130:                name = getNodeName();
131:                if (name.length() > 32) {
132:                    name = name.substring(0, 32) + "..";
133:                }
134:                if (getSystemId() != null) {
135:                    name = name + "] SYSTEM [" + getSystemId();
136:                }
137:                if (getPublicId() != null) {
138:                    name = name + "] PUBLIC [" + getPublicId();
139:                }
140:                return "Notation decl: [" + name + "]";
141:            }
142:
143:            public synchronized void cloneInto(NodeProxy into, boolean deep) {
144:                super .cloneInto(into, deep);
145:                ((NotationProxy) into).setSystemId(_systemID);
146:                ((NotationProxy) into).setPublicId(_publicID);
147:            }
148:
149:            protected final boolean supportsChildern() {
150:                return false;
151:            }
152:
153:            /**
154:             * Constructor requires owner document, notation name and all its attributes.
155:             *
156:             * @param owner The owner document
157:             * @param name The entity name
158:             * @param systemID The system identifier, if specified
159:             * @param publicID The public identifier, if specified
160:             */
161:            public NotationImpl(DocumentImpl owner, String name,
162:                    String systemID, String publicID) {
163:                init(owner, name, systemID, publicID);
164:            }
165:
166:            public NotationImpl() {
167:                super ();
168:            }
169:
170:            public void init(DocumentProxy owner, String name, String systemID,
171:                    String publicID) {
172:                super .init(owner, name, null, true);
173:                if (_systemID == null && _publicID == null) {
174:                    throw new IllegalArgumentException(
175:                            "Both 'systemID' and 'publicID' are missing.");
176:                }
177:                _systemID = systemID;
178:                _publicID = publicID;
179:            }
180:
181:            /**
182:             * The system identifier of this notation, if specified.
183:             */
184:            private String _systemID;
185:
186:            /**
187:             * The public identifier of this notation, if specified.
188:             */
189:            private String _publicID;
190:
191:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.