From 99e275f9b5a79b62cd73f472276cd72235a9d2dd Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Tue, 18 Feb 2014 17:48:28 +0100 Subject: [PATCH] [BUGFIX] Memberships no longer miss their person. --- triplify.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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":