oeg-upm / yatter

Translate YARRRML into easy-to-read [R2]RML mappings

Home Page:https://doi.org/10.5281/zenodo.7024500

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ› Mapping is not valid

jatoledo opened this issue Β· comments

It should be changed:
rr:constant a; -------> rr:constant rdf:type ;
example .yaml.txt
mapping.ttl.txt

rr:predicateObjectMap [
		rr:predicateMap [
			a rr:PredicateMap;
			rr:constant a;  <-------- HERE
		];
		rr:objectMap [
			a rr:ObjectMap;
			rr:constant gtfs:StopTime;
		];
	];

@jatoledo could you test it now?

Testing with json example from #20 and the output includes rdf:type instead of a

@prefix ex: <http://example.com/>.
@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#>.


<#person_0> a rr:TriplesMap;

	rml:LogicalSource [
		a rml:logicalSource;
		rml:source "data.json";
		rml:referenceFormulation ql:JSONpath;
		rml:iterator"$.persons[*]";
	];
	rr:subjectMap [
		a rr:SubjectMap;
		rr:template "http://example.com/{firstname}";
	];
	rr:predicateObjectMap [
		rr:predicateMap [
			a rr:PredicateMap;
			rr:constant rdf:type;
		];
		rr:objectMap [
			a rr:ObjectMap;
			rr:constant foaf:Person;
		];
	];
	rr:predicateObjectMap [
		rr:predicateMap [
			a rr:PredicateMap;
			rr:constant ex:name;
		];
		rr:objectMap [
			a rr:ObjectMap;
			rml:reference "firstname";
		];
	].