From: <nl...@us...> - 2007-05-14 23:10:33
|
Revision: 594 http://svn.sourceforge.net/obo/?rev=594&view=rev Author: nlw Date: 2007-05-14 16:10:35 -0700 (Mon, 14 May 2007) Log Message: ----------- modified the display of the 'replaced by' and 'consider' terms in the TermInfo box for obsoletes. Modified Paths: -------------- phenote/trunk/src/java/phenote/util/HtmlUtil.java Modified: phenote/trunk/src/java/phenote/util/HtmlUtil.java =================================================================== --- phenote/trunk/src/java/phenote/util/HtmlUtil.java 2007-05-14 16:58:38 UTC (rev 593) +++ phenote/trunk/src/java/phenote/util/HtmlUtil.java 2007-05-14 23:10:35 UTC (rev 594) @@ -88,22 +88,32 @@ } if (oboClass.isObsolete()) { Set obsReplacements = oboClass.getReplacedBy(); + StringBuffer replace = new StringBuffer(); + boolean replaceFlag = false; + boolean considerFlag = false; ObsoletableObject obsObj; for (Iterator it = obsReplacements.iterator(); it.hasNext(); ) { obsObj = (ObsoletableObject)it.next(); + replaceFlag = true; if (obsObj!=null) { - sb.append(makeRow(makeLeftCol(italic("replaced by:"))+makeRightCol(bold(termLink(obsObj))))); + replace.append(termLink(obsObj)+"<br>"); } } + if (replaceFlag) + sb.append(makeRow(makeLeftCol(bold(italic("Replaced by:")))+makeRightCol(replace.toString()))); + Set obsConsiders = oboClass.getConsiderReplacements(); + StringBuffer considers = new StringBuffer(); for (Iterator it = obsConsiders.iterator(); it.hasNext(); ) { obsObj = (ObsoletableObject)it.next(); + considerFlag = true; if (obsObj!=null) { - sb.append(makeRow(makeLeftCol(italic("consider replacing with:"))+makeRightCol(bold(termLink(obsObj))))); + considers.append(termLink(obsObj)+"<br>"); } } - - } + if (considerFlag) + sb.append(makeRow(makeLeftCol(bold(italic("Consider using:")))+makeRightCol(considers.toString()))); + } sb.append(makeRow(makeLeftCol(bold("ID"))+makeRightCol(oboClass.getID()))); String synonyms = makeSyns(true, oboClass.getSynonyms()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |