.hasNext();)
{
JSONObject doc = docIter.next();
- // if (doc.get("molecule_sequence") != null)
- // {
result.add(searchResult.new PDBResponseSummary(doc, pdbRestRequest));
- // }
}
searchResult.setNumberOfItemsFound(numFound);
searchResult.setResponseTime(queryTime);
{
e.printStackTrace();
}
-
return searchResult;
}
/**
- * Takes a collection of PDBDocField and converts it into a comma delimited
- * string.
+ * Takes a collection of PDBDocField and converts its code values into a comma
+ * delimited string.
*
* @param pdbDocfields
* @return
}
/**
- * Determines the column index for the pdb id in the summary table. The pdb id
- * serves as a unique identifier for a given row in the summary table
+ * Determines the column index for 'PDB Id' Fields in the dynamic summary
+ * table. The PDB Id serves as a unique identifier for a given row in the
+ * summary table
*
* @param wantedFeilds
* the available table columns in no particular order
public static int getPDBIdColumIndex(
Collection<PDBDocField> wantedFeilds, boolean hasRefSeq)
{
- int pdbFeildIndex = hasRefSeq ? 1 : 0;
+ int pdbFeildIndexCounter = hasRefSeq ? 1 : 0; // If a reference sequence is
+ // attached then start counting from
+ // 1 else start from zero
for (PDBDocField feild : wantedFeilds)
{
if (feild.equals(PDBDocField.PDB_ID))
{
- break;
+ break; // once PDB Id index is determined exit iteration
}
- ++pdbFeildIndex;
+ ++pdbFeildIndexCounter;
}
- return pdbFeildIndex;
+ return pdbFeildIndexCounter;
}
/**