Skip to content

Commit

Permalink
[kbss-cvut/termit-ui#449] Add some explanatory javadoc.
Browse files Browse the repository at this point in the history
  • Loading branch information
ledsoft committed Aug 29, 2024
1 parent 801d64f commit 2c2acba
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,17 @@ private String resolveVocabularyTermNamespace(Vocabulary vocabulary) {
config.getNamespace().getTerm().getSeparator());
}

/**
* Resolves term identifier.
* <p>
* If the term does not have an identifier, it is generated so that existing instance can be removed before
* inserting the imported term. If the term has an identifier, but it does not match the expected vocabulary-based
* namespace, it is adjusted so that it does. Otherwise, the identifier is used.
*
* @param vocabulary Vocabulary into which the term will be added
* @param term The imported term
* @return Term identifier
*/
private URI resolveTermIdentifier(Vocabulary vocabulary, Term term) {
final String termNamespace = resolveVocabularyTermNamespace(vocabulary);
if (term.getUri() == null) {
Expand Down

0 comments on commit 2c2acba

Please sign in to comment.