Source Code Cross Referenced for DOMException.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) 


01:        /* DOMException.java
02:
03:        {{IS_NOTE
04:
05:        	Purpose: 
06:        	Description: 
07:        	History:
08:        	2001/09/28 14:04:16, Create, Tom M. Yeh.
09:        }}IS_NOTE
10:
11:        Copyright (C) 2001 Potix Corporation. All Rights Reserved.
12:
13:        {{IS_RIGHT
14:        	This program is distributed under GPL Version 2.0 in the hope that
15:        	it will be useful, but WITHOUT ANY WARRANTY.
16:        }}IS_RIGHT
17:         */
18:        package org.zkoss.idom;
19:
20:        import org.xml.sax.Locator;
21:
22:        import org.zkoss.lang.Objects;
23:        import org.zkoss.idom.util.SimpleLocator;
24:
25:        /**
26:         * Denotes an operation is not supported.
27:         *
28:         * @author tomyeh
29:         */
30:        public class DOMException extends org.w3c.dom.DOMException {
31:            protected Locator _loc;
32:
33:            public DOMException(short code) {
34:                super (code, message(code, null, null));
35:            }
36:
37:            public DOMException(short code, String extraMsg) {
38:                super (code, message(code, extraMsg, null));
39:            }
40:
41:            public DOMException(short code, Locator loc) {
42:                super (code, message(code, null, loc));
43:                _loc = loc;
44:            }
45:
46:            public DOMException(short code, String extraMsg, Locator loc) {
47:                super (code, message(code, extraMsg, loc));
48:                _loc = loc;
49:            }
50:
51:            private static final String message(short code, String extraMsg,
52:                    Locator loc) {
53:                StringBuffer sb = new StringBuffer(64);
54:                switch (code) {
55:                case HIERARCHY_REQUEST_ERR:
56:                    sb.append("Hierarchy request error");
57:                    break;
58:                case INVALID_ACCESS_ERR:
59:                    sb.append("Invalid access to the underly object");
60:                    break;
61:                case INVALID_CHARACTER_ERR:
62:                    sb.append("Invalid character(s)");
63:                    break;
64:                case NAMESPACE_ERR:
65:                    sb.append("Namespace error");
66:                    break;
67:                case NO_DATA_ALLOWED_ERR:
68:                    sb.append("Data not allowed");
69:                    break;
70:                case NO_MODIFICATION_ALLOWED_ERR:
71:                    sb.append("No modification allowed");
72:                    break;
73:                case NOT_FOUND_ERR:
74:                    sb.append("Not found");
75:                    break;
76:                case NOT_SUPPORTED_ERR:
77:                    sb.append("Not supported yet");
78:                    break;
79:                case SYNTAX_ERR:
80:                    sb.append("Syntax error");
81:                    break;
82:                default:
83:                    sb.append("Unknown error");
84:                    break;
85:                }
86:                if (extraMsg != null)
87:                    sb.append(": ").append(extraMsg);
88:
89:                if (loc != null) {
90:                    if (sb.length() > 0)
91:                        sb.append(' ');
92:
93:                    sb.append(SimpleLocator.toString(loc));
94:                }
95:                return sb.toString();
96:            }
97:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.