Source Code Cross Referenced for LocatorImpl.java in  » Web-Server » Quadcap-Web-Server » org » xml » sax » helpers » 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 » Web Server » Quadcap Web Server » org.xml.sax.helpers 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* Copyright 2000 - 2001 Quadcap Software.  All rights reserved.
002:         *
003:         * This software is distributed under the Quadcap Free Software License.
004:         * This software may be used or modified for any purpose, personal or
005:         * commercial.  Open Source redistributions are permitted.  Commercial
006:         * redistribution of larger works derived from, or works which bundle
007:         * this software requires a "Commercial Redistribution License"; see
008:         * http://www.quadcap.com/purchase.
009:         *
010:         * Redistributions qualify as "Open Source" under  one of the following terms:
011:         *   
012:         *    Redistributions are made at no charge beyond the reasonable cost of
013:         *    materials and delivery.
014:         *
015:         *    Redistributions are accompanied by a copy of the Source Code or by an
016:         *    irrevocable offer to provide a copy of the Source Code for up to three
017:         *    years at the cost of materials and delivery.  Such redistributions
018:         *    must allow further use, modification, and redistribution of the Source
019:         *    Code under substantially the same terms as this license.
020:         *
021:         * Redistributions of source code must retain the copyright notices as they
022:         * appear in each source code file, these license terms, and the
023:         * disclaimer/limitation of liability set forth as paragraph 6 below.
024:         *
025:         * Redistributions in binary form must reproduce this Copyright Notice,
026:         * these license terms, and the disclaimer/limitation of liability set
027:         * forth as paragraph 6 below, in the documentation and/or other materials
028:         * provided with the distribution.
029:         *
030:         * The Software is provided on an "AS IS" basis.  No warranty is
031:         * provided that the Software is free of defects, or fit for a
032:         * particular purpose.  
033:         *
034:         * Limitation of Liability. Quadcap Software shall not be liable
035:         * for any damages suffered by the Licensee or any third party resulting
036:         * from use of the Software.
037:         */
038:
039:        // SAX default implementation for Locator.
040:        // No warranty; no copyright -- use this as you will.
041:        // $Id: LocatorImpl.java,v 1.3 2001/01/06 06:11:03 stan Exp $
042:        package org.xml.sax.helpers;
043:
044:        import org.xml.sax.Locator;
045:
046:        /**
047:         * Provide an optional convenience implementation of Locator.
048:         *
049:         * <p>This class is available mainly for application writers, who
050:         * can use it to make a persistent snapshot of a locator at any
051:         * point during a document parse:</p>
052:         *
053:         * <pre>
054:         * Locator locator;
055:         * Locator startloc;
056:         *
057:         * public void setLocator (Locator locator)
058:         * {
059:         *         // note the locator
060:         *   this.locator = locator;
061:         * }
062:         *
063:         * public void startDocument ()
064:         * {
065:         *         // save the location of the start of the document
066:         *         // for future use.
067:         *   Locator startloc = new LocatorImpl(locator);
068:         * }
069:         *</pre>
070:         *
071:         * <p>Normally, parser writers will not use this class, since it
072:         * is more efficient to provide location information only when
073:         * requested, rather than constantly updating a Locator object.</p>
074:         *
075:         * @see org.xml.sax.Locator
076:         */
077:        public class LocatorImpl implements  Locator {
078:
079:            /**
080:             * Zero-argument constructor.
081:             *
082:             * <p>This will not normally be useful, since the main purpose
083:             * of this class is to make a snapshot of an existing Locator.</p>
084:             */
085:            public LocatorImpl() {
086:            }
087:
088:            /**
089:             * Copy constructor.
090:             *
091:             * <p>Create a persistent copy of the current state of a locator.
092:             * When the original locator changes, this copy will still keep
093:             * the original values (and it can be used outside the scope of
094:             * DocumentHandler methods).</p>
095:             *
096:             * @param locator The locator to copy.
097:             */
098:            public LocatorImpl(Locator locator) {
099:                setPublicId(locator.getPublicId());
100:                setSystemId(locator.getSystemId());
101:                setLineNumber(locator.getLineNumber());
102:                setColumnNumber(locator.getColumnNumber());
103:            }
104:
105:            //////////////////////////////////////////////////////////////////////
106:            // Implementation of org.xml.sax.Locator
107:            //////////////////////////////////////////////////////////////////////
108:
109:            /**
110:             * Return the saved public identifier.
111:             *
112:             * @return The public identifier as a string, or null if none
113:             *         is available.
114:             * @see org.xml.sax.Locator#getPublicId
115:             * @see #setPublicId
116:             */
117:            public String getPublicId() {
118:                return publicId;
119:            }
120:
121:            /**
122:             * Return the saved system identifier.
123:             *
124:             * @return The system identifier as a string, or null if none
125:             *         is available.
126:             * @see org.xml.sax.Locator#getSystemId
127:             * @see #setSystemId
128:             */
129:            public String getSystemId() {
130:                return systemId;
131:            }
132:
133:            /**
134:             * Return the saved line number (1-based).
135:             *
136:             * @return The line number as an integer, or -1 if none is available.
137:             * @see org.xml.sax.Locator#getLineNumber
138:             * @see #setLineNumber
139:             */
140:            public int getLineNumber() {
141:                return lineNumber;
142:            }
143:
144:            /**
145:             * Return the saved column number (1-based).
146:             *
147:             * @return The column number as an integer, or -1 if none is available.
148:             * @see org.xml.sax.Locator#getColumnNumber
149:             * @see #setColumnNumber
150:             */
151:            public int getColumnNumber() {
152:                return columnNumber;
153:            }
154:
155:            //////////////////////////////////////////////////////////////////////
156:            // Setters for the properties (not in org.xml.sax.Locator)
157:            //////////////////////////////////////////////////////////////////////
158:
159:            /**
160:             * Set the public identifier for this locator.
161:             *
162:             * @param publicId The new public identifier, or null 
163:             *        if none is available.
164:             * @see #getPublicId
165:             */
166:            public void setPublicId(String publicId) {
167:                this .publicId = publicId;
168:            }
169:
170:            /**
171:             * Set the system identifier for this locator.
172:             *
173:             * @param systemId The new system identifier, or null 
174:             *        if none is available.
175:             * @see #getSystemId
176:             */
177:            public void setSystemId(String systemId) {
178:                this .systemId = systemId;
179:            }
180:
181:            /**
182:             * Set the line number for this locator (1-based).
183:             *
184:             * @param lineNumber The line number, or -1 if none is available.
185:             * @see #getLineNumber
186:             */
187:            public void setLineNumber(int lineNumber) {
188:                this .lineNumber = lineNumber;
189:            }
190:
191:            /**
192:             * Set the column number for this locator (1-based).
193:             *
194:             * @param columnNumber The column number, or -1 if none is available.
195:             * @see #getColumnNumber
196:             */
197:            public void setColumnNumber(int columnNumber) {
198:                this .columnNumber = columnNumber;
199:            }
200:
201:            //////////////////////////////////////////////////////////////////////
202:            // Internal state.
203:            //////////////////////////////////////////////////////////////////////
204:
205:            private String publicId;
206:            private String systemId;
207:            private int lineNumber;
208:            private int columnNumber;
209:
210:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.