Examples of eSet()


Examples of org.eclipse.emf.ecore.EObject.eSet()

    EObject pObjectInstance = instanceFactory.create(pObject);
    pObjectInstance.eSet(pObjectRegionAttr, "EU");

    // Create Permission instance
    EObject permissionInstance = instanceFactory.create(permission);
    permissionInstance.eSet(permRegionAttr, "EU");

    // Create Role instance
    EObject roleInstance = instanceFactory.create(role);
    roleInstance.eSet(permissionRef, permissionInstance);
View Full Code Here

Examples of org.eclipse.emf.ecore.EObject.eSet()

    EObject permissionInstance = instanceFactory.create(permission);
    permissionInstance.eSet(permRegionAttr, "EU");

    // Create Role instance
    EObject roleInstance = instanceFactory.create(role);
    roleInstance.eSet(permissionRef, permissionInstance);

    return evaluator.evaluate(pObjectInstance, roleInstance, operation);
  }

  private EAttribute getRegionAttr() {
View Full Code Here

Examples of org.eclipse.emf.ecore.EObject.eSet()

            ChangeRecorder r = new ChangeRecorder(eFeature);
            Object o1 = eFeature.eGet(eAttribute);
            System.out.println("2: " + o1);
            Object o2 = eFeature.eGet(eAttribute);
            System.out.println("2: " + o2);
            eFeature.eSet(eAttribute, v);
            ChangeDescription c = r.endRecording();
            c.applyAndReverse();
            c.apply();
        } catch (Exception e) {
            LOGGER.log(Level.SEVERE, e.getMessage(), e);
View Full Code Here

Examples of org.eclipse.emf.ecore.EObject.eSet()

        String name = descriptor.getName();
        EStructuralFeature feature = poInstance.eClass().getEStructuralFeature(name);
        if (feature != null) {
          try {
            Object value = method.invoke(object, new Object[0]);
            poInstance.eSet(feature, value);
            LogFactory.getLog(JavaInstanceMapper.class).debug(MessageFormat.format("Set attibute {0}", name));
          } catch (Exception e) {
            throw new CreateObjectException(MessageFormat.format("Unable to set the feature {0}: {1}", name, e.getLocalizedMessage()));
          }
        }
View Full Code Here

Examples of org.eclipse.emf.ecore.EObject.eSet()

        } else {
          throw new CreateObjectException(MessageFormat.format("Can''t create instance of {0} protected object: the value of attribute {1} isn''t defined", po.getName(), attrName));
        }
      }
      try {
        poInstance.eSet(attribute, value);
      } catch (ClassCastException e) {
        throw new CreateObjectException(MessageFormat.format("Can''t create instance of {0} protected object: the value of attribute {1} has incorrect type: {2}", po.getName(), attrName, e.getLocalizedMessage()));
      }
    }
    return poInstance;
View Full Code Here

Examples of org.eclipse.emf.ecore.EObject.eSet()

            logger.trace("{} feature type {}", LoggerConstants.CONFIG, feature.getEType()
                .getInstanceClassName());
            logger.debug("configuring feature: {} for uid {}", feature.getName(), uid);
            String className = feature.getEType().getInstanceClassName();
            if (className.equals("int")) {
              tfConfig.eSet(feature, Integer.parseInt(deviceConfig.get(property)));
            } else if (className.equals("short") || className.equals("java.lang.Short")) {
              tfConfig.eSet(feature, Short.parseShort(deviceConfig.get(property)));
            } else if (className.equals("long") || className.equals("java.lang.Long")) {
              tfConfig.eSet(feature, Long.parseLong(deviceConfig.get(property)));
            } else if (className.equals("boolean") || className.equals("java.lang.Boolean")) {
View Full Code Here

Examples of org.eclipse.emf.ecore.EObject.eSet()

            logger.debug("configuring feature: {} for uid {}", feature.getName(), uid);
            String className = feature.getEType().getInstanceClassName();
            if (className.equals("int")) {
              tfConfig.eSet(feature, Integer.parseInt(deviceConfig.get(property)));
            } else if (className.equals("short") || className.equals("java.lang.Short")) {
              tfConfig.eSet(feature, Short.parseShort(deviceConfig.get(property)));
            } else if (className.equals("long") || className.equals("java.lang.Long")) {
              tfConfig.eSet(feature, Long.parseLong(deviceConfig.get(property)));
            } else if (className.equals("boolean") || className.equals("java.lang.Boolean")) {
              logger.debug("{} found boolean value", LoggerConstants.CONFIG);
              tfConfig.eSet(feature, Boolean.parseBoolean(deviceConfig.get(property)));
View Full Code Here

Examples of org.eclipse.emf.ecore.EObject.eSet()

            if (className.equals("int")) {
              tfConfig.eSet(feature, Integer.parseInt(deviceConfig.get(property)));
            } else if (className.equals("short") || className.equals("java.lang.Short")) {
              tfConfig.eSet(feature, Short.parseShort(deviceConfig.get(property)));
            } else if (className.equals("long") || className.equals("java.lang.Long")) {
              tfConfig.eSet(feature, Long.parseLong(deviceConfig.get(property)));
            } else if (className.equals("boolean") || className.equals("java.lang.Boolean")) {
              logger.debug("{} found boolean value", LoggerConstants.CONFIG);
              tfConfig.eSet(feature, Boolean.parseBoolean(deviceConfig.get(property)));
            } else if (className.equals("java.lang.String")) {
              logger.debug("{} found String value", LoggerConstants.CONFIG);
View Full Code Here

Examples of org.eclipse.emf.ecore.EObject.eSet()

              tfConfig.eSet(feature, Short.parseShort(deviceConfig.get(property)));
            } else if (className.equals("long") || className.equals("java.lang.Long")) {
              tfConfig.eSet(feature, Long.parseLong(deviceConfig.get(property)));
            } else if (className.equals("boolean") || className.equals("java.lang.Boolean")) {
              logger.debug("{} found boolean value", LoggerConstants.CONFIG);
              tfConfig.eSet(feature, Boolean.parseBoolean(deviceConfig.get(property)));
            } else if (className.equals("java.lang.String")) {
              logger.debug("{} found String value", LoggerConstants.CONFIG);
              tfConfig.eSet(feature, deviceConfig.get(property));
            } else if (className.equals("java.math.BigDecimal")) {
              logger.debug("{} found BigDecimal value", LoggerConstants.CONFIG);
View Full Code Here

Examples of org.eclipse.emf.ecore.EObject.eSet()

            } else if (className.equals("boolean") || className.equals("java.lang.Boolean")) {
              logger.debug("{} found boolean value", LoggerConstants.CONFIG);
              tfConfig.eSet(feature, Boolean.parseBoolean(deviceConfig.get(property)));
            } else if (className.equals("java.lang.String")) {
              logger.debug("{} found String value", LoggerConstants.CONFIG);
              tfConfig.eSet(feature, deviceConfig.get(property));
            } else if (className.equals("java.math.BigDecimal")) {
              logger.debug("{} found BigDecimal value", LoggerConstants.CONFIG);
              tfConfig.eSet(feature, new BigDecimal(deviceConfig.get(property)));
              // } else if (feature.getEType().getInstanceClassName().equals("EList")){
              // logger.debug("{} found EList value", LoggerConstants.CONFIG);
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.