From edc1cf2713839ad692f4b49e000305b9e4c2a8cc Mon Sep 17 00:00:00 2001
From: juancar0505 <70941752+juancar0505@users.noreply.github.com>
Date: Mon, 26 Oct 2020 19:01:17 +0100
Subject: [PATCH] Create mapping-with-links.rml.ttl
---
.../mappings/mapping-with-links.rml.ttl | 95 +++++++++++++++++++
1 file changed, 95 insertions(+)
create mode 100644 HandsOn/Group33/mappings/mapping-with-links.rml.ttl
diff --git a/HandsOn/Group33/mappings/mapping-with-links.rml.ttl b/HandsOn/Group33/mappings/mapping-with-links.rml.ttl
new file mode 100644
index 000000000..196aa05a0
--- /dev/null
+++ b/HandsOn/Group33/mappings/mapping-with-links.rml.ttl
@@ -0,0 +1,95 @@
+@base .
+@prefix xsd: .
+@prefix rr: .
+@prefix rml: .
+@prefix ql: .
+@prefix transit: .
+@prefix wgs84_pos: .
+@prefix classes: .
+@prefix properties: .
+@prefix owl: .
+
+<#PuestoMapping> a rr:TriplesMap;
+ rml:logicalSource [
+ rml:source "../csv/red_recarga_acceso_publico__2020_modificado-with-links.csv";
+ rml:referenceFormulation ql:CSV
+ ];
+ rr:subjectMap [
+ rr:template "http://www.semanticweb.org/RecargaMadrid/classes#Puesto/{PR_ID}";
+ rr:termType rr:IRI;
+ rr:class classes:Puesto
+ ];
+
+ rr:predicateObjectMap [
+ rr:predicateMap[rr:constant properties:TieneDistrito; rr:termType rr:IRI ];
+ rr:objectMap [
+ rml:reference "DISTRITO"; rr:termType rr:Literal
+ ]
+ ];
+
+ rr:predicateObjectMap [
+ rr:predicateMap[rr:constant properties:tieneCiudad; rr:termType rr:IRI ];
+ rr:objectMap [
+ rml:reference "CIUDAD"; rr:termType rr:Literal
+ ]
+ ];
+
+ rr:predicateObjectMap [
+ rr:predicateMap[rr:constant properties:tieneOperador; rr:termType rr:IRI ];
+ rr:objectMap [
+ rml:reference "OPERADOR"; rr:termType rr:Literal
+ ]
+ ].
+
+<#DistritoMapping> a rr:TriplesMap;
+ rml:logicalSource [
+ rml:source "../csv/red_recarga_acceso_publico__2020_modificado-with-links.csv";
+ rml:referenceFormulation ql:CSV
+ ];
+ rr:subjectMap [
+ rr:template "http://www.semanticweb.org/RecargaMadrid/classes#Distrito/{DISTRITO}";
+ rr:termType rr:IRI;
+ rr:class classes:Distrito
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [rr:constant owl:sameAs; rr:termType rr:IRI ];
+ rr:objectMap [
+ rml:reference "wikidata:distrito";
+ rr:termType rr:IRI ]
+ ].
+
+
+<#CiudadMapping> a rr:TriplesMap;
+ rml:logicalSource [
+ rml:source "../csv/red_recarga_acceso_publico__2020_modificado-with-links.csv";
+ rml:referenceFormulation ql:CSV
+ ];
+ rr:subjectMap [
+ rr:template "http://www.semanticweb.org/RecargaMadrid/classes#Direccion/{CIUDAD}";
+ rr:termType rr:IRI;
+ rr:class classes:Ciudad
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [rr:constant owl:sameAs; rr:termType rr:IRI ];
+ rr:objectMap [
+ rml:reference "wikidata:ciudad";
+ rr:termType rr:IRI ]
+ ].
+
+
+<#OperadorMapping> a rr:TriplesMap;
+ rml:logicalSource [
+ rml:source "../csv/red_recarga_acceso_publico__2020_modificado-with-links.csv";
+ rml:referenceFormulation ql:CSV
+ ];
+ rr:subjectMap [
+ rr:template "http://www.semanticweb.org/RecargaMadrid/classes#Operador/{OPERADOR}";
+ rr:termType rr:IRI;
+ rr:class classes:Operador
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [rr:constant owl:sameAs; rr:termType rr:IRI ];
+ rr:objectMap [
+ rml:reference "wikidata:operador";
+ rr:termType rr:IRI ]
+ ].