Package org.eclipse.emf.common.util

Examples of org.eclipse.emf.common.util.UniqueEList


  public static List getMetaObjectInstanceProperties(EModelElement metaObject)
  {
    // Use the default helper context for now
    TypeHelper typeHelper = HelperProvider.getDefaultContext().getTypeHelper();
     
    List result = new UniqueEList();
    List annotations = metaObject.getEAnnotations();
    int size = annotations.size();
    for (int i=0; i<size; i++)
    {
      EAnnotation annotation = (EAnnotation)annotations.get(i);
      String propertyURI = annotation.getSource();
     
      for (Iterator iter = annotation.getDetails().iterator(); iter.hasNext(); )
      {
        EStringToStringMapEntryImpl entry = (EStringToStringMapEntryImpl)iter.next();
        String propertyName = entry.getTypedKey();
       
        Property globalProperty = getGlobalProperty(typeHelper, propertyURI, propertyName);
        if (globalProperty != null)
        {
          result.add(globalProperty);
        }
      }
    }
    return result;
  }
View Full Code Here


      allFeaturesCache = allFeatures;
      allProperties = allExtendedProperties = null;
    }
    if (allProperties == null)
    {
      List allProperties = new UniqueEList();
      for (final Iterator iterator = getBaseTypes().iterator(); iterator.hasNext(); )
      {
        Type baseType = (Type)iterator.next();
        allProperties.addAll(baseType.getProperties());
      }
      allProperties.addAll(getDeclaredProperties());    
      this.allProperties = allProperties;
    }
    return allProperties;
  }
View Full Code Here

      allFeaturesCache = allFeatures;
      allProperties = allExtendedProperties = null;
    }
    if (allProperties == null)
    {
      List allExtendedProperties = new UniqueEList();
      for (final Iterator iterator = getBaseTypes().iterator(); iterator.hasNext(); )
      {
        Type baseType = (Type)iterator.next();
        allExtendedProperties.addAll(((ClassImpl)baseType).getAllExtendedProperties());
      }
      allExtendedProperties.addAll(getExtendedProperties());    
      this.allExtendedProperties = allExtendedProperties;
    }
    return allExtendedProperties;
  }
View Full Code Here

      return null;
  }
 
  public static List getOpenContentProperties(DataObject dataObject)
  {
    List result = new UniqueEList();
    ((ClassImpl)dataObject.getType()).addOpenProperties((EObject)dataObject, result);
    return result;
  }
View Full Code Here

   *            The interface to collect the associations from
   * @return An <code>EList</code> with all collected associations
   */
  @SuppressWarnings({ "rawtypes", "unchecked" })
  private EList getAllInterfaceAssociations(Interface iFace) {
    EList associations = new UniqueEList();

    associations.addAll(iFace.getAssociations());
    if (iFace.getGeneralizations().size() > 0) {
      for (int i = 0; i < iFace.getGeneralizations().size(); i++) {
        associations
            .addAll(getAllInterfaceAssociations((Interface) iFace
                .getGeneralizations().get(i).getGeneral()));
      }
    }
    return associations;
View Full Code Here

  }

  public static List getInstanceProperties(DataObject dataObject)
  {
    Type type = dataObject.getType();
    List result = new UniqueEList(type.getProperties());
    ((ClassImpl)type).addOpenProperties((EObject)dataObject, result);
    return result;
  }
View Full Code Here

  {
    // Use the default helper context for now
//    TypeHelper typeHelper = HelperProvider.getDefaultContext().getTypeHelper();
      HelperContext hc = HelperProvider.getDefaultContext();
     
    List result = new UniqueEList();
    List annotations = metaObject.getEAnnotations();
    int size = annotations.size();
    for (int i=0; i<size; i++)
    {
      EAnnotation annotation = (EAnnotation)annotations.get(i);
      String propertyURI = annotation.getSource();
     
      for (Iterator iter = annotation.getDetails().iterator(); iter.hasNext(); )
      {
        EStringToStringMapEntryImpl entry = (EStringToStringMapEntryImpl)iter.next();
        String propertyName = entry.getTypedKey();
       
        Property globalProperty = getGlobalProperty(hc, propertyURI, propertyName);
        if (globalProperty != null)
        {
          result.add(globalProperty);
        }
      }
    }
    return result;
  }
View Full Code Here

        }
        return null;
    }

    public List getOpenContentProperties(DataObject dataObject) {
        List result = new UniqueEList();
        ((ClassImpl)dataObject.getType()).addOpenProperties((EObject)dataObject, result);
        return result;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.emf.common.util.UniqueEList

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.