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

allow recon to add chembl compound annotation

parent 33a16f7d
No related branches found
No related tags found
2 merge requests!630WIP: Resolve "The privileges of a new user are not saved in some cases",!386Resolve "Continous integration tests"
......@@ -523,6 +523,11 @@ public abstract class ElementAnnotator extends CachableInterface {
element.addMiriamData(md);
}
protected void addChemblCompound(BioEntity element, String value) {
MiriamData md = createMiriamData(MiriamType.CHEMBL_COMPOUND, value);
element.addMiriamData(md);
}
/**
* Sets {@link BioEntity#getFormula()}.
*
......
......@@ -134,7 +134,6 @@ public class ReconAnnotator extends ElementAnnotator implements IExternalService
logger.warn("Unknown class type: " + annotatedObject.getClass());
return;
}
logger.debug(url);
try {
String content = getWebPageContent(url);
......@@ -296,6 +295,8 @@ public class ReconAnnotator extends ElementAnnotator implements IExternalService
continue;
} else if (key.equals("casRegistry")) {
addCas(annotatedObject, value);
} else if (key.equals("chembl")) {
addChemblCompound(annotatedObject, value);
} else if (key.equals("epa_id")) {
// for now we don't handle it
continue;
......@@ -308,6 +309,9 @@ public class ReconAnnotator extends ElementAnnotator implements IExternalService
} else if (key.equals("biocyc")) {
// for now we don't handle it
continue;
} else if (key.equals("fda_id")) {
// for now we don't handle it
continue;
} else {
unknown = true;
}
......
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