Hello,
I am a newbie to semantic web and owlready2, so this might be a dumb question.
I am trying to use properties and classes from RDF and FOAF namespaces.
I am basiclly trying to translate following rdflib program to one using owlready2
=======================================
rom rdflib import URIRef, Graph
from rdflib.namespace import RDF, FOAF
john = URIRef("John")
g = Graph()
g.add((john, RDF.type, FOAF.Person))
print(g.serialize(format='xml').decode('u8'))
''' output ---------------
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:rdf="
http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="John">
<rdf:type rdf:resource="
http://xmlns.com/foaf/0.1/Person"/> </rdf:Description>
</rdf:RDF>
'''
=======================================
I am unable to locate some examples how to do this using owlready2.
I know how to create my own classes/properties and use them in owlready2 programs.
But I want to use existing vocabularies like FOAF, RDF etc.
Any help would be greatly appreciated.