Skip to content

Commit

Permalink
Create mapping-with-links.rml.ttl
Browse files Browse the repository at this point in the history
  • Loading branch information
juancar0505 authored Oct 26, 2020
1 parent 530fef7 commit edc1cf2
Showing 1 changed file with 95 additions and 0 deletions.
95 changes: 95 additions & 0 deletions HandsOn/Group33/mappings/mapping-with-links.rml.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
@base <http://www.semanticweb.org/RecargaMadrid/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@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 transit: <http://vocab.org/transit/terms/> .
@prefix wgs84_pos: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
@prefix classes: <http://www.semanticweb.org/RecargaMadrid/classes#> .
@prefix properties: <http://www.semanticweb.org/RecargaMadrid/properties#> .
@prefix owl: <http://www.w3.org/2002/07/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 ]
].

0 comments on commit edc1cf2

Please sign in to comment.