X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fuimodel%2FPDBRestRequest.java;fp=src%2Fjalview%2Fws%2Fuimodel%2FPDBRestRequest.java;h=0000000000000000000000000000000000000000;hb=64dd25185d2caf389946bb7e70053183d5aa31a6;hp=7bfc226dba2f6ea894e976e7bfea529c182c9a68;hpb=39a3725d4d499eb0f1bd14e3c049cd954faddfdc;p=jalview.git diff --git a/src/jalview/ws/uimodel/PDBRestRequest.java b/src/jalview/ws/uimodel/PDBRestRequest.java deleted file mode 100644 index 7bfc226..0000000 --- a/src/jalview/ws/uimodel/PDBRestRequest.java +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2) - * Copyright (C) 2014 The Jalview Authors - * - * This file is part of Jalview. - * - * Jalview is free software: you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation, either version 3 - * of the License, or (at your option) any later version. - * - * Jalview is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Jalview. If not, see . - * The Jalview Authors are detailed in the 'AUTHORS' file. - */ - -package jalview.ws.uimodel; - -import jalview.bin.Cache; -import jalview.datamodel.SequenceI; -import jalview.ws.dbsources.PDBRestClient.PDBDocField; - -import java.util.Collection; - -/** - * Represents the PDB request to be consumed by the PDBRestClient - * - * @author tcnofoegbu - * - */ -public class PDBRestRequest -{ - private String fieldToSearchBy; - - private String searchTerm; - - private String fieldToSortBy; - - private SequenceI associatedSequence; - - private boolean allowEmptySequence; - - private boolean allowUnpublishedEntries = Cache.getDefault( - "ALLOW_UNPUBLISHED_PDB_QUERYING", false); - - private boolean facet; - - private String facetPivot; - - private int facetPivotMinCount; - - private int responseSize; - - private boolean isSortAscending; - - private Collection wantedFields; - - public String getFieldToSearchBy() - { - return fieldToSearchBy; - } - - public void setFieldToSearchBy(String fieldToSearchBy) - { - this.fieldToSearchBy = fieldToSearchBy; - } - - public String getSearchTerm() - { - return searchTerm; - } - - public void setSearchTerm(String searchTerm) - { - this.searchTerm = searchTerm; - } - - public boolean isAllowEmptySeq() - { - return allowEmptySequence; - } - - public void setAllowEmptySeq(boolean allowEmptySeq) - { - this.allowEmptySequence = allowEmptySeq; - } - - public int getResponseSize() - { - return responseSize; - } - - public void setResponseSize(int responseSize) - { - this.responseSize = responseSize; - } - - public Collection getWantedFields() - { - return wantedFields; - } - - public void setWantedFields(Collection wantedFields) - { - this.wantedFields = wantedFields; - } - - public String getFieldToSortBy() - { - return fieldToSortBy; - } - - public void setFieldToSortBy(String fieldToSortBy, boolean isSortAscending) - { - this.fieldToSortBy = fieldToSortBy; - this.isSortAscending = isSortAscending; - } - - public boolean isAscending() - { - return isSortAscending; - } - - public SequenceI getAssociatedSequence() - { - return associatedSequence; - } - - public void setAssociatedSequence(SequenceI associatedSequence) - { - this.associatedSequence = associatedSequence; - } - - public String getQuery() - { - return fieldToSearchBy + searchTerm - + (isAllowEmptySeq() ? "" : " AND molecule_sequence:['' TO *]") - + (isAllowUnpublishedEntries() ? "" : " AND status:REL"); - } - - @Override - public String toString() - { - return "Query : " + getQuery() + " sort field: " + fieldToSortBy - + " isAsc: " + isAscending() + " Associated Seq : " - + associatedSequence; - } - - public boolean isAllowUnpublishedEntries() - { - return allowUnpublishedEntries; - } - - public void setAllowUnpublishedEntries(boolean allowUnpublishedEntries) - { - this.allowUnpublishedEntries = allowUnpublishedEntries; - } - - public boolean isFacet() - { - return facet; - } - - public void setFacet(boolean facet) - { - this.facet = facet; - } - - public String getFacetPivot() - { - return facetPivot; - } - - public void setFacetPivot(String facetPivot) - { - this.facetPivot = facetPivot; - } - - public int getFacetPivotMinCount() - { - return facetPivotMinCount; - } - - public void setFacetPivotMinCount(int facetPivotMinCount) - { - this.facetPivotMinCount = facetPivotMinCount; - } -}