Package org.eclipse.emf.ecore

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


      }
      if (oldContainer != documentRoot || oldContainmentReference != rootElement)
      {
        if (oldContainmentReference != null && FeatureMapUtil.isMany(oldContainer, oldContainmentReference))
        {
          oldContainmentIndex = ((List)oldContainer.eGet(oldContainmentReference)).indexOf(rootObject);
        }
       
        Object rootValue =
          rootElement instanceof EAttribute && rootObject instanceof SimpleAnyTypeDataObject ?
            ((SimpleAnyTypeDataObject)rootObject).getValue() : rootObject;
View Full Code Here


    {
      if (oldContainer != documentRoot || oldContainmentReference != rootElement)
      {
        if (FeatureMapUtil.isMany(oldContainer, oldContainmentReference))
        {
          ((List)oldContainer.eGet(oldContainmentReference)).add(oldContainmentIndex, rootObject);
        }
        else
        {
          oldContainer.eSet(oldContainmentReference, rootObject);
        }
View Full Code Here

      EStructuralFeature eStructuralFeature = setting.getEStructuralFeature();
      if (eStructuralFeature.isChangeable())
      {
        if (eStructuralFeature.isMany())
        {
          List refList = (List)referencingEObject.eGet(eStructuralFeature);
          int refIndex = refList.indexOf(oldEObject);
          if (refIndex != -1) refList.set(refIndex, newEObject);
        }
        else
        {
View Full Code Here

      EClass eClass = root.eClass();

      EReference xmlnsPrefixMapFeature = extendedMetaData.getXMLNSPrefixMapFeature(eClass);
      if (xmlnsPrefixMapFeature != null)
      {
        @SuppressWarnings("unchecked") EMap<String, String> xmlnsPrefixMap = (EMap<String, String>)root.eGet(xmlnsPrefixMapFeature);
        for (Map.Entry<String, String> entry : helper.getPrefixToNamespaceMap())
        {
          String key = entry.getKey();
          String value = entry.getValue();
          String currentValue = xmlnsPrefixMap.get(key);
View Full Code Here

        EClass eClass = root.eClass();

        EReference xmlnsPrefixMapFeature = extendedMetaData.getXMLNSPrefixMapFeature(eClass);
        if (xmlnsPrefixMapFeature != null)
        {
          @SuppressWarnings("unchecked") EMap<String, String> xmlnsPrefixMap = (EMap<String, String>)root.eGet(xmlnsPrefixMapFeature);
          helper.setPrefixToNamespaceMap(xmlnsPrefixMap);
        }
      }
    }
   
View Full Code Here

          EClass eClass = root.eClass();

          EReference xsiSchemaLocationMapFeature = extendedMetaData.getXSISchemaLocationMapFeature(eClass);
          if (xsiSchemaLocationMapFeature != null)
          {
            @SuppressWarnings("unchecked") EMap<String, String> xsiSchemaLocationMap = (EMap<String, String>)root.eGet(xsiSchemaLocationMapFeature);
            if (!xsiSchemaLocationMap.isEmpty())
            {
              handledBySchemaLocationMap = xsiSchemaLocationMap.map();
              declareXSI = true;
              for (Map.Entry<String, String> entry : xsiSchemaLocationMap.entrySet())
View Full Code Here

            //
            if (oppositeEReference.isMany())
            {
              // So if the resolved object is also present...
              //
              InternalEList<?> holderContents = (InternalEList<?>)proxyHolder.eGet(oppositeEReference);
              int resolvedEObjectIndex = holderContents.basicIndexOf(resolvedEObject);
              if (resolvedEObjectIndex != -1)
              {
                // Move the resolved object to the right place, remove the proxy, and we're done.
                //
View Full Code Here

            {
              // The proxy needs to be replaced in a way that updates both ends of the reference.
              //
              if (oppositeEReference.isMany())
              {
                @SuppressWarnings("unchecked") InternalEList<EObject> proxyHolderList = (InternalEList<EObject>)proxyHolder.eGet(oppositeEReference);
                proxyHolderList.setUnique(proxyHolderList.basicIndexOf(proxy), resolvedEObject);
              }
              else
              {
                proxyHolder.eSet(oppositeEReference, resolvedEObject);
View Full Code Here

      if (oppositeEObject != null)
      {
        if (eOpposite.isMany())
        {
          @SuppressWarnings("unchecked")
          List<EObject> oppositeValues = (List<EObject>)oppositeEObject.eGet(eOpposite);
          if (!oppositeValues.contains(eObject))
          {
            result = false;
            if (diagnostics != null)
            {
View Full Code Here

            }
          }
        }
        else
        {
          if (oppositeEObject.eGet(eOpposite) != eObject)
          {
            result = false;
            if (diagnostics != null)
            {
              diagnostics.add
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.