Hi, you might be interested in a small tool I just started hacking. It allows you to explore an RDF store in your filesystem, using FUSE.
https://github.com/pchampin/rdflib-fuse
For the moment, it is read-only, but my plan is to support mutations as well (through creating, modifying and deleting files).
is there any way to avoid the creation of that extra rdf:description
tag and provide parseType="Resource"
to dcterms:modified
?
import rdflib
from rdflib.namespace import Namespace, DCTERMS, RDF, XSD
from datetime import datetime
graph = rdflib.Graph()
graph.bind('dcterms', DCTERMS)
graph.bind('xsd', XSD)
description = rdflib.URIRef(f'#TNFalpha_944')
w3cdtf_node = rdflib.BNode()
date = rdflib.Literal(datetime.now(), datatype=XSD.dateTime)
graph.add((description, DCTERMS.modified, w3cdtf_node))
graph.add((w3cdtf_node, DCTERMS.W3CDTF, date))
ann = graph.serialize(format="pretty-xml").decode('utf-8')
print(ann)
this is the code I used to generate that output.