Commit 01cc4707 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

unused code removed

parent 0709752f
......@@ -531,38 +531,6 @@ public class ModelToGPML {
return dataNodes.toString();
}
String speciesToLabel(Species species) throws ConverterException {
StringBuilder result = new StringBuilder();
result.append(
" <Label TextLabel=\"" + species.getName() + "\" GraphId=\"" + species.getElementId() + "\"");
if (species.getComplex() != null) {
result.append(" GroupRef=\"" + species.getComplex().getElementId() + "\"");
}
result.append(">\n");
result.append(" <Comment>" + StringEscapeUtils.escapeXml11(species.getNotes().trim()) + "</Comment>\n");
result.append(biopaxParser.toReferenceXml(species.getMiriamData()));
Rectangle2D rec = species.getBorder();
result.append(
" <Graphics CenterX=\"" + rec.getCenterX() + "\" " +
"CenterY=\"" + rec.getCenterY() + "\" " +
"Width=\"" + rec.getWidth() + "\" " +
"Height=\"" + rec.getHeight() + "\" " +
"ZOrder=\"" + species.getZ() + "\" " +
"FontSize=\"" + species.getFontSize().intValue() + "\" " +
"Valign=\"Middle\" " +
"Color=\"" + colorToString(species.getFontColor()) + "\" " +
"FillColor=\"" + colorToString(species.getFillColor()) + "\"/>\n");
if (species.getMiriamData().size() > 0) {
logger.warn(new LogMarker(ProjectLogEntryType.EXPORT_ISSUE, species), "Annotations cannot be exported to gpml");
}
result.append(" </Label>\n");
return result.toString();
}
String speciesToShape(Species species) throws ConverterException {
String shape = ShapeMapping.getShape(species.getClass()).getStringRepresentation();
StringBuilder result = new StringBuilder();
......
......@@ -257,16 +257,6 @@ public class ModelToGPMLTest extends WikipathwaysTestFunctions {
assertNotNull(content);
}
@Test
public void testSpeciesToLabel() throws Exception {
ModelToGPML parser = new ModelToGPML("xyz");
Unknown unknown = createUnknown();
unknown.addMiriamData(new MiriamData(MiriamType.HGNC_SYMBOL, "SNCA"));
String xml = parser.speciesToLabel(unknown);
assertFalse("Label tag cannot contain Xref child", xml.contains("<Xref"));
assertEquals(1, getWarnings().size());
}
@Test
public void testDegraded() throws Exception {
Model model = new ModelFullIndexed(null);
......
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