def setUp(self):
self.graph = rdflib.Graph()
self.entity = rdflib.URIRef("https://bibcat.org/test-entity")
self.simple_title_bnode = rdflib.BNode()
self.graph.add((self.entity,
rdflib.RDF.type,
BF.Title))
self.graph.add((self.entity, BF.title, self.simple_title_bnode))
self.graph.add((self.simple_title_bnode,
BF.mainTitle,
rdflib.Literal("This is a test")))
self.top_title_bnode = rdflib.BNode()
self.graph.add((self.entity, BF.title, self.top_title_bnode))
secondary_title_bnode = rdflib.BNode()
self.graph.add((self.top_title_bnode, rdflib.RDF.type, BF.Topic))
self.graph.add((self.top_title_bnode,
rdflib.RDFS.label,
rdflib.Literal("This is a title and a name")))
self.graph.add((self.top_title_bnode, SCHEMA.name, secondary_title_bnode))
self.graph.add((secondary_title_bnode,
rdflib.RDF.value,
rdflib.Literal("This is a name")))
评论列表
文章目录