Hello,
I am trying to use rdf lib to create the following: (a protege screenshot in the attachment)
<rdfs:subClassOf>
<Restriction>
</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