Package org.eclipse.emf.ecore.util

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


    result.append('@');
    result.append(eStructuralFeature.getName());

    if (eStructuralFeature instanceof EAttribute)
    {
      FeatureMap featureMap = (FeatureMap)eGet(eStructuralFeature, false);
      for (int i = 0, size = featureMap.size(); i < size; ++i)
      {
        if (featureMap.getValue(i) == eObject)
        {
          EStructuralFeature entryFeature = featureMap.getEStructuralFeature(i);
          if (entryFeature instanceof EReference && ((EReference)entryFeature).isContainment())
          {
            result.append('.');
            result.append(i);
            return result.toString();
View Full Code Here


        {
          return (EReference)eFeature;
        }
        else
        {
          FeatureMap featureMap = (FeatureMap)eContainer.eGet(eFeature);
          for (int i = 0, size = featureMap.size(); i < size; ++i)
          {
            if (featureMap.getValue(i) == eObject)
            {
              EStructuralFeature entryFeature = featureMap.getEStructuralFeature(i);
              if (entryFeature instanceof EReference)
              {
                EReference entryReference = (EReference)entryFeature;
                if (entryReference.isContainment())
                {
View Full Code Here

    {
      if (!FeatureMapUtil.isFeatureMap(openFeature))
      {
        openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature);
      }
      FeatureMap featureMap = (FeatureMap)eGet(openFeature);
      return ((FeatureMap.Internal)featureMap).get(eFeature, resolve);
    }
    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);
      ((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

TOP

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

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.