def authorship(self):
"""
Add authorship statements and vcards for authors.
:return: rdflib.Graph
"""
g = Graph()
for num, au in enumerate(self.authors()):
position = str(num + 1)
vcard_individual_uri, vcard_stmts = self.add_vcard(position, au)
g += vcard_stmts
# Authorship
aship_uri = D['authorship-' + position + '-' + self.localid]
g.add((aship_uri, RDF.type, VIVO.Authorship))
g.add((aship_uri, VIVO.rank, Literal(int(position))))
# Relate pub and authorship
g.add((aship_uri, VIVO.relates, self.pub_uri))
# Relate vcard and authorship
g.add((aship_uri, VIVO.relates, vcard_individual_uri))
return g
评论列表
文章目录