wodka.util
Class Marshaller

java.lang.Object
  extended bywodka.util.Marshaller

public class Marshaller
extends java.lang.Object

Converts a soda model from and to xml.


Method Summary
static Marshaller current()
           
 void marshalModel(java.io.Writer out, Model model)
          Writes a model as xml stream on the output stream.
 void marshalRace(java.io.Writer out, java.util.Collection models, java.lang.String terrain)
           
 Model unmarshal(java.io.Reader reader)
          Reads an xml from the input stream and creates a model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

current

public static Marshaller current()

marshalModel

public void marshalModel(java.io.Writer out,
                         Model model)
                  throws java.io.IOException
Writes a model as xml stream on the output stream.

Throws:
java.io.IOException

marshalRace

public void marshalRace(java.io.Writer out,
                        java.util.Collection models,
                        java.lang.String terrain)
                 throws java.io.IOException,
                        org.jdom.JDOMException
Throws:
java.io.IOException
org.jdom.JDOMException

unmarshal

public Model unmarshal(java.io.Reader reader)
                throws org.jdom.JDOMException
Reads an xml from the input stream and creates a model.

Throws:
org.jdom.JDOMException