Class 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 Detail

      • tree

        protected de.unirostock.sems.xmlutils.ds.TreeDocument tree
        The tree.
    • 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 exception
        IOException - 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 exception
        IOException - 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
      • 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 by getReactionsGraphML()
        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 by getReactionsDotGraph()
        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 by getReactionsJsonGraph()
        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
      • getHierarchyJsonGraph

        public abstract String getHierarchyJsonGraph()
                                              throws Exception
        Returns the component's hierarchy graph encoded in JSON. Might return null if not available.
        Returns:
        the hierarchy graph or null if not available
        Throws:
        Exception - the exception