Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Devrim Gunyel
core
Commits
79e345e9
Commit
79e345e9
authored
Nov 11, 2019
by
Piotr Gawron
Browse files
import of structural state check if data is not null
parent
ef19828d
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
79e345e9
...
...
@@ -11,6 +11,8 @@ minerva (15.0.0~alpha.1) stable; urgency=medium
exporter
violates
SBGN
specification
(#
707
)
*
Bug
fix
:
unknown
catalysis
boolean
gate
modifiers
in
CellDesigner
are
visualized
with
proper
line
type
across
all
included
modifiers
(#
957
)
*
Bug
fix
:
dimension
of
the
modifications
is
the
same
as
in
minerva
when
exporting
to
SBGNML
-
PD
(#
554
)
minerva
(
15.0.0
~
alpha
.0
)
stable
;
urgency
=
medium
*
Improvement
:
logs
provided
for
validation
data
model
are
structurized
(#
325
)
...
...
converter-SBGNML/src/main/java/lcsb/mapviewer/converter/model/sbgnml/SbgnmlXmlParser.java
View file @
79e345e9
...
...
@@ -4,15 +4,14 @@ import java.awt.Color;
import
java.awt.geom.Line2D
;
import
java.awt.geom.Point2D
;
import
java.io.File
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.*
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.sbgn.*
;
import
org.sbgn.bindings.*
;
import
org.sbgn.bindings.Arc.*
;
import
org.sbgn.bindings.Map
;
import
lcsb.mapviewer.common.Configuration
;
import
lcsb.mapviewer.common.comparator.DoubleComparator
;
...
...
@@ -80,6 +79,8 @@ public class SbgnmlXmlParser {
*/
private
List
<
Arc
>
logicArcs
=
new
ArrayList
<
Arc
>();
Model
model
;
/**
* Method used to create a model from SBGN-ML file.
*
...
...
@@ -94,7 +95,7 @@ public class SbgnmlXmlParser {
*/
public
Model
createModel
(
String
filename
,
File
inputSbgnmlFile
)
throws
InvalidInputDataExecption
{
Model
model
=
new
ModelFullIndexed
(
null
);
model
=
new
ModelFullIndexed
(
null
);
model
.
setIdModel
(
filename
);
Sbgn
sbgnData
;
...
...
@@ -598,7 +599,7 @@ public class SbgnmlXmlParser {
logger
.
warn
(
"Only macromolecule elements can have state variables."
);
}
}
else
{
StructuralState
state
=
stateVariableTo
StructuralState
(
child
);
StructuralState
state
=
create
StructuralState
(
child
);
if
(
newSpecies
instanceof
Protein
)
{
((
Protein
)
newSpecies
).
setStructuralState
(
state
);
}
else
{
...
...
@@ -625,21 +626,12 @@ public class SbgnmlXmlParser {
}
private
StructuralState
stateVariableToStructuralState
(
Glyph
glyph
)
{
StructuralState
state
=
new
StructuralState
();
state
.
setFontSize
(
10
);
state
.
setPosition
(
new
Point2D
.
Double
(
glyph
.
getBbox
().
getX
(),
glyph
.
getBbox
().
getY
()));
state
.
setHeight
((
double
)
glyph
.
getBbox
().
getH
());
state
.
setWidth
((
double
)
glyph
.
getBbox
().
getW
());
if
(
glyph
.
getState
()
!=
null
)
{
state
.
setValue
(
glyph
.
getState
().
getValue
());
}
return
state
;
}
private
StructuralState
createStructuralState
(
Glyph
glyph
)
{
if
(
glyph
.
getState
()
==
null
||
glyph
.
getState
().
getValue
()
==
null
)
{
logger
.
warn
(
new
LogMarker
(
ProjectLogEntryType
.
PARSING_ISSUE
,
glyph
.
getId
(),
"state"
,
model
.
getName
()),
"Invalid structural state"
);
return
null
;
}
StructuralState
structuralState
=
new
StructuralState
();
double
height
=
new
Double
(
glyph
.
getBbox
().
getH
());
...
...
converter-SBGNML/testFiles/sbgnmlCellDesignerInompatible/inflamation_cd.sbgn
0 → 100644
View file @
79e345e9
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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