/*
 * 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 Moduletype.
 * 
 * @version $Revision$ $Date$
 */
public class Moduletype implements java.io.Serializable {


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

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

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

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

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

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

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


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

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


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

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

    /**
     * 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 'length'.
     * 
     * @return the value of field 'length'.
     */
    public java.lang.String getLength()
    {
        return this._length;
    } //-- java.lang.String getLength() 

    /**
     * Returns the value of field 'thickness'.
     * 
     * @return the value of field 'thickness'.
     */
    public java.lang.String getThickness()
    {
        return this._thickness;
    } //-- java.lang.String getThickness() 

    /**
     * Returns the value of field 'width'.
     * 
     * @return the value of field 'width'.
     */
    public java.lang.String getWidth()
    {
        return this._width;
    } //-- java.lang.String getWidth() 

    /**
     * Returns the value of field 'widthAtHalfLength'.
     * 
     * @return the value of field 'widthAtHalfLength'.
     */
    public java.lang.String getWidthAtHalfLength()
    {
        return this._widthAtHalfLength;
    } //-- java.lang.String getWidthAtHalfLength() 

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

    /**
     * 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 'length'.
     * 
     * @param length the value of field 'length'.
     */
    public void setLength(java.lang.String length)
    {
        this._length = length;
    } //-- void setLength(java.lang.String) 

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

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

    /**
     * Sets the value of field 'widthAtHalfLength'.
     * 
     * @param widthAtHalfLength the value of field
     * 'widthAtHalfLength'.
     */
    public void setWidthAtHalfLength(java.lang.String widthAtHalfLength)
    {
        this._widthAtHalfLength = widthAtHalfLength;
    } //-- void setWidthAtHalfLength(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 (Moduletype) Unmarshaller.unmarshal(Moduletype.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() 

}
