コード例 #1
0
  public ConfigurationDescriptor() {
    super();
    _nsURI = "http://xmlns.opennms.org/xsd/config/snmp";
    _xmlName = "configuration";
    _elementDefinition = false;
    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

    // -- _port
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.Integer.TYPE, "_port", "port", org.exolab.castor.xml.NodeType.Attribute);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          @Override
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Configuration target = (Configuration) object;
            if (!target.hasPort()) {
              return null;
            }
            return new java.lang.Integer(target.getPort());
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Configuration target = (Configuration) object;
              // if null, use delete method for optional primitives
              if (value == null) {
                target.deletePort();
                return;
              }
              target.setPort(((java.lang.Integer) value).intValue());
            } 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("int");
    desc.setHandler(handler);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _port
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- local scope
      org.exolab.castor.xml.validators.IntValidator typeValidator;
      typeValidator = new org.exolab.castor.xml.validators.IntValidator();
      fieldValidator.setValidator(typeValidator);
      typeValidator.setMinInclusive(1);
      typeValidator.setMaxInclusive(65535);
    }
    desc.setValidator(fieldValidator);
    // -- _retry
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.Integer.TYPE, "_retry", "retry", org.exolab.castor.xml.NodeType.Attribute);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          @Override
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Configuration target = (Configuration) object;
            if (!target.hasRetry()) {
              return null;
            }
            return new java.lang.Integer(target.getRetry());
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Configuration target = (Configuration) object;
              // if null, use delete method for optional primitives
              if (value == null) {
                target.deleteRetry();
                return;
              }
              target.setRetry(((java.lang.Integer) value).intValue());
            } 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("int");
    desc.setHandler(handler);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _retry
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- local scope
      org.exolab.castor.xml.validators.IntValidator typeValidator;
      typeValidator = new org.exolab.castor.xml.validators.IntValidator();
      fieldValidator.setValidator(typeValidator);
      typeValidator.setMinInclusive(-2147483648);
      typeValidator.setMaxInclusive(2147483647);
    }
    desc.setValidator(fieldValidator);
    // -- _timeout
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.Integer.TYPE,
            "_timeout",
            "timeout",
            org.exolab.castor.xml.NodeType.Attribute);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          @Override
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Configuration target = (Configuration) object;
            if (!target.hasTimeout()) {
              return null;
            }
            return new java.lang.Integer(target.getTimeout());
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Configuration target = (Configuration) object;
              // if null, use delete method for optional primitives
              if (value == null) {
                target.deleteTimeout();
                return;
              }
              target.setTimeout(((java.lang.Integer) value).intValue());
            } 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("int");
    desc.setHandler(handler);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _timeout
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- local scope
      org.exolab.castor.xml.validators.IntValidator typeValidator;
      typeValidator = new org.exolab.castor.xml.validators.IntValidator();
      fieldValidator.setValidator(typeValidator);
      typeValidator.setMinInclusive(-2147483648);
      typeValidator.setMaxInclusive(2147483647);
    }
    desc.setValidator(fieldValidator);
    // -- _readCommunity
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class,
            "_readCommunity",
            "read-community",
            org.exolab.castor.xml.NodeType.Attribute);
    desc.setImmutable(true);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          @Override
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Configuration target = (Configuration) object;
            return target.getReadCommunity();
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Configuration target = (Configuration) object;
              target.setReadCommunity((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.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _readCommunity
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- 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);
    // -- _writeCommunity
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class,
            "_writeCommunity",
            "write-community",
            org.exolab.castor.xml.NodeType.Attribute);
    desc.setImmutable(true);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          @Override
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Configuration target = (Configuration) object;
            return target.getWriteCommunity();
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Configuration target = (Configuration) object;
              target.setWriteCommunity((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.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _writeCommunity
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- 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);
    // -- _proxyHost
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class,
            "_proxyHost",
            "proxy-host",
            org.exolab.castor.xml.NodeType.Attribute);
    desc.setImmutable(true);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          @Override
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Configuration target = (Configuration) object;
            return target.getProxyHost();
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Configuration target = (Configuration) object;
              target.setProxyHost((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.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _proxyHost
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- 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);
    // -- _version
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class,
            "_version",
            "version",
            org.exolab.castor.xml.NodeType.Attribute);
    desc.setImmutable(true);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          @Override
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Configuration target = (Configuration) object;
            return target.getVersion();
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Configuration target = (Configuration) object;
              target.setVersion((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.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _version
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- local scope
      org.exolab.castor.xml.validators.StringValidator typeValidator;
      typeValidator = new org.exolab.castor.xml.validators.StringValidator();
      fieldValidator.setValidator(typeValidator);
      typeValidator.addPattern("(v1|v2c|v3)");
      typeValidator.setWhiteSpace("preserve");
    }
    desc.setValidator(fieldValidator);
    // -- _maxVarsPerPdu
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.Integer.TYPE,
            "_maxVarsPerPdu",
            "max-vars-per-pdu",
            org.exolab.castor.xml.NodeType.Attribute);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          @Override
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Configuration target = (Configuration) object;
            if (!target.hasMaxVarsPerPdu()) {
              return null;
            }
            return new java.lang.Integer(target.getMaxVarsPerPdu());
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Configuration target = (Configuration) object;
              // if null, use delete method for optional primitives
              if (value == null) {
                target.deleteMaxVarsPerPdu();
                return;
              }
              target.setMaxVarsPerPdu(((java.lang.Integer) value).intValue());
            } 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("int");
    desc.setHandler(handler);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _maxVarsPerPdu
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- local scope
      org.exolab.castor.xml.validators.IntValidator typeValidator;
      typeValidator = new org.exolab.castor.xml.validators.IntValidator();
      fieldValidator.setValidator(typeValidator);
      typeValidator.setMinInclusive(-2147483648);
      typeValidator.setMaxInclusive(2147483647);
    }
    desc.setValidator(fieldValidator);
    // -- _maxRepetitions
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.Integer.TYPE,
            "_maxRepetitions",
            "max-repetitions",
            org.exolab.castor.xml.NodeType.Attribute);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          @Override
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Configuration target = (Configuration) object;
            if (!target.hasMaxRepetitions()) {
              return null;
            }
            return new java.lang.Integer(target.getMaxRepetitions());
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Configuration target = (Configuration) object;
              // if null, use delete method for optional primitives
              if (value == null) {
                target.deleteMaxRepetitions();
                return;
              }
              target.setMaxRepetitions(((java.lang.Integer) value).intValue());
            } 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("int");
    desc.setHandler(handler);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _maxRepetitions
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- local scope
      org.exolab.castor.xml.validators.IntValidator typeValidator;
      typeValidator = new org.exolab.castor.xml.validators.IntValidator();
      fieldValidator.setValidator(typeValidator);
      typeValidator.setMinInclusive(-2147483648);
      typeValidator.setMaxInclusive(2147483647);
    }
    desc.setValidator(fieldValidator);
    // -- _maxRequestSize
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.Integer.TYPE,
            "_maxRequestSize",
            "max-request-size",
            org.exolab.castor.xml.NodeType.Attribute);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          @Override
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Configuration target = (Configuration) object;
            if (!target.hasMaxRequestSize()) {
              return null;
            }
            return new java.lang.Integer(target.getMaxRequestSize());
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Configuration target = (Configuration) object;
              // if null, use delete method for optional primitives
              if (value == null) {
                target.deleteMaxRequestSize();
                return;
              }
              target.setMaxRequestSize(((java.lang.Integer) value).intValue());
            } 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("int");
    desc.setHandler(handler);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _maxRequestSize
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- local scope
      org.exolab.castor.xml.validators.IntValidator typeValidator;
      typeValidator = new org.exolab.castor.xml.validators.IntValidator();
      fieldValidator.setValidator(typeValidator);
      typeValidator.setMinInclusive(484);
      typeValidator.setMaxInclusive(2147483647);
    }
    desc.setValidator(fieldValidator);
    // -- _securityName
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class,
            "_securityName",
            "security-name",
            org.exolab.castor.xml.NodeType.Attribute);
    desc.setImmutable(true);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          @Override
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Configuration target = (Configuration) object;
            return target.getSecurityName();
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Configuration target = (Configuration) object;
              target.setSecurityName((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.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _securityName
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- 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);
    // -- _securityLevel
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.Integer.TYPE,
            "_securityLevel",
            "security-level",
            org.exolab.castor.xml.NodeType.Attribute);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          @Override
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Configuration target = (Configuration) object;
            if (!target.hasSecurityLevel()) {
              return null;
            }
            return new java.lang.Integer(target.getSecurityLevel());
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Configuration target = (Configuration) object;
              // if null, use delete method for optional primitives
              if (value == null) {
                target.deleteSecurityLevel();
                return;
              }
              target.setSecurityLevel(((java.lang.Integer) value).intValue());
            } 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("int");
    desc.setHandler(handler);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _securityLevel
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- local scope
      org.exolab.castor.xml.validators.IntValidator typeValidator;
      typeValidator = new org.exolab.castor.xml.validators.IntValidator();
      fieldValidator.setValidator(typeValidator);
      typeValidator.setMinInclusive(1);
      typeValidator.setMaxInclusive(3);
    }
    desc.setValidator(fieldValidator);
    // -- _authPassphrase
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class,
            "_authPassphrase",
            "auth-passphrase",
            org.exolab.castor.xml.NodeType.Attribute);
    desc.setImmutable(true);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          @Override
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Configuration target = (Configuration) object;
            return target.getAuthPassphrase();
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Configuration target = (Configuration) object;
              target.setAuthPassphrase((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.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _authPassphrase
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- 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);
    // -- _authProtocol
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class,
            "_authProtocol",
            "auth-protocol",
            org.exolab.castor.xml.NodeType.Attribute);
    desc.setImmutable(true);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          @Override
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Configuration target = (Configuration) object;
            return target.getAuthProtocol();
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Configuration target = (Configuration) object;
              target.setAuthProtocol((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.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _authProtocol
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- local scope
      org.exolab.castor.xml.validators.StringValidator typeValidator;
      typeValidator = new org.exolab.castor.xml.validators.StringValidator();
      fieldValidator.setValidator(typeValidator);
      typeValidator.addPattern("(MD5|SHA)");
      typeValidator.setWhiteSpace("preserve");
    }
    desc.setValidator(fieldValidator);
    // -- _engineId
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class,
            "_engineId",
            "engine-id",
            org.exolab.castor.xml.NodeType.Attribute);
    desc.setImmutable(true);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          @Override
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Configuration target = (Configuration) object;
            return target.getEngineId();
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Configuration target = (Configuration) object;
              target.setEngineId((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.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _engineId
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- 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);
    // -- _contextEngineId
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class,
            "_contextEngineId",
            "context-engine-id",
            org.exolab.castor.xml.NodeType.Attribute);
    desc.setImmutable(true);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          @Override
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Configuration target = (Configuration) object;
            return target.getContextEngineId();
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Configuration target = (Configuration) object;
              target.setContextEngineId((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.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _contextEngineId
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- 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);
    // -- _contextName
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class,
            "_contextName",
            "context-name",
            org.exolab.castor.xml.NodeType.Attribute);
    desc.setImmutable(true);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          @Override
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Configuration target = (Configuration) object;
            return target.getContextName();
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Configuration target = (Configuration) object;
              target.setContextName((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.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _contextName
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- 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);
    // -- _privacyPassphrase
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class,
            "_privacyPassphrase",
            "privacy-passphrase",
            org.exolab.castor.xml.NodeType.Attribute);
    desc.setImmutable(true);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          @Override
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Configuration target = (Configuration) object;
            return target.getPrivacyPassphrase();
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Configuration target = (Configuration) object;
              target.setPrivacyPassphrase((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.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _privacyPassphrase
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- 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);
    // -- _privacyProtocol
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class,
            "_privacyProtocol",
            "privacy-protocol",
            org.exolab.castor.xml.NodeType.Attribute);
    desc.setImmutable(true);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          @Override
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Configuration target = (Configuration) object;
            return target.getPrivacyProtocol();
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Configuration target = (Configuration) object;
              target.setPrivacyProtocol((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.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _privacyProtocol
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- local scope
      org.exolab.castor.xml.validators.StringValidator typeValidator;
      typeValidator = new org.exolab.castor.xml.validators.StringValidator();
      fieldValidator.setValidator(typeValidator);
      typeValidator.addPattern("(DES|AES|AES192|AES256)");
      typeValidator.setWhiteSpace("preserve");
    }
    desc.setValidator(fieldValidator);
    // -- _enterpriseId
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class,
            "_enterpriseId",
            "enterprise-id",
            org.exolab.castor.xml.NodeType.Attribute);
    desc.setImmutable(true);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          @Override
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Configuration target = (Configuration) object;
            return target.getEnterpriseId();
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Configuration target = (Configuration) object;
              target.setEnterpriseId((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.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _enterpriseId
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- 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);
    // -- initialize element descriptors

  }
