Commit fff5c5ab authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch '1359-identifiers-org-url-not-processed' into 'master'

Resolve "identifiers.org url not processed"

Closes #1359

See merge request !1239
parents b1473e5f c9e19853
Pipeline #31328 passed with stage
in 21 minutes and 3 seconds
minerva (15.1.0~beta.1) unstable; urgency=medium
* Small improvement: "Human Disease Ontology", "IUPHAR ligand" and "Protein
Modification Ontology" annotation types are handled (#1359)
* Bug fix: SBML import - label aligned to top of species was inproperly drawn
(#1354)
* Bug fix: SBML text labels that were referencing layout aliases using
layout:graphicalObject attribute were not handled properly (#1356)
* Bug fix: miriam urls in new format
(like: https://identifiers.org/kegg.compound:197020) are parsed properly for
all know identifier types (#1359)
-- Piotr Gawron <piotr.gawron@uni.lu> Mon, 17 Aug 2020 16:00:00 +0200
......
......@@ -109,6 +109,24 @@ public class MiriamTypeGenericTest extends ModelTestFunctions {
}
}
@Test
public void testNewHttpAndHttpsForIdentifiersOrg() {
if (!deprecated) {
boolean httpIdentifiersOrgUriExists = false;
boolean httpsIdentifiersOrgUriExists = false;
for (String uri : miriamType.getUris()) {
if (uri.toLowerCase().startsWith("http://identifiers.org/") && !uri.endsWith("/")) {
httpIdentifiersOrgUriExists = true;
}
if (uri.toLowerCase().startsWith("https://identifiers.org/") && !uri.endsWith("/")) {
httpsIdentifiersOrgUriExists = true;
}
}
assertTrue("Http identifiers.org url does not exists for: " + miriamType, httpIdentifiersOrgUriExists);
assertTrue("Https identifiers.org url does not exists for: " + miriamType, httpsIdentifiersOrgUriExists);
}
}
@Test
public void testGetMiriamByIncompleteUri() throws Exception {
for (String uri : miriamType.getUris()) {
......
......@@ -123,4 +123,33 @@ public class MiriamTypeTest extends ModelTestFunctions {
assertTrue(md.getResource().contains("/"));
}
@Test
public void testGetMiriamByKeggCompoundIdentifiersOrgUri() throws Exception {
MiriamData md = MiriamType.getMiriamByUri("https://identifiers.org/kegg.compound:197020");
assertEquals(new MiriamData(MiriamType.KEGG_COMPOUND, "197020"), md);
}
@Test
public void testGetMiriamByEcoIdentifiersOrgUri() throws Exception {
MiriamData md = MiriamType.getMiriamByUri("https://identifiers.org/ECO:0000006");
assertEquals(new MiriamData(MiriamType.ECO, "ECO:0000006"), md);
}
@Test
public void testGetMiriamByMgiIdentifiersOrgUri() throws Exception {
MiriamData md = MiriamType.getMiriamByUri("https://identifiers.org/MGI:2442292");
assertEquals(new MiriamData(MiriamType.MGD, "MGI:2442292"), md);
}
@Test
public void testGetMiriamByPatoIdentifiersOrgUri() throws Exception {
MiriamData md = MiriamType.getMiriamByUri("https://identifiers.org/PATO:0001998");
assertEquals(new MiriamData(MiriamType.PATO, "PATO:0001998"), md);
}
@Test
public void testGetMiriamBySboIdentifiersOrgUri() throws Exception {
MiriamData md = MiriamType.getMiriamByUri("https://identifiers.org/SBO:0000262");
assertEquals(new MiriamData(MiriamType.SBO_TERM, "SBO:0000262"), md);
}
}
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