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
2466b0b5
Commit
2466b0b5
authored
6 years ago
by
Sascha Herzinger
Browse files
Options
Downloads
Patches
Plain Diff
refactored SbmlParser to use the new Converter class
parent
bb27d5ea
No related branches found
No related tags found
1 merge request
!644
Refactored IConverter and XmlParser across project
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
converter-sbml/src/main/java/lcsb/mapviewer/converter/model/sbml/SbmlParser.java
+3
-22
3 additions, 22 deletions
.../java/lcsb/mapviewer/converter/model/sbml/SbmlParser.java
with
3 additions
and
22 deletions
converter-sbml/src/main/java/lcsb/mapviewer/converter/model/sbml/SbmlParser.java
+
3
−
22
View file @
2466b0b5
...
...
@@ -19,14 +19,13 @@ import org.sbml.jsbml.ext.SBasePlugin;
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.render.LocalStyle
;
import
lcsb.mapviewer.commands.CommandExecutionException
;
import
lcsb.mapviewer.commands.layout.ApplySimpleLayoutModelCommand
;
import
lcsb.mapviewer.common.MimeType
;
import
lcsb.mapviewer.converter.ConverterException
;
import
lcsb.mapviewer.converter.ConverterParams
;
import
lcsb.mapviewer.converter.
I
Converter
;
import
lcsb.mapviewer.converter.Converter
;
import
lcsb.mapviewer.converter.InvalidInputDataExecption
;
import
lcsb.mapviewer.converter.model.sbml.compartment.SbmlCompartmentParser
;
import
lcsb.mapviewer.converter.model.sbml.reaction.SbmlReactionParser
;
...
...
@@ -49,7 +48,7 @@ import lcsb.mapviewer.model.map.species.Species;
import
lcsb.mapviewer.model.map.species.field.ModificationResidue
;
import
lcsb.mapviewer.model.map.species.field.SpeciesWithModificationResidue
;
public
class
SbmlParser
implem
en
t
s
I
Converter
{
public
class
SbmlParser
ext
en
d
s
Converter
{
/**
* Default class logger.
...
...
@@ -275,13 +274,7 @@ public class SbmlParser implements IConverter {
}
@Override
public
InputStream
exportModelToInputStream
(
Model
model
)
throws
ConverterException
,
InconsistentModelException
{
String
exportedString
=
toXml
(
model
);
InputStream
inputStream
=
new
ByteArrayInputStream
(
exportedString
.
getBytes
());
return
inputStream
;
}
private
String
toXml
(
Model
model
)
throws
ConverterException
{
public
String
model2Xml
(
Model
model
)
throws
ConverterException
{
try
{
SbmlExporter
sbmlExporter
=
new
SbmlExporter
();
sbmlExporter
.
setProvideDefaults
(
provideDefaults
);
...
...
@@ -291,18 +284,6 @@ public class SbmlParser implements IConverter {
}
}
@Override
public
File
exportModelToFile
(
Model
model
,
String
filePath
)
throws
ConverterException
,
InconsistentModelException
,
IOException
{
File
file
=
new
File
(
filePath
);
String
exportedString
=
toXml
(
model
);
FileWriter
fileWriter
=
new
FileWriter
(
file
);
fileWriter
.
write
(
exportedString
);
fileWriter
.
flush
();
fileWriter
.
close
();
return
file
;
}
@Override
public
String
getCommonName
()
{
return
"SBML"
;
...
...
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