Skip to content

Commit

Permalink
Load all default formats prior to loading custom format map for an in…
Browse files Browse the repository at this point in the history
…dexing profile to ensure default values are available when translating values
  • Loading branch information
mdnoble73 committed May 15, 2024
1 parent 4ae3341 commit 5ff365d
Show file tree
Hide file tree
Showing 23 changed files with 27 additions and 11 deletions.
Binary file modified code/axis_360_export/axis_360_export.jar
Binary file not shown.
Binary file modified code/carlx_export/carlx_export.jar
Binary file not shown.
Binary file modified code/cloud_library_export/cloud_library_export.jar
Binary file not shown.
Binary file modified code/course_reserves_indexer/course_reserves_indexer.jar
Binary file not shown.
Binary file modified code/cron/cron.jar
Binary file not shown.
Binary file modified code/events_indexer/events_indexer.jar
Binary file not shown.
Binary file modified code/evergreen_export/evergreen_export.jar
Binary file not shown.
Binary file modified code/evolve_export/evolve_export.jar
Binary file not shown.
Binary file modified code/hoopla_export/hoopla_export.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -347,16 +347,30 @@ private void loadTranslationMaps(Connection dbConn, BaseIndexingLogEntry logEntr
translationMap.put(value, translation);
}
mapValuesRS.close();
translationMaps.put(mapName, translationMap);
if (translationMaps.containsKey(mapName)) {
translationMaps.get(mapName).putAll(translationMap);
}else{
translationMaps.put(mapName, translationMap);
}
}
translationMapsRS.close();

PreparedStatement getFormatMapStmt = dbConn.prepareStatement("SELECT * from format_map_values WHERE indexingProfileId = ?");
getFormatMapStmt.setLong(1, id);
ResultSet formatMapRS = getFormatMapStmt.executeQuery();
HashMap <String, String> formatMap = new HashMap<>();
translationMaps.put("format", formatMap);
if (translationMaps.containsKey("format")) {
formatMap = translationMaps.get("format");
}else{
translationMaps.put("format", formatMap);
}
HashMap <String, String> formatCategoryMap = new HashMap<>();
if (translationMaps.containsKey("format_category")) {
formatCategoryMap = translationMaps.get("format_category");
}else{
translationMaps.put("format_category", formatCategoryMap);
}

translationMaps.put("format_category", formatCategoryMap);
while (formatMapRS.next()){
String format = formatMapRS.getString("value");
Expand Down Expand Up @@ -1061,15 +1075,6 @@ public SierraExportFieldMapping getSierraExportFieldMappings() {
return sierraExportFieldMappings;
}

public boolean hasTranslation(String mapName, String value) {
HashMap<String, String> translationMap = translationMaps.get(mapName);
if (translationMap != null){
return translationMap.containsKey(value.toLowerCase());
}else{
return false;
}
}

public String translateValue(String mapName, String value) {
value = value.toLowerCase();
HashMap<String, String> translationMap = translationMaps.get(mapName);
Expand Down
Binary file modified code/koha_export/koha_export.jar
Binary file not shown.
Binary file modified code/oai_indexer/oai_indexer.jar
Binary file not shown.
Binary file modified code/overdrive_extract/overdrive_extract.jar
Binary file not shown.
Binary file modified code/palace_project_export/palace_project_export.jar
Binary file not shown.
Binary file modified code/polaris_export/polaris_export.jar
Binary file not shown.
Binary file modified code/reindexer/reindexer.jar
Binary file not shown.
Binary file modified code/sideload_processing/sideload_processing.jar
Binary file not shown.
Binary file modified code/sierra_export_api/sierra_export_api.jar
Binary file not shown.
Binary file modified code/symphony_export/symphony_export.jar
Binary file not shown.
Binary file modified code/user_list_indexer/user_list_indexer.jar
Binary file not shown.
10 changes: 10 additions & 0 deletions code/web/release_notes/24.05.01.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Aspen Discovery Updates
### Axis 360 updates
- Provide default format boost for Axis 360 comics. (*MDN*)

### Indexing Updates
- Load all default formats prior to loading custom format map for an indexing profile to ensure default values are available when translating values. (Ticket 132034) (*MDN*)

## This release includes code contributions from
- ByWater Solutions
- Mark Noble (MDN)
Binary file modified code/web_indexer/web_indexer.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
#
eBook = 10
eAudiobook = 8
eComic = 8

0 comments on commit 5ff365d

Please sign in to comment.