You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason is that the Web API returns the results as N-Quads, while the default for the RMLMapper is Turtle. A new feature has been added to the RMLMapper (and consequently also the Web API) that allows you to set the Target of a mapping. This target allows you also to define what serialization format is used for the output.
this is the body
{ "rml": "@prefix rr: <http://www.w3.org/ns/r2rml#>. @prefix rml: <http://semweb.mmlab.be/ns/rml#>. @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>. @prefix ql: <http://semweb.mmlab.be/ns/ql#>. @prefix map: <http://mapping.example.com/>. map:map_person_0 rml:logicalSource map:source_0; a rr:TriplesMap; rdfs:label \"person\"; rr:subjectMap map:s_0; rr:predicateObjectMap map:pom_0, map:pom_1. map:om_0 a rr:ObjectMap; rr:constant \"http://xmlns.com/foaf/0.1/Person\"; rr:termType rr:IRI. map:om_1 a rr:ObjectMap; rml:reference \"firstname\"; rr:termType rr:Literal. map:pm_0 a rr:PredicateMap; rr:constant rdf:type. map:pm_1 a rr:PredicateMap; rr:constant <http://example.com/name>. map:pom_0 a rr:PredicateObjectMap; rr:predicateMap map:pm_0; rr:objectMap map:om_0. map:pom_1 a rr:PredicateObjectMap; rr:predicateMap map:pm_1; rr:objectMap map:om_1. map:s_0 a rr:SubjectMap; rr:template \"http://example.com/{firstname}\". map:source_0 a rml:LogicalSource; rml:source \"data.json\"; rml:iterator \"$.persons[*]\"; rml:referenceFormulation ql:JSONPath.", "sources": { "data.json": "{ \"persons\": [ { \"firstname\": \"John\", \"lastname\": \"Doe\" }, { \"firstname\": \"Jane\", \"lastname\": \"Smith\" }, { \"firstname\": \"Sarah\", \"lastname\": \"Bladinck\" } ] }" }, "serialization": "turtle" }
this is the result wihout the prefixes ?? and if you mapp direct from jar file it print out the prefixes.
{ "output": "\n<http://example.com/Jane> a <http://xmlns.com/foaf/0.1/Person>;\n <http://example.com/name> \"Jane\" .\n\n<http://example.com/John> a <http://xmlns.com/foaf/0.1/Person>;\n <http://example.com/name> \"John\" .\n\n<http://example.com/Sarah> a <http://xmlns.com/foaf/0.1/Person>;\n <http://example.com/name> \"Sarah\" .\n" }
The text was updated successfully, but these errors were encountered: