@startuml
hide empty members
hide circle
skinparam classAttributeIconSize 0
class person_Contact_ROWNUM_ as "person:Contact/(ROWNUM)"
class person_Contact_ROWNUM_ <<(P,lightgreen)>>
show person_Contact_ROWNUM_ circle
class person_PI1_ROWNUM_ as "person:PI1/(ROWNUM)"
class person_PI1_ROWNUM_ <<(P,lightgreen)>>
show person_PI1_ROWNUM_ circle
class org_Participant_PIC_ as "org:(Participant_PIC)"
class org_Participant_PIC_ <<(O,lightgreen)>>
show org_Participant_PIC_ circle
class proj_Project_ID_ as "proj:(Project_ID)"
class proj_Project_ID_ <<(J,lightgreen)>>
show proj_Project_ID_ circle
class rel_Contact_ROWNUM_ as "rel:Contact/(ROWNUM)"
class rel_Contact_ROWNUM_ <<(R,red)>>
show rel_Contact_ROWNUM_ circle
class rel_PI1_ROWNUM_ as "rel:PI1/(ROWNUM)"
class rel_PI1_ROWNUM_ <<(R,red)>>
show rel_PI1_ROWNUM_ circle
class source_participants as "source:participants"
class source_participants <<(S,lightgray)>>
show source_participants circle
org_Participant_PIC_ : {field} a trr:Organization
org_Participant_PIC_ -down-> source_participants : trr:source
org_Participant_PIC_ : {field}  <color:red>"Or blank node if there's no Participant_PIC"</color>
org_Participant_PIC_ : {field} trr:address "(Participant_Street_Name)"
org_Participant_PIC_ : {field} trr:altName "(Participant_Legal_Name)"
org_Participant_PIC_ : {field} trr:city "(Participant_City)"
org_Participant_PIC_ : {field} trr:country "(Participant_Country)"
org_Participant_PIC_ : {field} trr:email "fewFrom(Participant_Internet_Homepage)"
org_Participant_PIC_ : {field} trr:emailDomain "computeFrom(fewFrom(Participant_Internet_Homepage))"
org_Participant_PIC_ : {field} trr:id\n  "(Participant_PIC)",\n  "(Participant_PIC_In_Use) # bug TRR-116"
org_Participant_PIC_ : {field} trr:isSME "(Participant_SME_Y_N)"^^xsd:boolean
org_Participant_PIC_ : {field} trr:name "oneOf(Participant_Legal_Name)"
org_Participant_PIC_ : {field} trr:postalCode "(Participant_Postal_Code)"
org_Participant_PIC_ : {field} trr:status "raw # if no Participant_PIC"
org_Participant_PIC_ : {field} trr:type org:type/(Organisation_Type)
org_Participant_PIC_ : {field} trr:webDomain "computeFrom(Participant_Internet_Homepage)"
org_Participant_PIC_ : {field} trr:webLink "splitAndClean(Participant_Internet_Homepage)"
person_Contact_ROWNUM_ : {field} a trr:Person
person_Contact_ROWNUM_ -down-> source_participants : trr:source
person_Contact_ROWNUM_ : {field} trr:email "splitAndClean(Contact_Email)"
person_Contact_ROWNUM_ : {field} trr:emailDomain "computeFrom(Contact_Email)"
person_Contact_ROWNUM_ : {field} trr:name "concat(Contact_First_Name,Contact_Last_Name)"
person_Contact_ROWNUM_ : {field} trr:nameFirst "(Contact_First_Name)"
person_Contact_ROWNUM_ : {field} trr:nameLast "(Contact_Last_Name)"
person_Contact_ROWNUM_ : {field} trr:personFunction "(Contact_Function)"
person_Contact_ROWNUM_ : {field} trr:personTitle "(Contact_Title)"
person_Contact_ROWNUM_ : {field} trr:phone "(Contact_Phone)"
person_Contact_ROWNUM_ : {field} trr:status "raw"
person_PI1_ROWNUM_ : {field} a trr:Person
person_PI1_ROWNUM_ -down-> source_participants : trr:source
person_PI1_ROWNUM_ : {field} trr:email "splitAndClean(PI_Email)"
person_PI1_ROWNUM_ : {field} trr:emailDomain "computeFrom(PI_Email)"
person_PI1_ROWNUM_ : {field} trr:name "concat(PI_First_Name,PI_Last_Name)"
person_PI1_ROWNUM_ : {field} trr:nameFirst "(PI_First_Name)"
person_PI1_ROWNUM_ : {field} trr:nameLast "(PI_Last_Name)"
person_PI1_ROWNUM_ : {field} trr:personFunction "(PI_Function)"
person_PI1_ROWNUM_ : {field} trr:personTitle "(PI_Title)"
person_PI1_ROWNUM_ : {field} trr:phone "(PI_Phone)"
person_PI1_ROWNUM_ : {field} trr:status "raw"
proj_Project_ID_ : {field} a trr:Project
rel_Contact_ROWNUM_ : {field} a trr:ProjectParticipation
rel_Contact_ROWNUM_ -down-> org_Participant_PIC_ : trr:organization
rel_Contact_ROWNUM_ -down-> person_Contact_ROWNUM_ : trr:person
rel_Contact_ROWNUM_ -up-> proj_Project_ID_ : trr:project
rel_Contact_ROWNUM_ -down-> source_participants : trr:source
rel_Contact_ROWNUM_ : {field} trr:organizationRole "(Participant_Role)"
rel_Contact_ROWNUM_ : {field} trr:personRole "Contact"
rel_PI1_ROWNUM_ : {field} a trr:ProjectParticipation
rel_PI1_ROWNUM_ -down-> org_Participant_PIC_ : trr:organization
rel_PI1_ROWNUM_ -down-> person_PI1_ROWNUM_ : trr:person
rel_PI1_ROWNUM_ -up-> proj_Project_ID_ : trr:project
rel_PI1_ROWNUM_ -down-> source_participants : trr:source
rel_PI1_ROWNUM_ : {field} trr:personRole "PrincipalInvestigator"
source_participants : {field} a trr:Source
source_participants : {field} trr:fileName "TRR_metadata_7893-participants.csv"
source_participants : {field} trr:src "EC"
@enduml
