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

ElementModification interface removed

parent b2c643f0
No related branches found
No related tags found
1 merge request!345Resolve "Genes annotations don't show"
package lcsb.mapviewer.model.map.species.field;
public interface ElementModification {
ModificationState getState();
String getName();
ElementModification copy();
}
...@@ -43,7 +43,7 @@ import lcsb.mapviewer.model.map.species.Species; ...@@ -43,7 +43,7 @@ import lcsb.mapviewer.model.map.species.Species;
@DiscriminatorColumn(name = "modification_type", discriminatorType = DiscriminatorType.STRING) @DiscriminatorColumn(name = "modification_type", discriminatorType = DiscriminatorType.STRING)
@DiscriminatorValue("GENERIC_MODIFICATION_RESIDUE") @DiscriminatorValue("GENERIC_MODIFICATION_RESIDUE")
@org.hibernate.annotations.GenericGenerator(name = "test-increment-strategy", strategy = "increment") @org.hibernate.annotations.GenericGenerator(name = "test-increment-strategy", strategy = "increment")
public class ModificationResidue implements Serializable, ElementModification { public class ModificationResidue implements Serializable {
/** /**
* *
...@@ -118,7 +118,6 @@ public class ModificationResidue implements Serializable, ElementModification { ...@@ -118,7 +118,6 @@ public class ModificationResidue implements Serializable, ElementModification {
return result; return result;
} }
/** /**
* @return the idModificationResidue * @return the idModificationResidue
* @see #id * @see #id
...@@ -211,7 +210,7 @@ public class ModificationResidue implements Serializable, ElementModification { ...@@ -211,7 +210,7 @@ public class ModificationResidue implements Serializable, ElementModification {
public void setPosition(Point2D position) { public void setPosition(Point2D position) {
this.position = position; this.position = position;
} }
public ModificationResidue copy() { public ModificationResidue copy() {
throw new NotImplementedException(); throw new NotImplementedException();
} }
......
...@@ -20,7 +20,7 @@ import lcsb.mapviewer.model.map.species.Element; ...@@ -20,7 +20,7 @@ import lcsb.mapviewer.model.map.species.Element;
import lcsb.mapviewer.model.map.species.Protein; import lcsb.mapviewer.model.map.species.Protein;
import lcsb.mapviewer.model.map.species.Rna; import lcsb.mapviewer.model.map.species.Rna;
import lcsb.mapviewer.model.map.species.Species; import lcsb.mapviewer.model.map.species.Species;
import lcsb.mapviewer.model.map.species.field.ElementModification; import lcsb.mapviewer.model.map.species.field.ModificationResidue;
import lcsb.mapviewer.model.map.species.field.Structure; import lcsb.mapviewer.model.map.species.field.Structure;
import lcsb.mapviewer.model.map.species.field.UniprotRecord; import lcsb.mapviewer.model.map.species.field.UniprotRecord;
import lcsb.mapviewer.services.SecurityException; import lcsb.mapviewer.services.SecurityException;
...@@ -230,9 +230,9 @@ public class ElementsRestImpl extends BaseRestImpl { ...@@ -230,9 +230,9 @@ public class ElementsRestImpl extends BaseRestImpl {
return result; return result;
} }
private List<Map<String, Object>> getModifications(List<? extends ElementModification> elements) { private List<Map<String, Object>> getModifications(List<? extends ModificationResidue> elements) {
List<Map<String, Object>> result = new ArrayList<>(); List<Map<String, Object>> result = new ArrayList<>();
for (ElementModification region : elements) { for (ModificationResidue region : elements) {
if (region.getState() != null) { if (region.getState() != null) {
Map<String, Object> row = new TreeMap<>(); Map<String, Object> row = new TreeMap<>();
row.put("name", region.getName()); row.put("name", region.getName());
......
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