compbio.engine.conf
Class RunnerConfigMarshaller<T>

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

public class RunnerConfigMarshaller<T>
extends Object


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

Constructor Detail

RunnerConfigMarshaller

public RunnerConfigMarshaller(Class<?> rootClass)
                       throws JAXBException
Throws:
JAXBException

RunnerConfigMarshaller

public RunnerConfigMarshaller(Class<?> rootClass,
                              Class<?>... classes)
                       throws JAXBException
Throws:
JAXBException
Method Detail

write

public void write(Object xmlRootElement,
                  OutputStream out)
           throws JAXBException,
                  IOException
Throws:
JAXBException
IOException

writeAndValidate

public void writeAndValidate(Object xmlRootElement,
                             String schemafile,
                             OutputStream out)
                      throws JAXBException,
                             IOException,
                             SAXException
Throws:
JAXBException
IOException
SAXException

getSchema

public static Schema getSchema(String schemafile)
                        throws SAXException
Throws:
SAXException

getValidator

public static Validator getValidator(String schemafile)
                              throws SAXException
Returns:
validator instance
Throws:
SAXException

getValidator

public static Validator getValidator(Schema schema)
                              throws SAXException
Throws:
SAXException

validate

public static boolean validate(Validator validator,
                               String document)
                        throws IOException,
                               SAXException
Throws:
IOException
SAXException

readAndValidate

public <V> V readAndValidate(InputStream document,
                             Class<V> resultElemType)
                  throws JAXBException,
                         IOException,
                         SAXException
Throws:
JAXBException
IOException
SAXException

read

public <V> V read(InputStream instream,
                  Class<V> resultElemType)
       throws JAXBException
Throws:
JAXBException

read

public <V> V read(InputStream instream,
                  Class<V> resultElemType,
                  Class<?>... classes)
       throws JAXBException
Throws:
JAXBException