public class SBML2Escher extends Object
Modifier and Type | Field and Description |
---|---|
static ResourceBundle |
bundle
Default values,
|
protected org.sbml.jsbml.SBMLDocument |
document
SBML document to extract escher maps from.
|
protected List<EscherMap> |
escherMaps
List of escher maps converted from the layouts exported from the SBML document.
|
protected List<org.sbml.jsbml.ext.layout.Layout> |
layouts
List of layouts exported from the SBML document.
|
static ResourceBundle |
messages
Localization support.
|
protected double |
primary_node_height
The height of primary nodes; in case bounding boxes have no dimensions
|
protected double |
primary_node_width
The width of primary nodes; in case bounding boxes have no dimensions
|
Constructor and Description |
---|
SBML2Escher()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected Canvas |
addCanvasInfo(org.sbml.jsbml.ext.layout.Layout layout)
Create a
Canvas instance from an SBML Layout . |
List<EscherMap> |
convert(org.sbml.jsbml.SBMLDocument doc)
Converts an
SBMLDocument to a list of EscherMap s by iteratively creating nodes,
reactions, etc. |
protected Metabolite |
createMetabolite(org.sbml.jsbml.SpeciesReference speciesReference)
Creates a
Metabolite from a SpeciesReference . |
protected Node |
createMidMarker(org.sbml.jsbml.ext.layout.ReactionGlyph reactionGlyph)
Creates a
Node (mid-marker) from a ReactionGlyph . |
protected List<Node> |
createMultiMarkers(org.sbml.jsbml.ext.layout.SpeciesReferenceGlyph sRG)
Creates a list of
Node s(multi-markers) from a SpeciesReferenceGlyph . |
protected Node |
createNode(org.sbml.jsbml.ext.layout.SpeciesGlyph speciesGlyph)
Creates a
Node (metabolite) from a SpeciesGlyph . |
protected EscherReaction |
createReaction(org.sbml.jsbml.ext.layout.ReactionGlyph reactionGlyph)
Creates an
EscherReaction from a ReactionGlyph . |
protected List<Segment> |
createSegments(org.sbml.jsbml.ext.layout.SpeciesReferenceGlyph sRG,
org.sbml.jsbml.ext.layout.ReactionGlyph rG)
Creates a list of
Segment s from a SpeciesReferenceGlyph . |
protected TextLabel |
createTextLabel(org.sbml.jsbml.ext.layout.TextGlyph textGlyph)
Create a
TextLabel from a TextGlyph . |
org.sbml.jsbml.ext.layout.SpeciesReferenceRole |
determineSpeciesReferenceRole(org.sbml.jsbml.ext.layout.SpeciesReferenceGlyph sRG,
org.sbml.jsbml.ext.layout.ReactionGlyph rg)
Finds out whether a
SpeciesReferenceGlyph is a product, substrate or modifier. |
protected double |
midPoint(double d1,
double d2)
Calculates mid-point of two decimal values.
|
void |
setNodeHeight(double height) |
void |
setNodeWidth(double width) |
public static final ResourceBundle bundle
public static final ResourceBundle messages
protected List<EscherMap> escherMaps
protected org.sbml.jsbml.SBMLDocument document
protected List<org.sbml.jsbml.ext.layout.Layout> layouts
protected double primary_node_height
protected double primary_node_width
public List<EscherMap> convert(org.sbml.jsbml.SBMLDocument doc)
SBMLDocument
to a list of EscherMap
s by iteratively creating nodes,
reactions, etc.document
- The SBML
document to convert.protected Canvas addCanvasInfo(org.sbml.jsbml.ext.layout.Layout layout)
Canvas
instance from an SBML Layout
.layout
- The SBML layout
.canvas
instance.protected TextLabel createTextLabel(org.sbml.jsbml.ext.layout.TextGlyph textGlyph)
TextLabel
from a TextGlyph
.textGlyph
- The text glyph
.text label.
protected Node createNode(org.sbml.jsbml.ext.layout.SpeciesGlyph speciesGlyph)
Node
(metabolite) from a SpeciesGlyph
.speciesGlyph
- The species glyph
.node
of type "metabolite"protected Node createMidMarker(org.sbml.jsbml.ext.layout.ReactionGlyph reactionGlyph)
Node
(mid-marker) from a ReactionGlyph
.reactionGlyph
- The reaction glyph
.node
(mid-marker).protected List<Node> createMultiMarkers(org.sbml.jsbml.ext.layout.SpeciesReferenceGlyph sRG)
Node
s(multi-markers) from a SpeciesReferenceGlyph
.
A multi-marker is created for every joining of two curve segments in a curve.sRG
- The species reference glyph
.nodes
(multi-markers).public org.sbml.jsbml.ext.layout.SpeciesReferenceRole determineSpeciesReferenceRole(org.sbml.jsbml.ext.layout.SpeciesReferenceGlyph sRG, org.sbml.jsbml.ext.layout.ReactionGlyph rg)
SpeciesReferenceGlyph
is a product, substrate or modifier.sRG
- The SpeciesReferenceGlyph
rg
- The ReactionGlyph
the sRG
is linked torole
- A SpeciesReferenceRole
(product, substrate or modifier)protected EscherReaction createReaction(org.sbml.jsbml.ext.layout.ReactionGlyph reactionGlyph)
EscherReaction
from a ReactionGlyph
.reactionGlyph
- The reaction glyph
.escher reaction
.protected List<Segment> createSegments(org.sbml.jsbml.ext.layout.SpeciesReferenceGlyph sRG, org.sbml.jsbml.ext.layout.ReactionGlyph rG)
Segment
s from a SpeciesReferenceGlyph
.
A segment is created for every CurveSegment
inside a Curve
.sRG
- The species reference glyph
.rG
- The linked reaction glyph
.segments
.protected Metabolite createMetabolite(org.sbml.jsbml.SpeciesReference speciesReference)
Metabolite
from a SpeciesReference
.speciesReference
- The species reference
.metabolite
.protected double midPoint(double d1, double d2)
d1
- First value.d2
- Second value.public void setNodeHeight(double height)
public void setNodeWidth(double width)
Copyright © 2015–2019 University of Tübingen. All rights reserved.