Examples of ExtensionType


Examples of org.dmg.pmml._40.ExtensionType

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetExtension1(ExtensionType newExtension1, NotificationChain msgs) {
    ExtensionType oldExtension1 = extension1;
    extension1 = newExtension1;
    if (eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, _40Package.SEGMENT_TYPE__EXTENSION1, oldExtension1, newExtension1);
      if (msgs == null) msgs = notification; else msgs.add(notification);
    }
View Full Code Here

Examples of org.dmg.pmml._40.ExtensionType

      dataField.setName(attr.name()); // String
      dataField.setOptype(OPTYPE.CONTINUOUS); // OPTYPE
      String[] strCoordinates = null;
      strCoordinates = createAnchors(attr.index(), k);
      // Add Extension - Coordinate X
      ExtensionType extension = _40Factory.eINSTANCE
          .createExtensionType();
      extension.setName("xCoordinate");
      extension.setValue(strCoordinates[0]);
      dataField.getExtension().add(extension);
      // Add Extension - Coordinate y
      extension = _40Factory.eINSTANCE.createExtensionType();
      extension.setName("yCoordinate");
      extension.setValue(strCoordinates[1]);
      dataField.getExtension().add(extension);
      dataDictionary.getDataField().add(dataField);
    }
    DataFieldType dataField = _40Factory.eINSTANCE.createDataFieldType();
    dataField.setDataType(DATATYPE.STRING); // DATATYPE
    dataField.setName("class"); // String
    dataField.setOptype(OPTYPE.CATEGORICAL); // OPTYPE
    dataDictionary.getDataField().add(dataField);
    Attribute classAttr = data.classAttribute();
    Enumeration values = classAttr.enumerateValues();

    while (values.hasMoreElements()) {
      ValueType valueType = _40Factory.eINSTANCE.createValueType();
      valueType.setValue(values.nextElement().toString());
      dataField.getValue().add(valueType);
    }

    Enumeration<?> helpInstances = data.enumerateInstances();
    while (helpInstances.hasMoreElements()) {
      Instance instance = (Instance) helpInstances.nextElement();
      setMinAndMaxOfAttributes(instance);
    }

    Enumeration<?> instances = data.enumerateInstances();
    while (instances.hasMoreElements()) {
      Instance instance = (Instance) instances.nextElement();
      createPointsU(instance);
    }

    ExtensionType extension = null;
    for (String[] helpBody : bodyU) {
      String helpString = "";
      helpString = helpBody[0] + " " + helpBody[1] + " " + helpBody[2];
      extension = _40Factory.eINSTANCE.createExtensionType();
      extension.setName(Integer.toString(bodyU.indexOf(helpBody) + 1));
      FeatureMapUtil.addText(extension.getMixed(), helpString);
      dataDictionary.getExtension().add(extension);
    }

    resource.getContents().add(documentRoot);
    ByteArrayOutputStream os = new ByteArrayOutputStream();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.