Commit 3db478fe authored by Thodoris Nestoridis's avatar Thodoris Nestoridis

test the add of rdflib-test scripts

parent bf1b8fb5
from rdflib import Graph
from rdflib import Namespace
from rdflib.namespace import RDF
g = Graph()
#g.parse("../Ontologies/Mokos_18_1_7_47 copy.ttl", format="turtle")
#print(len(g)) # prints 2
RDO_instances = Namespace("http://delab.csd.auth.gr/ontologies/2018/RDO-instances#")
RBO = Namespace("http://delab.csd.auth.gr/ontologies/2018/RBO#")
RDO = Namespace("http://delab.csd.auth.gr/ontologies/2018/RDO#")
#add unique id
new_req = RDO_instances.EEMR
#add the S1-S5 or M1-M16 etc
new_req_2 = RBO.M16
new_req_3 = RBO.M17
#g.bind('RDO_instances', RDO_instances)
g.add((new_req, RDF.type, new_req_2))
g.add((new_req, RDF.type, new_req_3))
print(g.serialize(format="turtle").decode("utf-8"))
#save in file
#g.serialize(destination='output.txt', format='turtle')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment