Source Code Cross Referenced for NotationImpl.java in  » XML » xerces-2_9_1 » 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 » XML » xerces 2_9_1 » org.apache.xerces.dom 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         * 
009:         *      http://www.apache.org/licenses/LICENSE-2.0
010:         * 
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         */
017:
018:        package org.apache.xerces.dom;
019:
020:        import org.apache.xerces.util.URI;
021:        import org.w3c.dom.DOMException;
022:        import org.w3c.dom.Node;
023:        import org.w3c.dom.Notation;
024:
025:        /**
026:         * Notations are how the Document Type Description (DTD) records hints
027:         * about the format of an XML "unparsed entity" -- in other words,
028:         * non-XML data bound to this document type, which some applications
029:         * may wish to consult when manipulating the document. A Notation
030:         * represents a name-value pair, with its nodeName being set to the
031:         * declared name of the notation.
032:         * <P>
033:         * Notations are also used to formally declare the "targets" of
034:         * Processing Instructions.
035:         * <P>
036:         * Note that the Notation's data is non-DOM information; the DOM only
037:         * records what and where it is.
038:         * <P>
039:         * See the XML 1.0 spec, sections 4.7 and 2.6, for more info.
040:         * <P>
041:         * Level 1 of the DOM does not support editing Notation contents.
042:         * 
043:         * @xerces.internal
044:         *
045:         * @version $Id: NotationImpl.java 447266 2006-09-18 05:57:49Z mrglavas $
046:         * @since  PR-DOM-Level-1-19980818.
047:         */
048:        public class NotationImpl extends NodeImpl implements  Notation {
049:
050:            //
051:            // Constants
052:            //
053:
054:            /** Serialization version. */
055:            static final long serialVersionUID = -764632195890658402L;
056:
057:            //
058:            // Data
059:            //
060:
061:            /** Notation name. */
062:            protected String name;
063:
064:            /** Public identifier. */
065:            protected String publicId;
066:
067:            /** System identifier. */
068:            protected String systemId;
069:
070:            /** Base URI*/
071:            protected String baseURI;
072:
073:            //
074:            // Constructors
075:            //
076:
077:            /** Factory constructor. */
078:            public NotationImpl(CoreDocumentImpl ownerDoc, String name) {
079:                super (ownerDoc);
080:                this .name = name;
081:            }
082:
083:            //
084:            // Node methods
085:            //
086:
087:            /** 
088:             * A short integer indicating what type of node this is. The named
089:             * constants for this value are defined in the org.w3c.dom.Node interface.
090:             */
091:            public short getNodeType() {
092:                return Node.NOTATION_NODE;
093:            }
094:
095:            /**
096:             * Returns the notation name
097:             */
098:            public String getNodeName() {
099:                if (needsSyncData()) {
100:                    synchronizeData();
101:                }
102:                return name;
103:            }
104:
105:            //
106:            // Notation methods
107:            //
108:
109:            /**
110:             * The Public Identifier for this Notation. If no public identifier
111:             * was specified, this will be null.  
112:             */
113:            public String getPublicId() {
114:
115:                if (needsSyncData()) {
116:                    synchronizeData();
117:                }
118:                return publicId;
119:
120:            } // getPublicId():String
121:
122:            /**
123:             * The System Identifier for this Notation. If no system identifier
124:             * was specified, this will be null.  
125:             */
126:            public String getSystemId() {
127:
128:                if (needsSyncData()) {
129:                    synchronizeData();
130:                }
131:                return systemId;
132:
133:            } // getSystemId():String
134:
135:            //
136:            // Public methods
137:            //
138:
139:            /** 
140:             * NON-DOM: The Public Identifier for this Notation. If no public
141:             * identifier was specified, this will be null.  
142:             */
143:            public void setPublicId(String id) {
144:
145:                if (isReadOnly()) {
146:                    throw new DOMException(
147:                            DOMException.NO_MODIFICATION_ALLOWED_ERR,
148:                            DOMMessageFormatter.formatMessage(
149:                                    DOMMessageFormatter.DOM_DOMAIN,
150:                                    "NO_MODIFICATION_ALLOWED_ERR", null));
151:                }
152:                if (needsSyncData()) {
153:                    synchronizeData();
154:                }
155:                publicId = id;
156:
157:            } // setPublicId(String)
158:
159:            /** 
160:             * NON-DOM: The System Identifier for this Notation. If no system
161:             * identifier was specified, this will be null.  
162:             */
163:            public void setSystemId(String id) {
164:
165:                if (isReadOnly()) {
166:                    throw new DOMException(
167:                            DOMException.NO_MODIFICATION_ALLOWED_ERR,
168:                            DOMMessageFormatter.formatMessage(
169:                                    DOMMessageFormatter.DOM_DOMAIN,
170:                                    "NO_MODIFICATION_ALLOWED_ERR", null));
171:                }
172:                if (needsSyncData()) {
173:                    synchronizeData();
174:                }
175:                systemId = id;
176:
177:            } // setSystemId(String)
178:
179:            /**
180:             * Returns the absolute base URI of this node or null if the implementation
181:             * wasn't able to obtain an absolute URI. Note: If the URI is malformed, a
182:             * null is returned.
183:             * 
184:             * @return The absolute base URI of this node or null.
185:             * @since DOM Level 3
186:             */
187:            public String getBaseURI() {
188:                if (needsSyncData()) {
189:                    synchronizeData();
190:                }
191:                if (baseURI != null && baseURI.length() != 0) {// attribute value is always empty string
192:                    try {
193:                        return new URI(baseURI).toString();
194:                    } catch (org.apache.xerces.util.URI.MalformedURIException e) {
195:                        // REVISIT: what should happen in this case?
196:                        return null;
197:                    }
198:                }
199:                return baseURI;
200:            }
201:
202:            /** NON-DOM: set base uri*/
203:            public void setBaseURI(String uri) {
204:                if (needsSyncData()) {
205:                    synchronizeData();
206:                }
207:                baseURI = uri;
208:            }
209:
210:        } // class NotationImpl
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.