compbio.engine.conf
Class RunnerConfigMarshaller<T>

java.lang.Object
  extended by compbio.engine.conf.RunnerConfigMarshaller<T>

public class RunnerConfigMarshaller<T>
extends java.lang.Object


Constructor Summary
RunnerConfigMarshaller(java.lang.Class<?> rootClass)
           
RunnerConfigMarshaller(java.lang.Class<?> rootClass, java.lang.Class<?>... classes)
           
 
Method Summary
static javax.xml.validation.Schema getSchema(java.lang.String schemafile)
           
static javax.xml.validation.Validator getValidator(javax.xml.validation.Schema schema)
           
static javax.xml.validation.Validator getValidator(java.lang.String schemafile)
           
<V> V
read(java.io.InputStream instream, java.lang.Class<V> resultElemType)
           
<V> V
read(java.io.InputStream instream, java.lang.Class<V> resultElemType, java.lang.Class<?>... classes)
           
<V> V
readAndValidate(java.io.InputStream document, java.lang.Class<V> resultElemType)
           
static boolean validate(javax.xml.validation.Validator validator, java.lang.String document)
           
 void write(java.lang.Object xmlRootElement, java.io.OutputStream out)
           
 void writeAndValidate(java.lang.Object xmlRootElement, java.lang.String schemafile, java.io.OutputStream out)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RunnerConfigMarshaller

public RunnerConfigMarshaller(java.lang.Class<?> rootClass)
                       throws javax.xml.bind.JAXBException
Throws:
javax.xml.bind.JAXBException

RunnerConfigMarshaller

public RunnerConfigMarshaller(java.lang.Class<?> rootClass,
                              java.lang.Class<?>... classes)
                       throws javax.xml.bind.JAXBException
Throws:
javax.xml.bind.JAXBException
Method Detail

write

public void write(java.lang.Object xmlRootElement,
                  java.io.OutputStream out)
           throws javax.xml.bind.JAXBException,
                  java.io.IOException
Throws:
javax.xml.bind.JAXBException
java.io.IOException

writeAndValidate

public void writeAndValidate(java.lang.Object xmlRootElement,
                             java.lang.String schemafile,
                             java.io.OutputStream out)
                      throws javax.xml.bind.JAXBException,
                             java.io.IOException,
                             org.xml.sax.SAXException
Throws:
javax.xml.bind.JAXBException
java.io.IOException
org.xml.sax.SAXException

getSchema

public static javax.xml.validation.Schema getSchema(java.lang.String schemafile)
                                             throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

getValidator

public static javax.xml.validation.Validator getValidator(java.lang.String schemafile)
                                                   throws org.xml.sax.SAXException
Returns:
Throws:
org.xml.sax.SAXException

getValidator

public static javax.xml.validation.Validator getValidator(javax.xml.validation.Schema schema)
                                                   throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

validate

public static boolean validate(javax.xml.validation.Validator validator,
                               java.lang.String document)
                        throws java.io.IOException,
                               org.xml.sax.SAXException
Throws:
java.io.IOException
org.xml.sax.SAXException

readAndValidate

public <V> V readAndValidate(java.io.InputStream document,
                             java.lang.Class<V> resultElemType)
                  throws javax.xml.bind.JAXBException,
                         java.io.IOException,
                         org.xml.sax.SAXException
Throws:
javax.xml.bind.JAXBException
java.io.IOException
org.xml.sax.SAXException

read

public <V> V read(java.io.InputStream instream,
                  java.lang.Class<V> resultElemType)
       throws javax.xml.bind.JAXBException
Throws:
javax.xml.bind.JAXBException

read

public <V> V read(java.io.InputStream instream,
                  java.lang.Class<V> resultElemType,
                  java.lang.Class<?>... classes)
       throws javax.xml.bind.JAXBException
Throws:
javax.xml.bind.JAXBException