Source Code Cross Referenced for DocType.java in  » Ajax » zk » org » zkoss » idom » 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 » Ajax » zk » org.zkoss.idom 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* DocType.java
002:
003:        {{IS_NOTE
004:
005:        	Purpose:
006:        	Description:
007:        	History:
008:        	2001/10/22 16:12:44, Create, Tom M. Yeh.
009:        }}IS_NOTE
010:
011:        Copyright (C) 2001 Potix Corporation. All Rights Reserved.
012:
013:        {{IS_RIGHT
014:        	This program is distributed under GPL Version 2.0 in the hope that
015:        	it will be useful, but WITHOUT ANY WARRANTY.
016:        }}IS_RIGHT
017:         */
018:        package org.zkoss.idom;
019:
020:        import org.w3c.dom.NamedNodeMap;
021:        import org.w3c.dom.DocumentType;
022:
023:        import org.zkoss.lang.Objects;
024:        import org.zkoss.idom.impl.*;
025:
026:        /**
027:         * The iDOM DocType.
028:         *
029:         * @author tomyeh
030:         * @see Document
031:         */
032:        public class DocType extends AbstractItem implements  DocumentType {
033:            /** The element being constrained */
034:            protected String _name;
035:            /** The public ID of the DOCTYPE */
036:            protected String _pubId;
037:            /** The system ID of the DOCTYPE */
038:            protected String _sysId;
039:            /** The internal subset of the DOCTYPE */
040:            protected String _intSubset;
041:
042:            /** Constructor.
043:             *
044:             * @param publicId the public Id; null or empty if not availabl
045:             * @param systemId the system Id; null or empty if not availabl
046:             */
047:            public DocType(String elementName, String publicId, String systemId) {
048:                setName(elementName);
049:                setPublicId(publicId);
050:                setSystemId(systemId);
051:            }
052:
053:            /** Constructor.
054:             */
055:            public DocType(String elementName, String systemId) {
056:                setName(elementName);
057:                _pubId = "";
058:                setSystemId(systemId);
059:            }
060:
061:            /** Constructor.
062:             */
063:            public DocType(String elementName) {
064:                this ();
065:                setName(elementName);
066:                _pubId = _sysId = "";
067:            }
068:
069:            /** Constructor.
070:             */
071:            protected DocType() {
072:                _pubId = _sysId = "";
073:            }
074:
075:            //-- DocType extrs --//
076:            /**
077:             * Gets the public ID of an externally referenced DTD, or an empty
078:             * String if none is referenced.
079:             *
080:             * @return the public ID of referenced DTD; never null
081:             */
082:            public final String getPublicId() {
083:                return _pubId;
084:            }
085:
086:            /**
087:             * Sets the public ID of an externally referenced DTD, or an empty
088:             * String if none is referenced.
089:             *
090:             * @param publicId the public Id; null or empty if not availabl
091:             */
092:            public final void setPublicId(String publicId) {
093:                checkWritable();
094:
095:                if (publicId == null)
096:                    publicId = "";
097:
098:                if (!Objects.equals(_pubId, publicId)) {
099:                    _pubId = publicId;
100:                    setModified();
101:                }
102:            }
103:
104:            /**
105:             * Gets the system ID of an externally referenced DTD, or an empty
106:             * String if none is referenced.
107:             *
108:             * @return the system ID of referenced DTD; never null
109:             */
110:            public final String getSystemId() {
111:                return _sysId;
112:            }
113:
114:            /**
115:             * Sets the system ID of an externally referenced DTD, or an empty
116:             * String if none is referenced.
117:             *
118:             * @param systemId the system Id; null or empty if not availabl
119:             */
120:            public final void setSystemId(String systemId) {
121:                checkWritable();
122:
123:                if (systemId == null)
124:                    systemId = "";
125:
126:                if (!Objects.equals(_sysId, systemId)) {
127:                    _sysId = systemId;
128:                    setModified();
129:                }
130:            }
131:
132:            /**
133:             * Gets the data for the internal subset.
134:             */
135:            public final String getInternalSubset() {
136:                return _intSubset;
137:            }
138:
139:            /**
140:             * Sets the data for the internal subset.
141:             */
142:            public final void setInternalSubset(String newData) {
143:                checkWritable();
144:                if (!Objects.equals(_intSubset, newData)) {
145:                    _intSubset = newData;
146:                    setModified();
147:                }
148:            }
149:
150:            //-- Item --//
151:            /**
152:             * Gets the element name being constrained. Never null.
153:             */
154:            public final String getName() {
155:                return _name;
156:            }
157:
158:            public final void setName(String elementName) {
159:                checkWritable();
160:
161:                if (elementName == null)
162:                    elementName = "";
163:
164:                if (!Objects.equals(_name, elementName)) {
165:                    //TY: we don't verify it here because it might contain colon
166:                    //Verifier.checkElementName(elementName, getLocator());
167:                    _name = elementName;
168:                    setModified();
169:                }
170:            }
171:
172:            //-- Node --//
173:            public final short getNodeType() {
174:                return DOCUMENT_TYPE_NODE;
175:            }
176:
177:            //-- DocumentType --//
178:            public final NamedNodeMap getEntities() {
179:                throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
180:                        getLocator()); //NOT YET
181:            }
182:
183:            public final NamedNodeMap getNotations() {
184:                throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
185:                        getLocator()); //NOT YET
186:            }
187:
188:            //-- Object --//
189:            public String toString() {
190:                StringBuffer sb = new StringBuffer(64).append("[DocType: ")
191:                        .append(_name);
192:                if (_pubId.length() > 0)
193:                    sb.append(" PUBLIC ").append(_pubId);
194:                if (_sysId.length() > 0)
195:                    sb.append(" SYSTEM ").append(_sysId);
196:                return sb.append(']').toString();
197:            }
198:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.