*/
private boolean isResidueObserved(Residue residue)
{
- String annotation = getResidueAnnotaiton(residue,
+ HashSet<String> annotations = getResidueAnnotaitons(residue,
ResidueDetailType.ANNOTATION);
- if (annotation == null)
+ if (annotations == null || annotations.isEmpty())
{
return true;
}
- if (!annotation.equalsIgnoreCase(NOT_FOUND)
- && annotation.equalsIgnoreCase(NOT_OBSERVED))
+ for (String annotation : annotations)
{
- return false;
+ if (annotation.equalsIgnoreCase(NOT_OBSERVED))
+ {
+ return false;
+ }
}
return true;
}
* @param type
* @return
*/
- private String getResidueAnnotaiton(Residue residue,
+ private HashSet<String> getResidueAnnotaitons(Residue residue,
ResidueDetailType type)
{
+ HashSet<String> foundAnnotations = new HashSet<String>();
List<ResidueDetail> resDetails = residue.getResidueDetail();
for (ResidueDetail resDetail : resDetails)
{
if (resDetail.getProperty().equalsIgnoreCase(type.getCode()))
{
- return resDetail.getContent();
+ foundAnnotations.add(resDetail.getContent());
}
}
- return NOT_FOUND;
+ return foundAnnotations;
}
@Override