问题
I'm using Virtuoso at AWS.
I want to get JSON-LD Data using SPARQL query. Because I'm making opendata that is JSON-LD Content-type.
But, I can not import JSON-LD file into Virtuoso Conductor.
So, do you know how to import JSON-LD into Virtuoso?
回答1:
To import JSON-LD into Virtuoso you need to install the Virtuoso Sponger Middleware module. Once installed, you can use Sponger pragmas and/or URL patterns to facilitate imports from documents comprised of JSON-LD content.
SPARQL pragma example:
define get:soft "replace"
SELECT * FROM <{JSONLD-DOC-URL}>
WHERE {?s ?p ?o}.
Web Service URL Patterns:
first time
http://{your-virtuoso-instance-cname}/about/html/{JSONLD-DOC-URL}
to replace/overwrite data stored in Virtuoso hosted named graph (internal document)
http://{your-virtuoso-instance-cname}/about/html/{JSONLD-DOC-URL}?sponger:get=replace
to add/append to data already stored in Virtuoso hosted named graph (internal document)
http://{your-virtuoso-instance-cname}/about/html/{JSONLD-DOC-URL}?sponger:get=add
来源:https://stackoverflow.com/questions/32298456/how-to-import-json-ld-into-virtuoso