X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fuimodel%2FPDBRestResponse.java;fp=src%2Fjalview%2Fws%2Fuimodel%2FPDBRestResponse.java;h=7f570a48e179cae46db65af0109a9f813f58d53b;hb=2cbc2e45a74eb8cf8040f9a71636289ca2db5241;hp=fb227ee17bbd603f17c7a70971723e74f7a7d17b;hpb=49207bb4d5c7b380978923817742d095b3f685b3;p=jalview.git diff --git a/src/jalview/ws/uimodel/PDBRestResponse.java b/src/jalview/ws/uimodel/PDBRestResponse.java index fb227ee..7f570a4 100644 --- a/src/jalview/ws/uimodel/PDBRestResponse.java +++ b/src/jalview/ws/uimodel/PDBRestResponse.java @@ -77,8 +77,8 @@ public class PDBRestResponse /** - * Convenience method to obtain a Table model for a given summary List and - * request + * Convenience method to obtain a Table model for a given summary List based + * on the request parameters * * @param request * the PDBRestRequest object which holds useful information for @@ -115,8 +115,6 @@ public class PDBRestResponse /** * Model for a unique response summary * - * @author tcnofoegbu - * */ public class PDBResponseSummary { @@ -126,7 +124,7 @@ public class PDBRestResponse private String associatedSequence; - public PDBResponseSummary(JSONObject doc, PDBRestRequest request) + public PDBResponseSummary(JSONObject pdbJsonDoc, PDBRestRequest request) { Collection diplayFields = request.getWantedFields(); String associatedSeq = request.getAssociatedSequence(); @@ -143,10 +141,11 @@ public class PDBRestResponse for (PDBDocField field : diplayFields) { - String fieldData = (doc.get(field.getCode()) == null) ? "" : doc + String fieldData = (pdbJsonDoc.get(field.getCode()) == null) ? "" + : pdbJsonDoc .get(field.getCode()).toString(); if (field.equals(PDBDocField.PDB_ID) - && doc.get(PDBDocField.PDB_ID.getCode()) != null) + && pdbJsonDoc.get(PDBDocField.PDB_ID.getCode()) != null) { this.pdbId = fieldData; summaryRowData[colCounter++] = this.pdbId; @@ -178,6 +177,9 @@ public class PDBRestResponse this.summaryRowData = summaryData; } + /** + * Returns a string representation of this object; + */ @Override public String toString() { @@ -189,12 +191,18 @@ public class PDBRestResponse return summaryFieldValues.toString(); } + /** + * Returns hash code value for this object + */ @Override public int hashCode() { return Objects.hash(this.pdbId, this.toString()); } + /** + * Indicates whether some object is equal to this one + */ @Override public boolean equals(Object that) {