Well; I gave up and found an easier way using straight rdflib methods; another day wasted. The tutorials on rdflib are pretty bad. So you just can't jump straight in. Wordpress formatting sucks, I know; prolly should upgrade.
from rdflib import ConjunctiveGraph as Graph, Namespace
g = Graph()
g.parse("sample.metadata", format="xml")
creator_list = list(g.subject_objects(DublinCore["creator"]))
for data, blank_node in creator_list:
# We get the dc:creator sequence
sequence = g.seq(blank_node)
for creator in sequence:
print creator
SPARQL and Subquery; 3rd go
Well; I gave up and found an easier way using straight rdflib methods; another day wasted. The tutorials on rdflib are pretty bad. So you just can't jump straight in. Wordpress formatting sucks, I know; prolly should upgrade.
Related Posts:
About Christopher Warner
No description. Please complete your profile.