Commit 3fbdcc2f authored by Piotr Gawron's avatar Piotr Gawron
Browse files

export transcription and translation reactions

parent 39b6a42b
......@@ -13,6 +13,8 @@ minerva (15.1.0) unstable; urgency=medium
* Small improvement: process rectangle can be specified in SBML with reaction
bounding box (#1292)
* Small improvement: API allows to remove plugin data entry (#1298)
* Small improvement: transport/translation/transcription reactions are
exported to SBGN PD (#1302)
* Bug fix: export to image from selected polygon contained all elements
inside rectangle bounded by the polygon coordinates (#1096)
* Bug fix: continuous refreshing list of project when uploading/removing
......
......@@ -102,7 +102,7 @@ public class SbgnmlXmlExporter {
ColorParser colorParser = new ColorParser();
XmlAnnotationParser xap = new XmlAnnotationParser(new ArrayList<>(), true);
/**
* Transforms model into SBGN-ML xml.
*
......@@ -236,7 +236,7 @@ public class SbgnmlXmlExporter {
private org.w3c.dom.Element getAnnotationExtension(Element element) {
try {
String content =xap.dataSetToXmlString(element.getMiriamData(), element.getElementId());
String content = xap.dataSetToXmlString(element.getMiriamData(), element.getElementId());
content = "<annotation>" + content + "</annotation>";
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);
......@@ -710,8 +710,8 @@ public class SbgnmlXmlExporter {
private GlyphClazz getGlyphClazzFromReaction(Reaction reaction) {
if (reaction instanceof StateTransitionReaction ||
reaction instanceof TransportReaction ||
reaction instanceof StateTransitionReaction
) {
reaction instanceof TranslationReaction ||
reaction instanceof TranscriptionReaction) {
return GlyphClazz.PROCESS;
}
if (reaction instanceof HeterodimerAssociationReaction) {
......
......@@ -21,7 +21,7 @@ import lcsb.mapviewer.model.map.InconsistentModelException;
import lcsb.mapviewer.model.map.model.Model;
import lcsb.mapviewer.model.map.model.ModelFullIndexed;
import lcsb.mapviewer.model.map.reaction.*;
import lcsb.mapviewer.model.map.reaction.type.TransportReaction;
import lcsb.mapviewer.model.map.reaction.type.*;
import lcsb.mapviewer.model.map.species.Ion;
@RunWith(Parameterized.class)
......@@ -39,6 +39,8 @@ public class SbgnmlXmlExporterTest extends SbgnmlTestFunctions {
public static Collection<Object[]> data() throws Exception {
Collection<Object[]> data = new ArrayList<>();
data.add(createTestEntry(createReaction(TransportReaction.class)));
data.add(createTestEntry(createReaction(TranslationReaction.class)));
data.add(createTestEntry(createReaction(TranscriptionReaction.class)));
return data;
}
......
......@@ -27,6 +27,10 @@ public class TranscriptionReaction extends Reaction implements SimpleReactionInt
public TranscriptionReaction() {
super();
}
public TranscriptionReaction(String elementId) {
super(elementId);
}
/**
* Constructor that copies data from the parameter given in the argument.
......
......@@ -29,6 +29,10 @@ public class TranslationReaction extends Reaction implements SimpleReactionInter
super();
}
public TranslationReaction(String elementId) {
super(elementId);
}
/**
* Constructor that copies data from the parameter given in the argument.
*
......
Supports Markdown
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