WORK-IN-PROGRESS
This library transforms JSON data to RDF using a RML mapping file.
- Loads in memory the rml model
- Generates the subjects with defined URI templates
- Add RDF.types to the subjects
- Generate properties
This application implements the RML specification. To learn how to create RML flies please go to the Specs section.
A fat jar is packaged to be used as a java executable:
$ java -jar json2rdf-0.1.0-jar-with-dependencies.jar
Usage: <main class> [options]
Options:
--help, -h
* --inputFile, -f
JSON file to convert
* --rml, -m
RML mapping file
- Add RML.joinCondition support
- RDF.List as Data Type
- Script Engine
- Add generated sources to target directory
- Add the project to maven central
Use iteration index to create consecutive URI
rml:logicalSource [
rml:source "source.json";
rml:referenceFormulation ql:JSONPath;
rml:iterator "$.store.books.[*]"
];
rr:subjectMap [
rr:template "http://example.com/book/{{}}" ;
rr:class kso:DnsRequest
];
Javascript
rr:subjectMap [
rr:template "http://example.com/book/{{uuid.generate()}}" ;
rr:class owl:Thing
];
rr:predicateObjectMap [
rr:predicate schema:title;
rr:objectMap [
rml:reference "title" ;
rr:datatype xsd:string
rml:script: ""
];
];