Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonioG70 committed Jul 29, 2024
1 parent fb139d9 commit 630c371
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,10 @@ private static List<ViewerView> getViews(ViewerDatabaseFromToolkit vdb, List<Vie
ArrayList<ViewerView> result = new ArrayList<>();
if (views != null) {
for (ViewStructure view : views) {
result.add(getView(vdb, view));
ViewerView viewerView = getView(vdb, view);
if (viewerView != null) {
result.add(viewerView);
}
}
}
return result;
Expand All @@ -377,7 +380,11 @@ private static ViewerView getView(ViewerDatabaseFromToolkit vdb, ViewStructure v
result.setName(view.getName());
result.setUuid(SolrUtils.randomUUID());
try {
result.setColumns(getColumns(view.getColumns()));
if (view.getColumns() != null) {
result.setColumns(getColumns(view.getColumns()));
} else {
return null;
}
} catch (ViewerException e) {
LOGGER.error("Could not convert the columns for view {}", view, e);
result.setColumns(new ArrayList<>());
Expand Down Expand Up @@ -846,7 +853,7 @@ private static ViewerCell getCell(CollectionStatus collectionConfiguration, View
actualViewerRow.addLobType(
collectionConfiguration.getTableStatusByTableId(table.getId()).getColumnByIndex(colIndex).getId(),
ViewerLobStoreType.INTERNALLY);
//TODO binaryCell.getFile() pass it to mimetype

String dbContainerName = databasePath.split("/")[databasePath.split("/").length - 1];
if (binaryCell.getFile() != null && dbContainerName.matches("AVID\\.[A-ZÆØÅ]{2,4}\\.[1-9][0-9].*")) {
result.setValue(binaryCell.getFile());
Expand Down

0 comments on commit 630c371

Please sign in to comment.