Skip to content
Snippets Groups Projects
Commit d49a963a authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch '471-chebi-annotator-stopped-working' into 'devel_12.0.x'

broken chebi annotator doesn't stop data uploading

See merge request !366
parents 7d11e44b 0d9a06bf
No related branches found
No related tags found
1 merge request!366broken chebi annotator doesn't stop data uploading
Pipeline #
......@@ -27,7 +27,6 @@ import lcsb.mapviewer.model.map.MiriamType;
import lcsb.mapviewer.model.map.species.Chemical;
import lcsb.mapviewer.modelutils.map.ElementUtils;
import uk.ac.ebi.chebi.webapps.chebiWS.client.ChebiWebServiceClient;
import uk.ac.ebi.chebi.webapps.chebiWS.model.ChebiWebServiceFault_Exception;
import uk.ac.ebi.chebi.webapps.chebiWS.model.DataItem;
import uk.ac.ebi.chebi.webapps.chebiWS.model.Entity;
import uk.ac.ebi.chebi.webapps.chebiWS.model.LiteEntity;
......@@ -205,7 +204,7 @@ public class ChebiAnnotator extends ElementAnnotator implements IExternalService
}
}
}
} catch (ChebiWebServiceFault_Exception e) {
} catch (Exception e) {
throw new ChebiSearchException("Problem with chebi connection", e);
}
return null;
......@@ -290,7 +289,7 @@ public class ChebiAnnotator extends ElementAnnotator implements IExternalService
String value = miriamListToStringList(result);
setCacheValue(query, value);
} catch (ChebiWebServiceFault_Exception e) {
} catch (Exception e) {
throw new ChebiSearchException("Problem with chebi", e);
}
return result;
......@@ -300,7 +299,7 @@ public class ChebiAnnotator extends ElementAnnotator implements IExternalService
* Serialize list of chebi identifiers.
*
* @param list
* list of chebi identfiers
* list of chebi identifiers
* @return string with identifiers
*/
private String miriamListToStringList(List<MiriamData> list) {
......@@ -357,7 +356,6 @@ public class ChebiAnnotator extends ElementAnnotator implements IExternalService
}
try {
ChebiWebServiceClient client = getClient();
LiteEntityList entities = client.getLiteEntity(id, SearchCategory.CHEBI_ID, MAX_SEARCH_RESULTS_FROM_CHEBI_API,
StarsCategory.ALL);
List<LiteEntity> resultList = entities.getListElement();
......@@ -374,7 +372,7 @@ public class ChebiAnnotator extends ElementAnnotator implements IExternalService
setCacheValue("id: " + id, chebiSerializer.objectToString(result));
}
return result;
} catch (ChebiWebServiceFault_Exception e) {
} catch (Exception e) {
throw new ChebiSearchException("Problem with chebi", e);
}
}
......@@ -387,7 +385,7 @@ public class ChebiAnnotator extends ElementAnnotator implements IExternalService
* identifier): "CHEBI:XXXXX" or "XXXXX"
* @return common name of chemical
* @throws ChebiSearchException
* thrown when there is a problemw ith accessing information from
* thrown when there is a problem with accessing information from
* external chebi database
*/
protected String getChebiNameForChebiId(MiriamData id) throws ChebiSearchException {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment