From 87760dd4df98bfeeee86027c6e44a3a3838244fe Mon Sep 17 00:00:00 2001 From: tcofoegbu Date: Wed, 30 Sep 2015 14:20:22 +0100 Subject: [PATCH] JAL-1852 disable querying of unpublished PDB entries by default --- src/jalview/ws/uimodel/PDBRestRequest.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/jalview/ws/uimodel/PDBRestRequest.java b/src/jalview/ws/uimodel/PDBRestRequest.java index 7826fbd..5442b65 100644 --- a/src/jalview/ws/uimodel/PDBRestRequest.java +++ b/src/jalview/ws/uimodel/PDBRestRequest.java @@ -44,6 +44,8 @@ public class PDBRestRequest private boolean allowEmptySequence; + private boolean allowUnpublishedEntries; + private int responseSize; private boolean isSortAscending; @@ -130,7 +132,8 @@ public class PDBRestRequest public String getQuery() { return fieldToSearchBy + searchTerm - + (isAllowEmptySeq() ? "" : " AND molecule_sequence:['' TO *]"); + + (isAllowEmptySeq() ? "" : " AND molecule_sequence:['' TO *]") + + (isAllowUnpublishedEntries() ? "" : " AND status:REL"); } public String toString() @@ -139,4 +142,14 @@ public class PDBRestRequest + " isAsc: " + isAscending() + " Associated Seq : " + associatedSequence; } + + public boolean isAllowUnpublishedEntries() + { + return allowUnpublishedEntries; + } + + public void setAllowUnpublishedEntries(boolean allowUnpublishedEntries) + { + this.allowUnpublishedEntries = allowUnpublishedEntries; + } } -- 1.7.10.2