Closed bilalbenma closed 7 months ago
Hello @bilalbenma,
First of all, thank you for using SDM-RDFizer. I checked the example you sent and there a couple errors with the JSONPaths. Here is the corrected version:
@base <http://example.org> .
@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix fo: <http://purl.org/ifo/#> .
<#FitbitRestingHeartRate>
a rr:TriplesMap;
rml:logicalSource [
rml:source "./test.json";
rml:referenceFormulation ql:JSONPath;
rml:iterator "$.body.measuregrps[*]";
];
rr:subjectMap [
rr:template "http://ifo.com/{grpid}";
rr:class fo:HeartRate;
];
rr:predicateObjectMap [
rr:predicate fo:hasTemporalRelationshipToPhysicalActivity;
rr:objectMap [
rr:constant fo:AtRest;
];
];
rr:predicateObjectMap [
rr:predicate fo:hasMeasure;
rr:objectMap [
rr:parentTriplesMap <#MeasureHeartRate>;
];
].
<#MeasureHeartRate>
a rr:TriplesMap;
rml:logicalSource [
rml:source "./test.json";
rml:referenceFormulation ql:JSONPath;
rml:iterator "$.body.measuregrps[*]";
];
rr:subjectMap [
rr:template "http://ifo.com/{grpid}/{date}/{measures[*].type}";
rr:class fo:Measure;
];
rr:predicateObjectMap [
rr:predicate fo:hasNumericalValue;
rr:objectMap [
rml:reference "measures[*].value";
rr:datatype xsd:float;
];
];
rr:predicateObjectMap [
rr:predicate fo:hasDescriptiveStatistic;
rr:objectMap [
rr:constant fo:average;
];
];
rr:predicateObjectMap [
rr:predicate fo:hasUnit;
rr:objectMap [
rr:constant fo:bpm;
];
].
You can use this tool to check your JSONPath https://jsonpath.com/.
As is, SDM-RDFizer is capable of semantifying the <#FitbitRestingHeartRate>
but not <#MeasureHeartRate>
. I'm currently trying fix that problem.
Sincerely, Enrique Iglesias
Thank you @eiglesias34 Sorry for providing a wrong content, but this is just an example. The real file that I am working on contains the right data and structure, I only provide this because it really explains what I want to achieve. Sincerely Bilalox
No problem. I'll try to have the problem fixed. If not by today, tomorrow should be done.
Hello @bilalbenma
I could fix the problem and replicate the behavior as in your example. Please test it out and tell me everything is good on your side.
Sincerely, Enrique
Hello @eiglesias34, Thank you, I'll test it then let you know if the issue is solved . Sincerely, Bilal
Hello,
Since there hasn't been activity in over a week, I will assume that the issue has been solved and close it. In case the issue still persists please reopen the issue.
Sincerely, Enrique
Describe the bug I can't share the real use case, but I found the same one with only different data. Suppose that we have the following json file data:
I'm trying to map this JSON file to RDF using SDM-RDFizer, but I can't get the values that are inside the measures array. Therefore, I decided to use another engine to see if the problem in my mapping file (RocketRML), but my mapping file works well with RocketRML. Please to test in your own, you can use this example
To Reproduce
Please to reproduce the same behavior, you can follow this link
Desktop (please complete the following information):