public RawScriptTypeDescriptor() {
    super();
    _xmlName = "RawScriptType";
    _elementDefinition = false;

    // -- 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

    // -- _content
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class, "_content", "content", org.exolab.castor.xml.NodeType.Element);
    desc.setImmutable(true);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            RawScriptType target = (RawScriptType) object;
            return target.getContent();
          }

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

    // -- validation code for: _content
    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);
  }
Exemplo n.º 2
0
  public MaximumVersionDescriptor() {
    super();
    _nsURI = "http://ltsc.ieee.org/xsd/LOM";
    _xmlName = "maximumVersion";
    _elementDefinition = false;

    // -- 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

    // -- _groupMaximumVersionMaximumVersion
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            es.pode.parseadorXML.castor.GroupMaximumVersionMaximumVersion.class,
            "_groupMaximumVersionMaximumVersion",
            "maximumVersion",
            org.exolab.castor.xml.NodeType.Element);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            MaximumVersion target = (MaximumVersion) object;
            return target.getGroupMaximumVersionMaximumVersion();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              MaximumVersion target = (MaximumVersion) object;
              target.setGroupMaximumVersionMaximumVersion(
                  (es.pode.parseadorXML.castor.GroupMaximumVersionMaximumVersion) value);
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

          public java.lang.Object newInstance(java.lang.Object parent) {
            return new es.pode.parseadorXML.castor.GroupMaximumVersionMaximumVersion();
          }
        };
    desc.setHandler(handler);
    desc.setNameSpaceURI("http://ltsc.ieee.org/xsd/LOM");
    desc.setRequired(true);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _groupMaximumVersionMaximumVersion
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
    }
    desc.setValidator(fieldValidator);
  }
Exemplo n.º 3
0
  public EventsDescriptor() {
    super();
    _xmlName = "events";
    _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

    // -- _event
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            com.bugclipse.fogbugz.api.Event.class,
            "_event",
            "event",
            org.exolab.castor.xml.NodeType.Element);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Events target = (Events) object;
            return target.getEvent();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Events target = (Events) object;
              target.setEvent((com.bugclipse.fogbugz.api.Event) value);
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

          public java.lang.Object newInstance(java.lang.Object parent) {
            return null;
          }
        };
    desc.setSchemaType("com.bugclipse.fogbugz.api.Event");
    desc.setHandler(handler);
    desc.setRequired(true);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);
    addSequenceElement(desc);

    // -- validation code for: _event
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
    }
    desc.setValidator(fieldValidator);
  }
Exemplo n.º 4
0
  public IsNullExprTypeDescriptor() {
    super();
    _xmlName = "IsNullExprType";
    _elementDefinition = false;

    // -- 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

    // -- _variable
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            org.ralasafe.db.sql.xml.Variable.class,
            "_variable",
            "variable",
            org.exolab.castor.xml.NodeType.Element);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            IsNullExprType target = (IsNullExprType) object;
            return target.getVariable();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              IsNullExprType target = (IsNullExprType) object;
              target.setVariable((org.ralasafe.db.sql.xml.Variable) value);
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

          public java.lang.Object newInstance(java.lang.Object parent) {
            return new org.ralasafe.db.sql.xml.Variable();
          }
        };
    desc.setSchemaType("org.ralasafe.db.sql.xml.Variable");
    desc.setHandler(handler);
    desc.setRequired(true);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);
    addSequenceElement(desc);

    // -- validation code for: _variable
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
    }
    desc.setValidator(fieldValidator);
  }
  public SecurityRequirementDescriptor() {
    super();
    xmlName = "security-requirement";
    XMLFieldDescriptorImpl desc = null;
    XMLFieldHandler handler = null;
    FieldValidator fieldValidator = null;

    // -- set grouping compositor
    setCompositorAsSequence();
    // -- initialize attribute descriptors

    // -- initialize element descriptors

    // -- _description
    desc =
        new XMLFieldDescriptorImpl(
            java.lang.String.class, "_description", "description", NodeType.Element);
    desc.setImmutable(true);
    handler =
        (new XMLFieldHandler() {
          public Object getValue(Object object) throws IllegalStateException {
            SecurityRequirement target = (SecurityRequirement) object;
            return target.getDescription();
          }

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

          public Object newInstance(Object parent) {
            return null;
          }
        });
    desc.setHandler(handler);
    desc.setRequired(true);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _description
    fieldValidator = new FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
      StringValidator sv = new StringValidator();
      sv.setWhiteSpace("preserve");
      fieldValidator.setValidator(sv);
    }
    desc.setValidator(fieldValidator);
  } // -- de.fhg.isst.ComponentML.SecurityRequirementDescriptor()
  public ProcesosBackgroundDescriptor() {
    super();
    xmlName = "ProcesosBackground";

    // -- set grouping compositor
    setCompositorAsSequence();
    org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
    org.exolab.castor.xml.XMLFieldHandler handler = null;
    org.exolab.castor.xml.FieldValidator fieldValidator = null;
    // -- initialize attribute descriptors

    // -- initialize element descriptors

    // -- _procesoList
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            com.tmk.kernel.server.Proceso.class,
            "_procesoList",
            "Proceso",
            org.exolab.castor.xml.NodeType.Element);
    handler =
        (new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            ProcesosBackground target = (ProcesosBackground) object;
            return target.getProceso();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              ProcesosBackground target = (ProcesosBackground) object;
              target.addProceso((com.tmk.kernel.server.Proceso) value);
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

          public java.lang.Object newInstance(java.lang.Object parent) {
            return new com.tmk.kernel.server.Proceso();
          }
        });
    desc.setHandler(handler);
    desc.setRequired(true);
    desc.setMultivalued(true);
    addFieldDescriptor(desc);

    // -- validation code for: _procesoList
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
    }
    desc.setValidator(fieldValidator);
  } // -- com.tmk.kernel.server.ProcesosBackgroundDescriptor()
Exemplo n.º 7
0
  public AndamiDescriptor() {
    super();
    xmlName = "andami";
    org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
    org.exolab.castor.xml.XMLFieldHandler handler = null;
    org.exolab.castor.xml.FieldValidator fieldValidator = null;
    // -- initialize attribute descriptors

    // -- _update
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.Boolean.TYPE, "_update", "update", org.exolab.castor.xml.NodeType.Attribute);
    handler =
        (new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Andami target = (Andami) object;
            if (!target.hasUpdate()) return null;
            return (target.getUpdate() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Andami target = (Andami) object;
              // ignore null values for non optional primitives
              if (value == null) return;

              target.setUpdate(((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.setHandler(handler);
    desc.setRequired(true);
    addFieldDescriptor(desc);

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

  } // -- com.iver.andami.config.generate.AndamiDescriptor()
Exemplo n.º 8
0
  public AT033ATDescriptor() {
    super();
    nsURI = "http://www.evologic.com.uk/evologic/evotype";
    xmlName = "AT033AT";
    org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
    org.exolab.castor.xml.XMLFieldHandler handler = null;
    org.exolab.castor.xml.FieldValidator fieldValidator = null;
    // -- initialize attribute descriptors

    // -- _value
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class, "_value", "value", 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 {
            AT033AT target = (AT033AT) object;
            return target.getValue();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              AT033AT target = (AT033AT) object;
              target.setValue((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.setHandler(handler);
    desc.setRequired(true);
    addFieldDescriptor(desc);

    // -- validation code for: _value
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
      StringValidator typeValidator = new StringValidator();
      typeValidator.setWhiteSpace("preserve");
      fieldValidator.setValidator(typeValidator);
    }
    desc.setValidator(fieldValidator);
    // -- initialize element descriptors

  } // -- org.artistar.tahoe.config.type.AT033ATDescriptor()
Exemplo n.º 9
0
  public JndiDescriptor() {
    xmlName = "jndi";
    XMLFieldDescriptorImpl desc = null;
    XMLFieldHandler handler = null;
    FieldValidator fieldValidator = null;
    // -- initialize attribute descriptors

    attributes = new XMLFieldDescriptorImpl[1];
    // -- _name
    desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", NodeType.Attribute);
    desc.setImmutable(true);
    handler =
        (new XMLFieldHandler() {
          public Object getValue(Object object) throws IllegalStateException {
            Jndi target = (Jndi) object;
            return target.getName();
          }

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

          public Object newInstance(Object parent) {
            return null;
          }
        });
    desc.setHandler(handler);
    desc.setRequired(true);
    attributes[0] = desc;

    // -- validation code for: _name
    fieldValidator = new FieldValidator();
    fieldValidator.setMinOccurs(1);
    fieldValidator.setValidator(new StringValidator());
    desc.setValidator(fieldValidator);

    // -- initialize element descriptors

    elements = new XMLFieldDescriptorImpl[0];
  } // -- org.exolab.castor.jdo.conf.JndiDescriptor()
Exemplo n.º 10
0
  public TopicsDescriptor() {
    super();
    nsURI = "http://jakarta.apache.org/jetspeed/xml/jetspeed-portal-content";
    xmlName = "topics";
    XMLFieldDescriptorImpl desc = null;
    XMLFieldHandler handler = null;
    FieldValidator fieldValidator = null;
    // -- initialize attribute descriptors

    // -- initialize element descriptors

    // -- _entryList
    desc = new XMLFieldDescriptorImpl(Entry.class, "_entryList", "entry", NodeType.Element);
    handler =
        (new XMLFieldHandler() {
          public Object getValue(Object object) throws IllegalStateException {
            Topics target = (Topics) object;
            return target.getEntry();
          }

          public void setValue(Object object, Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Topics target = (Topics) object;
              target.addEntry((Entry) value);
            } catch (Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

          public Object newInstance(Object parent) {
            return new Entry();
          }
        });
    desc.setHandler(handler);
    desc.setNameSpaceURI("http://jakarta.apache.org/jetspeed/xml/jetspeed-portal-content");
    desc.setRequired(true);
    desc.setMultivalued(true);
    addFieldDescriptor(desc);

    // -- validation code for: _entryList
    fieldValidator = new FieldValidator();
    fieldValidator.setMinOccurs(1);
    desc.setValidator(fieldValidator);
  } // -- org.apache.jetspeed.xml.api.jcm.TopicsDescriptor()
Exemplo n.º 11
0
  public PlotDescriptor() {
    super();
    xmlName = "Plot";

    // -- set grouping compositor
    setCompositorAsSequence();
    org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
    org.exolab.castor.xml.XMLFieldHandler handler = null;
    org.exolab.castor.xml.FieldValidator fieldValidator = null;
    // -- initialize attribute descriptors

    // -- _foregroundAlpha
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            float.class,
            "_foregroundAlpha",
            "foregroundAlpha",
            org.exolab.castor.xml.NodeType.Attribute);
    handler =
        (new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Plot target = (Plot) object;
            if (!target.hasForegroundAlpha()) return null;
            return new java.lang.Float(target.getForegroundAlpha());
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Plot target = (Plot) object;
              // if null, use delete method for optional primitives
              if (value == null) {
                target.deleteForegroundAlpha();
                return;
              }
              target.setForegroundAlpha(((java.lang.Float) value).floatValue());
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

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

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

    // -- _backgroundPaint
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            org.gridsphere.services.core.charts.BackgroundPaint.class,
            "_backgroundPaint",
            "BackgroundPaint",
            org.exolab.castor.xml.NodeType.Element);
    handler =
        (new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Plot target = (Plot) object;
            return target.getBackgroundPaint();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Plot target = (Plot) object;
              target.setBackgroundPaint(
                  (org.gridsphere.services.core.charts.BackgroundPaint) value);
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

          public java.lang.Object newInstance(java.lang.Object parent) {
            return new org.gridsphere.services.core.charts.BackgroundPaint();
          }
        });
    desc.setHandler(handler);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _backgroundPaint
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- local scope
    }
    desc.setValidator(fieldValidator);
    // -- _settings
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            org.gridsphere.services.core.charts.Settings.class,
            "_settings",
            "Settings",
            org.exolab.castor.xml.NodeType.Element);
    handler =
        (new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Plot target = (Plot) object;
            return target.getSettings();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Plot target = (Plot) object;
              target.setSettings((org.gridsphere.services.core.charts.Settings) value);
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

          public java.lang.Object newInstance(java.lang.Object parent) {
            return new org.gridsphere.services.core.charts.Settings();
          }
        });
    desc.setHandler(handler);
    desc.setRequired(true);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _settings
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
    }
    desc.setValidator(fieldValidator);
    // -- _seriesPaintList
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            org.gridsphere.services.core.charts.SeriesPaint.class,
            "_seriesPaintList",
            "SeriesPaint",
            org.exolab.castor.xml.NodeType.Element);
    handler =
        (new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Plot target = (Plot) object;
            return target.getSeriesPaint();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Plot target = (Plot) object;
              target.addSeriesPaint((org.gridsphere.services.core.charts.SeriesPaint) value);
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

          public java.lang.Object newInstance(java.lang.Object parent) {
            return new org.gridsphere.services.core.charts.SeriesPaint();
          }
        });
    desc.setHandler(handler);
    desc.setMultivalued(true);
    addFieldDescriptor(desc);

    // -- validation code for: _seriesPaintList
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(0);
    { // -- local scope
    }
    desc.setValidator(fieldValidator);
    // -- _noDataMessage
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            org.gridsphere.services.core.charts.NoDataMessage.class,
            "_noDataMessage",
            "NoDataMessage",
            org.exolab.castor.xml.NodeType.Element);
    handler =
        (new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Plot target = (Plot) object;
            return target.getNoDataMessage();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Plot target = (Plot) object;
              target.setNoDataMessage((org.gridsphere.services.core.charts.NoDataMessage) value);
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

          public java.lang.Object newInstance(java.lang.Object parent) {
            return new org.gridsphere.services.core.charts.NoDataMessage();
          }
        });
    desc.setHandler(handler);
    desc.setRequired(true);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _noDataMessage
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
    }
    desc.setValidator(fieldValidator);
  } // -- org.gridsphere.services.core.charts.PlotDescriptor()
Exemplo n.º 12
0
  public AuditMgrRespDescriptor() {
    super();
    xmlName = "auditMgrResp";

    // -- set grouping compositor
    setCompositorAsChoice();
    XMLFieldDescriptorImpl desc = null;
    XMLFieldHandler handler = null;
    FieldValidator fieldValidator = null;
    // -- initialize attribute descriptors

    // -- initialize element descriptors

    // -- _auditLogEntriesList
    desc =
        new XMLFieldDescriptorImpl(
            AuditLogEntries.class, "_auditLogEntriesList", "auditLogEntries", NodeType.Element);
    handler =
        (new XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            AuditMgrResp target = (AuditMgrResp) object;
            return target.getAuditLogEntries();
          }

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

          public java.lang.Object newInstance(java.lang.Object parent) {
            return new AuditLogEntries();
          }
        });
    desc.setHandler(handler);
    desc.setRequired(true);
    desc.setMultivalued(true);
    addFieldDescriptor(desc);

    // -- validation code for: _auditLogEntriesList
    fieldValidator = new FieldValidator();
    fieldValidator.setMinOccurs(0);
    desc.setValidator(fieldValidator);

    // -- _noDataResponse
    desc =
        new XMLFieldDescriptorImpl(
            java.lang.String.class, "_noDataResponse", "noDataResponse", NodeType.Element);
    desc.setImmutable(true);
    handler =
        (new XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            AuditMgrResp target = (AuditMgrResp) object;
            return target.getNoDataResponse();
          }

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

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

    // -- validation code for: _noDataResponse
    fieldValidator = new FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
      StringValidator sv = new StringValidator();
      sv.setWhiteSpace("preserve");
      fieldValidator.setValidator(sv);
    }
    desc.setValidator(fieldValidator);
  } // -- com.cisco.eManager.common.audit2.AuditMgrRespDescriptor()
  public SeriesDescriptor() {
    super();
    xmlName = "series";
    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

    // -- _seriesColor
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class,
            "_seriesColor",
            "series-color",
            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 {
            Series target = (Series) object;
            return target.getSeriesColor();
          }

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

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

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

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Series target = (Series) object;
              target.setSeriesName((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.setHandler(handler);
    desc.setRequired(true);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _seriesName
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
      org.exolab.castor.xml.validators.StringValidator typeValidator =
          new org.exolab.castor.xml.validators.StringValidator();
      typeValidator.setWhiteSpace("preserve");
      fieldValidator.setValidator(typeValidator);
    }
    desc.setValidator(fieldValidator);
  } // -- org.pentaho.jfreereport.castormodel.reportspec.SeriesDescriptor()
Exemplo n.º 14
0
  public PremiumDtlsDescriptor() {
    super();
    xmlName = "PremiumDtls";

    // -- 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

    // -- _premiumTypeCd
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            au.com.suncorp.dm.policy.types.PremiumTypeCdType.class,
            "_premiumTypeCd",
            "PremiumTypeCd",
            org.exolab.castor.xml.NodeType.Element);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            PremiumDtls target = (PremiumDtls) object;
            return target.getPremiumTypeCd();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              PremiumDtls target = (PremiumDtls) object;
              target.setPremiumTypeCd((au.com.suncorp.dm.policy.types.PremiumTypeCdType) 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(
            au.com.suncorp.dm.policy.types.PremiumTypeCdType.class, handler);
    desc.setImmutable(true);
    desc.setHandler(handler);
    desc.setRequired(true);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _premiumTypeCd
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
    }
    desc.setValidator(fieldValidator);
    // -- _inOutputCd
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            au.com.suncorp.dm.policy.types.InOutputCdType.class,
            "_inOutputCd",
            "InOutputCd",
            org.exolab.castor.xml.NodeType.Element);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            PremiumDtls target = (PremiumDtls) object;
            return target.getInOutputCd();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              PremiumDtls target = (PremiumDtls) object;
              target.setInOutputCd((au.com.suncorp.dm.policy.types.InOutputCdType) 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(
            au.com.suncorp.dm.policy.types.InOutputCdType.class, handler);
    desc.setImmutable(true);
    desc.setHandler(handler);
    desc.setRequired(true);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _inOutputCd
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
    }
    desc.setValidator(fieldValidator);
    // -- _singleInstalmentCd
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            au.com.suncorp.dm.policy.types.SingleInstalmentCdType.class,
            "_singleInstalmentCd",
            "SingleInstalmentCd",
            org.exolab.castor.xml.NodeType.Element);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            PremiumDtls target = (PremiumDtls) object;
            return target.getSingleInstalmentCd();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              PremiumDtls target = (PremiumDtls) object;
              target.setSingleInstalmentCd(
                  (au.com.suncorp.dm.policy.types.SingleInstalmentCdType) 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(
            au.com.suncorp.dm.policy.types.SingleInstalmentCdType.class, handler);
    desc.setImmutable(true);
    desc.setHandler(handler);
    desc.setRequired(true);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _singleInstalmentCd
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
    }
    desc.setValidator(fieldValidator);
    // -- _premiumCompDtlsList
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            au.com.suncorp.dm.policy.PremiumCompDtls.class,
            "_premiumCompDtlsList",
            "PremiumCompDtls",
            org.exolab.castor.xml.NodeType.Element);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            PremiumDtls target = (PremiumDtls) object;
            return target.getPremiumCompDtls();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              PremiumDtls target = (PremiumDtls) object;
              target.addPremiumCompDtls((au.com.suncorp.dm.policy.PremiumCompDtls) value);
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

          public java.lang.Object newInstance(java.lang.Object parent) {
            return new au.com.suncorp.dm.policy.PremiumCompDtls();
          }
        };
    desc.setHandler(handler);
    desc.setRequired(true);
    desc.setMultivalued(true);
    addFieldDescriptor(desc);

    // -- validation code for: _premiumCompDtlsList
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
    }
    desc.setValidator(fieldValidator);
  } // -- au.com.suncorp.dm.policy.PremiumDtlsDescriptor()
