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


001:        /*
002:         * (c) Copyright 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
003:         * [See end of file]
004:         */
005:
006:        package com.hp.hpl.jena.rdf.arp.states;
007:
008:        import org.xml.sax.Attributes;
009:        import org.xml.sax.SAXParseException;
010:
011:        import com.hp.hpl.jena.rdf.arp.impl.AbsXMLContext;
012:        import com.hp.hpl.jena.rdf.arp.impl.AttributeLexer;
013:
014:        abstract class AbsWantLiteralValueOrDescription extends WantDescription {
015:
016:            private StringBuffer buf;
017:
018:            private boolean checkComposingChar = true;
019:
020:            public AbsWantLiteralValueOrDescription(FrameI s, AbsXMLContext x) {
021:                super (s, x);
022:            }
023:
024:            public AbsWantLiteralValueOrDescription(FrameI s, AttributeLexer x)
025:                    throws SAXParseException {
026:                super (s, x);
027:            }
028:
029:            /**
030:             * It is unclear to jjc, whether we are obliged to copy the characters, or
031:             * whether we know that they will not be overwritten after we return. For
032:             * safety, I hence copy them. Normally, we have two interesting cases: a)
033:             * characters is called once, then endElement, and we form a literal from
034:             * the characters. This involves creating a string, if we used a char[] then
035:             * we would have another char[] to char[] copy, which is one too many. Hence
036:             * we use a StringBuffer. b) <eg:prop> <eg:typedNode /> </eg:prop> with two
037:             * lots of characters both white. This case happens from within
038:             * InsidePropertyElementFrame, and the second lot of characters do not get
039:             * here.
040:             */
041:            public void characters(char[] ch, int start, int length)
042:                    throws SAXParseException {
043:                if (checkComposingChar)
044:                    checkComposingChar(taint, ch, start, length);
045:                checkComposingChar = false;
046:                if (buf == null)
047:                    buf = new StringBuffer(length);
048:                getBuf().append(ch, start, length);
049:            }
050:
051:            void setBuf(StringBuffer buf) {
052:                this .buf = buf;
053:            }
054:
055:            StringBuffer getBuf() {
056:                if (buf == null)
057:                    buf = new StringBuffer(0);
058:                return buf;
059:            }
060:
061:            boolean bufIsSet() {
062:                return buf != null;
063:            }
064:
065:            public FrameI startElement(String uri, String localName,
066:                    String rawName, Attributes atts) throws SAXParseException {
067:                checkComposingChar = true;
068:                return super .startElement(uri, localName, rawName, atts);
069:            }
070:
071:            public void comment(char ch[], int st, int lng) {
072:                checkComposingChar = true;
073:            }
074:
075:            public void processingInstruction(String a, String b)
076:                    throws SAXParseException {
077:                checkComposingChar = true;
078:                super .processingInstruction(a, b);
079:
080:            }
081:
082:        }
083:
084:        /*
085:         * (c) Copyright 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP All rights
086:         * reserved.
087:         * 
088:         * Redistribution and use in source and binary forms, with or without
089:         * modification, are permitted provided that the following conditions are met:
090:         * 1. Redistributions of source code must retain the above copyright notice,
091:         * this list of conditions and the following disclaimer. 2. Redistributions in
092:         * binary form must reproduce the above copyright notice, this list of
093:         * conditions and the following disclaimer in the documentation and/or other
094:         * materials provided with the distribution. 3. The name of the author may not
095:         * be used to endorse or promote products derived from this software without
096:         * specific prior written permission.
097:         * 
098:         * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
099:         * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
100:         * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
101:         * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
102:         * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
103:         * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
104:         * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
105:         * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
106:         * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
107:         * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
108:         */
w_ww__.ja___v___a_2__s___.__c_o___m_ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.