Package org.eclipse.emf.ecore

Examples of org.eclipse.emf.ecore.EClassifier


                    // Process all the global XSD elements
                    EClass documentRoot = extendedMetaData.getDocumentRoot(currentEPackage);
                    if (documentRoot != null) {
                        for (EStructuralFeature element : (List<EStructuralFeature>)extendedMetaData
                            .getElements(documentRoot)) {
                            EClassifier elementType = element.getEType();
                           
                            // Handle a complex type
                            if (elementType instanceof EClass) {
                                EClass eClass = (EClass)elementType;

                                GenClass genClass = genClasses.get(elementType);
                                QName qname = new QName(extendedMetaData.getNamespace(currentEPackage),
                                        extendedMetaData.getName(element));
                                String interfaceName = (DYNAMIC_SDO & genOptions) == DYNAMIC_SDO ? "commonj.sdo.DataObject" : genClass
                                        .getGenPackage().getInterfacePackageName()
                                + '.' + genClass.getInterfaceName();
                                boolean anonymous = extendedMetaData.isAnonymous(eClass);
                               
                                // Build list of property class names
                                List<String> propertyClassNames=new ArrayList<String>();
                                for (EStructuralFeature feature : (List<EStructuralFeature>)eClass.getEStructuralFeatures()) {
                                    EClassifier propertyType = feature.getEType();
                                    if (propertyType instanceof EClass) {
                                        GenClass propertyGenClass = genClasses.get(propertyType);
                                        String propertyClassName = (DYNAMIC_SDO & genOptions) == DYNAMIC_SDO ? "commonj.sdo.DataObject"
                                                : propertyGenClass.getGenPackage().getInterfacePackageName() + '.'
                                                               + '.' + propertyGenClass.getInterfaceName();
                                        propertyClassNames.add(propertyClassName);
                                    } else if (propertyType instanceof EClassifier) {
                                        String propertyClassName = propertyType.getInstanceClass().getName();
                                        propertyClassNames.add(propertyClassName);
                                    }
                                }

                                SDODataBindingTypeMappingEntry typeMappingEntry =
View Full Code Here


                    // Process all the global XSD elements
                    EClass documentRoot = extendedMetaData.getDocumentRoot(currentEPackage);
                    if (documentRoot != null) {
                        for (EStructuralFeature element : (List<EStructuralFeature>)extendedMetaData
                            .getElements(documentRoot)) {
                            EClassifier elementType = element.getEType();
                           
                            // Handle a complex type
                            if (elementType instanceof EClass) {
                                EClass eClass = (EClass)elementType;

                                GenClass genClass = genClasses.get(elementType);
                                QName qname = new QName(extendedMetaData.getNamespace(currentEPackage),
                                        extendedMetaData.getName(element));
                                String interfaceName = genClass.getGenPackage().getInterfacePackageName()
                                + '.' + genClass.getInterfaceName();
                                boolean anonymous = extendedMetaData.isAnonymous(eClass);
                               
                                // Build list of property class names
                                List<String> propertyClassNames=new ArrayList<String>();
                                for (EStructuralFeature feature : (List<EStructuralFeature>)eClass.getEStructuralFeatures()) {
                                    EClassifier propertyType = feature.getEType();
                                    if (propertyType instanceof EClass) {
                                        GenClass propertyGenClass = genClasses.get(propertyType);
                                        String propertyClassName = propertyGenClass.getGenPackage().getInterfacePackageName()
                                                               + '.' + propertyGenClass.getInterfaceName();
                                        propertyClassNames.add(propertyClassName);
                                    } else if (propertyType instanceof EClassifier) {
                                        String propertyClassName = propertyType.getInstanceClass().getName();
                                        propertyClassNames.add(propertyClassName);
                                    }
                                }

                                SDODataBindingTypeMappingEntry typeMappingEntry =
View Full Code Here

  /**
   * @generated
   */
  protected Object getValidNewValue(EAttribute feature, Object value) {
    EClassifier type = feature.getEType();
    if (type instanceof EDataType) {
      Class iClass = type.getInstanceClass();
      if (Boolean.TYPE.equals(iClass)) {
        if (value instanceof Boolean) {
          // ok
        } else if (value instanceof String) {
          value = Boolean.valueOf((String) value);
View Full Code Here

  private static ImageDescriptor getProvidedImageDescriptor(
      ENamedElement element) {
    if (element instanceof EStructuralFeature) {
      EStructuralFeature feature = ((EStructuralFeature) element);
      EClass eContainingClass = feature.getEContainingClass();
      EClassifier eType = feature.getEType();
      if (eContainingClass != null && !eContainingClass.isAbstract()) {
        element = eContainingClass;
      } else if (eType instanceof EClass
          && !((EClass) eType).isAbstract()) {
        element = eType;
View Full Code Here

  /**
   * @generated
   */
  protected Object getValidNewValue(EAttribute feature, Object value) {
    EClassifier type = feature.getEType();
    if (type instanceof EDataType) {
      Class iClass = type.getInstanceClass();
      if (Boolean.TYPE.equals(iClass)) {
        if (value instanceof Boolean) {
          // ok
        } else if (value instanceof String) {
          value = Boolean.valueOf((String) value);
View Full Code Here

  private static ImageDescriptor getProvidedImageDescriptor(
      ENamedElement element) {
    if (element instanceof EStructuralFeature) {
      EStructuralFeature feature = ((EStructuralFeature) element);
      EClass eContainingClass = feature.getEContainingClass();
      EClassifier eType = feature.getEType();
      if (eContainingClass != null && !eContainingClass.isAbstract()) {
        element = eContainingClass;
      } else if (eType instanceof EClass
          && !((EClass) eType).isAbstract()) {
        element = eType;
View Full Code Here

  private static ImageDescriptor getProvidedImageDescriptor(
      ENamedElement element) {
    if (element instanceof EStructuralFeature) {
      EStructuralFeature feature = ((EStructuralFeature) element);
      EClass eContainingClass = feature.getEContainingClass();
      EClassifier eType = feature.getEType();
      if (eContainingClass != null && !eContainingClass.isAbstract()) {
        element = eContainingClass;
      } else if (eType instanceof EClass
          && !((EClass) eType).isAbstract()) {
        element = eType;
View Full Code Here

      // Use EObject as implicit root class for any object, to allow eContainer() and other EObject operations from OCL expressions
      ParsingOptions.setOption(ecoreEnv,
          ParsingOptions.implicitRootClass(ecoreEnv),
          EcorePackage.eINSTANCE.getEObject());
      for (String varName : environment.keySet()) {
        EClassifier varType = environment.get(varName);
        ecoreEnv.addElement(varName,
            createVar(ecoreEnv, varName, varType), false);
      }
    }
View Full Code Here

  /**
   * @generated
   */
  protected Object getValidNewValue(EAttribute feature, Object value) {
    EClassifier type = feature.getEType();
    if (type instanceof EDataType) {
      Class iClass = type.getInstanceClass();
      if (Boolean.TYPE.equals(iClass)) {
        if (value instanceof Boolean) {
          // ok
        } else if (value instanceof String) {
          value = Boolean.valueOf((String) value);
View Full Code Here

  /**
   * @generated
   */
  protected Object getValidNewValue(EAttribute feature, Object value) {
    EClassifier type = feature.getEType();
    if (type instanceof EDataType) {
      Class iClass = type.getInstanceClass();
      if (Boolean.TYPE.equals(iClass)) {
        if (value instanceof Boolean) {
          // ok
        } else if (value instanceof String) {
          value = Boolean.valueOf((String) value);
View Full Code Here

TOP

Related Classes of org.eclipse.emf.ecore.EClassifier

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.