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

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

import java.io.IOException;
import java.io.Reader;
import java.io.Serializable;
import java.io.Writer;
import org.exolab.castor.xml.MarshalException;
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
import org.exolab.castor.xml.ValidationException;
import org.xml.sax.ContentHandler;

/**
 * Class Module.
 * 
 * @version $Revision$ $Date$
 */
public class Module implements java.io.Serializable {


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

    /**
     * Field _id
     */
    private int _id;

    /**
     * keeps track of state for field: _id
     */
    private boolean _has_id;

    /**
     * Field _xcenter
     */
    private java.lang.String _xcenter;

    /**
     * Field _ycenter
     */
    private java.lang.String _ycenter;

    /**
     * Field _zcenter
     */
    private java.lang.String _zcenter;

    /**
     * Field _type
     */
    private int _type;

    /**
     * keeps track of state for field: _type
     */
    private boolean _has_type;


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

    public Module() {
        super();
    } //-- Module()


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

    /**
     * Method deleteId
     */
    public void deleteId()
    {
        this._has_id= false;
    } //-- void deleteId() 

    /**
     * Method deleteType
     */
    public void deleteType()
    {
        this._has_type= false;
    } //-- void deleteType() 

    /**
     * Returns the value of field 'id'.
     * 
     * @return the value of field 'id'.
     */
    public int getId()
    {
        return this._id;
    } //-- int getId() 

    /**
     * Returns the value of field 'type'.
     * 
     * @return the value of field 'type'.
     */
    public int getType()
    {
        return this._type;
    } //-- int getType() 

    /**
     * Returns the value of field 'xcenter'.
     * 
     * @return the value of field 'xcenter'.
     */
    public java.lang.String getXcenter()
    {
        return this._xcenter;
    } //-- java.lang.String getXcenter() 

    /**
     * Returns the value of field 'ycenter'.
     * 
     * @return the value of field 'ycenter'.
     */
    public java.lang.String getYcenter()
    {
        return this._ycenter;
    } //-- java.lang.String getYcenter() 

    /**
     * Returns the value of field 'zcenter'.
     * 
     * @return the value of field 'zcenter'.
     */
    public java.lang.String getZcenter()
    {
        return this._zcenter;
    } //-- java.lang.String getZcenter() 

    /**
     * Method hasId
     */
    public boolean hasId()
    {
        return this._has_id;
    } //-- boolean hasId() 

    /**
     * Method hasType
     */
    public boolean hasType()
    {
        return this._has_type;
    } //-- boolean hasType() 

    /**
     * Method isValid
     */
    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 'id'.
     * 
     * @param id the value of field 'id'.
     */
    public void setId(int id)
    {
        this._id = id;
        this._has_id = true;
    } //-- void setId(int) 

    /**
     * Sets the value of field 'type'.
     * 
     * @param type the value of field 'type'.
     */
    public void setType(int type)
    {
        this._type = type;
        this._has_type = true;
    } //-- void setType(int) 

    /**
     * Sets the value of field 'xcenter'.
     * 
     * @param xcenter the value of field 'xcenter'.
     */
    public void setXcenter(java.lang.String xcenter)
    {
        this._xcenter = xcenter;
    } //-- void setXcenter(java.lang.String) 

    /**
     * Sets the value of field 'ycenter'.
     * 
     * @param ycenter the value of field 'ycenter'.
     */
    public void setYcenter(java.lang.String ycenter)
    {
        this._ycenter = ycenter;
    } //-- void setYcenter(java.lang.String) 

    /**
     * Sets the value of field 'zcenter'.
     * 
     * @param zcenter the value of field 'zcenter'.
     */
    public void setZcenter(java.lang.String zcenter)
    {
        this._zcenter = zcenter;
    } //-- void setZcenter(java.lang.String) 

    /**
     * Method unmarshal
     * 
     * @param reader
     */
    public static java.lang.Object unmarshal(java.io.Reader reader)
        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
    {
        return (Module) Unmarshaller.unmarshal(Module.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() 

}
