public class SBGN2Escher extends Object
Modifier and Type | Field and Description |
---|---|
protected HashMap<String,String> |
arc2GlyphMap
Arc s' ids with their respective process (Glyph ) nodes ids. |
static ResourceBundle |
bundle
Default values.
|
protected org.sbgn.bindings.Sbgn |
document
Input SBGN-ML document.
|
protected EscherMap |
escherMap
Output Escher map.
|
protected HashMap<String,String> |
glyphId2LabelMap
Glyph ids with their respective label. |
protected Set<String> |
glyphIds
List of
Glyph ids. |
static ResourceBundle |
messages
Localization support.
|
protected Set<String> |
metaboliteIds
List of
Metabolite ids. |
protected HashMap<String,String> |
port2GlyphMap
Port ids with their respective Glyph ids. |
protected Set<String> |
processIds
List of process (
Glyph ) ids. |
protected long |
reactionId
Generated reaction ids.
|
Constructor and Description |
---|
SBGN2Escher()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addCanvasInfo(org.sbgn.bindings.Bbox bbox)
Add canvas info to the internal
escherMap field. |
void |
addMetaInfo()
Add meta info about the map to the internal
escherMap field. |
EscherMap |
convert(org.sbgn.bindings.Sbgn document)
Converts
Sbgn document to EscherMap by iteratively creating nodes,
reactions, etc. |
Node |
createMidMarker(org.sbgn.bindings.Glyph glyph)
Create an Escher
Node (mid-marker) from process Glyph . |
Node |
createMultiMarker(org.sbgn.bindings.Arc.Next next)
Create an Escher
Node (multi-marker) from Arc.Next . |
Node |
createNode(org.sbgn.bindings.Glyph glyph)
Create an Escher
Node (metabolite) from EPN Glyph . |
EscherReaction |
createReaction(org.sbgn.bindings.Glyph glyph)
Create an
EscherReaction from an SBGN-ML Glyph . |
List<Segment> |
createSegments(org.sbgn.bindings.Arc arc)
Create a list of
Segment s from an SBGN-ML Arc . |
TextLabel |
createTextLabel(org.sbgn.bindings.Glyph glyph)
Create a
TextLabel from an SBGN-ML Glyph . |
double |
extractCoefficient(Object object) |
String |
getGlyphIdFromPortId(String id)
Get
Glyph id from a Port or Glyph id. |
String |
getIdFromSourceOrTarget(Object sOrT)
Extract id from either a
Glyph or a Port . |
protected void |
preProcessSbgn()
Processes the input
Sbgn document and populates internal helper fields. |
public static final ResourceBundle messages
public static final ResourceBundle bundle
protected EscherMap escherMap
protected org.sbgn.bindings.Sbgn document
protected long reactionId
protected HashMap<String,String> port2GlyphMap
Port
ids with their respective Glyph
ids.protected HashMap<String,String> arc2GlyphMap
Arc
s' ids with their respective process (Glyph
) nodes ids.protected Set<String> metaboliteIds
Metabolite
ids.public void addCanvasInfo(org.sbgn.bindings.Bbox bbox)
escherMap
field.bbox
- BBox containing canvas info.public void addMetaInfo()
escherMap
field.public Node createNode(org.sbgn.bindings.Glyph glyph)
Node
(metabolite) from EPN Glyph
.glyph
- The glyph
.node
.public Node createMidMarker(org.sbgn.bindings.Glyph glyph)
Node
(mid-marker) from process Glyph
.glyph
- The glyph
.node
.public Node createMultiMarker(org.sbgn.bindings.Arc.Next next)
Node
(multi-marker) from Arc.Next
.next
- The next
element.node
.public EscherReaction createReaction(org.sbgn.bindings.Glyph glyph)
EscherReaction
from an SBGN-ML Glyph
. The glyph is used to create
the mid-marker.glyph
- The glyph
.reaction
.public double extractCoefficient(Object object)
object
- public TextLabel createTextLabel(org.sbgn.bindings.Glyph glyph)
TextLabel
from an SBGN-ML Glyph
.glyph
- The glyph
.text label
.public List<Segment> createSegments(org.sbgn.bindings.Arc arc)
Segment
s from an SBGN-ML Arc
.arc
- The arc
.segments
.public String getIdFromSourceOrTarget(Object sOrT)
Glyph
or a Port
. Since the source/target of an
Arc
is a plain Object
and it needs to be cast into a Glyph
or
Port
, this methods checks its type and returns the id.sOrT
- The source/target object.public String getGlyphIdFromPortId(String id)
Glyph
id from a Port
or Glyph
id.id
- The port
or glyph
id.glyph
id.public EscherMap convert(org.sbgn.bindings.Sbgn document)
Sbgn
document to EscherMap
by iteratively creating nodes,
reactions, etc.document
- The SBGN
document to convert.escher map
.protected void preProcessSbgn()
Sbgn
document and populates internal helper fields.Copyright © 2015–2019 University of Tübingen. All rights reserved.