I am trying to restrict a dataproperty to the min/max/exactly etc but it does not seem to
be reflected in the resulting owl file. What could be the problem?
onto = get_ontology("
http://navy.mil/Proto")
with onto:
shipProperties = types.new_class("ShipProperties", (DataProperty,))
navyProperties = types.new_class("NavyProperties", (shipProperties,))
fregaPropertiesName = types.new_class("FregatPropertiesName", (navyProperties,))
fregaPropertiesName.range.append(str)
fregaPropertiesName.min(0,None)
fregaPropertiesName.max(2,None)
default_world.save()
onto.save(file="./navy.owl",format="rdfxml")
============navy.owl====================
1 <?xml version="1.0"?>
2 <rdf:RDF xmlns:rdf="
http://www.w3.org/1999/02/22-rdf-syntax-ns#" 3 xmlns:xsd="
http://www.w3.org/2001/XMLSchema#" 4 xmlns:rdfs="
http://www.w3.org/2000/01/rdf-schema#" 5 xmlns:owl="
http://www.w3.org/2002/07/owl#" 6 xml:base="
http://navy.mil/Proto" 7 xmlns="
http://navy.mil/Proto#"> 8
9 <owl:Ontology rdf:about="
http://navy.mil/Proto"/> 10
11 <owl:DatatypeProperty rdf:about="#ShipProperties"/>
12
13 <owl:DatatypeProperty rdf:about="#NavyProperties">
14 <rdfs:subPropertyOf rdf:resource="#ShipProperties"/>
15 </owl:DatatypeProperty>
16
17 <owl:DatatypeProperty rdf:about="#FregatPropertiesName">
18 <rdfs:range rdf:resource="
http://www.w3.org/2001/XMLSchema#string"/> 19 <rdfs:subPropertyOf rdf:resource="#NavyProperties"/>
20 </owl:DatatypeProperty>
21
22
23 </rdf:RDF>