Commit 99adff4d authored by Piotr Gawron's avatar Piotr Gawron
Browse files

status check fixed

parent fc80ef23
......@@ -91,14 +91,9 @@ public class PdbAnnotator extends ElementAnnotator implements IExternalService {
Collection<Structure> structures = uniProtToPdb(getExampleValidAnnotation());
if (structures.size() > 0) {
if (structures.iterator().next().getPdbId() != null) { // TODO - is this
// id?
status.setStatus(ExternalServiceStatusType.OK);
} else {
status.setStatus(ExternalServiceStatusType.CHANGED);
}
status.setStatus(ExternalServiceStatusType.OK);
} else {
status.setStatus(ExternalServiceStatusType.DOWN);
status.setStatus(ExternalServiceStatusType.CHANGED);
}
} catch (final Exception e) {
logger.error(status.getName() + " is down", e);
......@@ -207,7 +202,7 @@ public class PdbAnnotator extends ElementAnnotator implements IExternalService {
* @return set of PDB identifiers found on the webpage
*/
private Collection<Structure> processMappingData(final String pageContentJson) {
Collection<Structure> result = new HashSet<Structure>();
Collection<Structure> result = new HashSet<>();
try {
ObjectMapper objectMapper = new ObjectMapper();
Map<String, List<PdbBestMappingEntry>> m = objectMapper.readValue(pageContentJson, new TypeReference<Map<String, List<PdbBestMappingEntry>>>() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment