Examples of EClass


Examples of org.eclipse.emf.ecore.EClass

  /**
   * Basically a copy of super, only linkNode is remembered before calling getScope
   */
  public List<EObject> getLinkedObjects(EObject context, EReference ref, INode node)
      throws IllegalNodeException {
    final EClass requiredType = ref.getEReferenceType();
    if (requiredType == null)
      return Collections.<EObject> emptyList();

    final String crossRefString = getCrossRefNodeAsString(node);
    if (crossRefString != null && !crossRefString.equals("")) {
View Full Code Here

Examples of org.eclipse.emf.ecore.EClass

  protected Collection<String> getInitialObjectNames() {
    if (initialObjectNames == null) {
      initialObjectNames = new ArrayList<String>();
      for (EClassifier eClassifier : ontoUMLPackage.getEClassifiers()) {
        if (eClassifier instanceof EClass) {
          EClass eClass = (EClass)eClassifier;
          if (!eClass.isAbstract()) {
            initialObjectNames.add(eClass.getName());
          }
        }
      }
      Collections.sort(initialObjectNames, java.text.Collator.getInstance());
    }
View Full Code Here

Examples of org.eclipse.emf.ecore.EClass

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  protected EObject createInitialModel() {
    EClass eClass = (EClass)ontoUMLPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName());
    EObject rootObject = ontoUMLFactory.create(eClass);
    return rootObject;
  }
View Full Code Here

Examples of org.eclipse.emf.ecore.EClass

   */
  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;
      }
    }
    if (element instanceof EClass) {
      EClass eClass = (EClass) element;
      if (!eClass.isAbstract()) {
        return OntoUML.diagram.part.OntoUMLDiagramEditorPlugin
            .getInstance().getItemImageDescriptor(
                eClass.getEPackage().getEFactoryInstance()
                    .create(eClass));
      }
    }
    // TODO : support structural features
    return null;
View Full Code Here

Examples of org.eclipse.emf.ecore.EClass

      Object expectedValue) {
    if (false == receiver instanceof EObject) {
      return false;
    }
    EObject eObject = (EObject) receiver;
    EClass eClass = eObject.eClass();
    if (eClass == OntoUML.OntoUMLPackage.eINSTANCE.getAntiRigidMixinClass()) {
      return true;
    }
    if (eClass == OntoUML.OntoUMLPackage.eINSTANCE
        .getAntiRigidSortalClass()) {
View Full Code Here

Examples of org.eclipse.emf.ecore.EClass

  protected Collection<String> getInitialObjectNames() {
    if (initialObjectNames == null) {
      initialObjectNames = new ArrayList<String>();
      for (EClassifier eClassifier : urmlPackage.getEClassifiers()) {
        if (eClassifier instanceof EClass) {
          EClass eClass = (EClass)eClassifier;
          if (!eClass.isAbstract()) {
            initialObjectNames.add(eClass.getName());
          }
        }
      }
      Collections.sort(initialObjectNames, java.text.Collator.getInstance());
    }
View Full Code Here

Examples of org.eclipse.emf.ecore.EClass

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  protected EObject createInitialModel() {
    EClass eClass = (EClass)urmlPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName());
    EObject rootObject = urmlFactory.create(eClass);
    return rootObject;
  }
View Full Code Here

Examples of org.eclipse.emf.ecore.EClass

        eAttribute.setVolatile(true);
      }
    }
    else
    {
      EClass eClass = (EClass)type;
      EAttribute any = (EAttribute)eClass.getEStructuralFeature("any");
      eClass.getEStructuralFeatures().remove(any)
    }
  }
View Full Code Here

Examples of org.eclipse.emf.ecore.EClass

      if (type.getName() != null) // document root is a special case
        throw new IllegalArgumentException();
    }
   
    if (isSequenced) {
      EClass eClass = (EClass)type;
      ExtendedMetaData.INSTANCE.setContentKind(eClass, ExtendedMetaData.MIXED_CONTENT);
      EAttribute mixedFeature = EcoreFactory.eINSTANCE.createEAttribute();
      mixedFeature.setName("mixed");
      mixedFeature.setUnique(false);
      mixedFeature.setEType(EcorePackage.eINSTANCE.getEFeatureMapEntry());
      mixedFeature.setLowerBound(0);
      mixedFeature.setUpperBound(-1);
      eClass.getEStructuralFeatures().add(mixedFeature);
      ExtendedMetaData.INSTANCE.setFeatureKind(mixedFeature, ExtendedMetaData.ELEMENT_WILDCARD_FEATURE);
      ExtendedMetaData.INSTANCE.setName(mixedFeature, ":mixed");
    }
    else
    {
View Full Code Here

Examples of org.eclipse.emf.ecore.EClass

                                new SDODataBindingTypeMappingEntry(interfaceName, false, null);
                        typeMapping.put(qname, typeMappingEntry);
                    }

                    // 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();
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.