Source Code Cross Referenced for SAX2RDFImpl.java in  » RSS-RDF » Jena-2.5.5 » com » hp » hpl » jena » rdf » arp » impl » 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 » RSS RDF » Jena 2.5.5 » com.hp.hpl.jena.rdf.arp.impl 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * (c) Copyright 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
003:         * [See end of file]
004:         */
005:
006:        package com.hp.hpl.jena.rdf.arp.impl;
007:
008:        import org.xml.sax.Attributes;
009:        import org.xml.sax.ContentHandler;
010:        import org.xml.sax.ErrorHandler;
011:        import org.xml.sax.SAXException;
012:        import org.xml.sax.SAXParseException;
013:        import org.xml.sax.ext.LexicalHandler;
014:
015:        import com.hp.hpl.jena.rdf.arp.SAX2RDF;
016:
017:        /**
018:         * This class is public merely to reduce the amount of irrelevant documentation
019:         * generated by Javadoc for {@link SAX2RDF}.
020:         * 
021:         * There is nothing of interest in this JavaDoc. This if (depth>0) superclass
022:         * implements the functionality needed by {@link SAX2RDF}. The API given here
023:         * is the familiar SAX.
024:         * 
025:         * @author Jeremy J. Carroll
026:         *  
027:         */
028:        public class SAX2RDFImpl extends XMLHandler implements  LexicalHandler,
029:                ContentHandler, ErrorHandler {
030:            private int depth;
031:            final private String lang;
032:
033:            protected SAX2RDFImpl(String base, String l) {
034:                lang = l;
035:            }
036:
037:            protected void initParse(String b) throws SAXParseException {
038:                super .initParse(b, lang == null ? "" : lang);
039:
040:            }
041:
042:            /*
043:             * (non-Javadoc)
044:             * 
045:             * @see org.xml.sax.ext.LexicalHandler#endCDATA()
046:             */
047:            public void endCDATA() throws SAXException {
048:                if (depth > 0)
049:                    super .endCDATA();
050:
051:            }
052:
053:            /*
054:             * (non-Javadoc)
055:             * 
056:             * @see org.xml.sax.ext.LexicalHandler#endDTD()
057:             */
058:            public void endDTD() throws SAXException {
059:                if (depth > 0)
060:                    super .endDTD();
061:
062:            }
063:
064:            /*
065:             * (non-Javadoc)
066:             * 
067:             * @see org.xml.sax.ext.LexicalHandler#startCDATA()
068:             */
069:            public void startCDATA() throws SAXException {
070:                if (depth > 0)
071:                    super .startCDATA();
072:
073:            }
074:
075:            /*
076:             * (non-Javadoc)
077:             * 
078:             * @see org.xml.sax.ext.LexicalHandler#comment(char[], int, int)
079:             */
080:            public void comment(char[] ch, int start, int length)
081:                    throws SAXParseException {
082:                if (depth > 0)
083:                    super .comment(ch, start, length);
084:
085:            }
086:
087:            /*
088:             * (non-Javadoc)
089:             * 
090:             * @see org.xml.sax.ext.LexicalHandler#endEntity(java.lang.String)
091:             */
092:            public void endEntity(String name) throws SAXException {
093:                if (depth > 0)
094:                    super .endEntity(name);
095:
096:            }
097:
098:            /*
099:             * (non-Javadoc)
100:             * 
101:             * @see org.xml.sax.ext.LexicalHandler#startEntity(java.lang.String)
102:             */
103:            public void startEntity(String name) throws SAXException {
104:                if (depth > 0)
105:                    super .startEntity(name);
106:
107:            }
108:
109:            /*
110:             * (non-Javadoc)
111:             * 
112:             * @see org.xml.sax.ext.LexicalHandler#startDTD(java.lang.String,
113:             *      java.lang.String, java.lang.String)
114:             */
115:            public void startDTD(String name, String publicId, String systemId)
116:                    throws SAXException {
117:                if (depth > 0)
118:                    super .startDTD(name, publicId, systemId);
119:
120:            }
121:
122:            /*
123:             * (non-Javadoc)
124:             * 
125:             * @see org.xml.sax.ContentHandler#endDocument()
126:             */
127:            public void endDocument() throws SAXException {
128:                if (depth > 0)
129:                    super .endDocument();
130:
131:            }
132:
133:            /*
134:             * (non-Javadoc)
135:             * 
136:             * @see org.xml.sax.ContentHandler#startDocument()
137:             */
138:            public void startDocument() throws SAXException {
139:                if (depth > 0)
140:                    super .startDocument();
141:
142:            }
143:
144:            /*
145:             * (non-Javadoc)
146:             * 
147:             * @see org.xml.sax.ContentHandler#characters(char[], int, int)
148:             */
149:            public void characters(char[] ch, int start, int length)
150:                    throws SAXException {
151:                if (depth > 0)
152:                    super .characters(ch, start, length);
153:
154:            }
155:
156:            /*
157:             * (non-Javadoc)
158:             * 
159:             * @see org.xml.sax.ContentHandler#ignorableWhitespace(char[], int, int)
160:             */
161:            public void ignorableWhitespace(char[] ch, int start, int length)
162:                    throws SAXException {
163:                if (depth > 0)
164:                    super .ignorableWhitespace(ch, start, length);
165:
166:            }
167:
168:            /*
169:             * (non-Javadoc)
170:             * 
171:             * @see org.xml.sax.ContentHandler#endPrefixMapping(java.lang.String)
172:             */
173:            public void endPrefixMapping(String prefix) {
174:                if (depth > 0)
175:                    super .endPrefixMapping(prefix);
176:
177:            }
178:
179:            /*
180:             * (non-Javadoc)
181:             * 
182:             * @see org.xml.sax.ContentHandler#skippedEntity(java.lang.String)
183:             */
184:            public void skippedEntity(String name) throws SAXException {
185:                if (depth > 0)
186:                    super .skippedEntity(name);
187:
188:            }
189:
190:            /*
191:             * (non-Javadoc)
192:             * 
193:             * @see org.xml.sax.ContentHandler#processingInstruction(java.lang.String,
194:             *      java.lang.String)
195:             */
196:            public void processingInstruction(String target, String data)
197:                    throws SAXException {
198:                if (depth > 0)
199:                    super .processingInstruction(target, data);
200:
201:            }
202:
203:            /*
204:             * (non-Javadoc)
205:             * 
206:             * @see org.xml.sax.ContentHandler#endElement(java.lang.String,
207:             *      java.lang.String, java.lang.String)
208:             */
209:            public void endElement(String namespaceURI, String localName,
210:                    String qName) throws SAXException {
211:                if (depth <= 0) {
212:                    // Does not return.
213:                    fatalError(new SAXParseException("Unmatched end tag: "
214:                            + qName, getLocator()));
215:                }
216:                super .endElement(namespaceURI, localName, qName);
217:                if (--depth == 0) {
218:                    close();
219:                }
220:
221:            }
222:
223:            protected void close() {
224:                afterParse();
225:            }
226:
227:            /*
228:             * (non-Javadoc)
229:             * 
230:             * @see org.xml.sax.ContentHandler#startElement(java.lang.String,
231:             *      java.lang.String, java.lang.String, org.xml.sax.Attributes)
232:             */
233:            public void startElement(String namespaceURI, String localName,
234:                    String qName, Attributes atts) throws SAXException {
235:                depth++;
236:                super .startElement(namespaceURI, localName, qName, atts);
237:
238:            }
239:
240:            /*
241:             * (non-Javadoc)
242:             * 
243:             * @see org.xml.sax.ErrorHandler#error(org.xml.sax.SAXParseException)
244:             */
245:            public void error(SAXParseException exception)
246:                    throws SAXParseException {
247:
248:                super .error(exception);
249:
250:            }
251:
252:            /*
253:             * (non-Javadoc)
254:             * @see org.xml.sax.ErrorHandler#fatalError(org.xml.sax.SAXParseException)
255:             */
256:            public void fatalError(SAXParseException exception)
257:                    throws SAXException {
258:
259:                super .fatalError(exception);
260:
261:            }
262:
263:            /*
264:             * (non-Javadoc)
265:             * 
266:             * @see org.xml.sax.ErrorHandler#warning(org.xml.sax.SAXParseException)
267:             */
268:            public void warning(SAXParseException exception)
269:                    throws SAXParseException {
270:                super .warning(exception);
271:
272:            }
273:        }
274:
275:        /*
276:         * (c) Copyright 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP All rights
277:         * reserved.
278:         * 
279:         * Redistribution and use in source and binary forms, with or without
280:         * modification, are permitted provided that the following conditions are met:
281:         * 1. Redistributions of source code must retain the above copyright notice,
282:         * this list of conditions and the following disclaimer. 2. Redistributions in
283:         * binary form must reproduce the above copyright notice, this list of
284:         * conditions and the following disclaimer in the documentation and/or other
285:         * materials provided with the distribution. 3. The name of the author may not
286:         * be used to endorse or promote products derived from this software without
287:         * specific prior written permission.
288:         * 
289:         * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
290:         * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
291:         * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
292:         * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
293:         * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
294:         * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
295:         * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
296:         * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
297:         * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
298:         * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
299:         */
w_w__w.__j___a__v_a2s__.__c__om__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.