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

Merge branch '548-automatic-vmh-annotation' into 'devel_12.1.x'

Resolve "automatic VMH annotation not working"

See merge request !476
parents 6b46f1b1 0d12c101
No related branches found
No related tags found
5 merge requests!488Merge 12.1.1 into master,!48712.1.1 into master,!484v12.1.1 release,!479Resolve "Pathways and compartments overlay is unavailable if using Custom Semantic Zoom",!476Resolve "automatic VMH annotation not working"
Pipeline #7179 passed
......@@ -464,6 +464,22 @@ public enum MiriamType {
new String[] {}, //
new Class<?>[] {}, null),
/**
* VMH metabolite: https://vmh.uni.lu/.
*/
VMH_METABOLITE("VMH metabolite", //
"https://vmh.uni.lu/", //
"urn:miriam:vmhmetabolite", //
new Class<?>[] { Chemical.class }, "MIR:00000636"),
/**
* VMH reaction: https://vmh.uni.lu/.
*/
VMH_REACTION("VMH reaction", //
"https://vmh.uni.lu/", //
"urn:miriam:vmhreaction", //
new Class<?>[] { Reaction.class }, "MIR:00000640"),
/**
* Wikidata: https://www.wikidata.org/.
*/
......
......@@ -88,16 +88,27 @@ public class MiriamTypeTest {
assertNull(MiriamType.getTypeByCommonName("xyz"));
}
@Test
public void testGetMiriamByUri1() throws Exception {
try {
MiriamData md = MiriamType.getMiriamByUri("urn:miriam:panther.family:PTHR19384:SF5");
assertTrue(new MiriamData(MiriamType.PANTHER, "PTHR19384:SF5").equals(md));
} catch (Exception e) {
e.printStackTrace();
throw e;
}
}
@Test
public void testGetMiriamByUri1() throws Exception {
try {
MiriamData md = MiriamType.getMiriamByUri("urn:miriam:panther.family:PTHR19384:SF5");
assertTrue(new MiriamData(MiriamType.PANTHER, "PTHR19384:SF5").equals(md));
} catch (Exception e) {
e.printStackTrace();
throw e;
}
}
@Test
public void testGetMiriamForVmhMetabolite() throws Exception {
try {
MiriamData md = MiriamType.getMiriamByUri("urn:miriam:vmhmetabolite:o2");
assertNotNull(md);
} catch (Exception e) {
e.printStackTrace();
throw e;
}
}
@Test
public void testGetMiriamByUri2() throws Exception {
......
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