Class GraphTranslatorSbgnJson
- java.lang.Object
-
- de.unirostock.sems.bives.ds.graph.GraphTranslator
-
- de.unirostock.sems.bives.ds.graph.GraphTranslatorSbgnJson
-
public class GraphTranslatorSbgnJson extends GraphTranslator
The class GraphTranslatorSbgnJson translates the internal graph structure into a JSON which is SBGN PD sufficient. The needed form looks like: {"nodes": [ {"bivesClass":"...","compartment":"...","id":"...","label":"...","class":"..."}, ... ], "links": [ {"bivesClass":"...","source":"...","class":"...","target":"..."}, ... ] } The elements order is not important- Author:
- Tom
-
-
Constructor Summary
Constructors Constructor Description GraphTranslatorSbgnJson()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.json.simple.JSONObject
getJsonGraph()
Gets the JSON object.String
translate(HierarchyNetwork hn)
Translate a hierarchy network.String
translate(ReactionNetwork rn)
Translate a reaction network.
-
-
-
Method Detail
-
getJsonGraph
public org.json.simple.JSONObject getJsonGraph()
Gets the JSON object.- Returns:
- the JSON object representing the graph
-
translate
public String translate(ReactionNetwork rn)
Description copied from class:GraphTranslator
Translate a reaction network. Might return null if not available.- Specified by:
translate
in classGraphTranslator
- Parameters:
rn
- the internal reaction network- Returns:
- the graph format
-
translate
public String translate(HierarchyNetwork hn)
Description copied from class:GraphTranslator
Translate a hierarchy network. Might return null if not available.- Specified by:
translate
in classGraphTranslator
- Parameters:
hn
- the internal hierarchy network- Returns:
- the graph format
-
-