diff --git a/converter-CellDesigner/src/main/java/lcsb/mapviewer/converter/model/celldesigner/alias/CompartmentAliasXmlParser.java b/converter-CellDesigner/src/main/java/lcsb/mapviewer/converter/model/celldesigner/alias/CompartmentAliasXmlParser.java index 71c0aa5f0cadf4ba184ed3089c73b36e3c086cf1..f3a8bf849288d8cac9380e9830e7a07d2a9f1500 100644 --- a/converter-CellDesigner/src/main/java/lcsb/mapviewer/converter/model/celldesigner/alias/CompartmentAliasXmlParser.java +++ b/converter-CellDesigner/src/main/java/lcsb/mapviewer/converter/model/celldesigner/alias/CompartmentAliasXmlParser.java @@ -127,57 +127,57 @@ public class CompartmentAliasXmlParser extends AbstractAliasXmlParser<Compartmen } @Override - public String toXml(Compartment alias) { + public String toXml(Compartment compartment) { StringBuilder sb = new StringBuilder(""); sb.append("<celldesigner:compartmentAlias "); - sb.append("id=\"" + alias.getElementId() + "\" "); - sb.append("compartment=\"" + elements.getElementId(alias) + "\">\n"); + sb.append("id=\"" + compartment.getElementId() + "\" "); + sb.append("compartment=\"" + elements.getElementId(compartment) + "\">\n"); boolean bounds = true; - if (alias.getClass().getName().equals(SquareCompartment.class.getName())) { + if (compartment.getClass().getName().equals(SquareCompartment.class.getName())) { sb.append("<celldesigner:class>SQUARE</celldesigner:class>\n"); - } else if (alias.getClass().getName().equals(OvalCompartment.class.getName())) { + } else if (compartment.getClass().getName().equals(OvalCompartment.class.getName())) { sb.append("<celldesigner:class>OVAL</celldesigner:class>\n"); - } else if (alias.getClass().getName().equals(BottomSquareCompartment.class.getName())) { + } else if (compartment.getClass().getName().equals(BottomSquareCompartment.class.getName())) { sb.append("<celldesigner:class>SQUARE_CLOSEUP_NORTH</celldesigner:class>\n"); bounds = false; - sb.append("<celldesigner:point x=\"10\" y=\"" + alias.getY() + "\"/>"); - } else if (alias.getClass().getName().equals(TopSquareCompartment.class.getName())) { + sb.append("<celldesigner:point x=\"10\" y=\"" + compartment.getY() + "\"/>"); + } else if (compartment.getClass().getName().equals(TopSquareCompartment.class.getName())) { sb.append("<celldesigner:class>SQUARE_CLOSEUP_SOUTH</celldesigner:class>\n"); bounds = false; - sb.append("<celldesigner:point x=\"10\" y=\"" + alias.getY() + "\"/>"); - } else if (alias.getClass().getName().equals(LeftSquareCompartment.class.getName())) { + sb.append("<celldesigner:point x=\"10\" y=\"" + compartment.getY() + "\"/>"); + } else if (compartment.getClass().getName().equals(LeftSquareCompartment.class.getName())) { sb.append("<celldesigner:class>SQUARE_CLOSEUP_EAST</celldesigner:class>\n"); bounds = false; - sb.append("<celldesigner:point x=\"" + alias.getWidth() + "\" y=\"10\"/>"); - } else if (alias.getClass().getName().equals(RightSquareCompartment.class.getName())) { + sb.append("<celldesigner:point x=\"" + compartment.getWidth() + "\" y=\"10\"/>"); + } else if (compartment.getClass().getName().equals(RightSquareCompartment.class.getName())) { sb.append("<celldesigner:class>SQUARE_CLOSEUP_WEST</celldesigner:class>\n"); bounds = false; - sb.append("<celldesigner:point x=\"" + alias.getX() + "\" y=\"10\"/>"); + sb.append("<celldesigner:point x=\"" + compartment.getX() + "\" y=\"10\"/>"); } else { - throw new NotImplementedException("Unknown compartment class: " + alias.getClass()); + throw new NotImplementedException("Unknown compartment class: " + compartment.getClass()); } if (bounds) { sb.append("<celldesigner:bounds "); - sb.append("x=\"" + alias.getX() + "\" "); - sb.append("y=\"" + alias.getY() + "\" "); - sb.append("w=\"" + alias.getWidth() + "\" "); - sb.append("h=\"" + alias.getHeight() + "\"/>\n"); + sb.append("x=\"" + compartment.getX() + "\" "); + sb.append("y=\"" + compartment.getY() + "\" "); + sb.append("w=\"" + compartment.getWidth() + "\" "); + sb.append("h=\"" + compartment.getHeight() + "\"/>\n"); } sb.append("<celldesigner:namePoint "); - sb.append("x=\"" + alias.getNamePoint().getX() + "\" "); - sb.append("y=\"" + alias.getNamePoint().getY() + "\"/>\n"); + sb.append("x=\"" + compartment.getNamePoint().getX() + "\" "); + sb.append("y=\"" + compartment.getNamePoint().getY() + "\"/>\n"); sb.append("<celldesigner:doubleLine "); - sb.append("thickness=\"" + alias.getThickness() + "\" "); - sb.append("outerWidth=\"" + alias.getOuterWidth() + "\" "); - sb.append("innerWidth=\"" + alias.getInnerWidth() + "\"/>\n"); + sb.append("thickness=\"" + compartment.getThickness() + "\" "); + sb.append("outerWidth=\"" + compartment.getOuterWidth() + "\" "); + sb.append("innerWidth=\"" + compartment.getInnerWidth() + "\"/>\n"); sb.append("<celldesigner:paint "); - sb.append("color=\"" + colorToString(alias.getColor()) + "\" scheme=\"Color\"/>\n"); + sb.append("color=\"" + colorToString(compartment.getColor()) + "\" scheme=\"Color\"/>\n"); sb.append("</celldesigner:compartmentAlias>\n");