COL01.mapping.ttl 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. [ rr:column "TITLE" ]
  15. [ rr:column "FNAME" ]
  16. [ 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://data.example.com/person/{OWNER}";
  26. ];
  27. rr:predicateObjectMap [
  28. rr:predicate ex:owns;
  29. rr:objectMap [
  30. rr:template "http://data.example.com/pet/{ID}";
  31. ];
  32. rr:objectMap [
  33. rr:column "ID";
  34. rrf:collectAs rdf:List ;
  35. ];
  36. ];
  37. rr:predicateObjectMap [
  38. rr:predicate ex:ownsSeqSeperate;
  39. rr:objectMap [
  40. rr:template "http://data.example.com/pet/{ID}";
  41. rrf:collectAs rdf:Seq ;
  42. ];
  43. ] ;
  44. rr:predicateObjectMap [
  45. rr:predicate ex:ownsBagRefObjectMap;
  46. rr:objectMap [
  47. rr:parentTriplesMap <#PET>;
  48. rr:joinCondition [
  49. rr:child "ID";
  50. rr:parent "ID";
  51. ];
  52. rrf:collectAs rdf:Bag ;
  53. ];
  54. ]
  55. .
  56. <#PET>
  57. rr:logicalTable [ rr:tableName "PET" ];
  58. rr:subjectMap [
  59. rr:template "http://data.example.com/pet-test/{ID}";
  60. rr:class ex:Pet ;
  61. ];
  62. .