本文整理汇总了Python中dipper.utils.GraphUtils.GraphUtils.addOWLVersionIRI方法的典型用法代码示例。如果您正苦于以下问题:Python GraphUtils.addOWLVersionIRI方法的具体用法?Python GraphUtils.addOWLVersionIRI怎么用?Python GraphUtils.addOWLVersionIRI使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dipper.utils.GraphUtils.GraphUtils
的用法示例。
在下文中一共展示了GraphUtils.addOWLVersionIRI方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: declareAsOntology
# 需要导入模块: from dipper.utils.GraphUtils import GraphUtils [as 别名]
# 或者: from dipper.utils.GraphUtils.GraphUtils import addOWLVersionIRI [as 别名]
def declareAsOntology(self, graph):
"""
The file we output needs to be declared as an ontology, including it's version information.
Further information will be augmented in the dataset object.
:param version:
:return:
"""
# <http://data.monarchinitiative.org/ttl/biogrid.ttl> a owl:Ontology ;
# owl:versionInfo <http://archive.monarchinitiative.org/ttl/biogrid-YYYY-MM-DD.ttl>
gu = GraphUtils(curie_map.get())
ontology_file_id = 'MonarchData:'+self.name+".ttl"
gu.addOntologyDeclaration(graph, ontology_file_id)
# add timestamp as version info
t = datetime.now()
t_string = t.strftime("%Y-%m-%d-%H-%M")
ontology_version = self.name+'-'+t_string
archive_url = 'MonarchArchive:'+ontology_version+'.ttl'
gu.addOWLVersionIRI(graph, ontology_file_id, archive_url)
gu.addOWLVersionInfo(graph, ontology_file_id, ontology_version)
# TODO make sure this is synced with the Dataset class
return