public class EscherConverter
extends de.zbit.Launcher
Constructor and Description |
---|
EscherConverter(java.lang.String... args)
Called by the main method.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
addCopyrightToSplashScreen() |
protected boolean |
addVersionNumberToSplashScreen() |
void |
batchProcess(java.io.File input,
java.io.File output,
de.zbit.util.prefs.SBProperties properties)
Convert files one by one by calling the
convert(File, File, SBProperties) recursively. |
void |
commandLineMode(de.zbit.AppConf appConf) |
static <T> Escher2Standard<T> |
configure(Escher2Standard<T> converter,
de.zbit.util.prefs.SBProperties properties)
This configures the generic
Escher2Standard and sets the common layout options. |
static <T> T |
convert(EscherMap map,
java.lang.Class<? extends T> format,
de.zbit.util.prefs.SBProperties properties)
Generic method which converts the given
EscherMap instance to the specified
generic parameter format , by calling the corresponding converter. |
static <T> T |
convert(java.io.File input,
java.lang.Class<? extends T> format,
de.zbit.util.prefs.SBProperties properties)
Converts given JSON
input to given output format . |
void |
convert(java.io.File input,
java.io.File output,
de.zbit.util.prefs.SBProperties properties)
Called by
batchProcess(File, File, SBProperties) for every file. |
static EscherMap |
convert(org.sbgn.bindings.Sbgn document,
de.zbit.util.prefs.SBProperties properties)
Calls SBGN-ML to Escher converter.
|
static java.util.List<EscherMap> |
convert(org.sbml.jsbml.SBMLDocument document,
de.zbit.util.prefs.SBProperties properties)
Calls SBML Layout Extension to Escher converter.
|
static boolean |
extractCobraModel(java.io.File file)
Extracts CoBRA from
SBMLDocument if it is FBC compliant. |
java.util.List<java.lang.Class<? extends de.zbit.util.prefs.KeyProvider>> |
getCmdLineOptions() |
java.lang.String |
getInstitute() |
java.util.List<java.lang.Class<? extends de.zbit.util.prefs.KeyProvider>> |
getInteractiveOptions() |
java.lang.String[] |
getLogPackages() |
java.lang.String |
getOrganization() |
java.lang.String |
getProvider() |
java.net.URL |
getURLlicenseFile() |
java.net.URL |
getURLOnlineUpdate() |
java.lang.String |
getVersionNumber() |
short |
getYearOfProgramRelease() |
short |
getYearWhenProjectWasStarted() |
java.awt.Window |
initGUI(de.zbit.AppConf appConf) |
static void |
main(java.lang.String[] args)
Starts the program.
|
static EscherMap |
parseEscherJson(java.io.File input)
Parses given JSON file into an
EscherMap instance using Jackson. |
boolean |
showsGUI() |
checkForUpdate, configureSystemProperties, connectToGaruda, equals, exit, exit, exit, getAppConf, getAppName, getCitation, getCommandLineArgs, getCopyrightYears, getId, getLogLevel, getPersistentOptions, getResources, guiMode, hashCode, isGarudaEnabled, isTerminateJVMwhenDone, launchCommandLineMode, parseCmdArgs, printCopyrightMessage, run, setTerminateJVMwhenDone, setUp, toString
public EscherConverter(java.lang.String... args)
args
- Command line options, if any.public static <T> Escher2Standard<T> configure(Escher2Standard<T> converter, de.zbit.util.prefs.SBProperties properties)
Escher2Standard
and sets the common layout options.converter
- The converter to configure.properties
- Command line options, to configure the converter with.public static <T> T convert(EscherMap map, java.lang.Class<? extends T> format, de.zbit.util.prefs.SBProperties properties)
EscherMap
instance to the specified
generic parameter format
, by calling the corresponding converter.map
- EscherMap
instance to convert.format
- Output format to convert to.properties
- Command line options, if any.format
type created from the escher map.public static EscherMap convert(org.sbgn.bindings.Sbgn document, de.zbit.util.prefs.SBProperties properties)
SBGN2Escher
.document
- SBGN-ML (Sbgn
) document to convert.properties
- Command line options, if any.EscherMap
instance.public static java.util.List<EscherMap> convert(org.sbml.jsbml.SBMLDocument document, de.zbit.util.prefs.SBProperties properties)
SBML2Escher
.document
- SBMLDocument
to convert.properties
- Command line options, if any.EscherMap
extracted from the SBML file, as there may be more than
one.public static <T> T convert(java.io.File input, java.lang.Class<? extends T> format, de.zbit.util.prefs.SBProperties properties) throws java.io.IOException, org.json.simple.parser.ParseException
input
to given output format
. Simply calls the
convert(EscherMap, Class, SBProperties)
with the parsed JSON.input
- JSON file which has an EscherMap
.format
- Output format to convert to.properties
- Command line options, if any.format
type created from the escher map.java.io.IOException
- Thrown if there are problems in reading the input
file.org.json.simple.parser.ParseException
- Thrown if the JSON in input
file is invalid.public static EscherMap parseEscherJson(java.io.File input) throws java.io.IOException
EscherMap
instance using Jackson.input
- The File
to parse.EscherMap
instance.java.io.IOException
- Thrown if there are problems in reading the input
file.public static void main(java.lang.String[] args)
args
- Command line options, if any.protected boolean addCopyrightToSplashScreen()
addCopyrightToSplashScreen
in class de.zbit.Launcher
protected boolean addVersionNumberToSplashScreen()
addVersionNumberToSplashScreen
in class de.zbit.Launcher
public void batchProcess(java.io.File input, java.io.File output, de.zbit.util.prefs.SBProperties properties) throws org.json.simple.parser.ParseException, javax.xml.bind.JAXBException, java.io.IOException, javax.xml.stream.XMLStreamException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, javax.xml.transform.TransformerException
convert(File, File, SBProperties)
recursively.
Only called once if single file.input
- Single file or input directory to convert from.output
- Single file or output directory to convert to.properties
- Command line options, if any.java.io.IOException
- Thrown if there are problems in reading the input
file(s).javax.xml.transform.TransformerException
- Thrown if there are problems in parsing XML file(s).javax.xml.parsers.ParserConfigurationException
- Thrown if there are problems in parsing XML file(s).org.xml.sax.SAXException
- Thrown if there are problems in parsing XML file(s).javax.xml.bind.JAXBException
- Thrown if there are problems in parsing XML file(s).javax.xml.stream.XMLStreamException
- Thrown if there are problems in parsing XML file(s).org.json.simple.parser.ParseException
- Thrown if there are problems in parsing JSON file(s).org.sbml.jsbml.SBMLException
- Thrown if there are problems in parsing XML file(s).public void commandLineMode(de.zbit.AppConf appConf)
commandLineMode
in class de.zbit.Launcher
public void convert(java.io.File input, java.io.File output, de.zbit.util.prefs.SBProperties properties) throws java.io.IOException, org.json.simple.parser.ParseException, javax.xml.stream.XMLStreamException, org.sbml.jsbml.SBMLException, javax.xml.bind.JAXBException, org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException, javax.xml.transform.TransformerException
batchProcess(File, File, SBProperties)
for every file. Calls the
appropriate overloads.input
- Input (single) File
.output
- Output (single) File
.properties
- Command line options, if any.java.io.IOException
- Thrown if there are problems in reading the input
file(s).javax.xml.stream.XMLStreamException
- Thrown if there are problems in parsing XML file(s).javax.xml.transform.TransformerException
- Thrown if there are problems in parsing XML file(s).javax.xml.parsers.ParserConfigurationException
- Thrown if there are problems in parsing XML file(s).org.xml.sax.SAXException
- Thrown if there are problems in parsing XML file(s).javax.xml.bind.JAXBException
- Thrown if there are problems in parsing XML file(s).org.json.simple.parser.ParseException
- Thrown if there are problems in parsing JSON file(s).org.sbml.jsbml.SBMLException
- Thrown if there are problems in parsing XML file(s).public static boolean extractCobraModel(java.io.File file) throws java.io.IOException, javax.xml.stream.XMLStreamException
SBMLDocument
if it is FBC compliant. cobrapy must be present for
this.file
- Input file.java.io.IOException
- Thrown if there are problems in reading the input
file(s).javax.xml.stream.XMLStreamException
- Thrown if there are problems in parsing XML file(s).public java.util.List<java.lang.Class<? extends de.zbit.util.prefs.KeyProvider>> getCmdLineOptions()
getCmdLineOptions
in class de.zbit.Launcher
public java.lang.String getInstitute()
getInstitute
in class de.zbit.Launcher
public java.util.List<java.lang.Class<? extends de.zbit.util.prefs.KeyProvider>> getInteractiveOptions()
getInteractiveOptions
in class de.zbit.Launcher
public java.lang.String[] getLogPackages()
getLogPackages
in class de.zbit.Launcher
public java.lang.String getOrganization()
getOrganization
in class de.zbit.Launcher
public java.lang.String getProvider()
getProvider
in class de.zbit.Launcher
public java.net.URL getURLlicenseFile()
getURLlicenseFile
in class de.zbit.Launcher
public java.net.URL getURLOnlineUpdate()
getURLOnlineUpdate
in class de.zbit.Launcher
public java.lang.String getVersionNumber()
getVersionNumber
in class de.zbit.Launcher
public short getYearOfProgramRelease()
getYearOfProgramRelease
in class de.zbit.Launcher
public short getYearWhenProjectWasStarted()
getYearWhenProjectWasStarted
in class de.zbit.Launcher
public java.awt.Window initGUI(de.zbit.AppConf appConf)
initGUI
in class de.zbit.Launcher
public boolean showsGUI()
showsGUI
in class de.zbit.Launcher