From: preecej Date: Sat, 26 May 2012 00:09:53 +0000 (+0000) Subject: Moved term detail synonyms to separate table; more debugging to to, alon with bolding... X-Git-Url: http://gitweb.planteome.org/?a=commitdiff_plain;h=e1be9bf92a1b9bf6bdcdce6e654311d6e7096b65;p=old-jaiswallab-svn%2F.git Moved term detail synonyms to separate table; more debugging to to, alon with bolding the selected synonym svn path=/; revision=337 --- diff --git a/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java b/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java index b191cfe..1b84b55 100644 --- a/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java +++ b/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java @@ -59,6 +59,12 @@ public class SegmentationView extends Composite { // term detail table private static Table termDetailTable; + // Composite for Term synonyms (nested in Term details table) + private Composite termSynonymComposite; + + // term synonym table (1-col list of nested synonyms) + private static Table termSynonymTable; + // Control to change brush size private final BrushControl brushControl; @@ -131,8 +137,8 @@ public class SegmentationView extends Composite { accession_id("Accession ID"), aspect("Branch") /* a.k.a. "Aspect" */, definition("Definition"), - comment("Comment"), - synonyms("Synonyms"); + comment("Comment")/*, + synonyms("Synonyms")*/; final String extendedLabel; termDetailLabels(String extendedLabel) { this.extendedLabel = extendedLabel; @@ -170,6 +176,7 @@ public class SegmentationView extends Composite { createToolViewSelectionToolbar(); createToolTermLookupBar(); createTermDetailTable(); + createTermSynonymTable(); createTermDetailFields(); // lay out the controls @@ -335,6 +342,8 @@ public class SegmentationView extends Composite { */ public static void termDetailLookup(String accessionId) { termDetailTable.setEnabled(true); + termSynonymTable.setEnabled(true); + termSynonymTable.clearAll(); String webServiceURL = new String(); try { @@ -363,23 +372,36 @@ public class SegmentationView extends Composite { for (termDetailLabels code : values) { String currResponseValue = responseArray.getJSONObject(0).getString(code.toString()); // assumes an array of one response if (items[i].getText(0).equals(code.extendedLabel)) { - if (code.extendedLabel.equals("Synonyms")) { + /*if (code.extendedLabel.equals("Synonyms")) { String formattedSyns = new String(); + JSONArray synArray = responseArray.getJSONObject(0).getJSONArray("synonyms"); for (int j=0; j