コード例 #2
0
  public NsclientConfigDescriptor() {
    super();
    _nsURI = "http://xmlns.opennms.org/xsd/config/nsclient";
    _xmlName = "nsclient-config";
    _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

    // -- _port
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.Integer.TYPE, "_port", "port", org.exolab.castor.xml.NodeType.Attribute);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          @Override
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            NsclientConfig target = (NsclientConfig) object;
            if (!target.hasPort()) {
              return null;
            }
            return new java.lang.Integer(target.getPort());
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              NsclientConfig target = (NsclientConfig) object;
              // if null, use delete method for optional primitives
              if (value == null) {
                target.deletePort();
                return;
              }
              target.setPort(((java.lang.Integer) value).intValue());
            } 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("int");
    desc.setHandler(handler);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _port
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- local scope
      org.exolab.castor.xml.validators.IntValidator typeValidator;
      typeValidator = new org.exolab.castor.xml.validators.IntValidator();
      fieldValidator.setValidator(typeValidator);
      typeValidator.setMinInclusive(-2147483648);
      typeValidator.setMaxInclusive(2147483647);
    }
    desc.setValidator(fieldValidator);
    // -- _retry
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.Integer.TYPE, "_retry", "retry", org.exolab.castor.xml.NodeType.Attribute);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          @Override
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            NsclientConfig target = (NsclientConfig) object;
            if (!target.hasRetry()) {
              return null;
            }
            return new java.lang.Integer(target.getRetry());
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              NsclientConfig target = (NsclientConfig) object;
              // if null, use delete method for optional primitives
              if (value == null) {
                target.deleteRetry();
                return;
              }
              target.setRetry(((java.lang.Integer) value).intValue());
            } 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("int");
    desc.setHandler(handler);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _retry
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- local scope
      org.exolab.castor.xml.validators.IntValidator typeValidator;
      typeValidator = new org.exolab.castor.xml.validators.IntValidator();
      fieldValidator.setValidator(typeValidator);
      typeValidator.setMinInclusive(-2147483648);
      typeValidator.setMaxInclusive(2147483647);
    }
    desc.setValidator(fieldValidator);
    // -- _timeout
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.Integer.TYPE,
            "_timeout",
            "timeout",
            org.exolab.castor.xml.NodeType.Attribute);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          @Override
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            NsclientConfig target = (NsclientConfig) object;
            if (!target.hasTimeout()) {
              return null;
            }
            return new java.lang.Integer(target.getTimeout());
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              NsclientConfig target = (NsclientConfig) object;
              // if null, use delete method for optional primitives
              if (value == null) {
                target.deleteTimeout();
                return;
              }
              target.setTimeout(((java.lang.Integer) value).intValue());
            } 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("int");
    desc.setHandler(handler);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _timeout
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- local scope
      org.exolab.castor.xml.validators.IntValidator typeValidator;
      typeValidator = new org.exolab.castor.xml.validators.IntValidator();
      fieldValidator.setValidator(typeValidator);
      typeValidator.setMinInclusive(-2147483648);
      typeValidator.setMaxInclusive(2147483647);
    }
    desc.setValidator(fieldValidator);
    // -- _password
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class,
            "_password",
            "password",
            org.exolab.castor.xml.NodeType.Attribute);
    desc.setImmutable(true);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          @Override
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            NsclientConfig target = (NsclientConfig) object;
            return target.getPassword();
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              NsclientConfig target = (NsclientConfig) object;
              target.setPassword((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.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _password
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- 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);
    // -- initialize element descriptors

    // -- _definitionList
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            org.opennms.netmgt.config.nsclient.Definition.class,
            "_definitionList",
            "definition",
            org.exolab.castor.xml.NodeType.Element);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          @Override
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            NsclientConfig target = (NsclientConfig) object;
            return target.getDefinition();
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              NsclientConfig target = (NsclientConfig) object;
              target.addDefinition((org.opennms.netmgt.config.nsclient.Definition) value);
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

          public void resetValue(Object object)
              throws IllegalStateException, IllegalArgumentException {
            try {
              NsclientConfig target = (NsclientConfig) object;
              target.removeAllDefinition();
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

          @Override
          @SuppressWarnings("unused")
          public java.lang.Object newInstance(java.lang.Object parent) {
            return new org.opennms.netmgt.config.nsclient.Definition();
          }
        };
    desc.setSchemaType("org.opennms.netmgt.config.nsclient.Definition");
    desc.setHandler(handler);
    desc.setNameSpaceURI("http://xmlns.opennms.org/xsd/config/nsclient");
    desc.setMultivalued(true);
    addFieldDescriptor(desc);
    addSequenceElement(desc);

    // -- validation code for: _definitionList
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(0);
    { // -- local scope
    }
    desc.setValidator(fieldValidator);
  }
