Class SBMLFileUtils
java.lang.Object
de.uni_halle.informatik.biodata.mp.io.SBMLFileUtils
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Possible FileTypes of input file -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
checkCreateOutDir
(File output) Creates output directory or output parent directory, if necessarystatic SBMLFileUtils.FileType
getFileType
(File input) Determines the type of the input file based on its extension or content.static File
getOutputFileName
(File file, File output) Fix output file name to contain xml extensionstatic boolean
isDirectory
(File file) Check if file is directory by callingFile.isDirectory()
on an existing file or check presence of '.' in output.getName(), if this is not the case
-
Constructor Details
-
SBMLFileUtils
public SBMLFileUtils()
-
-
Method Details
-
getFileType
Determines the type of the input file based on its extension or content. This method checks if the file is an SBML, MatLab, or JSON file by utilizing theSBFileFilter
class.- Parameters:
input
- The file whose type needs to be determined.- Returns:
- FileType The type of the file, which can be SBML_FILE, MAT_FILE, JSON_FILE, or UNKNOWN if the type cannot be determined.
-
getOutputFileName
Fix output file name to contain xml extension- Parameters:
file
- : File to get name for in input directoryoutput
- : Path to output directory- Returns:
- File in output directory with correct file ending for SBML
-
isDirectory
Check if file is directory by callingFile.isDirectory()
on an existing file or check presence of '.' in output.getName(), if this is not the case -
checkCreateOutDir
Creates output directory or output parent directory, if necessary- Parameters:
output
- : File denoting output location
-