From e2b1f5bf27926eb126ef4222524e800e917a5929 Mon Sep 17 00:00:00 2001 From: Kenji Tanaka Date: Fri, 7 Feb 2025 10:38:29 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20chore(Institutions):=20Create=20?= =?UTF-8?q?composed=20name=20type=20property?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ccafs/marlo/data/model/Institution.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/Institution.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/Institution.java index aa0f9b6ac4..3b36a3145a 100644 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/Institution.java +++ b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/Institution.java @@ -153,6 +153,25 @@ public String getComposedNameLoc() { return this.getName(); } + public String getComposedNameType() { + if (this.getAcronym() != null) { + if (this.getAcronym().length() != 0) { + try { + String type = ""; + if (this.getInstitutionType() != null && this.getInstitutionType().getName() != null) { + type = " (" + this.getInstitutionType().getName() + ")"; + } + return this.getAcronym() + " - " + this.getName() + type; + } catch (Exception e) { + return this.getName(); + } + + } + } + return this.getName(); + + } + public Set getCrpPpaPartners() { return crpPpaPartners; }