from rdflib import Graph
from rdflib import URIRef, Literal, BNode, Namespace
from rdflib import RDF
store = Graph()
store.bind("topp.taxo", "http://topp.openplans.org/taxo/0.1/")
store.bind("dc", "http://purl.org/dc/elements/1.1/")
store.bind("foaf", "http://xmlns.com/foaf/0.1/")
FOAF = Namespace("http://xmlns.com/foaf/0.1/")
store.bind("archetypes", "http://www.plone.org/archetypes/1.4/")
AT = Namespace("http://www.plone.org/archetypes/1.4/")
tag=BNode()
TAXO=Namespace("http://topp.openplans.org/taxo/0.1/")
user=BNode()
store.add((user, FOAF['name'], Literal("juan")))
tag=BNode()
store.add((tag, TAXO['tag'], Literal("awesome")))
content = BNode()
store.add((content, AT['UID'], Literal("12345678")))
store.add((tag, TAXO['tagger'], user))
print store.serialize(format='nt')
print store.serialize(format='nt')
