diff --git a/triplify.py b/triplify.py index 4d610f2..4fb95f6 100644 --- a/triplify.py +++ b/triplify.py @@ -61,7 +61,7 @@ class HsHTelephone(Base): #RDF from rdflib import Namespace -from rdfalchemy import rdfSingle +from rdfalchemy import rdfSingle, rdfMultiple from rdfalchemy.rdfSubject import rdfSubject from rdflib import Literal, BNode, Namespace, URIRef @@ -140,8 +140,7 @@ class OboMembership(Thing): class Membership(OboMembership): rdf_type = vivo.Position label = rdfSingle(RDFS.label) - person = rdfSingle(vivo.relates) - organization = rdfSingle(vivo.relates) + relates = rdfMultiple(vivo.relates) dateTimeInterval = rdfSingle(vivo.dateTimeInterval) class FacultyPosition(Membership): @@ -269,9 +268,8 @@ def processMembership(membership, additionalIdSeq): rdfM = OboMembership(membershipUri) rdfM = Membership(membershipUri) + rdfM.relates = [personUri, organizationUri] rdfM.label = getBusinessRoleName(membership) - rdfM.person = personUri - rdfM.organization = organizationUri rdfM.dateTimeInterval = dtiUri if membership.mBusinessRole.name == "ProfessorIn":