{
if (secstr[p] >= 'A' && secstr[p] <= 'z')
{
+ try
+ {
asecstr[p] = new Annotation(String.valueOf(secstr[p]), null,
secstrcode[p], Float.NaN);
ssFound = true;
+ } catch (Exception e)
+ {
+ // e.printStackTrace();
+ }
}
}
{
Objects.requireNonNull(seqName);
return seqName.replaceAll("\\[\\d*\\]", "")
- .replaceAll("[^\\dA-Za-z ]", "").replaceAll("\\s+", "+");
+ .replaceAll("[^\\dA-Za-z|]", "").replaceAll("\\s+", "+");
}
summaryRowData[colCounter++] = 0.0;
}
}else{
- summaryRowData[colCounter++] = fieldData;
+ summaryRowData[colCounter++] = (fieldData == null || fieldData
+ .isEmpty()) ? null : fieldData;
}
}
}
{
for (PDBDocField wantedField : wantedFields)
{
+ try
+ {
if (wantedField.equals(PDBDocField.PDB_ID))
{
tbl_summary.getColumn(wantedField.getName()).setMinWidth(40);
tbl_summary.getColumn(wantedField.getName()).setMaxWidth(400);
tbl_summary.getColumn(wantedField.getName()).setPreferredWidth(95);
}
+ } catch (Exception e)
+ {
+ e.printStackTrace();
+ }
}
}
}
public void buildQueryTest()
{
String query = StructureChooser.buildQuery(seq);
- System.out.println(">>>>>>>>>> query : " + query);
+ assertEquals("pdb_id:1tim", query);
+ System.out.println("seq >>>> " + seq);
+ seq.getAllPDBEntries().clear();
+ query = StructureChooser.buildQuery(seq);
assertEquals(
- "4kqy OR text:1tim OR text:XYZ_1 OR text:XYZ_2 OR text:XYZ_3 OR text:XYZ_4",
+ "text:XYZ_1 OR text:XYZ_2 OR text:XYZ_3 OR text:XYZ_4 OR text:4kqy",
query);
+ seq.setDBRefs(null);
+ query = StructureChooser.buildQuery(seq);
+ assertEquals("text:4kqy", query);
}
@Test(groups = { "Functional" })