/*
 * This class was automatically generated with 
 * <a href="http://www.castor.org">Castor 0.9.7</a>, using an XML
 * Schema.
 * $Id$
 */

package com.queplix.core.modules.services.jxb;

//---------------------------------/
//- Imported classes and packages -/
//---------------------------------/

import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;

/**
 * Qx services structure
 *
 * @version $Revision$ $Date$
 */
public class ServicesConfig extends com.queplix.core.utils.jxb.JXBObject
        implements java.io.Serializable {

    //--------------------------/
    //- Class/Member Variables -/
    //--------------------------/

    /**
     * Field _scriptConfig
     */
    private com.queplix.core.modules.services.jxb.ScriptConfig _scriptConfig;

    /**
     * Field _taskConfig
     */
    private com.queplix.core.modules.services.jxb.TaskConfig _taskConfig;

    //----------------/
    //- Constructors -/
    //----------------/

    public ServicesConfig() {
        super();
    } //-- com.queplix.core.modules.services.jxb.ServicesConfig()

    //-----------/
    //- Methods -/
    //-----------/

    /**
     * Returns the value of field 'scriptConfig'.
     *
     * @return the value of field 'scriptConfig'.
     */
    public com.queplix.core.modules.services.jxb.ScriptConfig getScriptConfig() {
        return this._scriptConfig;
    } //-- com.queplix.core.modules.services.jxb.ScriptConfig getScriptConfig() 

    /**
     * Returns the value of field 'taskConfig'.
     *
     * @return the value of field 'taskConfig'.
     */
    public com.queplix.core.modules.services.jxb.TaskConfig getTaskConfig() {
        return this._taskConfig;
    } //-- com.queplix.core.modules.services.jxb.TaskConfig getTaskConfig() 

    /**
     * Method isValid
     *
     * @return boolean
     */
    public boolean isValid() {
        try {
            validate();
        }
        catch (org.exolab.castor.xml.ValidationException vex) {
            return false;
        }
        return true;
    } //-- boolean isValid() 

    /**
     * Method marshal
     *
     * @param out
     */
    public void marshal(java.io.Writer out)
            throws org.exolab.castor.xml.MarshalException,
            org.exolab.castor.xml.ValidationException {

        Marshaller.marshal(this, out);
    } //-- void marshal(java.io.Writer) 

    /**
     * Method marshal
     *
     * @param handler
     */
    public void marshal(org.xml.sax.ContentHandler handler)
            throws java.io.IOException, org.exolab.castor.xml.MarshalException,
            org.exolab.castor.xml.ValidationException {

        Marshaller.marshal(this, handler);
    } //-- void marshal(org.xml.sax.ContentHandler) 

    /**
     * Sets the value of field 'scriptConfig'.
     *
     * @param scriptConfig the value of field 'scriptConfig'.
     */
    public void setScriptConfig(
            com.queplix.core.modules.services.jxb.ScriptConfig scriptConfig) {
        this._scriptConfig = scriptConfig;
    } //-- void setScriptConfig(com.queplix.core.modules.services.jxb.ScriptConfig) 

    /**
     * Sets the value of field 'taskConfig'.
     *
     * @param taskConfig the value of field 'taskConfig'.
     */
    public void setTaskConfig(
            com.queplix.core.modules.services.jxb.TaskConfig taskConfig) {
        this._taskConfig = taskConfig;
    } //-- void setTaskConfig(com.queplix.core.modules.services.jxb.TaskConfig) 

    /**
     * Method unmarshal
     *
     * @param reader
     * @return Object
     */
    public static java.lang.Object unmarshal(java.io.Reader reader)
            throws org.exolab.castor.xml.MarshalException,
            org.exolab.castor.xml.ValidationException {
        return (com.queplix.core.modules.services.jxb.ServicesConfig) Unmarshaller
                .unmarshal(
                        com.queplix.core.modules.services.jxb.ServicesConfig.class,
                        reader);
    } //-- java.lang.Object unmarshal(java.io.Reader) 

    /**
     * Method validate
     */
    public void validate()
            throws org.exolab.castor.xml.ValidationException {
        org.exolab.castor.xml.Validator validator
                = new org.exolab.castor.xml.Validator();
        validator.validate(this);
    } //-- void validate() 

}
