UNPKG

@rmlio/yarrrml-parser

Version:

Parse YARRRML descriptions into RML RDF statements

85 lines (83 loc) 2.97 kB
@prefix rr: <http://www.w3.org/ns/r2rml#>. @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>. @prefix fnml: <http://semweb.mmlab.be/ns/fnml#>. @prefix fno: <https://w3id.org/function/ontology#>. @prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#>. @prefix void: <http://rdfs.org/ns/void#>. @prefix dc: <http://purl.org/dc/terms/>. @prefix foaf: <http://xmlns.com/foaf/0.1/>. @prefix rml: <http://semweb.mmlab.be/ns/rml#>. @prefix ql: <http://semweb.mmlab.be/ns/ql#>. @prefix : <http://mapping.example.com/>. @prefix ex: <http://example.com/>. :map_employee_000 rml:logicalSource :source_000. :source_000 a rml:LogicalSource; rml:source "data-1.csv"; rml:referenceFormulation ql:CSV. :map_employee_000 a rr:TriplesMap; rdfs:label "employee". :s_000 a rr:SubjectMap. :map_employee_000 rr:subjectMap :s_000. :s_000 rr:template "http://example.com/{id}". :pom_000 a rr:PredicateObjectMap. :map_employee_000 rr:predicateObjectMap :pom_000. :pm_000 a rr:PredicateMap. :pom_000 rr:predicateMap :pm_000. :pm_000 rr:constant ex:project. :map_employee_001 rml:logicalSource :source_001. :source_001 a rml:LogicalSource; rml:source "data-2.csv"; rml:referenceFormulation ql:CSV. :map_employee_001 a rr:TriplesMap; rdfs:label "employee". :s_001 a rr:SubjectMap. :map_employee_001 rr:subjectMap :s_001. :s_001 rr:template "http://example.com/{id}". :pom_001 a rr:PredicateObjectMap. :map_employee_001 rr:predicateObjectMap :pom_001. :pm_001 a rr:PredicateMap. :pom_001 rr:predicateMap :pm_001. :pm_001 rr:constant ex:project. :map_project_000 rml:logicalSource :source_002. :source_002 a rml:LogicalSource; rml:source "data-1.csv"; rml:referenceFormulation ql:CSV. :map_project_000 a rr:TriplesMap; rdfs:label "project". :s_002 a rr:SubjectMap. :map_project_000 rr:subjectMap :s_002. :s_002 rr:template "http://example.com/{slug}". :map_project_001 rml:logicalSource :source_003. :source_003 a rml:LogicalSource; rml:source "data-2.csv"; rml:referenceFormulation ql:CSV. :map_project_001 a rr:TriplesMap; rdfs:label "project". :s_003 a rr:SubjectMap. :map_project_001 rr:subjectMap :s_003. :s_003 rr:template "http://example.com/{slug}". :pom_000 rr:objectMap :om_000. :om_000 a rr:ObjectMap; rr:parentTriplesMap :map_project_000; rr:joinCondition :jc_000. :jc_000 rr:child "project-id"; rr:parent "id". :pom_000 rr:objectMap :om_001. :om_001 a rr:ObjectMap; rr:parentTriplesMap :map_project_001; rr:joinCondition :jc_001. :jc_001 rr:child "project-id"; rr:parent "id". :pom_001 rr:objectMap :om_002. :om_002 a rr:ObjectMap; rr:parentTriplesMap :map_project_000; rr:joinCondition :jc_002. :jc_002 rr:child "project-id"; rr:parent "id". :pom_001 rr:objectMap :om_003. :om_003 a rr:ObjectMap; rr:parentTriplesMap :map_project_001; rr:joinCondition :jc_003. :jc_003 rr:child "project-id"; rr:parent "id".