Prefix rr: <http://www.w3.org/ns/r2rml#>
Prefix foaf: <http://xmlns.com/foaf/0.1/>
Prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
Prefix ex: <http://example.com/>
Prefix activity: <http://example.com/activity/>
Prefix xsd: <http://www.w3.org/2001/XMLSchema#>
//@base <http://example.com/base/>

Prefix spy: <http://aksw.org/sparqlify/>

Create View TriplesMap2 As
  Construct {
    ?s rdf:type activity:Sport
  }
  With
    ?s = uri(concat("http://example.com/", ?Sport))
  From
    Student


Create View TriplesMap1 As
  Construct {
    ?s
      rdf:type foaf:Person ;
      ex:id ?i ;
      foaf:name ?n ;
      ex:Sport ?sp
  }
  With
    ?s = uri(concat("http://example.com/Student/", ?ID, "/", spy:urlEncode(?Name)))
    ?i = typedLiteral(?ID, xsd:integer)
    ?n = plainLiteral(?Name)
    ?sp = uri(concat("http://example.com/", ?Sport))
    // TODO references ?sp = TriplesMap2.?s ON this.?person_id = that.?id
  From
    Student
		
/* 
    rr:predicateObjectMap
    [ 
      rr:predicate		ex:Sport ;
      rr:objectMap		<RefObjectMap1>
    ]
    
 .

 
<RefObjectMap1>
	a rr:RefObjectMap;
	rr:parentTriplesMap <TriplesMap2> ;
.
*/
