是否可以使用RDFLIB绘制Sesame RDF数据库的图形?
这是我试过的:
endpoint = "http://127.0.0.1:8080/openrdf-workbench/repositories/movies/explore?resource=%3Cfile%3A%2F%2Fmovies_export.rdf%3E"
from rdflib import Graph
g = Graph()
g.parse(endpoint)
这是错误:
Traceback (most recent call last):
File "C:\Software\rdflib\movieGraph.py", line 10, in
g.parse(endpoint)
File "c:\python26_32bit\lib\site-packages\rdflib\graph.py", line 756, in parse
parser = plugin.get(format, Parser)()
File "c:\python26_32bit\lib\site-packages\rdflib\plugin.py", line 89, in get
raise PluginException("No plugin registered for (%s, %s)" % (name, kind))
rdflib.plugin.PluginException: No plugin registered for (application/xml,
'rdflib.parser.Parser'>)
我认为唯一的技巧是指定一个正确的URL来使Sesame返回.rdf xml布局.