Skip to content

Commit

Permalink
Fixed dbptk problem when siard has null attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosjepard committed Nov 21, 2024
1 parent 2d74f43 commit cd78c11
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<groupId>com.databasepreservation.visualization</groupId>
<artifactId>dbvtk</artifactId>
<packaging>war</packaging>
<version>2.11.0-SNAPSHOT</version>
<version>2.10.1</version>
<name>Database Visualization Toolkit</name>

<description>A viewer and explorer for preserved databases</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ protected void configureDisplay(CellTable<ViewerDatabase> display) {
Column<ViewerDatabase, SafeHtml> nameColumn = new TooltipColumn<ViewerDatabase>() {
@Override
public SafeHtml getValue(ViewerDatabase database) {
return database != null && database.getMetadata() != null
return database != null && database.getMetadata() != null && database.getMetadata().getName() != null
? SafeHtmlUtils.fromString(database.getMetadata().getName())
: SafeHtmlUtils.fromString("unknown");
}
Expand All @@ -86,7 +86,7 @@ public SafeHtml getValue(ViewerDatabase database) {
Column<ViewerDatabase, SafeHtml> description = new TooltipColumn<ViewerDatabase>() {
@Override
public SafeHtml getValue(ViewerDatabase database) {
return database != null && database.getMetadata() != null
return database != null && database.getMetadata() != null && database.getMetadata().getDescription() != null
? SafeHtmlUtils.fromString(database.getMetadata().getDescription())
: SafeHtmlUtils.fromString("unknown");
}
Expand All @@ -95,7 +95,7 @@ public SafeHtml getValue(ViewerDatabase database) {
Column<ViewerDatabase, SafeHtml> dbmsColumn = new TooltipColumn<ViewerDatabase>() {
@Override
public SafeHtml getValue(ViewerDatabase database) {
return database != null && database.getMetadata() != null
return database != null && database.getMetadata() != null && database.getMetadata().getDatabaseProduct() != null
? SafeHtmlUtils.fromString(database.getMetadata().getDatabaseProduct())
: SafeHtmlUtils.fromString("unknown");
}
Expand All @@ -104,7 +104,7 @@ public SafeHtml getValue(ViewerDatabase database) {
Column<ViewerDatabase, SafeHtml> dataOwnerColumn = new TooltipColumn<ViewerDatabase>() {
@Override
public SafeHtml getValue(ViewerDatabase database) {
return database != null && database.getMetadata() != null
return database != null && database.getMetadata() != null && database.getMetadata().getDataOwner() != null
? SafeHtmlUtils.fromString(database.getMetadata().getDataOwner())
: SafeHtmlUtils.fromString("unknown");
}
Expand All @@ -113,7 +113,7 @@ public SafeHtml getValue(ViewerDatabase database) {
Column<ViewerDatabase, SafeHtml> archivalDateColumn = new TooltipColumn<ViewerDatabase>() {
@Override
public SafeHtml getValue(ViewerDatabase database) {
return database != null && database.getMetadata() != null
return database != null && database.getMetadata() != null && database.getMetadata().getArchivalDate() != null
? SafeHtmlUtils.fromString(database.getMetadata().getArchivalDate().substring(0, 10))
: null;
}
Expand Down

0 comments on commit cd78c11

Please sign in to comment.