From 11abc97ed945ee5aba0a35bdd65b7c8455ce554b Mon Sep 17 00:00:00 2001
From: Piotr Gawron <piotr.gawron@uni.lu>
Date: Wed, 28 Dec 2016 18:34:41 +0100
Subject: [PATCH] when exporting to cell designer elements are distinguishe
 also by homodimer

---
 .../model/celldesigner/CellDesignerElementCollection.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/converter-CellDesigner/src/main/java/lcsb/mapviewer/converter/model/celldesigner/CellDesignerElementCollection.java b/converter-CellDesigner/src/main/java/lcsb/mapviewer/converter/model/celldesigner/CellDesignerElementCollection.java
index 1d6cdfa2a5..f9640d2df9 100644
--- a/converter-CellDesigner/src/main/java/lcsb/mapviewer/converter/model/celldesigner/CellDesignerElementCollection.java
+++ b/converter-CellDesigner/src/main/java/lcsb/mapviewer/converter/model/celldesigner/CellDesignerElementCollection.java
@@ -98,6 +98,7 @@ public class CellDesignerElementCollection {
 		if (modelElement.getCompartment() != null) {
 			compartmenName = modelElement.getCompartment().getName();
 		}
+
 		String modifications = "";
 		if (modelElement instanceof AntisenseRna) {
 			AntisenseRna asAntisenseRna = ((AntisenseRna) modelElement);
@@ -126,7 +127,9 @@ public class CellDesignerElementCollection {
 		}
 
 		String complexId = "";
+		String homodimer = "";
 		if (modelElement instanceof Species) {
+			homodimer = ((Species) modelElement).getHomodimer() + "";
 			if (((Species) modelElement).getComplex() != null) {
 				if (useComplex) {
 					if (!isCyclicNesting(((Species) modelElement).getComplex())) {
@@ -153,10 +156,11 @@ public class CellDesignerElementCollection {
 		}
 
 		// identifier that distinguish elements in sbml depends only on type,
-		// name, compartment, modifications, state, complex where it's located,
+		// name, compartment, modifications, homodimer, state, complex where it's
+		// located,
 		// children of the complex
 		String sbmlId = compartmenName + "\n" + modelElement.getName() + "\n" + modelElement.getStringType() + "\n" + modifications + "\n" + complexId + "\n"
-				+ childrenId;
+				+ homodimer + "\n" + childrenId;
 
 		return sbmlId;
 	}
-- 
GitLab