Exemplo n.º 15
0
  public SystemsDescriptor() {
    super();
    _nsURI = "http://xmlns.opennms.org/xsd/config/datacollection";
    _xmlName = "systems";
    _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

    // -- _systemDefList
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            org.opennms.netmgt.config.datacollection.SystemDef.class,
            "_systemDefList",
            "systemDef",
            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 {
            Systems target = (Systems) object;
            return target.getSystemDef();
          }

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

          @Override
          public void resetValue(Object object)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Systems target = (Systems) object;
              target.removeAllSystemDef();
            } 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.datacollection.SystemDef();
          }
        };
    desc.setSchemaType("org.opennms.netmgt.config.datacollection.SystemDef");
    desc.setHandler(handler);
    desc.setNameSpaceURI("http://xmlns.opennms.org/xsd/config/datacollection");
    desc.setRequired(true);
    desc.setMultivalued(true);
    addFieldDescriptor(desc);
    addSequenceElement(desc);

    // -- validation code for: _systemDefList
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
    }
    desc.setValidator(fieldValidator);
  }
  public MeteorRsMsgTypeDescriptor() {
    super();
    nsURI = "http://schemas.pescxml.org";
    xmlName = "MeteorRsMsgType";

    // -- set grouping compositor
    setCompositorAsSequence();
    org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
    org.exolab.castor.xml.XMLFieldHandler handler = null;
    org.exolab.castor.xml.FieldValidator fieldValidator = null;
    // -- initialize attribute descriptors

    // -- _PESCXMLVersion
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class,
            "_PESCXMLVersion",
            "PESCXMLVersion",
            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 {
            MeteorRsMsgType target = (MeteorRsMsgType) object;
            return target.getPESCXMLVersion();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              MeteorRsMsgType target = (MeteorRsMsgType) object;
              target.setPESCXMLVersion((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.setHandler(handler);
    desc.setRequired(true);
    addFieldDescriptor(desc);

    // -- validation code for: _PESCXMLVersion
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
      StringValidator typeValidator = new StringValidator();
      typeValidator.setWhiteSpace("preserve");
      typeValidator.setFixed("3.0.0");
      fieldValidator.setValidator(typeValidator);
    }
    desc.setValidator(fieldValidator);
    // -- initialize element descriptors

    // -- _meteorDataProviderInfoList
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            org.nchelp.meteor.message.response.MeteorDataProviderInfo.class,
            "_meteorDataProviderInfoList",
            "MeteorDataProviderInfo",
            org.exolab.castor.xml.NodeType.Element);
    handler =
        (new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            MeteorRsMsgType target = (MeteorRsMsgType) object;
            return target.getMeteorDataProviderInfo();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              MeteorRsMsgType target = (MeteorRsMsgType) object;
              target.addMeteorDataProviderInfo(
                  (org.nchelp.meteor.message.response.MeteorDataProviderInfo) value);
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

          public java.lang.Object newInstance(java.lang.Object parent) {
            return new org.nchelp.meteor.message.response.MeteorDataProviderInfo();
          }
        });
    desc.setHandler(handler);
    desc.setRequired(true);
    desc.setMultivalued(true);
    addFieldDescriptor(desc);

    // -- validation code for: _meteorDataProviderInfoList
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
    }
    desc.setValidator(fieldValidator);
    // -- _meteorDataAggregates
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            org.nchelp.meteor.message.response.MeteorDataAggregates.class,
            "_meteorDataAggregates",
            "MeteorDataAggregates",
            org.exolab.castor.xml.NodeType.Element);
    handler =
        (new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            MeteorRsMsgType target = (MeteorRsMsgType) object;
            return target.getMeteorDataAggregates();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              MeteorRsMsgType target = (MeteorRsMsgType) object;
              target.setMeteorDataAggregates(
                  (org.nchelp.meteor.message.response.MeteorDataAggregates) value);
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

          public java.lang.Object newInstance(java.lang.Object parent) {
            return new org.nchelp.meteor.message.response.MeteorDataAggregates();
          }
        });
    desc.setHandler(handler);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _meteorDataAggregates
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- local scope
    }
    desc.setValidator(fieldValidator);
    // -- _meteorIndexProviderDataList
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            org.nchelp.meteor.message.response.MeteorIndexProviderData.class,
            "_meteorIndexProviderDataList",
            "MeteorIndexProviderData",
            org.exolab.castor.xml.NodeType.Element);
    handler =
        (new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            MeteorRsMsgType target = (MeteorRsMsgType) object;
            return target.getMeteorIndexProviderData();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              MeteorRsMsgType target = (MeteorRsMsgType) object;
              target.addMeteorIndexProviderData(
                  (org.nchelp.meteor.message.response.MeteorIndexProviderData) value);
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

          public java.lang.Object newInstance(java.lang.Object parent) {
            return new org.nchelp.meteor.message.response.MeteorIndexProviderData();
          }
        });
    desc.setHandler(handler);
    desc.setMultivalued(true);
    addFieldDescriptor(desc);

    // -- validation code for: _meteorIndexProviderDataList
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(0);
    { // -- local scope
    }
    desc.setValidator(fieldValidator);
  } // -- org.nchelp.meteor.message.response.MeteorRsMsgTypeDescriptor()
