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 error- missing square brackets

jatoledo opened this issue Β· comments

Line 139 :
mapping.ttl.txt
example .yaml.txt

	rr:predicateObjectMap [
		rr:predicateMap [
			a rr:PredicateMap;
			rr:constant gtfs:stop;
		];
		rr:objectMap [ 
			a rr:RefObjectMap;
			rr:parentTriplesMap <#stops_0>;
			rr:joinCondition [
				rr:child "stop_id";
				rr:parent "stop_id";
			]; 
		];
	.  <-------------------------- Here

It's the same issue: #12

if this is solved, we will merge the code in master branch and open the repo

it is solved

@prefix rr: <http://www.w3.org/ns/r2rml#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix dc: <http://purl.org/dc/elements/1.1/>.
@prefix rev: <http://purl.org/stuff/rev#>.
@prefix gtfs: <http://vocab.gtfs.org/terms#>.
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>.
@prefix schema: <http://schema.org/>.
@prefix dct: <http://purl.org/dc/terms/>.
@prefix rml: <http://semweb.mmlab.be/ns/rml#>.
@prefix ql: <http://semweb.mmlab.be/ns/ql#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.


<#stoptimes_0> a rr:TriplesMap;

	rml:LogicalSource [
		a rml:logicalSource;
		rml:source "STOP_TIMES.csv";
		rml:referenceFormulation ql:CSV
	];
	rr:subjectMap [
		a rr:SubjectMap;
		rr:template "http://transport.linkeddata.es/madrid/metro/stoptimes/{trip_id}-{stop_id}-{arrival_time}";
	];
	rr:predicateObjectMap [
		rr:predicateMap [
			a rr:PredicateMap;
			rr:constant rdf:type;
		];
		rr:objectMap [
			a rr:ObjectMap;
			rr:constant gtfs:StopTime;
		];
	];
	rr:predicateObjectMap [
		rr:predicateMap [
			a rr:PredicateMap;
			rr:constant gtfs:arrivalTime;
		];
		rr:objectMap [
			a rr:ObjectMap;
			rml:reference "arrival_time";
			rr:datatype xsd:duration
		];
	];
	rr:predicateObjectMap [
		rr:predicateMap [
			a rr:PredicateMap;
			rr:constant gtfs:departureTime;
		];
		rr:objectMap [
			a rr:ObjectMap;
			rml:reference "departure_time";
			rr:datatype xsd:duration
		];
	];
	rr:predicateObjectMap [
		rr:predicateMap [
			a rr:PredicateMap;
			rr:constant gtfs:stopSequence;
		];
		rr:objectMap [
			a rr:ObjectMap;
			rml:reference "stop_sequence";
			rr:datatype xsd:integer
		];
	];
	rr:predicateObjectMap [
		rr:predicateMap [
			a rr:PredicateMap;
			rr:constant gtfs:headsign;
		];
		rr:objectMap [
			a rr:ObjectMap;
			rml:reference "stop_headsign";
		];
	];
	rr:predicateObjectMap [
		rr:predicateMap [
			a rr:PredicateMap;
			rr:constant gtfs:pickupType;
		];
		rr:objectMap [
			a rr:ObjectMap;
			rr:template "http://transport.linkeddata.es/resource/PickupType/{pickup_type}";
			rr:termType rr:IRI
		];
	];
	rr:predicateObjectMap [
		rr:predicateMap [
			a rr:PredicateMap;
			rr:constant gtfs:dropOffType;
		];
		rr:objectMap [
			a rr:ObjectMap;
			rr:template "http://transport.linkeddata.es/resource/DropOffType/{drop_off_type}";
			rr:termType rr:IRI
		];
	];
	rr:predicateObjectMap [
		rr:predicateMap [
			a rr:PredicateMap;
			rr:constant gtfs:distanceTraveled;
		];
		rr:objectMap [
			a rr:ObjectMap;
			rml:reference "shape_dist_traveled";
		];
	];
	rr:predicateObjectMap [
		rr:predicateMap [
			a rr:PredicateMap;
			rr:constant gtfs:stop;
		];
		rr:objectMap [ 
			a rr:RefObjectMap;
			rr:parentTriplesMap <#stoptimes_0>;
			rr:joinCondition [
				rr:child "stop_id";
				rr:parent "stop_id";
			]; 
		];
	].