Open pablo-de-andres opened 4 years ago
In GitLab by @urbanmatthias on Jun 10, 2020, 14:27
Two more things to consider:
In GitLab by @urbanmatthias on Jun 10, 2020, 14:28
Maybe it will not crash but tell the user that the data is inconsistent
So the solution here is a reasoner?
Could be...
In GitLab by @abahde on Jun 9, 2020, 14:50
Let's say a user wants to link two CUDS objects. The user creates both objects on his machine and sets a relationship between them. What happens if one of these objects is already present in the dataspace (in the sense that there is already an object in the dataspace that has the same meaning)? The user should actually link his object to the one from the dataspace and should not create a new one. An example:
A tensile test is performed by a tensile test machine (e.g. Machine No. 3 in the IWM). The two objects are of oclass
TENSILE_TEST
andTENSILE_TEST_MACHINE
. But if the tensile test machine already exists in the dataspace, the user should use theTENSILE_TEST_MACHINE
object from the dataspace instead of creating a new one. Otherwise the semantic link is missed and we end up with twoTENSILE_TEST_MACHINE
objects in the dataspace that are actually the same machine in the real world.In my opinion this is a general problem that users should be aware of. The question is still, whether we want to support some functionalities that helps the user here. A few ideas:
We provide a way to mark attributes as unique. Every object in the dataspace that has the same oclass and the same unique attribute value are duplicates. In the tensile test example, every
TENSILE_TEST_MACHINE
object with an attributelabel='machine no 3
is a duplicate and we raise a warning. This idea still does not catch the full problem:label='machine no three
will not be a duplicateWe make a whole documentation story out of that and make sure that users understand the issue. We could provide a utility function that searches the space for duplicates based on a criterion. It then returns either the found object or
None
if no duplicate was found.