コード例 #3
0
  public PluginOperationDescriptor() {
    super();
    _xmlName = "pluginOperation";
    _elementDefinition = true;
    org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
    org.exolab.castor.mapping.FieldHandler handler = null;
    org.exolab.castor.xml.FieldValidator fieldValidator = null;
    // -- _content
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class, "_content", "PCDATA", org.exolab.castor.xml.NodeType.Text);
    desc.setImmutable(true);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            PluginOperation target = (PluginOperation) object;
            return target.getContent();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              PluginOperation target = (PluginOperation) object;
              target.setContent((java.lang.String) value);
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

          public java.lang.Object newInstance(java.lang.Object parent) {
            return null;
          }
        };
    desc.setSchemaType("string");
    desc.setHandler(handler);
    addFieldDescriptor(desc);

    // -- validation code for: _content
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- 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);
    // -- initialize attribute descriptors

    // -- _name
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute);
    desc.setImmutable(true);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            PluginOperation target = (PluginOperation) object;
            return target.getName();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              PluginOperation target = (PluginOperation) object;
              target.setName((java.lang.String) value);
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

          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);

    // -- validation code for: _name
    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);
    // -- _oprName
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class,
            "_oprName",
            "oprName",
            org.exolab.castor.xml.NodeType.Attribute);
    desc.setImmutable(true);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            PluginOperation target = (PluginOperation) object;
            return target.getOprName();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              PluginOperation target = (PluginOperation) object;
              target.setOprName((java.lang.String) value);
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

          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);

    // -- validation code for: _oprName
    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);
    // -- _className
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class,
            "_className",
            "className",
            org.exolab.castor.xml.NodeType.Attribute);
    desc.setImmutable(true);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            PluginOperation target = (PluginOperation) object;
            return target.getClassName();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              PluginOperation target = (PluginOperation) object;
              target.setClassName((java.lang.String) value);
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

          public java.lang.Object newInstance(java.lang.Object parent) {
            return null;
          }
        };
    desc.setSchemaType("string");
    desc.setHandler(handler);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _className
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- 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);
    // -- _accessKey
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class,
            "_accessKey",
            "accessKey",
            org.exolab.castor.xml.NodeType.Attribute);
    desc.setImmutable(true);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            PluginOperation target = (PluginOperation) object;
            return target.getAccessKey();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              PluginOperation target = (PluginOperation) object;
              target.setAccessKey((java.lang.String) value);
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

          public java.lang.Object newInstance(java.lang.Object parent) {
            return null;
          }
        };
    desc.setSchemaType("string");
    desc.setHandler(handler);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _accessKey
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- 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);
    // -- _style
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class, "_style", "style", org.exolab.castor.xml.NodeType.Attribute);
    desc.setImmutable(true);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            PluginOperation target = (PluginOperation) object;
            return target.getStyle();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              PluginOperation target = (PluginOperation) object;
              target.setStyle((java.lang.String) value);
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

          public java.lang.Object newInstance(java.lang.Object parent) {
            return null;
          }
        };
    desc.setSchemaType("string");
    desc.setHandler(handler);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _style
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- 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);
    // -- _hostPage
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            haiyan.config.castorgen.types.PluginOperationHostPageType.class,
            "_hostPage",
            "hostPage",
            org.exolab.castor.xml.NodeType.Attribute);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            PluginOperation target = (PluginOperation) object;
            return target.getHostPage();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              PluginOperation target = (PluginOperation) object;
              target.setHostPage((haiyan.config.castorgen.types.PluginOperationHostPageType) value);
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

          public java.lang.Object newInstance(java.lang.Object parent) {
            return null;
          }
        };
    handler =
        new org.exolab.castor.xml.handlers.EnumFieldHandler(
            haiyan.config.castorgen.types.PluginOperationHostPageType.class, handler);
    desc.setImmutable(true);
    desc.setSchemaType("PluginOperationHostPageType");
    desc.setHandler(handler);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _hostPage
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- local scope
    }
    desc.setValidator(fieldValidator);
    // -- _tblevel
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.Integer.TYPE,
            "_tblevel",
            "tblevel",
            org.exolab.castor.xml.NodeType.Attribute);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            PluginOperation target = (PluginOperation) object;
            if (!target.hasTblevel()) {
              return null;
            }
            return new java.lang.Integer(target.getTblevel());
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              PluginOperation target = (PluginOperation) object;
              // if null, use delete method for optional primitives
              if (value == null) {
                target.deleteTblevel();
                return;
              }
              target.setTblevel(((java.lang.Integer) value).intValue());
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

          public java.lang.Object newInstance(java.lang.Object parent) {
            return null;
          }
        };
    desc.setSchemaType("int");
    desc.setHandler(handler);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _tblevel
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- local scope
      org.exolab.castor.xml.validators.IntValidator typeValidator;
      typeValidator = new org.exolab.castor.xml.validators.IntValidator();
      fieldValidator.setValidator(typeValidator);
      typeValidator.setMinInclusive(-2147483648);
      typeValidator.setMaxInclusive(2147483647);
    }
    desc.setValidator(fieldValidator);
    // -- _img
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class, "_img", "img", org.exolab.castor.xml.NodeType.Attribute);
    desc.setImmutable(true);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            PluginOperation target = (PluginOperation) object;
            return target.getImg();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              PluginOperation target = (PluginOperation) object;
              target.setImg((java.lang.String) value);
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

          public java.lang.Object newInstance(java.lang.Object parent) {
            return null;
          }
        };
    desc.setSchemaType("string");
    desc.setHandler(handler);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _img
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- 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);
    // -- _action
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class, "_action", "action", org.exolab.castor.xml.NodeType.Attribute);
    desc.setImmutable(true);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            PluginOperation target = (PluginOperation) object;
            return target.getAction();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              PluginOperation target = (PluginOperation) object;
              target.setAction((java.lang.String) value);
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

          public java.lang.Object newInstance(java.lang.Object parent) {
            return null;
          }
        };
    desc.setSchemaType("string");
    desc.setHandler(handler);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _action
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- 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);
    // -- _isNoVisibleContent
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.Boolean.TYPE,
            "_isNoVisibleContent",
            "isNoVisibleContent",
            org.exolab.castor.xml.NodeType.Attribute);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            PluginOperation target = (PluginOperation) object;
            if (!target.hasIsNoVisibleContent()) {
              return null;
            }
            return (target.getIsNoVisibleContent()
                ? java.lang.Boolean.TRUE
                : java.lang.Boolean.FALSE);
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              PluginOperation target = (PluginOperation) object;
              // if null, use delete method for optional primitives
              if (value == null) {
                target.deleteIsNoVisibleContent();
                return;
              }
              target.setIsNoVisibleContent(((java.lang.Boolean) value).booleanValue());
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

          public java.lang.Object newInstance(java.lang.Object parent) {
            return null;
          }
        };
    desc.setSchemaType("boolean");
    desc.setHandler(handler);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _isNoVisibleContent
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- local scope
      org.exolab.castor.xml.validators.BooleanValidator typeValidator;
      typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
      fieldValidator.setValidator(typeValidator);
    }
    desc.setValidator(fieldValidator);
    // -- initialize element descriptors

  }