commonsrdf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [3/5] incubator-commonsrdf git commit: JsonLdTerm.toString()
Date Fri, 04 Nov 2016 09:02:03 GMT
JsonLdTerm.toString()


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

Branch: refs/heads/master
Commit: 2e5cf8f5a8df6beb73f80474e894978451e37569
Parents: 3abb1ab
Author: Stian Soiland-Reyes <stain@apache.org>
Authored: Fri Nov 4 10:01:15 2016 +0100
Committer: Stian Soiland-Reyes <stain@apache.org>
Committed: Fri Nov 4 10:01:15 2016 +0100

----------------------------------------------------------------------
 .../org/apache/commons/rdf/jsonldjava/JsonLdBlankNode.java     | 5 +++++
 .../java/org/apache/commons/rdf/jsonldjava/JsonLdTerm.java     | 6 ++++++
 2 files changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/2e5cf8f5/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdBlankNode.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdBlankNode.java
b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdBlankNode.java
index d3ac1f0..66c8cba 100644
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdBlankNode.java
+++ b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdBlankNode.java
@@ -59,4 +59,9 @@ final class JsonLdBlankNodeImpl extends JsonLdTermImpl implements JsonLdBlankNod
     public int hashCode() {
         return uniqueReference().hashCode();
     }
+    
+    @Override
+    public String toString() {
+        return ntriplesString() + " [" + uniqueReference() + "]";
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/2e5cf8f5/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTerm.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTerm.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTerm.java
index 722f440..ac279a5 100644
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTerm.java
+++ b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTerm.java
@@ -41,4 +41,10 @@ abstract class JsonLdTermImpl implements JsonLdTerm {
     public Node asJsonLdNode() {
         return node;
     }
+    
+    @Override
+    public String toString() {
+        return ntriplesString();
+    }
+    
 }


Mime
View raw message