def getgraphfromfile(self):
"""Return a Conjunctive Graph generated from the referenced file.
Returns:
A ConjunctiveGraph
"""
graph = ConjunctiveGraph()
try:
graph.parse(self.path, format='nquads', publicID='http://localhost:5000/')
logger.debug('Success: File', self.path, 'parsed')
except KeyError as e:
# Given file contains non valid rdf data
# logger.debug('Error: File', self.path, 'not parsed')
# self.__setcontent([[None][None][None][None]])
pass
return graph
评论列表
文章目录