From 26280ae6be2d5ed70234c3612eae67851ebbfe86 Mon Sep 17 00:00:00 2001 From: Daniel Garijo Date: Fri, 25 Jun 2021 14:59:05 +0200 Subject: [PATCH] Fix #19 --- src/main/java/fair/FOOPS.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/fair/FOOPS.java b/src/main/java/fair/FOOPS.java index 6c90fa8..a882530 100644 --- a/src/main/java/fair/FOOPS.java +++ b/src/main/java/fair/FOOPS.java @@ -114,8 +114,15 @@ private float getTotalScore(){ * This method writes the results as a JSON file */ public String exportJSON(){ + String license = ""; + if (this.ontology.getLicense()!=null && !"".equals(ontology.getLicense())){ + license = "\"ontology_license\": \""+this.ontology.getLicense()+"\",\n"; + }else{ + license = "\"ontology_license\": \"unknown\",\n"; + } String out = "{\n\"ontology_URI\": \""+this.ontology.getOntologyURI()+"\",\n" + "\"ontology_title\": \""+this.ontology.getTitle()+"\",\n" + + license + "\"overall_score\":"+this.getTotalScore()+",\n" + "\"checks\":"; Gson gson = new GsonBuilder().