Examples of EAttribute


Examples of org.eclipse.emf.ecore.EAttribute

    }   
  }
 
  private void changeAttributeWithOperations(Reference2Attribute pPointer2Att, Object newValue){
    EObject pParent = pPointer2Att.getParent();
    EAttribute pAtt = pPointer2Att.getEAttribute();
    //TODO Check type mismatch
    //check if optional or mandatory (check null)
    log.debug("ParameterAttributeType: " + Util.getFullName(pAtt.getEAttributeType()) + " newValueType: " + newValue.getClass().getName());
   
    //TODO Change here if new operations
    if(newValue instanceof Boolean){
      //Negation operation
      boolean negate = pPointer2Att.isNegateValue();
View Full Code Here

Examples of org.eclipse.emf.ecore.EAttribute

            eObject.eClass().getName()));
    //findInPackageAndInstantiate(eObject.eClass().getName(),copiedObjectRootPackage);
   
    //copy attributes
    for(EAttribute eAtt : eObject.eClass().getEAllAttributes()){
      EAttribute copiedAtt = (EAttribute)copiedObject.eClass().getEStructuralFeature(eAtt.getName());
      copiedObject.eSet(copiedAtt, eObject.eGet(eAtt));
    }
    //copy references
    for(EReference eRef : eObject.eClass().getEAllReferences()){
      EReference copiedRef = (EReference)copiedObject.eClass().getEStructuralFeature(eRef.getName());
View Full Code Here

Examples of org.eclipse.emf.ecore.EAttribute

    EClass documentRootEClass = (EClass)SDOFactory.eINSTANCE.createClass();
    documentRootEClass.setName("DocumentRoot");
    ExtendedMetaData.INSTANCE.setName(documentRootEClass, "");
    ExtendedMetaData.INSTANCE.setContentKind(documentRootEClass, ExtendedMetaData.MIXED_CONTENT);
   
    EAttribute mixed = (EAttribute)SDOFactory.eINSTANCE.createAttribute();
    mixed.setName("mixed");
    mixed.setEType(EcorePackage.eINSTANCE.getEFeatureMapEntry());
    mixed.setUpperBound(EStructuralFeature.UNBOUNDED_MULTIPLICITY);
    ExtendedMetaData.INSTANCE.setName(mixed, ":mixed");
    ExtendedMetaData.INSTANCE.setFeatureKind(mixed, ExtendedMetaData.ELEMENT_WILDCARD_FEATURE);
    documentRootEClass.getEStructuralFeatures().add(mixed);
   
    EReference xmlnsPrefixMap = (EReference)SDOFactory.eINSTANCE.createReference();
View Full Code Here

Examples of org.eclipse.emf.ecore.EAttribute

        }
      }
    }
    else if (eClass().getEAllAttributes().contains(feature))
    {
      EAttribute eAttribute = (EAttribute)feature;
      switch (eventType)
      {
        case Notification.ADD:
        case Notification.ADD_MANY:
        case Notification.REMOVE:
View Full Code Here

Examples of org.eclipse.emf.ecore.EAttribute

        return eReference;
      }
      else
      {
        EAttribute eAttribute = ecoreFactory.createEAttribute();
        eAttribute.setName(name);
        eAttribute.setEType(demandMetaData.getAnySimpleType());
        eAttribute.setDerived(true);
        eAttribute.setTransient(true);
        eAttribute.setVolatile(true);
        documentRootEClass.getEStructuralFeatures().add(eAttribute);

        setFeatureKind(eAttribute, isElement ? ELEMENT_FEATURE : ATTRIBUTE_FEATURE);
        setNamespace(eAttribute, namespace);

        // Mark the bound as unspecified so that it won't be considered many
        // but can nevertheless be recognized as being unspecified and perhaps still be treat as many.
        //
        if (isElement)
        {
          eAttribute.setUpperBound(ETypedElement.UNSPECIFIED_MULTIPLICITY);
        }

        return eAttribute;
      }
    }
View Full Code Here