Exemplo n.º 17
0
  public SelectRecordDescriptor() {
    super();
    setExtendsWithoutFlatten(
        new com.cdoframework.cdolib.database.xsd.descriptors.SQLBlockTypeDescriptor());
    _xmlName = "SelectRecord";
    _elementDefinition = true;
    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

    // -- outputId
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class,
            "outputId",
            "OutputId",
            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 {
            SelectRecord target = (SelectRecord) object;
            return target.getOutputId();
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              SelectRecord target = (SelectRecord) object;
              target.setOutputId((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);

    // -- validation code for: outputId
    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.addPattern("\\{([a-z]|[A-Z])([a-z]|[A-Z]|[0-9]|\\.|\\[|\\])*\\}");
      typeValidator.setWhiteSpace("preserve");
      typeValidator.setMinLength(1);
    }
    desc.setValidator(fieldValidator);
    // -- recordCountId
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class,
            "recordCountId",
            "RecordCountId",
            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 {
            SelectRecord target = (SelectRecord) object;
            return target.getRecordCountId();
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              SelectRecord target = (SelectRecord) object;
              target.setRecordCountId((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: recordCountId
    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("(\\{([a-z]|[A-Z])([a-z]|[A-Z]|[0-9]|\\.|\\[|\\])*\\})?");
      typeValidator.setWhiteSpace("preserve");
    }
    desc.setValidator(fieldValidator);
    // -- initialize element descriptors

  }
Exemplo n.º 18
0
  public IntervalDescriptor() {
    super();
    _xmlName = "interval";
    _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

    // -- _ixBug
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.Long.TYPE, "_ixBug", "ixBug", org.exolab.castor.xml.NodeType.Element);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Interval target = (Interval) object;
            if (!target.hasIxBug()) {
              return null;
            }
            return new java.lang.Long(target.getIxBug());
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Interval target = (Interval) object;
              // ignore null values for non optional primitives
              if (value == null) {
                return;
              }

              target.setIxBug(((java.lang.Long) value).longValue());
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

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

    // -- validation code for: _ixBug
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
      org.exolab.castor.xml.validators.LongValidator typeValidator;
      typeValidator = new org.exolab.castor.xml.validators.LongValidator();
      fieldValidator.setValidator(typeValidator);
    }
    desc.setValidator(fieldValidator);
    // -- _ixInterval
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.Long.TYPE,
            "_ixInterval",
            "ixInterval",
            org.exolab.castor.xml.NodeType.Element);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Interval target = (Interval) object;
            if (!target.hasIxInterval()) {
              return null;
            }
            return new java.lang.Long(target.getIxInterval());
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Interval target = (Interval) object;
              // ignore null values for non optional primitives
              if (value == null) {
                return;
              }

              target.setIxInterval(((java.lang.Long) value).longValue());
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

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

    // -- validation code for: _ixInterval
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
      org.exolab.castor.xml.validators.LongValidator typeValidator;
      typeValidator = new org.exolab.castor.xml.validators.LongValidator();
      fieldValidator.setValidator(typeValidator);
    }
    desc.setValidator(fieldValidator);
    // -- _dtStart
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.util.Date.class, "_dtStart", "dtStart", org.exolab.castor.xml.NodeType.Element);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Interval target = (Interval) object;
            return target.getDtStart();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Interval target = (Interval) object;
              target.setDtStart((java.util.Date) value);
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

          public java.lang.Object newInstance(java.lang.Object parent) {
            return new java.util.Date();
          }
        };
    handler = new org.exolab.castor.xml.handlers.DateFieldHandler(handler);
    desc.setImmutable(true);
    desc.setSchemaType("dateTime");
    desc.setHandler(handler);
    desc.setRequired(true);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);
    addSequenceElement(desc);

    // -- validation code for: _dtStart
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
      org.exolab.castor.xml.validators.DateTimeValidator typeValidator;
      typeValidator = new org.exolab.castor.xml.validators.DateTimeValidator();
      fieldValidator.setValidator(typeValidator);
    }
    desc.setValidator(fieldValidator);
    // -- _dtEnd
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.util.Date.class, "_dtEnd", "dtEnd", org.exolab.castor.xml.NodeType.Element);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Interval target = (Interval) object;
            return target.getDtEnd();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Interval target = (Interval) object;
              target.setDtEnd((java.util.Date) value);
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

          public java.lang.Object newInstance(java.lang.Object parent) {
            return new java.util.Date();
          }
        };
    handler = new org.exolab.castor.xml.handlers.DateFieldHandler(handler);
    desc.setImmutable(true);
    desc.setSchemaType("dateTime");
    desc.setHandler(handler);
    desc.setRequired(true);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);
    addSequenceElement(desc);

    // -- validation code for: _dtEnd
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
      org.exolab.castor.xml.validators.DateTimeValidator typeValidator;
      typeValidator = new org.exolab.castor.xml.validators.DateTimeValidator();
      fieldValidator.setValidator(typeValidator);
    }
    desc.setValidator(fieldValidator);
    // -- _sTitle
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class, "_sTitle", "sTitle", org.exolab.castor.xml.NodeType.Element);
    desc.setImmutable(true);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Interval target = (Interval) object;
            return target.getSTitle();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Interval target = (Interval) object;
              target.setSTitle((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);
    addSequenceElement(desc);

    // -- validation code for: _sTitle
    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);
    // -- _ixPerson
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.Long.TYPE, "_ixPerson", "ixPerson", org.exolab.castor.xml.NodeType.Element);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            Interval target = (Interval) object;
            if (!target.hasIxPerson()) {
              return null;
            }
            return new java.lang.Long(target.getIxPerson());
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Interval target = (Interval) object;
              // ignore null values for non optional primitives
              if (value == null) {
                return;
              }

              target.setIxPerson(((java.lang.Long) value).longValue());
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

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

    // -- validation code for: _ixPerson
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
      org.exolab.castor.xml.validators.LongValidator typeValidator;
      typeValidator = new org.exolab.castor.xml.validators.LongValidator();
      fieldValidator.setValidator(typeValidator);
    }
    desc.setValidator(fieldValidator);
  }
