jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rve...@apache.org
Subject [12/19] jena git commit: More faithful version of LiteralImpl.isPlainLiteral.
Date Mon, 01 Dec 2014 16:03:56 GMT
More faithful version of LiteralImpl.isPlainLiteral.

Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/c33c239f
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/c33c239f
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/c33c239f

Branch: refs/heads/hadoop-rdf
Commit: c33c239f187fa5c4eb8f965d8810d769ba5602ed
Parents: f243e9e
Author: Andy Seaborne <andy@apache.org>
Authored: Sun Nov 30 12:39:28 2014 +0000
Committer: Andy Seaborne <andy@apache.org>
Committed: Sun Nov 30 12:39:28 2014 +0000

----------------------------------------------------------------------
 .../main/java/com/hp/hpl/jena/rdf/model/impl/LiteralImpl.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/c33c239f/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/LiteralImpl.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/LiteralImpl.java b/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/LiteralImpl.java
index d4929ae..ac34e49 100644
--- a/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/LiteralImpl.java
+++ b/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/LiteralImpl.java
@@ -120,9 +120,9 @@ public class LiteralImpl extends EnhNode implements Literal {
      * Return true if this is a "plain" (i.e. old style, not typed) literal.
      * For RDF 1.1, the most compatible choice is "xsd:string". 
      */
-    public boolean isPlainLiteral() {
+    private boolean isPlainLiteral() {
         if ( JenaRuntime.isRDF11 )
-            return XSDDatatype.XSDstring.equals(asNode().getLiteralDatatype()) ;
+            return Util.isLangString(this) || Util.isSimpleString(this) ;  
         else
             return asNode().getLiteralDatatype() == null;
     }


Mime
View raw message