Skip to content
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

Merged
merged 11 commits into from
Oct 17, 2024
Merged

Conversation

vietnguyengit
Copy link
Contributor

No description provided.

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?
Copy link
Contributor Author

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

Copy link
Contributor

@utas-raymondng utas-raymondng Oct 15, 2024

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
Copy link
Contributor Author

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"

Copy link
Contributor

@utas-raymondng utas-raymondng left a 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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line no need?

Copy link
Contributor Author

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

Copy link
Contributor Author

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.

Copy link
Contributor

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?

Copy link
Contributor

@utas-raymondng utas-raymondng left a 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;
Copy link
Contributor

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?

@utas-raymondng utas-raymondng merged commit 6a5bded into main Oct 17, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants