Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
minerva
core
Commits
d99ec5db
Commit
d99ec5db
authored
6 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
export types contains structural state feature
parent
179d6fc5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!630
WIP: Resolve "The privileges of a new user are not saved in some cases"
,
!560
Resolve "add support for modifications and states in sbml export/import"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
converter-sbml/src/main/java/lcsb/mapviewer/converter/model/sbml/SbmlExporter.java
+19
-2
19 additions, 2 deletions
...ava/lcsb/mapviewer/converter/model/sbml/SbmlExporter.java
with
19 additions
and
2 deletions
converter-sbml/src/main/java/lcsb/mapviewer/converter/model/sbml/SbmlExporter.java
+
19
−
2
View file @
d99ec5db
...
...
@@ -18,6 +18,8 @@ import org.sbml.jsbml.ext.layout.Layout;
import
org.sbml.jsbml.ext.layout.LayoutModelPlugin
;
import
org.sbml.jsbml.ext.multi.MultiModelPlugin
;
import
org.sbml.jsbml.ext.multi.MultiSpeciesType
;
import
org.sbml.jsbml.ext.multi.PossibleSpeciesFeatureValue
;
import
org.sbml.jsbml.ext.multi.SpeciesFeatureType
;
import
org.sbml.jsbml.ext.render.GlobalRenderInformation
;
import
org.sbml.jsbml.ext.render.RenderLayoutPlugin
;
...
...
@@ -25,10 +27,13 @@ import lcsb.mapviewer.common.Configuration;
import
lcsb.mapviewer.common.exception.InvalidStateException
;
import
lcsb.mapviewer.converter.model.sbml.compartment.SbmlCompartmentExporter
;
import
lcsb.mapviewer.converter.model.sbml.reaction.SbmlReactionExporter
;
import
lcsb.mapviewer.converter.model.sbml.species.SBOTermSpeciesType
;
import
lcsb.mapviewer.converter.model.sbml.species.SbmlSpeciesExporter
;
import
lcsb.mapviewer.converter.model.sbml.units.SbmlUnitExporter
;
import
lcsb.mapviewer.model.map.InconsistentModelException
;
import
lcsb.mapviewer.model.map.species.Complex
;
import
lcsb.mapviewer.model.map.species.Element
;
import
lcsb.mapviewer.model.map.species.Protein
;
import
lcsb.mapviewer.model.map.species.Species
;
import
lcsb.mapviewer.modelutils.map.ElementUtils
;
...
...
@@ -84,7 +89,7 @@ public class SbmlExporter {
}
if
(
usedExtensions
.
contains
(
SbmlExtension
.
MULTI
))
{
createSbmlMultiPlugin
(
model
,
result
);
createSbmlMultiPlugin
(
result
);
}
SbmlCompartmentExporter
compartmentExporter
=
new
SbmlCompartmentExporter
(
layout
,
model
,
usedExtensions
);
...
...
@@ -140,7 +145,8 @@ public class SbmlExporter {
return
layout
;
}
public
MultiModelPlugin
createSbmlMultiPlugin
(
lcsb
.
mapviewer
.
model
.
map
.
model
.
Model
model
,
Model
result
)
{
@SuppressWarnings
(
"unchecked"
)
protected
MultiModelPlugin
createSbmlMultiPlugin
(
Model
result
)
{
MultiModelPlugin
multiPlugin
=
new
MultiModelPlugin
(
result
);
result
.
addExtension
(
"multi"
,
multiPlugin
);
for
(
Class
<?
extends
Element
>
clazz
:
new
ElementUtils
().
getAvailableElementSubclasses
())
{
...
...
@@ -148,7 +154,18 @@ public class SbmlExporter {
MultiSpeciesType
speciesType
=
new
MultiSpeciesType
();
speciesType
.
setName
(
clazz
.
getSimpleName
());
speciesType
.
setId
(
"minerva_species_type_"
+
clazz
.
getSimpleName
());
if
(
Protein
.
class
.
isAssignableFrom
(
clazz
)
||
Complex
.
class
.
isAssignableFrom
(
clazz
))
{
SpeciesFeatureType
feature
=
new
SpeciesFeatureType
();
feature
.
setName
(
"Structural state"
);
feature
.
setId
(
"minerva_structural_state_"
+
clazz
.
getSimpleName
());
PossibleSpeciesFeatureValue
featureEmptyValue
=
new
PossibleSpeciesFeatureValue
();
featureEmptyValue
.
setId
(
"minerva_structural_state_"
+
clazz
.
getSimpleName
()
+
"_empty"
);
featureEmptyValue
.
setName
(
""
);
feature
.
getListOfPossibleSpeciesFeatureValues
().
add
(
featureEmptyValue
);
speciesType
.
getListOfSpeciesFeatureTypes
().
add
(
feature
);
}
multiPlugin
.
getListOfSpeciesTypes
().
add
(
speciesType
);
speciesType
.
setSBOTerm
(
SBOTermSpeciesType
.
getTermByType
((
Class
<?
extends
Species
>)
clazz
));
}
}
return
multiPlugin
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment