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

Merge branch '1468-homomultimer-information-not-available-via-minerva-api' into 'master'

Resolve "Homomultimer information not available via MINERVA API"

Closes #1468

See merge request !1290
parents bb00fccf 8875acfe
Pipeline #39893 passed with stage
in 31 minutes and 41 seconds
minerva (16.0.0~alpha.1) stable; urgency=medium
* Small improvement: homomultimer information is provided in API (#1468)
-- Piotr Gawron <piotr.gawron@uni.lu> Fri, 19 Mar 2021 10:00:00 +0200
minerva (16.0.0~alpha.1) stable; urgency=medium minerva (16.0.0~alpha.1) stable; urgency=medium
* Backward incompatibility: deprecated columns in data overlays are no longer * Backward incompatibility: deprecated columns in data overlays are no longer
supported (#958) supported (#958)
......
...@@ -213,6 +213,13 @@ public class ElementsRestImpl extends BaseRestImpl { ...@@ -213,6 +213,13 @@ public class ElementsRestImpl extends BaseRestImpl {
case "synonyms": case "synonyms":
value = element.getSynonyms(); value = element.getSynonyms();
break; break;
case "homomultimer":
if (element instanceof Species) {
value = ((Species) element).getHomodimer();
} else {
value = null;
}
break;
case "formula": case "formula":
value = element.getFormula(); value = element.getFormula();
break; break;
...@@ -385,6 +392,7 @@ public class ElementsRestImpl extends BaseRestImpl { ...@@ -385,6 +392,7 @@ public class ElementsRestImpl extends BaseRestImpl {
result.add("activity"); result.add("activity");
result.add("initialAmount"); result.add("initialAmount");
result.add("glyph"); result.add("glyph");
result.add("homomultimer");
return result; return result;
} }
......
...@@ -203,6 +203,10 @@ public class MapControllerIntegrationTest extends ControllerIntegrationTest { ...@@ -203,6 +203,10 @@ public class MapControllerIntegrationTest extends ControllerIntegrationTest {
.description("is the element hypothetical") .description("is the element hypothetical")
.type("boolean") .type("boolean")
.optional(), .optional(),
fieldWithPath("[].homomultimer")
.description("multimer value")
.type("int")
.optional(),
subsectionWithPath("[].other") subsectionWithPath("[].other")
.description("list of oher properties") .description("list of oher properties")
.type("object") .type("object")
...@@ -340,7 +344,7 @@ public class MapControllerIntegrationTest extends ControllerIntegrationTest { ...@@ -340,7 +344,7 @@ public class MapControllerIntegrationTest extends ControllerIntegrationTest {
} }
@Test @Test
public void testGetAllElementsFiltereByType() throws Exception { public void testGetAllElementsFilteredByType() throws Exception {
RequestBuilder request = get( RequestBuilder request = get(
"/projects/{projectId}/models/{mapId}/bioEntities/elements/?columns=name,complexId&type=Protein", "/projects/{projectId}/models/{mapId}/bioEntities/elements/?columns=name,complexId&type=Protein",
TEST_PROJECT, "*"); TEST_PROJECT, "*");
......
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