Exemplo n.º 19
0
  public CategoryDescriptor() {
    super();
    _nsURI = "http://xmlns.opennms.org/xsd/rtceui";
    _xmlName = "category";
    _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

    // -- _catlabel
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class,
            "_catlabel",
            "catlabel",
            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 {
            Category target = (Category) object;
            return target.getCatlabel();
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Category target = (Category) object;
              target.setCatlabel((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.setNameSpaceURI("http://xmlns.opennms.org/xsd/rtceui");
    desc.setRequired(true);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);
    addSequenceElement(desc);

    // -- validation code for: _catlabel
    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);
    // -- _catvalue
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.Double.TYPE, "_catvalue", "catvalue", 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 {
            Category target = (Category) object;
            if (!target.hasCatvalue()) {
              return null;
            }
            return new java.lang.Double(target.getCatvalue());
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Category target = (Category) object;
              // ignore null values for non optional primitives
              if (value == null) {
                return;
              }

              target.setCatvalue(((java.lang.Double) value).doubleValue());
            } 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("double");
    desc.setHandler(handler);
    desc.setNameSpaceURI("http://xmlns.opennms.org/xsd/rtceui");
    desc.setRequired(true);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);
    addSequenceElement(desc);

    // -- validation code for: _catvalue
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
      org.exolab.castor.xml.validators.DoubleValidator typeValidator;
      typeValidator = new org.exolab.castor.xml.validators.DoubleValidator();
      fieldValidator.setValidator(typeValidator);
      typeValidator.setMinInclusive(-1.7976931348623157E308);
      typeValidator.setMaxInclusive(1.7976931348623157E308);
    }
    desc.setValidator(fieldValidator);
    // -- _nodeList
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            org.opennms.netmgt.xml.rtc.Node.class,
            "_nodeList",
            "node",
            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 {
            Category target = (Category) object;
            return target.getNode();
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Category target = (Category) object;
              target.addNode((org.opennms.netmgt.xml.rtc.Node) value);
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

          public void resetValue(Object object)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Category target = (Category) object;
              target.removeAllNode();
            } 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.xml.rtc.Node();
          }
        };
    desc.setSchemaType("org.opennms.netmgt.xml.rtc.Node");
    desc.setHandler(handler);
    desc.setNameSpaceURI("http://xmlns.opennms.org/xsd/rtceui");
    desc.setMultivalued(true);
    addFieldDescriptor(desc);
    addSequenceElement(desc);

    // -- validation code for: _nodeList
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(0);
    { // -- local scope
    }
    desc.setValidator(fieldValidator);
  }
  public NsclientCollectionDescriptor() {
    super();
    _nsURI = "http://xmlns.opennms.org/xsd/config/nsclient-datacollection";
    _xmlName = "nsclient-collection";
    _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

    // -- _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() {
          @Override
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            NsclientCollection target = (NsclientCollection) object;
            return target.getName();
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              NsclientCollection target = (NsclientCollection) object;
              target.setName((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);

    // -- 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);
    // -- initialize element descriptors

    // -- _rrd
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            org.opennms.netmgt.config.nsclient.Rrd.class,
            "_rrd",
            "rrd",
            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 {
            NsclientCollection target = (NsclientCollection) object;
            return target.getRrd();
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              NsclientCollection target = (NsclientCollection) object;
              target.setRrd((org.opennms.netmgt.config.nsclient.Rrd) value);
            } 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.Rrd();
          }
        };
    desc.setSchemaType("org.opennms.netmgt.config.nsclient.Rrd");
    desc.setHandler(handler);
    desc.setNameSpaceURI("http://xmlns.opennms.org/xsd/config/nsclient-datacollection");
    desc.setRequired(true);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);
    addSequenceElement(desc);

    // -- validation code for: _rrd
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
    }
    desc.setValidator(fieldValidator);
    // -- _wpms
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            org.opennms.netmgt.config.nsclient.Wpms.class,
            "_wpms",
            "wpms",
            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 {
            NsclientCollection target = (NsclientCollection) object;
            return target.getWpms();
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              NsclientCollection target = (NsclientCollection) object;
              target.setWpms((org.opennms.netmgt.config.nsclient.Wpms) value);
            } 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.Wpms();
          }
        };
    desc.setSchemaType("org.opennms.netmgt.config.nsclient.Wpms");
    desc.setHandler(handler);
    desc.setNameSpaceURI("http://xmlns.opennms.org/xsd/config/nsclient-datacollection");
    desc.setRequired(true);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);
    addSequenceElement(desc);

    // -- validation code for: _wpms
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
    }
    desc.setValidator(fieldValidator);
  }
