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

CellDesiogner does not alow to serialize label width/height

parent 47c90381
......@@ -263,6 +263,7 @@ public class GPMLToModelTest extends WikipathwaysTestFunctions {
String fileName = "testFiles/compartment/complex_in_compartment.gpml";
Model model1 = new GPMLToModel().getModel(fileName);
assertEquals(2, getWarnings().size());
Model model2 = serializeModelOverCellDesignerParser(model1);
......
......@@ -248,9 +248,11 @@ public abstract class WikipathwaysTestFunctions {
String xml = parser.model2String(model1);
InputStream is = new ByteArrayInputStream(xml.getBytes(StandardCharsets.UTF_8));
for (Species bioEntity : model1.getSpeciesList()) {
for (lcsb.mapviewer.model.map.species.Element bioEntity : model1.getElements()) {
// CellDesigner doesn't allow to store border color
bioEntity.setBorderColor(Color.BLACK);
if (bioEntity instanceof Species) {
bioEntity.setBorderColor(Color.BLACK);
}
// CellDesigner doesn't allow to store name point position
bioEntity.setNameX(0);
bioEntity.setNameY(0);
......@@ -261,7 +263,7 @@ public abstract class WikipathwaysTestFunctions {
}
Model model2 = parser.createModel(new ConverterParams().inputStream(is).sizeAutoAdjust(false));
for (Species bioEntity : model2.getSpeciesList()) {
for (lcsb.mapviewer.model.map.species.Element bioEntity : model2.getElements()) {
// CellDesigner doesn't allow to store name point position
bioEntity.setNameX(0);
bioEntity.setNameY(0);
......
......@@ -295,6 +295,8 @@ public class ModelToGPMLTest extends WikipathwaysTestFunctions {
Complex complex = new Complex("sa" + (speciesCounter++));
complex.setName("s2");
super.assignCoordinates(1, 1, 10, 10, complex);
complex.setNameHeight(complex.getHeight()-2);
complex.setNameVerticalAlign(VerticalAlign.BOTTOM);
complex.setHypothetical(true);
return complex;
}
......@@ -303,6 +305,8 @@ public class ModelToGPMLTest extends WikipathwaysTestFunctions {
Compartment compartment = new SquareCompartment("ca" + (speciesCounter++));
compartment.setName("s2");
super.assignCoordinates(1, 1, 10, 10, compartment);
compartment.setNameHorizontalAlign(HorizontalAlign.LEFT);
compartment.setNameVerticalAlign(VerticalAlign.TOP);
compartment.setThickness(0);
compartment.setOuterWidth(0);
compartment.setInnerWidth(0);
......
......@@ -12,14 +12,14 @@ rootLogger.appenderRef.console.ref = STDOUT
logger.minerva.name = lcsb
logger.minerva.level = debug
#logger.minerva-persist.name = lcsb.mapviewer.persist.DbUtils
#logger.minerva-persist.level = info
#logger.minerva-cache.name = lcsb.mapviewer.annotation.cache
#logger.minerva-cache.level = info
#logger.minerva-comparator.name = lcsb.mapviewer.common.Comparator
#logger.minerva-comparator.level = info
#logger.minerva-model.name = lcsb.mapviewer.model
#logger.minerva-model.level = info
logger.minerva-persist.name = lcsb.mapviewer.persist.DbUtils
logger.minerva-persist.level = info
logger.minerva-cache.name = lcsb.mapviewer.annotation.cache
logger.minerva-cache.level = info
logger.minerva-comparator.name = lcsb.mapviewer.common.Comparator
logger.minerva-comparator.level = info
logger.minerva-model.name = lcsb.mapviewer.model
logger.minerva-model.level = info
logger.springframework.name = org.springframework
logger.springframework.level = warn
......
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