Examples of org.eclipse.emf.ecore.EAttribute

   * <!-- end-user-doc -->
   * @generated NOT
   */
  public Sequence getOldSequence(DataObject dataObject)
  {
    EAttribute mixedFeature = BasicExtendedMetaData.INSTANCE.getMixedFeature((EClass)dataObject.getType());
    if (mixedFeature != null)
    {
      return (Sequence)getOldValue(dataObject, (Property)mixedFeature).getValue();
    }
    return null;
View Full Code Here

Examples of org.eclipse.emf.ecore.EAttribute

                }
                continue;
              }

              // The property is a regular Java type / not an SDO, create an EAttribute to represent it
              EAttribute attribute = EcoreFactory.eINSTANCE.createEAttribute();
              attribute.setName(propertyName);
              EDataType dataType = (EDataType)TypeHelper.INSTANCE.getType(propertyClass);
              attribute.setEType(dataType);
              implEClass.getEStructuralFeatures().add(attribute);
            }
          }
        }
      }
View Full Code Here

Examples of org.eclipse.emf.ecore.EAttribute

    int propertyNumber = documentRootEClass.getEStructuralFeatures().size();

    EStructuralFeature globalProperty;
    if(asAttribute) {
      createEAttribute(documentRootEClass, propertyNumber);
      EAttribute gatt = (EAttribute)documentRootEClass.getEStructuralFeatures().get(propertyNumber);
      initEAttribute(gatt, (EDataType)type, name, null, 0, -2, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, IS_DERIVED, IS_ORDERED);
      globalProperty = gatt;
    } else {
      createEReference(documentRootEClass, propertyNumber);
      EReference gref = (EReference)documentRootEClass.getEStructuralFeatures().get(propertyNumber);
View Full Code Here

Examples of org.eclipse.emf.ecore.EAttribute

    EClass documentRootEClass = (EClass)SDOFactory.eINSTANCE.createClass();
    documentRootEClass.setName("DocumentRoot");
    ExtendedMetaData.INSTANCE.setName(documentRootEClass, "");
    ExtendedMetaData.INSTANCE.setContentKind(documentRootEClass, ExtendedMetaData.MIXED_CONTENT);
   
    EAttribute mixed = (EAttribute)SDOFactory.eINSTANCE.createAttribute();
    mixed.setName("mixed");
    mixed.setEType(EcorePackage.eINSTANCE.getEFeatureMapEntry());
    mixed.setUpperBound(EStructuralFeature.UNBOUNDED_MULTIPLICITY);
    ExtendedMetaData.INSTANCE.setName(mixed, ":mixed");
    ExtendedMetaData.INSTANCE.setFeatureKind(mixed, ExtendedMetaData.ELEMENT_WILDCARD_FEATURE);
    documentRootEClass.getEStructuralFeatures().add(mixed);
   
    EReference xmlnsPrefixMap = (EReference)SDOFactory.eINSTANCE.createReference();
View Full Code Here

Examples of org.eclipse.emf.ecore.EAttribute

    public void setOpen(Type type, boolean isOpen) {
        if (isOpen == type.isOpen())
            return;

        if (isOpen) {
            EAttribute eAttribute = (EAttribute)SDOFactory.eINSTANCE.createAttribute();
            ((EClass)type).getEStructuralFeatures().add(eAttribute);

            eAttribute.setName("any");
            eAttribute.setUnique(false);
            eAttribute.setUpperBound(ETypedElement.UNBOUNDED_MULTIPLICITY);
            eAttribute.setEType(EcorePackage.eINSTANCE.getEFeatureMapEntry());
            ExtendedMetaData.INSTANCE.setFeatureKind(eAttribute, ExtendedMetaData.ELEMENT_WILDCARD_FEATURE);
            ExtendedMetaData.INSTANCE.setProcessingKind(eAttribute, ExtendedMetaData.LAX_PROCESSING);
            ExtendedMetaData.INSTANCE.setWildcards(eAttribute, Collections.singletonList("##any"));

            // FB TBD Add an "anyAttribute" EAttribute as well.

            if (ExtendedMetaData.INSTANCE.getMixedFeature((EClass)type) != null) {
                eAttribute.setDerived(true);
                eAttribute.setTransient(true);
                eAttribute.setVolatile(true);
            }
        } else {
            EClass eClass = (EClass)type;
            EAttribute any = (EAttribute)eClass.getEStructuralFeature("any");
            eClass.getEStructuralFeatures().remove(any);
        }
    }
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.