Skip to content

Commit

Permalink
Fix #19
Browse files Browse the repository at this point in the history
  • Loading branch information
dgarijo committed Jun 25, 2021
1 parent adf55b2 commit 26280ae
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/java/fair/FOOPS.java
Original file line number Diff line number Diff line change
Expand Up @@ -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().
Expand Down

0 comments on commit 26280ae

Please sign in to comment.