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


001:        /*
002:          (c) Copyright 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
003:          [See end of file]
004:          $Id: Node_Literal.java,v 1.19 2008/01/02 12:06:55 andy_seaborne Exp $
005:         */
006:
007:        package com.hp.hpl.jena.graph;
008:
009:        import com.hp.hpl.jena.datatypes.RDFDatatype;
010:        import com.hp.hpl.jena.graph.impl.*;
011:        import com.hp.hpl.jena.shared.*;
012:
013:        /**
014:         An RDF node holding a literal value. Literals may have datatypes.
015:         @author kers
016:         */
017:        public class Node_Literal extends Node_Concrete {
018:            /* package */Node_Literal(Object label) {
019:                super (label);
020:            }
021:
022:            public LiteralLabel getLiteral() {
023:                return (LiteralLabel) label;
024:            }
025:
026:            public final Object getLiteralValue() {
027:                return getLiteral().getValue();
028:            }
029:
030:            public final String getLiteralLexicalForm() {
031:                return getLiteral().getLexicalForm();
032:            }
033:
034:            public final String getLiteralLanguage() {
035:                return getLiteral().language();
036:            }
037:
038:            public final String getLiteralDatatypeURI() {
039:                return getLiteral().getDatatypeURI();
040:            }
041:
042:            public final RDFDatatype getLiteralDatatype() {
043:                return getLiteral().getDatatype();
044:            }
045:
046:            public final boolean getLiteralIsXML() {
047:                return getLiteral().isXML();
048:            }
049:
050:            public String toString(PrefixMapping pm, boolean quoting) {
051:                return ((LiteralLabel) label).toString(quoting);
052:            }
053:
054:            public boolean isLiteral() {
055:                return true;
056:            }
057:
058:            /**
059:                Literal nodes defer their indexing value to the component literal.
060:                @see com.hp.hpl.jena.graph.Node#getIndexingValue()
061:             */
062:            public Object getIndexingValue() {
063:                return getLiteral().getIndexingValue();
064:            }
065:
066:            public Object visitWith(NodeVisitor v) {
067:                return v.visitLiteral(this , getLiteral());
068:            }
069:
070:            public boolean equals(Object other) {
071:                return other instanceof  Node_Literal
072:                        && label.equals(((Node_Literal) other).label);
073:            }
074:
075:            /**
076:             * Test that two nodes are semantically equivalent.
077:             * In some cases this may be the sames as equals, in others
078:             * equals is stricter. For example, two xsd:int literals with
079:             * the same value but different language tag are semantically
080:             * equivalent but distinguished by the java equality function
081:             * in order to support round tripping.
082:             * <p>Default implementation is to use equals, subclasses should
083:             * override this.</p>
084:             */
085:            public boolean sameValueAs(Object o) {
086:                return o instanceof  Node_Literal
087:                        && ((LiteralLabel) label)
088:                                .sameValueAs(((Node_Literal) o).getLiteral());
089:            }
090:
091:            public boolean matches(Node x) {
092:                return sameValueAs(x);
093:            }
094:
095:        }
096:
097:        /*
098:         (c) Copyright 2002, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
099:         All rights reserved.
100:
101:         Redistribution and use in source and binary forms, with or without
102:         modification, are permitted provided that the following conditions
103:         are met:
104:
105:         1. Redistributions of source code must retain the above copyright
106:         notice, this list of conditions and the following disclaimer.
107:
108:         2. Redistributions in binary form must reproduce the above copyright
109:         notice, this list of conditions and the following disclaimer in the
110:         documentation and/or other materials provided with the distribution.
111:
112:         3. The name of the author may not be used to endorse or promote products
113:         derived from this software without specific prior written permission.
114:
115:         THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
116:         IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
117:         OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
118:         IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
119:         INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
120:         NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
121:         DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
122:         THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
123:         (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
124:         THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
125:         */
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.