-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extra labels organisation vocabs #151
Conversation
default -> new ArrayList<>(); | ||
}; | ||
if (vocabType.equals(AppConstants.AODN_ORGANISATION_VOCABS)) { | ||
// TODO: the logics for mapping record's organisation vocabs are heavily customised for a manual approach, AI now or later? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should I do it the old school if-else, or leave here empty for Yuxuan's future magic? @utas-raymondng
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How complicate the logic will be, for simple one if-else makes more sense
if (!processedOrganisationVocabs.isEmpty()) { | ||
stacCollectionModel.getSummaries().setOrganisationVocabs(processedOrganisationVocabs); | ||
} | ||
// TODO: the logics for mapping record's organisation vocabs are heavily customised for a manual approach, AI now or later? need dedicated service's method |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will not using extractVocabLabelsFromThemes
method for organisation vocabs, the record's vocabs are found in different fields of the records, not "themes"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comment
if (labelNode instanceof TextNode) { | ||
return labelNode.asText(); | ||
} | ||
return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line no need?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think needed, there is case that the node is just a plain text, where also case it is a json-like
E.g node = "test" vs node = {"_value": "sample"}
@utas-raymond
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In particular, that line for textNode stuff helps to extract "displayLabel" , without it, can't get 'displayLabel' like with "prefLabel" you previous familiar with, no "_value" field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean there is already a return null at the end, hence if non of the if hit then it will already return null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
if (labelNode instanceof TextNode) { | ||
return labelNode.asText(); | ||
} | ||
return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean there is already a return null at the end, hence if non of the if hit then it will already return null?
No description provided.