Skip to content
This repository was archived by the owner on Aug 11, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ public static class StudiedSpecimen {
@Setter
public static class StudiedState {
private String id;
private String internalIdentifier;
private List<String> descendedFrom;
private List<String> type;
private String additionalRemarks;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,12 @@ private static FullNameRef undefinedFullnameRef() {
return fullNameRef;
}

private static String getLabel(int index) {
private static String getLabel(int index, DatasetVersionV3.StudiedState studiedState) {
int base = 'A';
//TODO fix for index > 26
if (StringUtils.isNotBlank(studiedState.getInternalIdentifier())) {
return studiedState.getInternalIdentifier().trim();
}
return String.valueOf((char) (base + index));
}

Expand Down Expand Up @@ -185,9 +188,9 @@ private BasicHierarchyElement<Object> translateToBasicHierarchyElement(DatasetVe
final String parentLabel = translator.calculateLabel(studiedState.getParent());
String label;
if (attachRootElementAsChild && StringUtils.isNotBlank(parentLabel)) {
label = getFullStateLabel(translator, getLabel(order), studiedState);
label = getFullStateLabel(translator, getLabel(order, studiedState), studiedState);
} else {
label = String.format("State %s", getLabel(order));
label = String.format("State %s", getLabel(order, studiedState));
}
elState.setTitle(label);
elState.setData(translator.translateState(studiedState, label));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1300,6 +1300,10 @@
"propertyName": "query:id",
"path": "@id"
},
{
"propertyName": "query:internalIdentifier",
"path": "https://openminds.ebrains.eu/vocab/internalIdentifier"
},
{
"propertyName": "query:descendedFrom",
"path": [
Expand Down Expand Up @@ -1940,6 +1944,10 @@
"propertyName": "query:id",
"path": "@id"
},
{
"propertyName": "query:internalIdentifier",
"path": "https://openminds.ebrains.eu/vocab/internalIdentifier"
},
{
"propertyName": "query:descendedFrom",
"path": [
Expand Down