diff --git a/src/main/java/io/bioimage/modelrunner/bioimageio/description/ModelDescriptor.java b/src/main/java/io/bioimage/modelrunner/bioimageio/description/ModelDescriptor.java index 3c958be0..fb242a4e 100644 --- a/src/main/java/io/bioimage/modelrunner/bioimageio/description/ModelDescriptor.java +++ b/src/main/java/io/bioimage/modelrunner/bioimageio/description/ModelDescriptor.java @@ -35,12 +35,11 @@ */ public interface ModelDescriptor { - static final String TEXT_DESCRIPTION = "" - + "Model name: %s" + System.lineSeparator() - + "Model nickname: %s" + System.lineSeparator() - + "Model description: %s" + System.lineSeparator() - + "Model author(s): %s" + System.lineSeparator() - + "Model citation: %s" + System.lineSeparator(); + static final String TEXT_DESCRIPTION = "" + + "

%s

" + + "

Nickname: %s

" + + "

Description: %s

" + + ""; /** * Create a set of specifications about the basic info of the model: name od the model, authors, diff --git a/src/main/java/io/bioimage/modelrunner/bioimageio/description/ModelDescriptorV04.java b/src/main/java/io/bioimage/modelrunner/bioimageio/description/ModelDescriptorV04.java index 69811235..c9b302ae 100644 --- a/src/main/java/io/bioimage/modelrunner/bioimageio/description/ModelDescriptorV04.java +++ b/src/main/java/io/bioimage/modelrunner/bioimageio/description/ModelDescriptorV04.java @@ -790,8 +790,17 @@ public boolean canRunOnBioengine() { @Override public String buildInfo() { - return String.format(TEXT_DESCRIPTION, this.name, this.getNickname(), this.description, this.authors.toString(), - this.cite.toString()); + String authorNames = ""; + for (Author auth : this.authors) { + authorNames += " - " + auth.getName() + System.lineSeparator(); + } + String citation = ""; + for (Cite ci : this.cite) { + citation += " - " + ci.getText() + System.lineSeparator(); + if (ci.getUrl() != null) + citation += " " + ci.getUrl() + System.lineSeparator(); + } + return String.format(TEXT_DESCRIPTION, this.name, this.getNickname(), this.description); } @Override diff --git a/src/main/java/io/bioimage/modelrunner/bioimageio/description/ModelDescriptorV05.java b/src/main/java/io/bioimage/modelrunner/bioimageio/description/ModelDescriptorV05.java index 8475a299..4f12de5d 100644 --- a/src/main/java/io/bioimage/modelrunner/bioimageio/description/ModelDescriptorV05.java +++ b/src/main/java/io/bioimage/modelrunner/bioimageio/description/ModelDescriptorV05.java @@ -645,8 +645,17 @@ public boolean canRunOnBioengine() { @Override public String buildInfo() { - return String.format(TEXT_DESCRIPTION, this.name, this.getNickname(), this.description, this.authors.toString(), - this.cite.toString()); + String authorNames = ""; + for (Author auth : this.authors) { + authorNames += " - " + auth.getName() + System.lineSeparator(); + } + String citation = ""; + for (Cite ci : this.cite) { + citation += " - " + ci.getText() + System.lineSeparator(); + if (ci.getUrl() != null) + citation += " " + ci.getUrl() + System.lineSeparator(); + } + return String.format(TEXT_DESCRIPTION, this.name, this.getNickname(), this.description); } @Override