You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2019/08/30 10:29:25 UTC

[jena] branch master updated: JENA-1744: Split as a Curie

This is an automated email from the ASF dual-hosted git repository.

andy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jena.git


The following commit(s) were added to refs/heads/master by this push:
     new 5d5dabd  JENA-1744: Split as a Curie
     new bf04de5  Merge pull request #596 from afs/JENA-1744-jsonld
5d5dabd is described below

commit 5d5dabde3adbfeb6974b6ac3a3f687022ff93391
Author: Andy Seaborne <an...@apache.org>
AuthorDate: Thu Aug 29 10:59:01 2019 +0100

    JENA-1744: Split as a Curie
---
 jena-arq/src/main/java/org/apache/jena/riot/writer/JsonLDWriter.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/jena-arq/src/main/java/org/apache/jena/riot/writer/JsonLDWriter.java b/jena-arq/src/main/java/org/apache/jena/riot/writer/JsonLDWriter.java
index cd6e146..fd1941b 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/writer/JsonLDWriter.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/writer/JsonLDWriter.java
@@ -47,6 +47,7 @@ import org.apache.jena.riot.system.PrefixMapFactory;
 import org.apache.jena.sparql.core.DatasetGraph ;
 import org.apache.jena.sparql.util.Context ;
 import org.apache.jena.sparql.util.Symbol;
+import org.apache.jena.util.SplitIRI;
 import org.apache.jena.vocabulary.RDF ;
 
 import com.fasterxml.jackson.core.JsonGenerationException ;
@@ -318,7 +319,9 @@ public class JsonLDWriter extends WriterDatasetRIOTBase
 
                 if ( p.equals(RDF.type.asNode()) )
                     return ;
-                String x = p.getLocalName() ;
+                // JENA-1744 : split as a "Curie" (at the last / or #, regardless of th characters in a lcoal name). 
+                // Curie : https://www.w3.org/TR/curie/
+                String x = SplitIRI.localname(p.getURI());
 
                 if ( ctx.containsKey(x) ) {
                 } else if ( o.isBlank() || o.isURI() ) {