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

support for vmh miriam types

parent 3783c589
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"
minerva (12.1.0~beta.0) experimental; urgency=medium
* Small improvement: miriam support for VMH reaction and VMH metabolite
-- Piotr Gawron <piotr.gawron@uni.lu> Wed, 05 Sep 2018 17:00:00 +0200
minerva (12.1.0~beta.0) experimental; urgency=medium
* Small improvement: option to remove additional overlays generated by custom
semantic zoom
......
......@@ -464,6 +464,22 @@ public enum MiriamType {
new String[] {}, //
new Class<?>[] {}, null),
/**
* VMH reaction
*/
VMH_REACTION("VMH reaction", //
"http://vmh.uni.lu/", //
new String[] { "urn:miriam:vmhreaction", "http://identifiers.org/vmhreaction/" }, //
new Class<?>[] { Reaction.class }, null),
/**
* VMH reaction
*/
VMH_METABOLITE("VMH reaction", //
"http://vmh.uni.lu/", //
new String[] { "urn:miriam:vmhmetabolite", "http://identifiers.org/vmhmetabolite/" }, //
new Class<?>[] { Chemical.class }, null),
/**
* Wikidata: https://www.wikidata.org/.
*/
......@@ -710,7 +726,7 @@ public enum MiriamType {
* @return {@link MiriamData} from miriam uri
*/
public static MiriamData getMiriamByUri(String miriamUri) {
// this hack is due to CellDesigner issue (CellDesigner incorectly handle
// this hack is due to CellDesigner issue (CellDesigner incorrectly handle
// with identifiers that have ":" inside resource ":" inside resource with
// "%3A" and also the last ":"
miriamUri = miriamUri.replace("%3A", ":");
......@@ -725,6 +741,11 @@ public enum MiriamType {
foundType = type;
foundUri = uri;
}
} else if (miriamUri.startsWith(uri) && uri.endsWith("/")) {
if (uri.length() > foundUri.length()) {
foundType = type;
foundUri = uri;
}
}
}
}
......
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