Package org.eclipse.emf.ecore.util

Examples of org.eclipse.emf.ecore.util.FeatureMap$Entry


    {
      if (!FeatureMapUtil.isFeatureMap(openFeature))
      {
        openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature);
      }
      FeatureMap featureMap = (FeatureMap)eGet(openFeature);
      ((FeatureMap.Internal)featureMap).set(eFeature, newValue);
    }
    else
    {
      throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid changeable feature");
View Full Code Here


    {
      if (!FeatureMapUtil.isFeatureMap(openFeature))
      {
        openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature);
      }
      FeatureMap featureMap = (FeatureMap)eGet(openFeature);
      ((FeatureMap.Internal)featureMap).unset(eFeature);
    }
    else
    {
      throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid changeable feature");
View Full Code Here

    {
      if (!FeatureMapUtil.isFeatureMap(openFeature))
      {
        openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature);
      }
      FeatureMap featureMap = (FeatureMap)eGet(openFeature);
      return ((FeatureMap.Internal)featureMap).isSet(eFeature);
    }
    else
    {
      throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid feature");
View Full Code Here

      {
        if (!FeatureMapUtil.isFeatureMap(openFeature))
        {
          openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature);
        }
        FeatureMap featureMap = (FeatureMap)eGet(openFeature);
        int upperBound = openFeature.getUpperBound();
        if (upperBound > 1 || upperBound == ETypedElement.UNBOUNDED_MULTIPLICITY)
        {
          return (EStructuralFeature.Setting)((FeatureMap.Internal)featureMap).get(eFeature, false);
        }
View Full Code Here

        {
          targetFeature = group;
        }
        if (targetFeature.getEType() == EcorePackage.Literals.EFEATURE_MAP_ENTRY)
        {
          FeatureMap featureMap = (FeatureMap)object.eGet(targetFeature);
          EClassifier eClassifier = feature.getEType();
          if (eClassifier instanceof EDataType)
          {
            EDataType eDataType = (EDataType) eClassifier;
            EFactory eFactory = eDataType.getEPackage().getEFactoryInstance();
            value = createFromString(eFactory, eDataType, (String)value);
          }
          featureMap.add(feature, value);
          return;
        }
        else
        {
          // If we are substituting an EAttribute for an EReference...
View Full Code Here

    if (baseElement.getExtensionValues().size() > 0) {

      for (ExtensionAttributeValue extensionAttributeValue : baseElement.getExtensionValues()) {

        FeatureMap extensionElements = extensionAttributeValue.getValue();

        for (Entry entry : extensionElements) {
          if (entry.getValue() instanceof Expression) {
            Expression expression= (Expression) entry.getValue();
            return expression;
View Full Code Here

    private Scenario getDefaultScenario(Definitions def) {
      if(def.getRelationships() != null && def.getRelationships().size() > 0) {
          // current support for single relationship
          Relationship relationship = def.getRelationships().get(0);
          for(ExtensionAttributeValue extattrval : relationship.getExtensionValues()) {
                FeatureMap extensionElements = extattrval.getValue();
                @SuppressWarnings("unchecked")
                List<BPSimDataType> bpsimExtension = (List<BPSimDataType>) extensionElements.get(BpsimPackage.Literals.DOCUMENT_ROOT__BP_SIM_DATA, true);
                if(bpsimExtension != null && bpsimExtension.size() > 0) {
                    BPSimDataType bpmsim = bpsimExtension.get(0);
                  if(bpmsim.getScenario() != null && bpmsim.getScenario().size() > 0) {
                    return bpmsim.getScenario().get(0);
                  }
View Full Code Here

    private Scenario getDefaultScenario(Definitions def) {
      if(def.getRelationships() != null && def.getRelationships().size() > 0) {
          // current support for single relationship
          Relationship relationship = def.getRelationships().get(0);
          for(ExtensionAttributeValue extattrval : relationship.getExtensionValues()) {
                FeatureMap extensionElements = extattrval.getValue();
                @SuppressWarnings("unchecked")
                List<BPSimDataType> bpsimExtension = (List<BPSimDataType>) extensionElements.get(BpsimPackage.Literals.DOCUMENT_ROOT__BP_SIM_DATA, true);
                if(bpsimExtension != null && bpsimExtension.size() > 0) {
                    BPSimDataType bpmsim = bpsimExtension.get(0);
                  if(bpmsim.getScenario() != null && bpmsim.getScenario().size() > 0) {
                    return bpmsim.getScenario().get(0);
                  }
View Full Code Here

    @Override
    public void handle(Object request, RequestData data) {
        super.handle(request, data);
       
        //also determine the sub operation
        FeatureMap elements = (FeatureMap) EMFUtils.get((EObject)request, "group");
        ListIterator i = elements.valueListIterator();
        int flag = 0;
        while(i.hasNext()) {
            Object e = i.next();
            if (e.getClass().getSimpleName().startsWith("Insert")) {
                flag |= 1;
View Full Code Here

        data.setSubOperation(sb.toString());
    }
   
    @Override
    public List<String> getLayers(Object request) {
        FeatureMap elements = (FeatureMap) EMFUtils.get((EObject)request, "group");
       
        List<String> layers = new ArrayList();
        ListIterator i = elements.valueListIterator();
        while(i.hasNext()) {
            Object e = i.next();
            if (EMFUtils.has((EObject)e, "typeName")) {
                Object typeName = EMFUtils.get((EObject)e, "typeName");
                if (typeName != null) {
View Full Code Here

TOP

Related Classes of org.eclipse.emf.ecore.util.FeatureMap$Entry

Copyright © 2018 www.massapicom. 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.