public class SbgnUtil extends Object
Constructor and Description |
---|
SbgnUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
getResource(String res)
Gets the resource.
|
static boolean |
isValid(File f)
Check if a given file validates against the given xsd.
|
static Sbgn |
readFromFile(File f)
Read an sbgn file (without validating against the schema)
|
static void |
writeToFile(Sbgn sbgn,
File f)
Write sbgn to a file
|
public static Sbgn readFromFile(File f) throws JAXBException
f
- file to read fromJAXBException
- if there is an IO error, or the file is not SBGNML.public static String getResource(String res) throws IOException
res
- the resourceIOException
- the IO exceptionpublic static boolean isValid(File f) throws JAXBException, SAXException, IOException
f
- the file to validateSAXException
- if there are problems reading xsdJAXBException
- if there are problems reading f that are not due
to validation problems (for example, disk error or file not found)IOException
- when the resource SBGN.xsd could not be loadedpublic static void writeToFile(Sbgn sbgn, File f) throws JAXBException
sbgn
- Sbgn data structure to writef
- output fileJAXBException
- if there is an IO errorCopyright © 2018 SEMS project @ University of Rostock. All rights reserved.