fern.network
Class NetworkLoader

java.lang.Object
  extended by fern.network.NetworkLoader

public class NetworkLoader
extends Object


Constructor Summary
NetworkLoader()
           
 
Method Summary
static void addTypesToFileChooser(JFileChooser dialog)
          Adds available types of networks to a JFileChooser.
static String[][] getAvailableTypes()
          Gets types of networks that are readable by FERN.
static Network readNetwork(File file)
          Tries to read the given file and returns the network in it (if there is one)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetworkLoader

public NetworkLoader()
Method Detail

getAvailableTypes

public static String[][] getAvailableTypes()
Gets types of networks that are readable by FERN. They are returned as String[N][2] containing for N types a description and the file pattern.

Returns:
readable file types

readNetwork

public static Network readNetwork(File file)
                           throws IOException,
                                  org.jdom.JDOMException,
                                  FeatureNotSupportedException,
                                  ClassNotFoundException
Tries to read the given file and returns the network in it (if there is one)

Parameters:
file - network file
Returns:
network object
Throws:
IOException - file could not be found
org.jdom.JDOMException - file could not be parsed correctly
FeatureNotSupportedException - file contains a not supported sbml feature
ClassNotFoundException - the class SBMLNetwork could not be found

addTypesToFileChooser

public static void addTypesToFileChooser(JFileChooser dialog)
Adds available types of networks to a JFileChooser.

Parameters:
dialog - the JFileChooser