simphony / simphony-osp

A framework that aims to achieve interoperability between software such as simulation engines, databases and data repositories using a knowledge graph as the common language.
https://simphony.readthedocs.io
Other
16 stars 12 forks source link

Enh: add checking of attribute-values (=values of data properties) #828

Closed MBueschelberger closed 1 year ago

MBueschelberger commented 1 year ago

As a follow-up of #821, I was also asked for the functionality to check the actual values of the Cuds.

For my opion this makes absolutely sense if you want to write a unittest for your function which is generating Cuds with actual data.

However, my suggestion would be that this might also overwrite the cardinality with a value-keyword in the case of data properties:

Restriction to length

city.Neighborhood:
    city.name:
        STRING:
            value: 1+

Following a similar pattern as the cardinality, this value might e.g. in case of a string restrict the length (see example above) or the actual value:

Restriction of value

city.Neighborhood:
    city.name:
        STRING:
            value: Stühlinger

In the case of floats, bools and ints, there is no restriction of the length needed, but rather a statement towards the data range:

Restriction of range

city.Citizen:
    city.age:
        INTEGER:
            value: 0+

... or the actual value:

Restriction of value

city.Citizen:
    city.age:
        INTEGER:
            value: 29
    city.name:
        STRING:
            value: Matthias

In case of vectors, length, data range and value restriction might be a bit more complicated. But I think this is not a huge priority to be implemented since we are ontologizing in the EMMO-way, without any vectors as data properties.