Hello, I am trying to use rdf lib to create the following: (a protege screenshot in the attachment)
<Class rdf:about="http://www.abc#Building"> <rdfs:subClassOf rdf:resource="http://www.abc#PhysicalLocation"/> <rdfs:subClassOf> <Restriction> <onProperty rdf:resource="http://www.abc#hasFloor"/> <allValuesFrom rdf:resource="http://abc#Floor"/> </Restriction> </rdfs:subClassOf> <rdfs:comment>This is a type for BUILDING facilities object</rdfs:comment> <rdfs:label>Building</rdfs:label> </Class> But the only way I am able to create something are restrictions on properties and not classes such as: <owl:ObjectProperty rdf:about="http://www.abc#hasFloor"> <rdfs:domain rdf:resource="http://www.abc#Building"/> <rdfs:subPropertyOf rdf:resource="http://www.abc#hasPhysicalLocation"/> <rdfs:range> <owl:Restriction rdf:nodeID="N73e2705103db4e57b37b969e7a1d4780"> <owl:onProperty rdf:resource="http://www.abc#hasFloor"/> <owl:allValuesFrom rdf:resource="http://www.abc#Floor"/> </owl:Restriction> </rdfs:range> </owl:ObjectProperty> Using the following code: restriction_floor = Restriction( constants.NS.hasFloor, allValuesFrom=constants.NS.Floor, graph=graph) Property( has_floor, graph=graph, domain=constants.NS.Building, range=restriction_floor) I would like to be able to create the restriction at the subClassOf level, how is it possible to do this? Thank you Best Charbel -- http://github.com/RDFLib --- You received this message because you are subscribed to the Google Groups "rdflib-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rdflib-dev/b3c19cbc-10db-4910-8d55-e84cce9ceb57%40googlegroups.com.
