OAGi / Score

Score
MIT License
9 stars 6 forks source link

Duplication property term check #1620

Closed hakjuoh closed 6 months ago

hakjuoh commented 7 months ago

By #1192, we applied DEN checking logic in the components' hierarchy to avoid duplicate elements. However, since 'Property Term' is used to express object names in schema expressions, we need to check 'Property Term' rather than 'DEN'. For instance, if the base ACC has 'Extension', the ACC should not have 'Extension', even if the DEN of the two 'Extension' components is different.

Screenshot 2024-04-15 at 1 10 53 PM
hakjuoh commented 7 months ago

Suggested solution:

hakjuoh commented 7 months ago

@kbserm

When an association with the same Property Term is found in the ACC hierarchy, it requests the user's input with the following message.

Screenshot 2024-04-22 at 3 38 07 PM

The following are scenarios where identical elements can be found:

  1. To perform 'Set Base ACC' - it compares the child associations of the current ACC with the child associations of the Base ACC.
  2. To perform 'Append/Insert Association' - it compares the child associations of the current ACC and the Base ACC with the association to be added.
  3. To perform 'Create OAGi Extension Component' - it compares whether there is 'Extension' in the current ACC and Base ACC.

It is also necessary to consider cases where an element contains 'Group' elements. In this case, the logic should be executed for the entire sub-elements of the Group.

@elena-jelisic Please review and test this.