Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
core
Commits
b7f30b21
Commit
b7f30b21
authored
May 03, 2019
by
Piotr Gawron
Browse files
celldesigner provides z-index when parsing
parent
e1f924aa
Changes
2
Hide whitespace changes
Inline
Side-by-side
converter-CellDesigner/src/main/java/lcsb/mapviewer/converter/model/celldesigner/CellDesignerXmlParser.java
View file @
b7f30b21
...
...
@@ -22,6 +22,7 @@ import lcsb.mapviewer.common.exception.InvalidXmlSchemaException;
import
lcsb.mapviewer.converter.Converter
;
import
lcsb.mapviewer.converter.ConverterParams
;
import
lcsb.mapviewer.converter.InvalidInputDataExecption
;
import
lcsb.mapviewer.converter.ZIndexPopulator
;
import
lcsb.mapviewer.converter.annotation.XmlAnnotationParser
;
import
lcsb.mapviewer.converter.model.celldesigner.alias.AliasCollectionXmlParser
;
import
lcsb.mapviewer.converter.model.celldesigner.annotation.RestAnnotationParser
;
...
...
@@ -236,6 +237,7 @@ public class CellDesignerXmlParser extends Converter {
model
.
setWidth
(
width
);
model
.
setHeight
(
height
);
}
new
ZIndexPopulator
().
populateZIndex
(
model
);
}
catch
(
InvalidXmlSchemaException
e
)
{
throw
new
InvalidInputDataExecption
(
e
);
}
catch
(
CellDesignerParserException
e
)
{
...
...
converter-CellDesigner/src/test/java/lcsb/mapviewer/converter/model/celldesigner/CellDesignerXmlParserTest.java
View file @
b7f30b21
...
...
@@ -36,6 +36,7 @@ import lcsb.mapviewer.converter.ConverterParams;
import
lcsb.mapviewer.converter.InvalidInputDataExecption
;
import
lcsb.mapviewer.converter.model.celldesigner.annotation.RestAnnotationParser
;
import
lcsb.mapviewer.model.graphics.PolylineData
;
import
lcsb.mapviewer.model.map.BioEntity
;
import
lcsb.mapviewer.model.map.compartment.Compartment
;
import
lcsb.mapviewer.model.map.layout.graphics.Layer
;
import
lcsb.mapviewer.model.map.layout.graphics.LayerOval
;
...
...
@@ -82,6 +83,20 @@ public class CellDesignerXmlParserTest extends CellDesignerTestFunctions {
}
}
@Test
public
void
testZIndexAvailableForBioEntities
()
throws
Exception
{
try
{
CellDesignerXmlParser
parser
=
new
CellDesignerXmlParser
();
Model
model
=
parser
.
createModel
(
new
ConverterParams
().
filename
(
"testFiles/sample.xml"
));
for
(
BioEntity
bioEntity
:
model
.
getBioEntities
())
{
assertNotNull
(
bioEntity
.
getZ
());
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
e
;
}
}
@Test
public
void
testOpenFromFile
()
throws
Exception
{
try
{
...
...
@@ -1068,7 +1083,7 @@ public class CellDesignerXmlParserTest extends CellDesignerTestFunctions {
InputStream
is
=
new
ByteArrayInputStream
(
xmlString
.
getBytes
(
"UTF-8"
));
Model
model2
=
parser
.
createModel
(
new
ConverterParams
().
inputStream
(
is
));
assertEquals
(
0
,
modelComparator
.
compare
(
model
,
model2
));
}
catch
(
Exception
e
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment