Re: Dynamic ConstrainedDatatype FunctionalProperty
Posted by Jiba on
URL: http://owlready.306.s1.nabble.com/Dynamic-ConstrainedDatatype-FunctionalProperty-tp2344p2352.html
Hi,
When you do:
class has_value(DataProperty, FunctionalProperty):
domain =[CValue]
range = [ConstrainedDatatype(float, min_inclusive = CValue.has_min, max_inclusive = CValue.has_max)]
The DataProperty is created with the min_inclusive given at that time; if CValue.has_min change later, it will not be updated.
I'm not sure that what you want to achieve can be done in OWL, because OWL definition corresponds to a single free variable, while you need two here (one for the dataproperty and one for the CValue). Possibly, you should look at SWRL rules, which support several free variables. You may create a rule limiting the range of the float value, by classifying any individual having a non satisfying value as Nothing.
Jiba