diff --git a/ardcvocabs/src/main/java/au/org/aodn/ardcvocabs/model/ArdcCurrentPaths.java b/ardcvocabs/src/main/java/au/org/aodn/ardcvocabs/model/ArdcCurrentPaths.java index 0327b435..1644c25b 100644 --- a/ardcvocabs/src/main/java/au/org/aodn/ardcvocabs/model/ArdcCurrentPaths.java +++ b/ardcvocabs/src/main/java/au/org/aodn/ardcvocabs/model/ArdcCurrentPaths.java @@ -21,9 +21,9 @@ public enum ArdcCurrentPaths { private final String categoryCurrent; private final String vocabCurrent; - ArdcCurrentPaths(String categoryRoot, String vocabRoot) { - String rootHostname = "https://vocabs.ardc.edu.au/repository/api/lda/aodn"; - this.categoryCurrent = rootHostname + categoryRoot; - this.vocabCurrent = rootHostname + vocabRoot; + ArdcCurrentPaths(String categoryCurrent, String vocabCurrent) { + String baseUrl = "https://vocabs.ardc.edu.au/repository/api/lda/aodn"; + this.categoryCurrent = baseUrl + categoryCurrent; + this.vocabCurrent = baseUrl + vocabCurrent; } } diff --git a/indexer/src/main/java/au/org/aodn/esindexer/utils/VocabsIndexUtils.java b/indexer/src/main/java/au/org/aodn/esindexer/utils/VocabsIndexUtils.java index 683f6441..3dcb15e6 100644 --- a/indexer/src/main/java/au/org/aodn/esindexer/utils/VocabsIndexUtils.java +++ b/indexer/src/main/java/au/org/aodn/esindexer/utils/VocabsIndexUtils.java @@ -62,7 +62,7 @@ public void scheduledRefreshVocabsData() { vocabService.populateVocabsData(latestResolvedPathCollection); refreshCaches(); - // Synchronize the update of the shared resource (storedResolvedPathCollection) + // update the head if there are new versions synchronized (this) { storedResolvedPathCollection = latestResolvedPathCollection; log.info("Updated storedResolvedPathCollection with the latest data.");