From: tcofoegbu Date: Fri, 11 Mar 2016 17:04:56 +0000 (+0000) Subject: JAL-2026 Bug fix for best quality filter X-Git-Tag: Release_2_10_0~301 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=3fd32306db772b6d6756ca20d33519edeb353c2d;p=jalview.git JAL-2026 Bug fix for best quality filter --- diff --git a/src/jalview/gui/StructureChooser.java b/src/jalview/gui/StructureChooser.java index d313002..2e396aa 100644 --- a/src/jalview/gui/StructureChooser.java +++ b/src/jalview/gui/StructureChooser.java @@ -399,18 +399,6 @@ public class StructureChooser extends GStructureChooser implements .getStructureSummaryFields(); Collection filteredResponse = new HashSet(); HashSet errors = new HashSet(); - // try - // { - // PDBDocField fiterField = PDBRestClient - // .getPDBDocFieldByCode(fieldToFilterBy); - // if (!wantedFields.contains(fiterField)) - // { - // wantedFields.add(fiterField); - // } - // } catch (Exception e) - // { - // e.printStackTrace(); - // } for (SequenceI seq : selectedSequences) { diff --git a/src/jalview/ws/dbsources/PDBRestClient.java b/src/jalview/ws/dbsources/PDBRestClient.java index 05dab95..a36fdd4 100644 --- a/src/jalview/ws/dbsources/PDBRestClient.java +++ b/src/jalview/ws/dbsources/PDBRestClient.java @@ -75,10 +75,27 @@ public class PDBRestClient .getWantedFields()); int responseSize = (pdbRestRequest.getResponseSize() == 0) ? DEFAULT_RESPONSE_SIZE : pdbRestRequest.getResponseSize(); - String sortParam = (pdbRestRequest.getFieldToSortBy() == null || pdbRestRequest - .getFieldToSortBy().trim().isEmpty()) ? "" : (pdbRestRequest - .getFieldToSortBy() + (pdbRestRequest.isAscending() ? " asc" - : " desc")); + String sortParam = null; + if (pdbRestRequest.getFieldToSortBy() == null + || pdbRestRequest.getFieldToSortBy().trim().isEmpty()) + { + sortParam = ""; + } + else + { + if (pdbRestRequest.getFieldToSortBy() + .equalsIgnoreCase("Resolution")) + { + sortParam = pdbRestRequest.getFieldToSortBy() + + (pdbRestRequest.isAscending() ? " asc" : " desc"); + } + else + { + sortParam = pdbRestRequest.getFieldToSortBy() + + (pdbRestRequest.isAscending() ? " desc" : " asc"); + } + } + String facetPivot = (pdbRestRequest.getFacetPivot() == null || pdbRestRequest .getFacetPivot().isEmpty()) ? "" : pdbRestRequest .getFacetPivot();