Examples of eGet()


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

    IModel instance = engine.getTemplateInstance();
    Resource instanceResource = instance.getModelResource();
    EObject javaRoot = instanceResource.getContents().get(0);
    EObject javaClass = javaRoot.eContents().get(0);
    EStructuralFeature memberFeature = javaClass.eClass().getEStructuralFeature("members");
    List<EObject> classMembers = (List<EObject>)javaClass.eGet(memberFeature);
    assert(Util.getElementName(classMembers.get(1)).matches("p1"));
   
    EObject fieldP1 = classMembers.get(1);
    EObject fieldP4 = EObjectCopier.copyElement(fieldP1, fieldP1.eClass().getEPackage());
    fieldP4.eSet(fieldP4.eClass().getEStructuralFeature("name"),"p4");
View Full Code Here

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

              i.remove();
            }

            // Compute the holder of the proxy
            //
            EObject proxyHolder = (EObject)(eReference.isMany() ? ((List<?>)proxy.eGet(eReference)).get(0) : proxy.eGet(eReference));

            // If the proxy holder can hold many values,
            // it may contain a duplicate that resulted when the other end was processed as an IDREF
            // and hence did both sides of the bidirectional relation.
            //
View Full Code Here

Examples of org.eclipselabs.mongoemf.junit.model.PrimaryObject.eGet()

    Resource primaryResource2 = resourceSet2.getResource(primaryObject.eResource().getURI(), true);
    PrimaryObject primaryObject2 = (PrimaryObject) primaryResource2.getContents().get(0);

    // Verify that proxies are created when loading from Mongo DB.
    //
    assertTrue(((EObject) primaryObject2.eGet(ModelPackage.Literals.PRIMARY_OBJECT__SINGLE_CONTAINMENT_REFERENCE_PROXIES, false)).eIsProxy());
    assertTrue(((EObject) primaryObject2.eGet(ModelPackage.Literals.PRIMARY_OBJECT__SINGLE_NON_CONTAINMENT_REFERENCE, false)).eIsProxy());
    assertTrue(((EObject) ((InternalEList<?>) primaryObject2.eGet(ModelPackage.Literals.PRIMARY_OBJECT__MULTIPLE_CONTAINMENT_REFERENCE_PROXIES)).basicGet(0)).eIsProxy());
    assertTrue(((EObject) ((InternalEList<?>) primaryObject2.eGet(ModelPackage.Literals.PRIMARY_OBJECT__MULTIPLE_NON_CONTAINMENT_REFERENCE)).basicGet(0)).eIsProxy());

    // Verify that those proxies have attributes populated as expected for OPTION_PROXY_ATTRIBUTES
View Full Code Here

Examples of org.openiaml.model.model.GeneratedElement.eGet()

            GeneratedElement edge2 = (GeneratedElement) edge;
           
            if (!edge2.isIsGenerated()) {
              EReference target = typ.getToRef();
             
              Object reverse = edge2.eGet(target);
              if (reverse == null)
                continue;
             
              if (!(reverse instanceof EObject)) {
                throw new IllegalArgumentException("Object '" + reverse + "' is not an EObject, resolved reference = '" + target + "' of edgeType " + typ);
View Full Code Here

Examples of org.openiaml.model.model.GeneratedElement.eGet()

            GeneratedElement edge2 = (GeneratedElement) edge;
           
            if (!edge2.isIsGenerated()) {
              EReference target = typ.getFromRef();
             
              Object reverse = edge2.eGet(target);
              if (reverse == null)
                continue;
             
              if (!(reverse instanceof EObject)) {
                throw new IllegalArgumentException("Object '" + reverse + "' is not an EObject, resolved reference = '" + target + "' of edgeType " + typ);
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.