You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (Jira)" <ji...@apache.org> on 2020/09/15 22:11:00 UTC

[jira] [Comment Edited] (JENA-1966) The base URI of a jsonLD file doesn't appear to be swapped out correctly. The first "./" is replaced correctly with the specified base, but after that, blank nodes that don't end up in the final graph seem to be created.

    [ https://issues.apache.org/jira/browse/JENA-1966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17196575#comment-17196575 ] 

Andy Seaborne edited comment on JENA-1966 at 9/15/20, 10:10 PM:
----------------------------------------------------------------

Workaround: Include a URI "http://demo.com/"

Apache Jena uses [https://github.com/jsonld-java/jsonld-java] for JSON-LD processing.

[https://github.com/jsonld-java/jsonld-java/pull/280]

Jena 3.16.0 uses jsonld-java 0.12.5. Upgrading to the latest jsonld-java should include their fix.

Jena 3.16.0 was released 2020-07-09. The fix is in jsonld-java 0.13.1 which was released 2020-09-09.

See also:

[https://github.com/w3c/json-ld-api/pull/430]

[https://lists.apache.org/thread.html/r343f27b3390dfbfd7ce9dcee4576bc532705b39d26923dfb0baf5322%40%3Cusers.jena.apache.org%3E]

JENA-1959 (contribution of 2020-09-03)

 


was (Author: andy.seaborne):
Workaround: Include a URI "http://demo.com/"

Apache Jena uses [https://github.com/jsonld-java/jsonld-java] for JSON-LD processing.

[https://github.com/jsonld-java/jsonld-java/pull/280]

Jena 3.16.0 uses jsonld-java 0.12.5. Upgrading to the latest jsonld-java should include their fix.

Jena 3.16.0 was released 2020-07-09. The fix is in jsonld-java 0.13.1 which was released 2020-09-09.

See also:

[https://github.com/w3c/json-ld-api/pull/430]

[https://lists.apache.org/thread.html/r343f27b3390dfbfd7ce9dcee4576bc532705b39d26923dfb0baf5322%40%3Cusers.jena.apache.org%3E]

 

 

> The base URI of a jsonLD file doesn't appear to be swapped out correctly.  The first "./" is replaced correctly with the specified base, but after that, blank nodes that don't end up in the final graph seem to be created.
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JENA-1966
>                 URL: https://issues.apache.org/jira/browse/JENA-1966
>             Project: Apache Jena
>          Issue Type: Bug
>    Affects Versions: Jena 3.16.0
>            Reporter: Erich Bremer
>            Priority: Minor
>
> The base URI of a jsonLD file doesn't appear to be swapped out correctly.  The first "./" is replaced correctly with the specified base, but after that, blank nodes that don't end up in the final graph seem to be created.
>   
>  See:
>   
>  [https://github.com/ebremer/jenabug]
>   
>  using the following code to read in a JSON-LD file:
>  
> {noformat}
>          Model m = ModelFactory.createDefaultModel();
>          InputStream inputStream = new FileInputStream("demo.jsonld");
>          RDFParser.create().base("https://demo.com").source(inputStream).lang(RDFLanguages.JSONLD).parse(m);
>          System.out.println("Number of triples : "+m.size());
>          RDFDataMgr.write(System.out, m, Lang.NQUADS);
> {noformat}
> demo.jsonld:
> {noformat}
> {
> 	"@context": [
> 		"https://w3id.org/ro/crate/1.0/context"
> 	],
> 	"@graph": [
> 		{
> 			"@id": "another/local/3223423423/blam.ttl",
> 			"@type": "CreativeWork"
> 		},
> 		{
> 			"@type": "CreativeWork",
> 			"@id": "ro-crate-metadata.jsonld",
> 			"conformsTo": {
> 				"@id": "https://w3id.org/ro/crate/1.0"
> 			},
> 			"about": {
> 				"@id": "./"
> 			}
> 		}
> 	]
> }
> {noformat}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)