Web-Karma icon indicating copy to clipboard operation
Web-Karma copied to clipboard

Json-LD Literal URI Issue

Open Maatary opened this issue 5 years ago • 0 comments

Hi, i am using the following option to link a Literal URI

Screen Shot 2019-04-03 at 7 58 24 PM

So far in N3 the generation works as expected, however in json-ld it is problematic. I had to specify a context for it to work. In particular i had to add as you can see below, that the property skos:inScheme and skos:topConceptOf link to an Id. Without that it is interpreted as a string, as the json-ld produce a string there rather than an URI

					"skos:prefLabel": {
						"@value": "Kemofam",
						"@language": "en"
					},
					"skos:inScheme": "https://data.elsevier.com/lifescience/taxonomy/pp/brandname/BrandNameScheme",
					"@type": [
						"pp:BrandName"
					],
					"skos:topConceptOf": "https://data.elsevier.com/lifescience/taxonomy/pp/brandname/BrandNameScheme",
					"@context": {
						"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
						"rr": "http://www.w3.org/ns/r2rml#",
						"reaxys": "https://data.elsevier.com/lifescience/schema/reaxys/",
						"owl": "http://www.w3.org/2002/07/owl#",
						"skos": "http://www.w3.org/2004/02/skos/core#",
						"reactiondata": "https://data.elsevier.com/lifescience/schema/reaxys/reactiondata/",
						"skos:inScheme": {
							"@type": "@id"
						},
						"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
						"xsd": "http://www.w3.org/2001/XMLSchema#",
						"pp": "https://data.elsevier.com/lifescience/schema/pp/",
						"skos:topConceptOf": {
							"@type": "@id"
						},
						"km-dev": "http://isi.edu/integration/karma/dev#"
					},
					"@id": "https://data.elsevier.com/lifescience/taxonomy/pp/brandname/2932"
				}```

I wonder if anyone could point me to the code part that would deal with generating the json-ld, and most importantly, where and how the information  ``IsURI`` or setting the type as ``xsd:anyURI`` would be taken into account so i can propose a pull request on that. 

That is Where in the worksheet (internally) is that information stored ?

Any Idea ? 

My idea is that the context that i am adding should not happen and it should simply be that the json-ld put an URI there i.e. <https://data.elsevier.com/lifescience/taxonomy/pp/brandname/BrandNameScheme>

If you have any suggestion for me to look at that would be great. 

Thank you

Maatary avatar Apr 03 '19 19:04 Maatary