def _convertRDF(self):
"""
Convert a RDF/XML result into an RDFLib triple store. This method can be overwritten
in a subclass for a different conversion method.
@return: converted result
@rtype: RDFLib Graph
"""
try:
from rdflib.graph import ConjunctiveGraph
except ImportError:
from rdflib import ConjunctiveGraph
retval = ConjunctiveGraph()
# this is a strange hack. If the publicID is not set, rdflib (or the underlying xml parser) makes a funny
#(and, as far as I could see, meaningless) error message...
retval.load(self.response, publicID=' ')
return retval
评论列表
文章目录