OnroerendErfgoed / skosprovider_rdf

Skosprovider implementation backed by RDF
http://skosprovider-rdf.readthedocs.org
MIT License
2 stars 4 forks source link

RDFLib classes are being passed to the provider #11

Closed koenedaele closed 9 years ago

koenedaele commented 9 years ago

When dumping an RDFProvider to a dict (with the skosprovider.utils.dict_dumper), I end up with some RDFLib classes. Seems to imply that they're imported from the Graph as is, without being properly cast to strings.

The script used for creating the dump:

import os

from skosprovider.utils import dict_dumper
from skosprovider_rdf.providers import RDFProvider

from rdflib import Graph

graph = Graph()

file = os.path.join(os.path.dirname(__file__), 'HERITAGETYPES-full.rdf')
graph.parse(file, format="xml")

prov = RDFProvider(
    {'id': 'HERITAGETYPES'},
    graph
)
dump = dict_dumper(prov)

import pprint
pp = pprint.PrettyPrinter(indent=4)
pp.pprint(dump)