# Construct relationship triples with tm: vocabulary. PREFIX rdfs: PREFIX tm: PREFIX migrants: PREFIX relp: CONSTRUCT { ?s a tm:Relationship . ?s tm:activePerson ?active . ?s tm:passivePerson ?passive . ?s tm:relationshipLocation ?location . ?s tm:relationshipOrganisation ?organisation . ?s tm:relationshipType ?relType . ?s tm:relationshipTypePrecise ?relTypePrecise . ?s rdfs:comment ?comment . ?s tm:timePeriod ?timePeriod . ?s tm:dateStartMin ?dsMin . ?s tm:dateStartMax ?dsMax . ?s tm:dateEndMin ?deMin . ?s tm:dateEndMax ?deMax . ?s tm:dateStartFuzzy ?dsFuzzy . ?s tm:dateEndFuzzy ?deFuzzy . } WHERE { ?s a migrants:relationship . OPTIONAL { ?s relp:ref-IDPerson_active ?active } OPTIONAL { ?s relp:ref-IDPerson_passive ?passive } OPTIONAL { ?s relp:ref-IDLocation ?location } OPTIONAL { ?s relp:ref-IDOrganisation ?organisation } OPTIONAL { ?s relp:Relationshiptype ?relType } OPTIONAL { ?s relp:relationshiptype_precise ?relTypePrecise } OPTIONAL { ?s relp:comment ?comment } OPTIONAL { ?s relp:Timeperiod ?timePeriod } OPTIONAL { ?s relp:DateStart_Min ?dsMin } OPTIONAL { ?s relp:DateStart_Max ?dsMax } OPTIONAL { ?s relp:DateEnd_Min ?deMin } OPTIONAL { ?s relp:DateEnd_Max ?deMax } OPTIONAL { ?s relp:DateStart_Fuzzy ?dsFuzzy } OPTIONAL { ?s relp:DateEnd_Fuzzy ?deFuzzy } }