COL02.mapping.ttl 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. @prefix rr: <http://www.w3.org/ns/r2rml#> .
  2. @prefix ex: <http://example.com/ns#> .
  3. @prefix rrf: <http://kdeg.scss.tcd.ie/ns/rrf#>
  4. @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
  5. <#TriplesMap1>
  6. rr:logicalTable [ rr:tableName "PERSON" ];
  7. rr:subjectMap [
  8. rr:template "http://data.example.com/person/{ID}";
  9. ];
  10. rr:predicateObjectMap [
  11. rr:predicate ex:name;
  12. rr:objectMap [
  13. rrf:gather (
  14. [ rrf:gather ([ rr:column "TITLE" ] ) ; ]
  15. [ rrf:gather ([ rr:column "FNAME" ] ) ; ]
  16. [ rrf:gather ([ rr:column "LNAME" ] ) ; ]
  17. ) ;
  18. rr:termType rdf:Bag ;
  19. ];
  20. ]
  21. .
  22. <#TriplesMap2>
  23. rr:logicalTable [ rr:tableName "PET" ];
  24. rr:subjectMap [
  25. rr:template "http://example.com/person/{OWNER}";
  26. ];
  27. rr:predicateObjectMap [
  28. rr:predicate ex:owns;
  29. rr:objectMap [
  30. rrf:gather (
  31. [ rr:column "ID" ]
  32. [ rr:column "NAME" ]
  33. ) ;
  34. rr:termType rdf:List ;
  35. rrf:collectAs rdf:List ;
  36. ];
  37. ]
  38. .
  39. <#TriplesMap3>
  40. rr:logicalTable [ rr:tableName "PET" ];
  41. rr:subjectMap [
  42. rr:template "http://example.com/person3/{OWNER}";
  43. ];
  44. rr:predicateObjectMap [
  45. rr:predicate ex:owns;
  46. rr:objectMap [
  47. rrf:gather (
  48. [ rr:column "ID" ; rrf:collectAs rdf:List ;]
  49. [ rr:column "NAME" ; rrf:collectAs rdf:List ;]
  50. ) ;
  51. rr:termType rdf:List ;
  52. ];
  53. ]
  54. .