public class StochSolutionConverter extends Object
StochSolution
to a XML file StochSolutionParams
, or the reverse operation:
from a XML file StochSolutionParams
to a instance of StochSolution
.Constructor and Description |
---|
StochSolutionConverter() |
Modifier and Type | Method and Description |
---|---|
static void |
main(String[] args)
Reads the stochastic solution from an XML file.
|
static void |
marshall(StochSolution sol,
File output)
Exports the stochastic solution of instance
StochSolution to an XML file
represented by StochSolutionParams . |
static StochSolution |
unmarshall(File stochFile)
Creates a new instance of
StochSolution from a XML file parameter StochSolutionParams . |
public static StochSolution unmarshall(File stochFile) throws JAXBException, FileNotFoundException
StochSolution
from a XML file parameter StochSolutionParams
.stochFile
- the XML file of StochSolutionParams
StochSolution
JAXBException
- if an error occurs when trying to read the XML fileFileNotFoundException
- if the file cannot be foundpublic static void marshall(StochSolution sol, File output) throws JAXBException
StochSolution
to an XML file
represented by StochSolutionParams
.sol
- the stochastic solutionoutput
- the output file to export toJAXBException
- if an error occurs while trying to export the solutionpublic static void main(String[] args) throws JAXBException, FileNotFoundException
args
- the name of the XML fileJAXBException
FileNotFoundException