X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FDasSourceBrowser.java;h=71efbd073ab55c0532b6a7fa5737416250c7e461;hb=9aae8c465483d78a6a0407774a86deb4b3b6416e;hp=10f5f953fc98e766d39077aa08ce8fa9a7c0fc60;hpb=2a5cbe264ec842c1a0f93e6bd78294607a94e686;p=jalview.git diff --git a/src/jalview/gui/DasSourceBrowser.java b/src/jalview/gui/DasSourceBrowser.java index 10f5f95..71efbd0 100755 --- a/src/jalview/gui/DasSourceBrowser.java +++ b/src/jalview/gui/DasSourceBrowser.java @@ -132,7 +132,8 @@ public class DasSourceBrowser extends GDasSourceBrowser implements for (int i = 0; i < dSize; i++) { data[i][0] = sources.get(i).getTitle(); // what's equivalent of nickname - data[i][1] = new Boolean(selectedSources.contains(sources.get(i).getTitle())); + data[i][1] = new Boolean(selectedSources.contains(sources.get(i) + .getTitle())); } refreshTableData(data); @@ -187,25 +188,34 @@ public class DasSourceBrowser extends GDasSourceBrowser implements + "
"); text.append("Nickname: " + ds.getTitle() + "
"); - + + text.append("URL: " + ds.getSourceURL() + "" + + "
"); if (!ds.isLocal()) { - // TODO: IMMEDIATE verify that URI + ds.URI point to latest version for non-local sources. - if (ds.getDocHref()!=null) { - text.append("URL: " + ds.getDocHref() - + "
"); - } - - text.append("Admin Email: " + ds.getEmail() + "" + "
"); + if (ds.getDocHref() != null && ds.getDocHref().length() > 0) + { + text.append("Site: " + ds.getDocHref() + "" + + "
"); + } - text.append("Registered at: " - + latest.getCreated() + "
"); + text.append("Description: " + + ds.getDescription() + "
"); + + text.append("Admin Email: " + ds.getEmail() + "" + "
"); + + text.append("Registered at: " + + latest.getCreated() + "
"); - // TODO: Identify last successful test date - // text.append("Last successful test: " - // + latest.dasSources[i].getLeaseDate() + "
"); - } else { + // TODO: Identify last successful test date + // text.append("Last successful test: " + // + latest.dasSources[i].getLeaseDate() + "
"); + } + else + { text.append("Source was added manually.
"); } text.append("Labels: "); @@ -214,7 +224,7 @@ public class DasSourceBrowser extends GDasSourceBrowser implements { if (labl.getName().equalsIgnoreCase("LABEL")) { - if (!b) + if (b) { text.append(","); } @@ -239,39 +249,30 @@ public class DasSourceBrowser extends GDasSourceBrowser implements } text.append("
"); - text.append("Coordinates: "); + text.append("Coordinates:"); + int i=1; for (COORDINATES dcs : latest.getCOORDINATES()) { - text.append("(" + dcs.getUri() + ") " - - + dcs.getSource() + ", " + dcs.getAuthority()); + text.append("
"+i+++". "); + text.append(dcs.getAuthority()+" : "+dcs.getSource()); if (dcs.getTaxid() != null && dcs.getTaxid().trim().length() > 0) { - text.append(", " + dcs.getTaxid()); + text.append(" [TaxId:" + dcs.getTaxid()+"]"); } - if (dcs.getVersion()!=null && dcs.getVersion().trim().length() > 0) + if (dcs.getVersion() != null + && dcs.getVersion().trim().length() > 0) { { - text.append(", " + dcs.getVersion()); + text.append(" {v. " + dcs.getVersion()+"}"); } - - text.append("
"); - } - - text.append("Description: " - + ds.getDescription() + "
"); - - if (ds.getDocHref() != null && ds.getDocHref().length() > 0) - { - text.append("Go to site"); } - - text.append(""); - - break; + text.append(" ("+dcs.getUri() + ")"); } + text.append(""); + + break; } + fullDetails.setText(text.toString()); javax.swing.SwingUtilities.invokeLater(new Runnable() { @@ -462,8 +463,8 @@ public class DasSourceBrowser extends GDasSourceBrowser implements int size = osize + (newSource ? 1 : 0); Object[][] data = new Object[size][2]; - DASTableModel dtm = (table != null) ? (DASTableModel)((TableSorter) table.getModel()).getTableModel() - : null; + DASTableModel dtm = (table != null) ? (DASTableModel) ((TableSorter) table + .getModel()).getTableModel() : null; for (int i = 0; i < osize; i++) { String osrc = (dtm == null || i >= osize) ? null : (String) dtm @@ -589,16 +590,17 @@ public class DasSourceBrowser extends GDasSourceBrowser implements // July 2006 - only 6 sources fo not serve features Object[] dummyFeatureList = new Object[] { "features" }; - List srcs=sourceRegistry.getSources(); + List srcs = sourceRegistry.getSources(); for (jalviewSourceI ds : srcs) { VERSION v = ds.getVersion(); List coords = v.getCOORDINATES(); - if (ds.isLocal() || ((coords == null || coords.size() == 0) - && filter1.getSelectedIndex() == 0 - && filter2.getSelectedIndex() == 0 - && filter3.getSelectedIndex() == 0)) + if (ds.isLocal() + || ((coords == null || coords.size() == 0) + && filter1.getSelectedIndex() == 0 + && filter2.getSelectedIndex() == 0 && filter3 + .getSelectedIndex() == 0)) { // THIS IS A FIX FOR LOCAL SOURCES WHICH DO NOT // HAVE COORDINATE SYSTEMS, INFO WHICH AT PRESENT @@ -648,11 +650,12 @@ public class DasSourceBrowser extends GDasSourceBrowser implements { return true; } - if (items==null || items.length==0) + if (items == null || items.length == 0) { return false; } - String sel=(items[0].startsWith("das1:") ? "das1:":"")+selection[i]; + String sel = (items[0].startsWith("das1:") ? "das1:" : "") + + selection[i]; for (int j = 0; j < items.length; j++) { if (sel.equals(items[j]))