Package de.unirostock.sems.bives.api
Class Single
- java.lang.Object
-
- de.unirostock.sems.bives.api.Single
-
public abstract class Single extends Object
The Class Single, providing an API to extract some information about single XML files. All methods might return null if not available in a certain case.- Author:
- Martin Scharm
-
-
Field Summary
Fields Modifier and Type Field Description protected de.unirostock.sems.xmlutils.ds.TreeDocument
tree
The tree.
-
Constructor Summary
Constructors Constructor Description Single(de.unirostock.sems.xmlutils.ds.TreeDocument tree)
Instantiates a new single object.Single(File file)
Instantiates a new single object reading the document from a file.Single(String str)
Instantiates a new single object reading the document from a string.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description abstract String
flatten()
Flatten the document.String
getCRNDotGraph()
Deprecated.As of 1.3.3 replaced bygetReactionsDotGraph()
Object
getCRNGraph(GraphTranslator gt)
Deprecated.As of 1.3.3 replaced bygetReactionsGraph(de.unirostock.sems.bives.ds.graph.GraphTranslator)
String
getCRNGraphML()
Deprecated.As of 1.3.3 replaced bygetReactionsGraphML()
String
getCRNJsonGraph()
Deprecated.As of 1.3.3 replaced bygetReactionsJsonGraph()
abstract String
getHierarchyDotGraph()
Returns the component's hierarchy graph encoded in DOT language.abstract Object
getHierarchyGraph(GraphTranslator gt)
Returns the component's hierarchy graph providing an own graph translator.abstract String
getHierarchyGraphML()
Returns the component's hierarchy graph encoded in GraphML.abstract String
getHierarchyJsonGraph()
Returns the component's hierarchy graph encoded in JSON.abstract String
getReactionsDotGraph()
Returns the graph of the reaction network encoded in DOT language.abstract Object
getReactionsGraph(GraphTranslator gt)
Returns the graph of the reaction network providing an own graph translator.abstract String
getReactionsGraphML()
Returns the graph of the reaction network encoded in GraphML.abstract String
getReactionsJsonGraph()
Returns the graph of the reaction network encoded in JSON.
-
-
-
Constructor Detail
-
Single
public Single(File file) throws de.unirostock.sems.xmlutils.exception.XmlDocumentParseException, IOException, org.jdom2.JDOMException
Instantiates a new single object reading the document from a file.- Parameters:
file
- the file containing the document- Throws:
de.unirostock.sems.xmlutils.exception.XmlDocumentParseException
- the xml document parse exceptionIOException
- Signals that an I/O exception has occurred.org.jdom2.JDOMException
- the jDOM exception
-
Single
public Single(String str) throws de.unirostock.sems.xmlutils.exception.XmlDocumentParseException, IOException, org.jdom2.JDOMException
Instantiates a new single object reading the document from a string.- Parameters:
str
- the string containing the document- Throws:
de.unirostock.sems.xmlutils.exception.XmlDocumentParseException
- the xml document parse exceptionIOException
- Signals that an I/O exception has occurred.org.jdom2.JDOMException
- the jDOM exception
-
Single
public Single(de.unirostock.sems.xmlutils.ds.TreeDocument tree)
Instantiates a new single object.- Parameters:
tree
- the tree
-
-
Method Detail
-
flatten
public abstract String flatten() throws Exception
Flatten the document.- Returns:
- the flattened document
- Throws:
Exception
- the exception
-
getCRNGraph
@Deprecated public Object getCRNGraph(GraphTranslator gt) throws Exception
Deprecated.As of 1.3.3 replaced bygetReactionsGraph(de.unirostock.sems.bives.ds.graph.GraphTranslator)
Returns the graph of the chemical reaction network providing an own graph translator. Might return null if not available.- Parameters:
gt
- the graph translator- Returns:
- the chemical reaction network or null if not available
- Throws:
Exception
- the exception
-
getReactionsGraph
public abstract Object getReactionsGraph(GraphTranslator gt) throws Exception
Returns the graph of the reaction network providing an own graph translator. Might return null if not available.- Parameters:
gt
- the graph translator- Returns:
- the reaction network or null if not available
- Throws:
Exception
- the exception
-
getHierarchyGraph
public abstract Object getHierarchyGraph(GraphTranslator gt) throws Exception
Returns the component's hierarchy graph providing an own graph translator. Might return null if not available.- Parameters:
gt
- the graph translator- Returns:
- the hierarchy graph or null if not available
- Throws:
Exception
- the exception
-
getCRNGraphML
@Deprecated public String getCRNGraphML() throws Exception
Deprecated.As of 1.3.3 replaced bygetReactionsGraphML()
Returns the graph of the chemical reaction network encoded in GraphML. Might return null if not available.- Returns:
- the chemical reaction network or null if not available
- Throws:
Exception
- the exception
-
getReactionsGraphML
public abstract String getReactionsGraphML() throws Exception
Returns the graph of the reaction network encoded in GraphML. Might return null if not available.- Returns:
- the reaction network or null if not available
- Throws:
Exception
- the exception
-
getHierarchyGraphML
public abstract String getHierarchyGraphML() throws Exception
Returns the component's hierarchy graph encoded in GraphML. Might return null if not available.- Returns:
- the hierarchy graph or null if not available
- Throws:
Exception
- the exception
-
getCRNDotGraph
@Deprecated public String getCRNDotGraph() throws Exception
Deprecated.As of 1.3.3 replaced bygetReactionsDotGraph()
Returns the graph of the chemical reaction network encoded in DOT language. Might return null if not available.- Returns:
- the chemical reaction network or null if not available
- Throws:
Exception
- the exception
-
getReactionsDotGraph
public abstract String getReactionsDotGraph() throws Exception
Returns the graph of the reaction network encoded in DOT language. Might return null if not available.- Returns:
- the reaction network or null if not available
- Throws:
Exception
- the exception
-
getHierarchyDotGraph
public abstract String getHierarchyDotGraph() throws Exception
Returns the component's hierarchy graph encoded in DOT language. Might return null if not available.- Returns:
- the hierarchy graph or null if not available
- Throws:
Exception
- the exception
-
getCRNJsonGraph
@Deprecated public String getCRNJsonGraph() throws Exception
Deprecated.As of 1.3.3 replaced bygetReactionsJsonGraph()
Returns the graph of the chemical reaction network encoded in JSON. Might return null if not available.- Returns:
- the chemical reaction network or null if not available
- Throws:
Exception
- the exception
-
getReactionsJsonGraph
public abstract String getReactionsJsonGraph() throws Exception
Returns the graph of the reaction network encoded in JSON. Might return null if not available.- Returns:
- the reaction network or null if not available
- Throws:
Exception
- the exception
-
-