Source Code Cross Referenced for CSSParseException.java in  » IDE-Netbeans » visualweb.api.designer » org » w3c » css » sac » 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 » IDE Netbeans » visualweb.api.designer » org.w3c.css.sac 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright (c) 1999 World Wide Web Consortium
003:         * (Massachusetts Institute of Technology, Institut National de Recherche
004:         *  en Informatique et en Automatique, Keio University).
005:         * All Rights Reserved. http://www.w3.org/Consortium/Legal/
006:         *
007:         * The original version of this interface comes from SAX :
008:         * http://www.megginson.com/SAX/
009:         *
010:         * $Id$
011:         */
012:        package org.w3c.css.sac;
013:
014:        /**
015:         * Encapsulate a CSS parse error or warning.
016:         *
017:         * <p>This exception will include information for locating the error
018:         * in the original CSS document.  Note that although the application
019:         * will receive a CSSParseException as the argument to the handlers
020:         * in the ErrorHandler interface, the application is not actually
021:         * required to throw the exception; instead, it can simply read the
022:         * information in it and take a different action.</p>
023:         *
024:         * <p>Since this exception is a subclass of CSSException, it
025:         * inherits the ability to wrap another exception.</p>
026:         *
027:         * @version $Revision$
028:         * @author  Philippe Le Hegaret
029:         */
030:        public class CSSParseException extends CSSException {
031:
032:            private String uri;
033:            private int lineNumber;
034:            private int columnNumber;
035:
036:            /**
037:             * Create a new CSSParseException from a message and a Locator.
038:             *
039:             * <p>This constructor is especially useful when an application is
040:             * creating its own exception from within a DocumentHandler
041:             * callback.</p>
042:             *
043:             * @param message The error or warning message.
044:             * @param locator The locator object for the error or warning.
045:             * @see Locator
046:             * @see Parser#setLocale 
047:             */
048:            public CSSParseException(String message, Locator locator) {
049:                super (message);
050:                this .code = SAC_SYNTAX_ERR;
051:                this .uri = locator.getURI();
052:                this .lineNumber = locator.getLineNumber();
053:                this .columnNumber = locator.getColumnNumber();
054:            }
055:
056:            /**
057:
058:             * Wrap an existing exception in a CSSParseException.
059:             *
060:             * <p>This constructor is especially useful when an application is
061:             * creating its own exception from within a DocumentHandler
062:             * callback, and needs to wrap an existing exception that is not a
063:             * subclass of CSSException.</p>
064:             *
065:             * @param message The error or warning message, or null to
066:             *                use the message from the embedded exception.
067:             * @param locator The locator object for the error or warning.
068:             * @param e Any exception
069:             * @see Locator
070:             * @see Parser#setLocale
071:             */
072:            public CSSParseException(String message, Locator locator,
073:                    Exception e) {
074:                super (SAC_SYNTAX_ERR, message, e);
075:                this .uri = locator.getURI();
076:                this .lineNumber = locator.getLineNumber();
077:                this .columnNumber = locator.getColumnNumber();
078:            }
079:
080:            /**
081:             * Create a new CSSParseException.
082:             *
083:             * <p>This constructor is most useful for parser writers.</p>
084:             *
085:             * <p>the parser must resolve the URI fully before creating the exception.</p>
086:             *
087:             * @param message The error or warning message.
088:             * @param uri The URI of the document that generated the error or warning.
089:             * @param lineNumber The line number of the end of the text that
090:             *                   caused the error or warning.
091:             * @param columnNumber The column number of the end of the text that
092:             *                     cause the error or warning.
093:             * @see Parser#setLocale
094:             */
095:            public CSSParseException(String message, String uri,
096:                    int lineNumber, int columnNumber) {
097:                super (message);
098:                this .code = SAC_SYNTAX_ERR;
099:                this .uri = uri;
100:                this .lineNumber = lineNumber;
101:                this .columnNumber = columnNumber;
102:            }
103:
104:            /**
105:             * Create a new CSSParseException with an embedded exception.
106:             *
107:             * <p>This constructor is most useful for parser writers who
108:             * need to wrap an exception that is not a subclass of
109:             * CSSException.</p>
110:             *
111:             * <p>The parser must resolve the URI fully before creating the
112:             * exception.</p>
113:             *
114:             * @param message The error or warning message, or null to use
115:             *                the message from the embedded exception.
116:             * @param uri The URI of the document that generated
117:             *                 the error or warning.
118:             * @param lineNumber The line number of the end of the text that
119:             *                   caused the error or warning.
120:             * @param columnNumber The column number of the end of the text that
121:             *                     cause the error or warning.
122:             * @param e Another exception to embed in this one.
123:             * @see Parser#setLocale 
124:             */
125:            public CSSParseException(String message, String uri,
126:                    int lineNumber, int columnNumber, Exception e) {
127:                super (SAC_SYNTAX_ERR, message, e);
128:                this .uri = uri;
129:                this .lineNumber = lineNumber;
130:                this .columnNumber = columnNumber;
131:            }
132:
133:            /**
134:             * Get the URI of the document where the exception occurred.
135:             *
136:             * <p>The URI will be resolved fully.</p>
137:             *
138:             * @return A string containing the URI, or null
139:             *         if none is available.
140:             * @see Locator#getURI
141:             */
142:            public String getURI() {
143:                return this .uri;
144:            }
145:
146:            /**
147:             * The line number of the end of the text where the exception occurred.
148:             *
149:             * @return An integer representing the line number, or -1
150:             *         if none is available.
151:             * @see Locator#getLineNumber
152:             */
153:            public int getLineNumber() {
154:                return this .lineNumber;
155:            }
156:
157:            /**
158:             * The column number of the end of the text where the exception occurred.
159:             *
160:             * <p>The first column in a line is position 1.</p>
161:             *
162:             * @return An integer representing the column number, or -1
163:             *         if none is available.
164:             * @see Locator#getColumnNumber
165:             */
166:            public int getColumnNumber() {
167:                return this.columnNumber;
168:            }
169:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.