gt:                     throw new IllegalStateException(ex.toString());
context: /*******************************************************************************
   * This file is part of OpenNMS(R).
   *
   * Copyright (C) 2011-2012 The OpenNMS Group, Inc.
   * OpenNMS(R) is Copyright (C) 1999-2012 The OpenNMS Group, Inc.
   *
   * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
   *
   * OpenNMS(R) is free software: you can redistribute it and/or modify
   * it under the terms of the GNU General Public License as published
   * by the Free Software Foundation, either version 3 of the License,
   * or (at your option) any later version.
   *
   * OpenNMS(R) is distributed in the hope that it will be useful,
   * but WITHOUT ANY WARRANTY; without even the implied warranty of
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   * GNU General Public License for more details.
   *
   * You should have received a copy of the GNU General Public License
   * along with OpenNMS(R).  If not, see:
   *      http://www.gnu.org/licenses/
   *
   * For more information contact:
   *     OpenNMS(R) Licensing <license@opennms.org>
   *     http://www.opennms.org/
   *     http://www.opennms.com/
   *******************************************************************************/
  
  /*
   * This class was automatically generated with 
   * <a href="http://www.castor.org">Castor 1.1.2.1</a>, using an XML
   * Schema.
   * $Id$
   */
  
  package org.opennms.netmgt.xml.event.descriptors;
  
    //---------------------------------/
   //- Imported classes and packages -/
  //---------------------------------/
  
  import org.opennms.netmgt.xml.event.Header;
  
  /**
   * Class HeaderDescriptor.
   * 
   * @version $Revision$ $Date$
   */
  @SuppressWarnings("all") public class HeaderDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
  
  
        //--------------------------/
       //- Class/Member Variables -/
      //--------------------------/
  
      /**
       * Field _elementDefinition.
       */
      private boolean _elementDefinition;
  
      /**
       * Field _nsPrefix.
       */
      private java.lang.String _nsPrefix;
  
      /**
       * Field _nsURI.
       */
      private java.lang.String _nsURI;
  
      /**
       * Field _xmlName.
       */
      private java.lang.String _xmlName;
  
      /**
       * Field _identity.
       */
      private org.exolab.castor.xml.XMLFieldDescriptor _identity;
  
  
        //----------------/
       //- Constructors -/
      //----------------/
  
      public HeaderDescriptor() {
          super();
          _nsURI = "http://xmlns.opennms.org/xsd/event";
          _xmlName = "header";
          _elementDefinition = true;
          
          //-- set grouping compositor
          setCompositorAsSequence();
          org.exolab.castor.xml.util.XMLFieldDescriptorImpl  desc           = null;
          org.exolab.castor.mapping.FieldHandler             handler        = null;
          org.exolab.castor.xml.FieldValidator               fieldValidator = null;
          //-- initialize attribute descriptors
          
          //-- initialize element descriptors
          
          //-- _ver
          desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_ver", "ver", org.exolab.castor.xml.NodeType.Element);
          desc.setImmutable(true);
          handler = new org.exolab.castor.xml.XMLFieldHandler() {
              @Override
              public java.lang.Object getValue( java.lang.Object object ) 
                  throws IllegalStateException
              {
                  Header target = (Header) object;
                  return target.getVer();
              }
              @Override
              public void setValue( java.lang.Object object, java.lang.Object value) 
                  throws IllegalStateException, IllegalArgumentException
              {
                  try {
                      Header target = (Header) object;
                      target.setVer( (java.lang.String) value);
                  } catch (java.lang.Exception ex) {
                      throw new IllegalStateException(ex.toString());
                  }
              }
              @Override
              @SuppressWarnings("unused")
              public java.lang.Object newInstance(java.lang.Object parent) {
                  return null;
              }
          };
          desc.setSchemaType("string");
          desc.setHandler(handler);
          desc.setRequired(true);
          desc.setMultivalued(false);
          addFieldDescriptor(desc);
          addSequenceElement(desc);
          
          //-- validation code for: _ver
          fieldValidator = new org.exolab.castor.xml.FieldValidator();
          fieldValidator.setMinOccurs(1);
          { //-- local scope
              org.exolab.castor.xml.validators.StringValidator typeValidator;
              typeValidator = new org.exolab.castor.xml.validators.StringValidator();
              fieldValidator.setValidator(typeValidator);
              typeValidator.setWhiteSpace("preserve");
          }
          desc.setValidator(fieldValidator);
          //-- _dpName
          desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_dpName", "dpName", org.exolab.castor.xml.NodeType.Element);
          desc.setImmutable(true);
          handler = new org.exolab.castor.xml.XMLFieldHandler() {
              @Override
              public java.lang.Object getValue( java.lang.Object object ) 
                  throws IllegalStateException
              {
                  Header target = (Header) object;
                  return target.getDpName();
              }
              @Override
              public void setValue( java.lang.Object object, java.lang.Object value) 
                  throws IllegalStateException, IllegalArgumentException
              {
                  try {
                      Header target = (Header) object;
                      target.setDpName( (java.lang.String) value);
                  } catch (java.lang.Exception ex) {
                      throw new IllegalStateException(ex.toString());
                  }
              }
              @Override
              @SuppressWarnings("unused")
              public java.lang.Object newInstance(java.lang.Object parent) {
                  return null;
              }
          };
          desc.setSchemaType("string");
          desc.setHandler(handler);
          desc.setRequired(true);
          desc.setMultivalued(false);
          addFieldDescriptor(desc);
          addSequenceElement(desc);
          
          //-- validation code for: _dpName
          fieldValidator = new org.exolab.castor.xml.FieldValidator();
          fieldValidator.setMinOccurs(1);
          { //-- local scope
              org.exolab.castor.xml.validators.StringValidator typeValidator;
              typeValidator = new org.exolab.castor.xml.validators.StringValidator();
              fieldValidator.setValidator(typeValidator);
              typeValidator.setWhiteSpace("preserve");
          }
          desc.setValidator(fieldValidator);
          //-- _created
          desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_created", "created", org.exolab.castor.xml.NodeType.Element);
          desc.setImmutable(true);
          handler = new org.exolab.castor.xml.XMLFieldHandler() {
              @Override
              public java.lang.Object getValue( java.lang.Object object ) 
                  throws IllegalStateException
              {
                  Header target = (Header) object;
                  return target.getCreated();
              }
              @Override
              public void setValue( java.lang.Object object, java.lang.Object value) 
                  throws IllegalStateException, IllegalArgumentException
              {
                  try {
                      Header target = (Header) object;
                      target.setCreated( (java.lang.String) value);
                  } catch (java.lang.Exception ex) {
                      throw new IllegalStateException(ex.toString());
                  }
              }
              @Override
              @SuppressWarnings("unused")
              public java.lang.Object newInstance(java.lang.Object parent) {
                  return null;
              }
          };
          desc.setSchemaType("string");
          desc.setHandler(handler);
          desc.setRequired(true);
          desc.setMultivalued(false);
          addFieldDescriptor(desc);
          addSequenceElement(desc);
          
          //-- validation code for: _created
          fieldValidator = new org.exolab.castor.xml.FieldValidator();
          fieldValidator.setMinOccurs(1);
          { //-- local scope
              org.exolab.castor.xml.validators.StringValidator typeValidator;
              typeValidator = new org.exolab.castor.xml.validators.StringValidator();
              fieldValidator.setValidator(typeValidator);
              typeValidator.setWhiteSpace("preserve");
          }
          desc.setValidator(fieldValidator);
          //-- _mstation
          desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_mstation", "mstation", org.exolab.castor.xml.NodeType.Element);
          desc.setImmutable(true);
          handler = new org.exolab.castor.xml.XMLFieldHandler() {
              @Override
              public java.lang.Object getValue( java.lang.Object object ) 
                  throws IllegalStateException
              {
                  Header target = (Header) object;
                  return target.getMstation();
              }
              @Override
              public void setValue( java.lang.Object object, java.lang.Object value) 
                  throws IllegalStateException, IllegalArgumentException
              {
                  try {
                      Header target = (Header) object;
                      target.setMstation( (java.lang.String) value);
                  } catch (java.lang.Exception ex) {
  