commonsrdf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [03/50] [abbrv] incubator-commonsrdf git commit: NodeFmtLib
Date Sat, 02 Jul 2016 16:14:20 GMT
NodeFmtLib


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

Branch: refs/heads/jena
Commit: ae1b26087e30ff195322f9ec21a22aebbdce466c
Parents: 209fa3c
Author: Andy Seaborne <andy@seaborne.org>
Authored: Thu Aug 27 16:12:23 2015 +0100
Committer: Andy Seaborne <andy@seaborne.org>
Committed: Thu Aug 27 16:12:23 2015 +0100

----------------------------------------------------------------------
 src/main/java/org/apache/jena/commonsrdf/JenaCommonsRDF.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/ae1b2608/src/main/java/org/apache/jena/commonsrdf/JenaCommonsRDF.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/jena/commonsrdf/JenaCommonsRDF.java b/src/main/java/org/apache/jena/commonsrdf/JenaCommonsRDF.java
index 7578505..c7e10db 100644
--- a/src/main/java/org/apache/jena/commonsrdf/JenaCommonsRDF.java
+++ b/src/main/java/org/apache/jena/commonsrdf/JenaCommonsRDF.java
@@ -108,7 +108,7 @@ public class JenaCommonsRDF {
             return factory.createIRI(node.getURI()) ;
         if ( node.isLiteral() ) {
             String lang = node.getLiteralLanguage() ;
-            if ( lang != null && lang.isEmpty() )
+            if ( lang != null && ! lang.isEmpty() )
                 return factory.createLiteral(node.getLiteralLexicalForm(), lang) ;
             if ( node.getLiteralDatatype().equals(XSDDatatype.XSDstring) )
                 return factory.createLiteral(node.getLiteralLexicalForm()) ;
@@ -124,8 +124,8 @@ public class JenaCommonsRDF {
     /** Convert from Jena to any RDFCommons implementation */
    public static Triple fromJena(RDFTermFactory factory, org.apache.jena.graph.Triple triple)
{
         BlankNodeOrIRI subject = (BlankNodeOrIRI)(fromJena(factory, triple.getSubject()))
;
-        IRI predicate = (IRI)(fromJena(factory, triple.getSubject())) ;
-        RDFTerm object = fromJena(factory, triple.getSubject()) ;
+        IRI predicate = (IRI)(fromJena(factory, triple.getPredicate())) ;
+        RDFTerm object = fromJena(factory, triple.getObject()) ;
         return factory.createTriple(subject, predicate, object) ;
     }
 


Mime
View raw message