dioscuri.config
Class ConfigController

java.lang.Object
  extended by dioscuri.config.ConfigController

public class ConfigController
extends java.lang.Object

Author:
Bram Lohman, Bart Kiers

Field Summary
static java.lang.String EMULATOR_XML
           
 
Constructor Summary
ConfigController()
           
 
Method Summary
static javax.xml.bind.Marshaller getEmuMarshaller()
          Get a marshaller that can marshal Emulator types
static javax.xml.bind.Unmarshaller getEmuUnmarshaller()
          Get an unmarshaller that can unmarshal Emulator types.
static dioscuri.config.Emulator loadFromXML(java.io.File inputEmuFile)
          Load a whole Emu object from an XML file on disk
static dioscuri.config.Emulator loadFromXML(java.io.InputStream is)
           
static void saveToXML(dioscuri.config.Emulator emuObject, java.io.File outputXMLFile)
          save JAXB Emu object to disk as an XML file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMULATOR_XML

public static java.lang.String EMULATOR_XML
Constructor Detail

ConfigController

public ConfigController()
Method Detail

getEmuUnmarshaller

public static javax.xml.bind.Unmarshaller getEmuUnmarshaller()
                                                      throws javax.xml.bind.JAXBException
Get an unmarshaller that can unmarshal Emulator types.

Returns:
A new unmarshaller
Throws:
javax.xml.bind.JAXBException

getEmuMarshaller

public static javax.xml.bind.Marshaller getEmuMarshaller()
                                                  throws javax.xml.bind.JAXBException
Get a marshaller that can marshal Emulator types

Returns:
A new marshaller
Throws:
javax.xml.bind.JAXBException

saveToXML

public static void saveToXML(dioscuri.config.Emulator emuObject,
                             java.io.File outputXMLFile)
                      throws java.lang.Exception
save JAXB Emu object to disk as an XML file

Parameters:
emuObject - The Emulator object
outputXMLFile - The xml output file
Throws:
java.lang.Exception

loadFromXML

public static dioscuri.config.Emulator loadFromXML(java.io.File inputEmuFile)
                                            throws java.lang.Exception
Load a whole Emu object from an XML file on disk

Parameters:
inputEmuFile - An Emulator XML config file to load into memory
Returns:
An Emulator object representing the whole Emulator file
Throws:
java.lang.Exception

loadFromXML

public static dioscuri.config.Emulator loadFromXML(java.io.InputStream is)
                                            throws java.lang.Exception
Parameters:
is -
Returns:
-
Throws:
java.lang.Exception