diff --git a/converter-CellDesigner/src/test/java/lcsb/mapviewer/converter/model/celldesigner/annotation/RestAnnotationParserTest.java b/converter-CellDesigner/src/test/java/lcsb/mapviewer/converter/model/celldesigner/annotation/RestAnnotationParserTest.java index 2817081a20adb7705f39873e4b8465662341db31..ff04e704263c0441452fe77f708ad972460e4c8f 100644 --- a/converter-CellDesigner/src/test/java/lcsb/mapviewer/converter/model/celldesigner/annotation/RestAnnotationParserTest.java +++ b/converter-CellDesigner/src/test/java/lcsb/mapviewer/converter/model/celldesigner/annotation/RestAnnotationParserTest.java @@ -411,6 +411,12 @@ public class RestAnnotationParserTest extends CellDesignerTestFunctions { // TODO Auto-generated method stub return 0; } + + @Override + public String getStringType() { + // TODO Auto-generated method stub + return null; + } }); fail("Exception expected"); } catch (NotImplementedException e) { diff --git a/model/src/main/java/lcsb/mapviewer/model/map/AnnotatedObject.java b/model/src/main/java/lcsb/mapviewer/model/map/AnnotatedObject.java index 6321ce8597f5122b26313a183450b6ebde7aa00c..e13e3aa8648abd1b1ab023b1545aa4a151d6615b 100644 --- a/model/src/main/java/lcsb/mapviewer/model/map/AnnotatedObject.java +++ b/model/src/main/java/lcsb/mapviewer/model/map/AnnotatedObject.java @@ -126,4 +126,13 @@ public interface AnnotatedObject extends Serializable { void setName(String name); int getId(); + + + /** + * Return human readable {@link String} representing class. + * + * @return human readable {@link String} representing class + */ + public abstract String getStringType(); + } diff --git a/model/src/main/java/lcsb/mapviewer/model/map/compartment/OvalCompartment.java b/model/src/main/java/lcsb/mapviewer/model/map/compartment/OvalCompartment.java index 2f5dc003cc0711fa7c87c674297028898b0ad9e9..be5a84f3f9c1349ebe938d52cf86d0de5402f740 100644 --- a/model/src/main/java/lcsb/mapviewer/model/map/compartment/OvalCompartment.java +++ b/model/src/main/java/lcsb/mapviewer/model/map/compartment/OvalCompartment.java @@ -38,6 +38,11 @@ public class OvalCompartment extends Compartment { super(original); } + public OvalCompartment(String elementId) { + super(); + setElementId(elementId); + } + @Override public OvalCompartment copy() { if (this.getClass() == OvalCompartment.class) { diff --git a/model/src/main/java/lcsb/mapviewer/model/map/reaction/Reaction.java b/model/src/main/java/lcsb/mapviewer/model/map/reaction/Reaction.java index c13687aaf44278aea625b8e85351161feefc48bf..90c1e5cdc6b7efd6fa4076858312a6f7513941ee 100644 --- a/model/src/main/java/lcsb/mapviewer/model/map/reaction/Reaction.java +++ b/model/src/main/java/lcsb/mapviewer/model/map/reaction/Reaction.java @@ -402,7 +402,7 @@ public class Reaction implements AnnotatedObject { * @return short string describing type of the reaction */ public String getStringType() { - throw new NotImplementedException(); + return "Generic Reaction"; } /** diff --git a/model/src/main/java/lcsb/mapviewer/model/map/species/Element.java b/model/src/main/java/lcsb/mapviewer/model/map/species/Element.java index c4a4c1d9797d47ca01ece9d6fcaaae49b3a0b262..e624b92ffb386407e46def4e5e20c34d7e050c8b 100644 --- a/model/src/main/java/lcsb/mapviewer/model/map/species/Element.java +++ b/model/src/main/java/lcsb/mapviewer/model/map/species/Element.java @@ -1058,13 +1058,6 @@ public abstract class Element implements AnnotatedObject, Serializable { synonyms.add(synonym); } - /** - * Return human readable {@link String} representing class. - * - * @return human readable {@link String} representing class - */ - public abstract String getStringType(); - /** * @return the dataMining * @see #dataMining