Package org.eclipse.emf.ecore

Examples of org.eclipse.emf.ecore.EStructuralFeature$Internal$DynamicValueHolder


 
  public Object eDynamicGet(int featureID, boolean resolve, boolean coreType)
  {
    if (featureID < eClass().getFeatureCount())
    {
      EStructuralFeature eFeature = eClass().getEStructuralFeature(featureID);
      return eSettingDelegate(eFeature).dynamicGet(this, eSettings(), featureID, resolve, coreType);
    }
    else
    {
      return super.eDynamicGet(featureID, resolve, coreType);
View Full Code Here


 
  public void eDynamicSet(int featureID, Object newValue)
  {
    if (featureID < eClass().getFeatureCount())
    {
      EStructuralFeature eFeature = eClass().getEStructuralFeature(featureID);
      eDynamicSet(featureID, eFeature, newValue);
    }
    else
    {
      super.eDynamicSet(featureID, newValue);
View Full Code Here

  public void eDynamicUnset(int featureID)
  {
    if (featureID < eClass().getFeatureCount())
    {
      EStructuralFeature eFeature = eClass().getEStructuralFeature(featureID);
      eDynamicUnset(featureID, eFeature);
    }
    else
    {
      super.eDynamicUnset(featureID);
View Full Code Here

  public boolean eDynamicIsSet(int featureID)
  {
    if (featureID < eClass().getFeatureCount())
    {
      EStructuralFeature eFeature = eClass().getEStructuralFeature(featureID);
      return eSettingDelegate(eFeature).dynamicIsSet(this, eSettings(), featureID);
    }
    else
    {
      return super.eDynamicIsSet(featureID);
View Full Code Here

    else
    {
      for (int i = 0; i < settings.size(); i++)
      {
        FeatureChange change = (FeatureChange)settings.get(i);
        EStructuralFeature feature = change.getFeature();
        if (FeatureMapUtil.isFeatureMap(feature))
        {
          final List values = (List)change.getValue();
          if (sdoSettings == null)
          {
            sdoSettings = new BasicEList(settings);
          }
          DelegatingFeatureMap featureMap = new DelegatingFeatureMap(((InternalEObject)dataObject), feature)
            {
              protected final List theList = values;
 
              protected List delegateList()
              {
                return theList;
              }
            };
 
          // create new settings and replace the setting for mixed feature
          sdoSettings.set(i, SDOFactory.eINSTANCE.createChangeSummarySetting(feature, new BasicSequence(featureMap), change.isSet()));
          // add all derived features
          for (int k = 0; k < featureMap.size(); k++)
          {
            EStructuralFeature f = featureMap.getEStructuralFeature(k);
            sdoSettings.add(SDOFactory.eINSTANCE.createChangeSummarySetting(f, featureMap.get(f, false), true));
          }
        }
      }
    }
View Full Code Here

    //TODO maybe optimize this to just return type.getProperties if type.isOpen (isOpen would need to be cached)
    EObject eDataObject = (EObject) dataObject;
    List result = new UniqueEList(eDataObject.eClass().getEAllStructuralFeatures());
    for (int i = 0, count = result.size(); i < count; ++i)
    {
      EStructuralFeature eStructuralFeature = (EStructuralFeature)result.get(i);
      if (!eStructuralFeature.isDerived() && FeatureMapUtil.isFeatureMap(eStructuralFeature))
      {
        List features = (List)eDataObject.eGet(eStructuralFeature);
        for (int j = 0, size = features.size(); j < size; ++j)
        {
          FeatureMap.Entry entry = (FeatureMap.Entry)features.get(j);
          EStructuralFeature entryFeature = entry.getEStructuralFeature();
          result.add(entryFeature);
        }
      }
    }
    return result;
View Full Code Here

      ((DataObject)contents.get(i)).delete();
    }
    EClass eClass = eDataObject.eClass();
    for (int i = 0, size = eClass.getFeatureCount(); i < size; ++i)
    {
      EStructuralFeature eStructuralFeature = eClass.getEStructuralFeature(i);
      if (eStructuralFeature.isChangeable() && !eStructuralFeature.isDerived() && !((Property)eStructuralFeature).isReadOnly())
      {
        eDataObject.eUnset(eStructuralFeature);
      }
    }
  }
View Full Code Here

    throw new IllegalArgumentException("The value of type '" + value.getClass().getName() + "' cannot be converted to BigDecimal");
  }

  public static Object getSetValue(Property property, BigDecimal value)
  {
    EStructuralFeature eStructuralFeature = (EStructuralFeature)property;
    EClassifier eType = eStructuralFeature.getEType();
    if (value == null)
    {
      return eType.getDefaultValue();
    }
View Full Code Here

    throw new IllegalArgumentException("The value of type '" + value.getClass().getName() + "' cannot be converted to BigInteger");
  }

  public static Object getSetValue(Property property, BigInteger value)
  {
    EStructuralFeature eStructuralFeature = (EStructuralFeature)property;
    EClassifier eType = eStructuralFeature.getEType();
    if (value == null)
    {
      return eType.getDefaultValue();
    }
View Full Code Here

    throw new IllegalArgumentException("The value of type '" + value.getClass().getName() + "' cannot be converted to boolean");
  }

  public static Object getSetValue(Property property, boolean value)
  {
    EStructuralFeature eStructuralFeature = (EStructuralFeature)property;
    String name = eStructuralFeature.getEType().getInstanceClassName();
    if (name == "java.lang.Boolean" || name == "boolean")
    {
      return value ? Boolean.TRUE : Boolean.FALSE;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.emf.ecore.EStructuralFeature$Internal$DynamicValueHolder

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.