change reltype constants

This commit is contained in:
Michele Artini 2022-05-09 15:29:28 +02:00
parent 762af8d0b1
commit 62ff066a5d
2 changed files with 14 additions and 9 deletions

View File

@ -2,14 +2,19 @@ package eu.dnetlib.organizations.utils;
public enum RelationType { public enum RelationType {
Child, Parent, Related, Other, Merged_In, Merges; IsChildOf,
IsParentOf,
Related,
Other,
Merged_In,
Merges;
public RelationType getInverse() { public RelationType getInverse() {
switch (this) { switch (this) {
case Child: case IsChildOf:
return Parent; return IsParentOf;
case Parent: case IsParentOf:
return Child; return IsChildOf;
case Related: case Related:
return Related; return Related;
case Merged_In: case Merged_In:

View File

@ -256,8 +256,8 @@
<td class="pl-3" colspan="3">This organizazion <td class="pl-3" colspan="3">This organizazion
<!-- NB: The showed value MUST be the inverse --> <!-- NB: The showed value MUST be the inverse -->
<span ng-switch="r.type"> <span ng-switch="r.type">
<b ng-switch-when="Child">is parent of</b> <!-- I reverse to have a better label, but it should be has child --> <b ng-switch-when="IsParentOf">is parent of</b>
<b ng-switch-when="Parent">is child of</b> <!-- I reverse to have a better label, but it should be has parent --> <b ng-switch-when="IsChildOf">is child of</b>
<b ng-switch-when="Merges">merges</b> <b ng-switch-when="Merges">merges</b>
<b ng-switch-when="Merged_In">is merged in</b> <b ng-switch-when="Merged_In">is merged in</b>
<b ng-switch-default>is related to</b> <b ng-switch-default>is related to</b>
@ -276,8 +276,8 @@
<select class="custom-select custom-select-sm" ng-model="newRelType"> <select class="custom-select custom-select-sm" ng-model="newRelType">
<option disabled="disabled" value=''>rel type...</option> <option disabled="disabled" value=''>rel type...</option>
<!-- NB: The showed value MUST be the inverse --> <!-- NB: The showed value MUST be the inverse -->
<option value="Parent">is child of</option> <option value="IsChildOf">is child of</option>
<option value="Child">is parent of</option> <option value="IsParentOf">is parent of</option>
</select> </select>
</td> </td>
<td> <td>