http://redfoot.net/3.0/code#python,
# Make sure all contexts have RDF.type of REDFOOT.Context
for context in redfoot.contexts():
if not (context, RDF.type, REDFOOT.DeletedContext) in redfoot:
redfoot.index.add((context, RDF.type, REDFOOT.Context))
cid = request.parameters.get("uri", None)
print cid
if cid:
cid = URIRef(cid)
cid = cid.abstract()
else:
cid = request.parameters.get("bnode", None)
if cid:
cid = BNode(cid)
else:
print "no context specified... assuming index"
cid = redfoot.index.identifier
#TODO: 404
g = redfoot.get_context(cid)
g.serialize(destination=response, format="pretty-xml")
Comments regarding http://redfoot.net/3.0/aspects/rdfxml
Login to submit a comment.