Exemplo n.º 21
0
  public HostStateDescriptor() {
    super();
    xmlName = "HostState";

    // -- set grouping compositor
    setCompositorAsChoice();
    org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
    org.exolab.castor.xml.XMLFieldHandler handler = null;
    org.exolab.castor.xml.FieldValidator fieldValidator = null;
    // -- initialize attribute descriptors

    // -- initialize element descriptors

    // -- _down
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.Integer.TYPE, "_down", "Down", org.exolab.castor.xml.NodeType.Element);
    handler =
        (new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            HostState target = (HostState) object;
            if (!target.hasDown()) return null;
            return new Integer(target.getDown());
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              HostState target = (HostState) object;
              // ignore null values for non optional primitives
              if (value == null) return;

              target.setDown(((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.setHandler(handler);
    desc.setRequired(true);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _down
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
      IntegerValidator typeValidator = new IntegerValidator();
      fieldValidator.setValidator(typeValidator);
    }
    desc.setValidator(fieldValidator);
    // -- _up
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.Integer.TYPE, "_up", "Up", org.exolab.castor.xml.NodeType.Element);
    handler =
        (new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            HostState target = (HostState) object;
            if (!target.hasUp()) return null;
            return new Integer(target.getUp());
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              HostState target = (HostState) object;
              // ignore null values for non optional primitives
              if (value == null) return;

              target.setUp(((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.setHandler(handler);
    desc.setRequired(true);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _up
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
      IntegerValidator typeValidator = new IntegerValidator();
      fieldValidator.setValidator(typeValidator);
    }
    desc.setValidator(fieldValidator);
  } // -- com.cisco.eManager.common.inventory2.HostStateDescriptor()
  public PresentationsDescriptor() {
    super();
    _xmlName = "presentations";
    _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

    // -- _presentationList
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            com.innowhite.documentManager.Presentation.class,
            "_presentationList",
            "presentation",
            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 {
            Presentations target = (Presentations) object;
            return target.getPresentation();
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Presentations target = (Presentations) object;
              target.addPresentation((com.innowhite.documentManager.Presentation) value);
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

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

          @Override
          @SuppressWarnings("unused")
          public java.lang.Object newInstance(java.lang.Object parent) {
            return new com.innowhite.documentManager.Presentation();
          }
        };
    desc.setSchemaType("list");
    desc.setComponentType("com.innowhite.documentManager.Presentation");
    desc.setHandler(handler);
    desc.setRequired(true);
    desc.setMultivalued(true);
    addFieldDescriptor(desc);
    addSequenceElement(desc);

    // -- validation code for: _presentationList
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
    }
    desc.setValidator(fieldValidator);
  }
Exemplo n.º 23
0
  public MarshallingTestDescriptor() {
    super();
    nsURI = "http://castor.exolab.org/Test";
    xmlName = "MarshallingTest";

    // -- set grouping compositor
    setCompositorAsSequence();
    XMLFieldDescriptorImpl desc = null;
    XMLFieldHandler handler = null;
    FieldValidator fieldValidator = null;
    // -- initialize attribute descriptors

    // -- initialize element descriptors

    // -- _root_Object
    desc =
        new XMLFieldDescriptorImpl(
            Root_Object.class, "_root_Object", "Root_Object", NodeType.Element);
    handler =
        (new XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            MarshallingTest target = (MarshallingTest) object;
            return target.getRoot_Object();
          }

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

          public java.lang.Object newInstance(java.lang.Object parent) {
            return new Root_Object();
          }
        });
    desc.setHandler(handler);
    desc.setNameSpaceURI("http://castor.exolab.org/Test");
    desc.setRequired(true);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _root_Object
    fieldValidator = new FieldValidator();
    fieldValidator.setMinOccurs(1);
    desc.setValidator(fieldValidator);

    // -- _unitTestCaseList
    desc =
        new XMLFieldDescriptorImpl(
            UnitTestCase.class, "_unitTestCaseList", "UnitTestCase", NodeType.Element);
    handler =
        (new XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            MarshallingTest target = (MarshallingTest) object;
            return target.getUnitTestCase();
          }

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

          public java.lang.Object newInstance(java.lang.Object parent) {
            return new UnitTestCase();
          }
        });
    desc.setHandler(handler);
    desc.setNameSpaceURI("http://castor.exolab.org/Test");
    desc.setRequired(true);
    desc.setMultivalued(true);
    addFieldDescriptor(desc);

    // -- validation code for: _unitTestCaseList
    fieldValidator = new FieldValidator();
    fieldValidator.setMinOccurs(1);
    desc.setValidator(fieldValidator);
  } // -- org.exolab.castor.tests.framework.testDescriptor.MarshallingTestDescriptor()
  public WdbElementDescriptor() {
    super();
    xmlName = "wdbElement";
    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

    // -- _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 {
            WdbElement target = (WdbElement) object;
            return target.getName();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              WdbElement target = (WdbElement) 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.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
      StringValidator typeValidator = new StringValidator();
      typeValidator.setWhiteSpace("preserve");
      fieldValidator.setValidator(typeValidator);
    }
    desc.setValidator(fieldValidator);
    // -- _type
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class, "_type", "type", 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 {
            WdbElement target = (WdbElement) object;
            return target.getType();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              WdbElement target = (WdbElement) object;
              target.setType((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.setHandler(handler);
    desc.setRequired(true);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _type
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
      StringValidator typeValidator = new StringValidator();
      typeValidator.setWhiteSpace("preserve");
      fieldValidator.setValidator(typeValidator);
    }
    desc.setValidator(fieldValidator);
    // -- _size
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.Integer.TYPE, "_size", "size", org.exolab.castor.xml.NodeType.Attribute);
    handler =
        new org.exolab.castor.xml.XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            WdbElement target = (WdbElement) object;
            if (!target.hasSize()) return null;
            return new java.lang.Integer(target.getSize());
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              WdbElement target = (WdbElement) object;
              // if null, use delete method for optional primitives
              if (value == null) {
                target.deleteSize();
                return;
              }
              target.setSize(((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.setHandler(handler);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

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

  } // -- com.gele.tools.wow.wdbearmanager.castor.WdbElementDescriptor()
Exemplo n.º 25
0
/*
Exemplo n.º 26
0
  public ParameterDescriptor() {
    super();
    _nsURI = "http://xmlns.opennms.org/xsd/config/datacollection";
    _xmlName = "parameter";
    _elementDefinition = true;
    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

    // -- _key
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class, "_key", "key", 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 {
            Parameter target = (Parameter) object;
            return target.getKey();
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Parameter target = (Parameter) object;
              target.setKey((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);

    // -- validation code for: _key
    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);
    // -- _value
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class, "_value", "value", 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 {
            Parameter target = (Parameter) object;
            return target.getValue();
          }

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

    // -- validation code for: _value
    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);
    // -- initialize element descriptors

  }
  public RuleSetDescriptor() {
    super();
    _nsURI = "http://xmlns.opennms.org/xsd/drools-engine";
    _xmlName = "rule-set";
    _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

    // -- _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() {
          @Override
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            RuleSet target = (RuleSet) object;
            return target.getName();
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              RuleSet target = (RuleSet) object;
              target.setName((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);

    // -- 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);
    // -- initialize element descriptors

    // -- _ruleFileList
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class,
            "_ruleFileList",
            "rule-file",
            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 {
            RuleSet target = (RuleSet) object;
            return target.getRuleFile();
          }

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

          public void resetValue(Object object)
              throws IllegalStateException, IllegalArgumentException {
            try {
              RuleSet target = (RuleSet) object;
              target.removeAllRuleFile();
            } 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.setNameSpaceURI("http://xmlns.opennms.org/xsd/drools-engine");
    desc.setRequired(true);
    desc.setMultivalued(true);
    addFieldDescriptor(desc);
    addSequenceElement(desc);

    // -- validation code for: _ruleFileList
    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);
    // -- _eventList
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class, "_eventList", "event", 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 {
            RuleSet target = (RuleSet) object;
            return target.getEvent();
          }

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

          public void resetValue(Object object)
              throws IllegalStateException, IllegalArgumentException {
            try {
              RuleSet target = (RuleSet) object;
              target.removeAllEvent();
            } 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.setNameSpaceURI("http://xmlns.opennms.org/xsd/drools-engine");
    desc.setRequired(true);
    desc.setMultivalued(true);
    addFieldDescriptor(desc);
    addSequenceElement(desc);

    // -- validation code for: _eventList
    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);
    // -- _appContext
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class,
            "_appContext",
            "app-context",
            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 {
            RuleSet target = (RuleSet) object;
            return target.getAppContext();
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              RuleSet target = (RuleSet) object;
              target.setAppContext((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.setNameSpaceURI("http://xmlns.opennms.org/xsd/drools-engine");
    desc.setMultivalued(false);
    addFieldDescriptor(desc);
    addSequenceElement(desc);

    // -- validation code for: _appContext
    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);
    // -- _globalList
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            org.opennms.netmgt.correlation.drools.config.Global.class,
            "_globalList",
            "global",
            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 {
            RuleSet target = (RuleSet) object;
            return target.getGlobal();
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              RuleSet target = (RuleSet) object;
              target.addGlobal((org.opennms.netmgt.correlation.drools.config.Global) value);
            } catch (java.lang.Exception ex) {
              throw new IllegalStateException(ex.toString());
            }
          }

          public void resetValue(Object object)
              throws IllegalStateException, IllegalArgumentException {
            try {
              RuleSet target = (RuleSet) object;
              target.removeAllGlobal();
            } 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.correlation.drools.config.Global();
          }
        };
    desc.setSchemaType("org.opennms.netmgt.correlation.drools.config.Global");
    desc.setHandler(handler);
    desc.setNameSpaceURI("http://xmlns.opennms.org/xsd/drools-engine");
    desc.setMultivalued(true);
    addFieldDescriptor(desc);
    addSequenceElement(desc);

    // -- validation code for: _globalList
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(0);
    { // -- local scope
    }
    desc.setValidator(fieldValidator);
  }
  public RetrieveEventsRespDescriptor() {
    super();
    xmlName = "retrieveEventsResp";

    // -- set grouping compositor
    setCompositorAsChoice();
    XMLFieldDescriptorImpl desc = null;
    XMLFieldHandler handler = null;
    FieldValidator fieldValidator = null;
    // -- initialize attribute descriptors

    // -- initialize element descriptors

    // -- _emanagerEventDetails
    desc =
        new XMLFieldDescriptorImpl(
            EmanagerEventDetails.class,
            "_emanagerEventDetails",
            "emanagerEventDetails",
            NodeType.Element);
    handler =
        (new XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            RetrieveEventsResp target = (RetrieveEventsResp) object;
            return target.getEmanagerEventDetails();
          }

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

          public java.lang.Object newInstance(java.lang.Object parent) {
            return new EmanagerEventDetails();
          }
        });
    desc.setHandler(handler);
    desc.setRequired(true);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _emanagerEventDetails
    fieldValidator = new FieldValidator();
    fieldValidator.setMinOccurs(1);
    desc.setValidator(fieldValidator);

    // -- _tibcoEventDetails
    desc =
        new XMLFieldDescriptorImpl(
            TibcoEventDetails.class, "_tibcoEventDetails", "tibcoEventDetails", NodeType.Element);
    handler =
        (new XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            RetrieveEventsResp target = (RetrieveEventsResp) object;
            return target.getTibcoEventDetails();
          }

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

          public java.lang.Object newInstance(java.lang.Object parent) {
            return new TibcoEventDetails();
          }
        });
    desc.setHandler(handler);
    desc.setRequired(true);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _tibcoEventDetails
    fieldValidator = new FieldValidator();
    fieldValidator.setMinOccurs(1);
    desc.setValidator(fieldValidator);

    // -- _processSequencerEventDetails
    desc =
        new XMLFieldDescriptorImpl(
            ProcessSequencerEventDetails.class,
            "_processSequencerEventDetails",
            "processSequencerEventDetails",
            NodeType.Element);
    handler =
        (new XMLFieldHandler() {
          public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
            RetrieveEventsResp target = (RetrieveEventsResp) object;
            return target.getProcessSequencerEventDetails();
          }

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

          public java.lang.Object newInstance(java.lang.Object parent) {
            return new ProcessSequencerEventDetails();
          }
        });
    desc.setHandler(handler);
    desc.setRequired(true);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _processSequencerEventDetails
    fieldValidator = new FieldValidator();
    fieldValidator.setMinOccurs(1);
    desc.setValidator(fieldValidator);
  } // -- com.cisco.eManager.common.event2.RetrieveEventsRespDescriptor()
Exemplo n.º 29
0
  public DowntimeDescriptor() {
    super();
    _nsURI = "http://xmlns.opennms.org/xsd/config/poller";
    _xmlName = "downtime";
    _elementDefinition = true;
    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

    // -- _begin
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.Long.TYPE, "_begin", "begin", 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 {
            Downtime target = (Downtime) object;
            if (!target.hasBegin()) {
              return null;
            }
            return new java.lang.Long(target.getBegin());
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Downtime target = (Downtime) object;
              // ignore null values for non optional primitives
              if (value == null) {
                return;
              }

              target.setBegin(((java.lang.Long) value).longValue());
            } 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("long");
    desc.setHandler(handler);
    desc.setRequired(true);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    // -- validation code for: _begin
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
      org.exolab.castor.xml.validators.LongValidator typeValidator;
      typeValidator = new org.exolab.castor.xml.validators.LongValidator();
      fieldValidator.setValidator(typeValidator);
      typeValidator.setMinInclusive(-9223372036854775808L);
      typeValidator.setMaxInclusive(9223372036854775807L);
    }
    desc.setValidator(fieldValidator);
    // -- _end
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.Long.TYPE, "_end", "end", 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 {
            Downtime target = (Downtime) object;
            if (!target.hasEnd()) {
              return null;
            }
            return new java.lang.Long(target.getEnd());
          }

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

    // -- validation code for: _end
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- local scope
      org.exolab.castor.xml.validators.LongValidator typeValidator;
      typeValidator = new org.exolab.castor.xml.validators.LongValidator();
      fieldValidator.setValidator(typeValidator);
      typeValidator.setMinInclusive(-9223372036854775808L);
      typeValidator.setMaxInclusive(9223372036854775807L);
    }
    desc.setValidator(fieldValidator);
    // -- _delete
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class, "_delete", "delete", 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 {
            Downtime target = (Downtime) object;
            return target.getDelete();
          }

          @Override
          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Downtime target = (Downtime) object;
              target.setDelete((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: _delete
    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("(yes|true)");
      typeValidator.setWhiteSpace("preserve");
    }
    desc.setValidator(fieldValidator);
    // -- _interval
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.Long.TYPE, "_interval", "interval", 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 {
            Downtime target = (Downtime) object;
            if (!target.hasInterval()) {
              return null;
            }
            return new java.lang.Long(target.getInterval());
          }

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

    // -- validation code for: _interval
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { // -- local scope
      org.exolab.castor.xml.validators.LongValidator typeValidator;
      typeValidator = new org.exolab.castor.xml.validators.LongValidator();
      fieldValidator.setValidator(typeValidator);
      typeValidator.setMinInclusive(-9223372036854775808L);
      typeValidator.setMaxInclusive(9223372036854775807L);
    }
    desc.setValidator(fieldValidator);
    // -- initialize element descriptors

  }
Exemplo n.º 30
0
  public IconDescriptor() {
    super();
    xmlName = "icon";
    org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
    org.exolab.castor.xml.XMLFieldHandler handler = null;
    org.exolab.castor.xml.FieldValidator fieldValidator = null;
    // -- initialize attribute descriptors

    // -- _text
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class, "_text", "text", 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 {
            Icon target = (Icon) object;
            return target.getText();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Icon target = (Icon) object;
              target.setText((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.setHandler(handler);
    desc.setRequired(true);
    addFieldDescriptor(desc);

    // -- validation code for: _text
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
      StringValidator typeValidator = new StringValidator();
      typeValidator.setWhiteSpace("preserve");
      fieldValidator.setValidator(typeValidator);
    }
    desc.setValidator(fieldValidator);
    // -- _src
    desc =
        new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
            java.lang.String.class, "_src", "src", 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 {
            Icon target = (Icon) object;
            return target.getSrc();
          }

          public void setValue(java.lang.Object object, java.lang.Object value)
              throws IllegalStateException, IllegalArgumentException {
            try {
              Icon target = (Icon) object;
              target.setSrc((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.setHandler(handler);
    desc.setRequired(true);
    addFieldDescriptor(desc);

    // -- validation code for: _src
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { // -- local scope
      StringValidator typeValidator = new StringValidator();
      typeValidator.setWhiteSpace("preserve");
      fieldValidator.setValidator(typeValidator);
    }
    desc.setValidator(fieldValidator);
    // -- initialize element descriptors

  } // -- com.iver.andami.plugins.config.generate.IconDescriptor()