Open saiedt opened 6 years ago
for problem 1. this is not the first time we have seen this problem in universAAL ontologies. Particularly in very abstract ontologies where the property is very open. is there a way to define a property just at RDF level, and not add the property type. The problem with adding an additional property for the value is that the code will need to be changed thoroughly; where the current code should be agnostic on the property type.
As for the setFunctional, and cardinalities, this is indeed residues from using the ontology modelling tool; and therefore can be (mostly) removed. I would have to check the code to see if it is agnositc enough to treat multivalue properties adequately.
Suggested changes in code have been submitted to Alejandro for double check and possibly commit in both 3.4.1-SNAPSHOT and 3.4.2-SNAPSHOT.
We have the same problem in the device ont (hasValue) as discussed here: https://github.com/universAAL/ontology/issues/7
@saiedt : Can the fix be applied there as well?
In
org.universAAL.middleware.managers.configuration.core.owl.ConfigurationOntology
there are the following type restrictions forConfigurationParameter.PROP_VALUE
:There are several issues here:
ConfigurationParameter.PROP_VALUE
has been added as anowl:ObjectProperty
. Does that mean that no conf paramers may have a literal value? I can live with that but maybe there are cases where a conf param has a literal value....setFunctional()
and the cardinality restriction are limiting the max cardinality to 1, but this does not make sense as a general restriction because at least in my case, all of my conf params accept a list of individuals as value.My suggestion is
ConfigurationParameter.PROP_OBJECT_VALUE
andConfigurationParameter.PROP_DATATYPE_VALUE
to resolve the first issue,setFunctional()
on them, and-1
for max cardinality to allow arbitrary number of values.If this is done in this way, then please take into account that
ConfigurationParameter#setValue(Object)
must decide to set which of the two props, depending on the type of the parameter (which maybe a single literal value, a single individual, a list of literal values or a list of individuals) andConfigurationParameter#getValue()
must check which of the two props has been set before and return that one. In any case, the return value may again be a list.