Java 类org.eclipse.emf.ecore.util.ExtendedMetaData 实例源码

项目:neoscada    文件:ConfigurationModelWizard.java   
/**
 * Returns the names of the features representing global elements.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames ()
{
    if ( initialObjectNames == null )
    {
        initialObjectNames = new ArrayList<String> ();
        for ( EStructuralFeature eStructuralFeature : ExtendedMetaData.INSTANCE.getAllElements ( ExtendedMetaData.INSTANCE.getDocumentRoot ( configurationPackage ) ) )
        {
            if ( eStructuralFeature.isChangeable () )
            {
                EClassifier eClassifier = eStructuralFeature.getEType ();
                if ( eClassifier instanceof EClass )
                {
                    EClass eClass = (EClass)eClassifier;
                    if ( !eClass.isAbstract () )
                    {
                        initialObjectNames.add ( eStructuralFeature.getName () );
                    }
                }
            }
        }
        Collections.sort ( initialObjectNames, CommonPlugin.INSTANCE.getComparator () );
    }
    return initialObjectNames;
}
项目:hybris-commerce-eclipse-plugin    文件:BeansModelWizard.java   
/**
 * Returns the names of the features representing global elements.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames() {
    if (initialObjectNames == null) {
        initialObjectNames = new ArrayList<String>();
        for (EStructuralFeature eStructuralFeature : ExtendedMetaData.INSTANCE.getAllElements(ExtendedMetaData.INSTANCE.getDocumentRoot(beansPackage))) {
            if (eStructuralFeature.isChangeable()) {
                EClassifier eClassifier = eStructuralFeature.getEType();
                if (eClassifier instanceof EClass) {
                    EClass eClass = (EClass)eClassifier;
                    if (!eClass.isAbstract()) {
                        initialObjectNames.add(eStructuralFeature.getName());
                    }
                }
            }
        }
        Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
    }
    return initialObjectNames;
}
项目:ATLauncher    文件:ATLLauncher.java   
private String lazyMetamodelRegistration(String metamodelPath){

    Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("ecore", new EcoreResourceFactoryImpl());

    ResourceSet rs = new ResourceSetImpl();
    // Enables extended meta-data, weird we have to do this but well...
    final ExtendedMetaData extendedMetaData = new BasicExtendedMetaData(EPackage.Registry.INSTANCE);
    rs.getLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, extendedMetaData);

    Resource r = rs.getResource(URI.createFileURI(metamodelPath), true);
    EObject eObject = r.getContents().get(0);
    // A meta-model might have multiple packages we assume the main package is the first one listed
    if (eObject instanceof EPackage) {
        EPackage p = (EPackage)eObject;
        System.out.println(p.getNsURI());
        EPackage.Registry.INSTANCE.put(p.getNsURI(), p);
        return p.getNsURI();
    }
    return null;
}
项目:SecureBPMN    文件:Bpmn2ModelWizard.java   
/**
 * Returns the names of the features representing global elements.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames() {
    if (initialObjectNames == null) {
        initialObjectNames = new ArrayList<String>();
        for (EStructuralFeature eStructuralFeature : ExtendedMetaData.INSTANCE
                .getAllElements(ExtendedMetaData.INSTANCE
                        .getDocumentRoot(bpmn2Package))) {
            if (eStructuralFeature.isChangeable()) {
                EClassifier eClassifier = eStructuralFeature.getEType();
                if (eClassifier instanceof EClass) {
                    EClass eClass = (EClass) eClassifier;
                    if (!eClass.isAbstract()) {
                        initialObjectNames
                                .add(eStructuralFeature.getName());
                    }
                }
            }
        }
        Collections.sort(initialObjectNames,
                CommonPlugin.INSTANCE.getComparator());
    }
    return initialObjectNames;
}
项目:OpenSPIFe    文件:EMFUtils.java   
/**
 * This is a much faster method for simply testing to see if something has a choice of values.
 * It is implemented based on getChoiceOfValues from ItemPropertyDescriptor.
 * 
 * @param pd
 * @param object
 * @return
 */
public static boolean hasChoiceOfValues(IItemPropertyDescriptor pd, Object object) {
    if (object instanceof EObject) {
        Object feature = pd.getFeature(object);
        if (feature instanceof EReference[]) {
            return true;
        } 
        if (feature instanceof EReference) {
            return true;
        } 
        if (feature instanceof EAttribute) {
            EAttribute attribute = (EAttribute) feature;
            if (attribute.getEType() instanceof EEnum) {
                return true;
            }
            EDataType eDataType = attribute.getEAttributeType();
            List<String> enumeration = ExtendedMetaData.INSTANCE.getEnumerationFacet(eDataType);
            if (!enumeration.isEmpty()) {
                return true;
            }
        }
    }
    // must fall back on property descriptor
    Collection<?> values = getChoiceOfValues(pd, object);
    return (values != null && !values.isEmpty());
}
项目:NeoEMF    文件:AbstractInputTest.java   
/**
 * Registers a EPackage in {@link Registry} according to its {@code prefix} and {@code uri}, from an Ecore file.
 * <p>
 * The targeted Ecore file must be present in {@code /resources/ecore}.
 */
protected static void registerEPackageFromEcore(String prefix, String uri) {
    File file = getResourceFile(ECORE_PATH.replaceAll("\\{name\\}", prefix));

    EPackage ePackage = null;

    Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put(ECORE, new EcoreResourceFactoryImpl());

    ResourceSet rs = new ResourceSetImpl();

    final ExtendedMetaData extendedMetaData = new BasicExtendedMetaData(rs.getPackageRegistry());
    rs.getLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, extendedMetaData);

    Resource r = rs.getResource(URI.createFileURI(file.toString()), true);
    EObject eObject = r.getContents().get(0);
    if (eObject instanceof EPackage) {
        ePackage = (EPackage) eObject;
        rs.getPackageRegistry().put(ePackage.getNsURI(), ePackage);
    }

    assertThat(ePackage).isNotNull(); // "EPackage does not exist"

    Registry.INSTANCE.put(uri, ePackage);
}
项目:LiquibaseEditor    文件:DbchangelogModelWizard.java   
/**
 * Returns the names of the features representing global elements.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames() {
    if (initialObjectNames == null) {
        initialObjectNames = new ArrayList<String>();
        for (EStructuralFeature eStructuralFeature : ExtendedMetaData.INSTANCE.getAllElements(ExtendedMetaData.INSTANCE.getDocumentRoot(dbchangelogPackage))) {
            if (eStructuralFeature.isChangeable()) {
                EClassifier eClassifier = eStructuralFeature.getEType();
                if (eClassifier instanceof EClass) {
                    EClass eClass = (EClass)eClassifier;
                    if (!eClass.isAbstract()) {
                        initialObjectNames.add(eStructuralFeature.getName());
                    }
                }
            }
        }
        Collections.sort(initialObjectNames, java.text.Collator.getInstance());
    }
    return initialObjectNames;
}
项目:eclipse-avro    文件:XMLTypeValidator.java   
protected void reportXMLGregorianCalendarViolation
  (EDataType eDataType, XMLGregorianCalendar value, DiagnosticChain diagnostics, Map<Object, Object> context)
{
  createDiagnostic
    (Diagnostic.ERROR,
     DIAGNOSTIC_SOURCE,
     WELL_FORMED_XML_GREGORIAN_CALENDAR,
     "_UI_BadXMLGregorianCalendar_diagnostic",
     new Object []
     {
       getValueLabel(eDataType, value, context),
       ExtendedMetaData.INSTANCE.getName(eDataType)
     },
     new Object [] { value },
     context);
}
项目:eclipse-avro    文件:EPackageImpl.java   
protected void fixEStructuralFeatures(EClass eClass)
{
  List<EStructuralFeature> features = eClass.getEStructuralFeatures();
  if (!features.isEmpty())
  {
    // The container class must be null for the open content features of the document root
    // to ensure that they are looked up in the actual eClass() 
    // rather than assumed to be a feature with a feature ID relative to the actual class.
    // Otherwise, it's good to have this optimization.
    //
    Class<?> containerClass = ExtendedMetaData.INSTANCE.getDocumentRoot(this) == eClass ? null : eClass.getInstanceClass();

    int id = eClass.getFeatureID(features.get(0));

    for (Iterator<EStructuralFeature> i = features.iterator(); i.hasNext(); )
    {
      EStructuralFeatureImpl eStructuralFeature = (EStructuralFeatureImpl)i.next();
      eStructuralFeature.setFeatureID(id++);
      eStructuralFeature.setContainerClass(containerClass);
    }
  }
}
项目:eclipse-avro    文件:BasicEObjectImpl.java   
public Object eOpenGet(EStructuralFeature eFeature, boolean resolve)
{
  EStructuralFeature openFeature = ExtendedMetaData.INSTANCE.getAffiliation(eClass(), eFeature);
  if (openFeature != null)
  {
    if (!FeatureMapUtil.isFeatureMap(openFeature))
    {
      openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature);
    }
    FeatureMap featureMap = (FeatureMap)eGet(openFeature);
    return ((FeatureMap.Internal)featureMap).get(eFeature, resolve);
  }
  else
  {
    throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid feature");
  }
}
项目:eclipse-avro    文件:BasicEObjectImpl.java   
public void eOpenSet(EStructuralFeature eFeature, Object newValue) 
{
  EStructuralFeature openFeature = ExtendedMetaData.INSTANCE.getAffiliation(eClass(), eFeature);
  if (openFeature != null)
  {
    if (!FeatureMapUtil.isFeatureMap(openFeature))
    {
      openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature);
    }
    FeatureMap featureMap = (FeatureMap)eGet(openFeature);
    ((FeatureMap.Internal)featureMap).set(eFeature, newValue);
  }
  else
  {
    throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid changeable feature");
  }
}
项目:eclipse-avro    文件:BasicEObjectImpl.java   
public void eOpenUnset(EStructuralFeature eFeature) 
{
  EStructuralFeature openFeature = ExtendedMetaData.INSTANCE.getAffiliation(eClass(), eFeature);
  if (openFeature != null)
  {
    if (!FeatureMapUtil.isFeatureMap(openFeature))
    {
      openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature);
    }
    FeatureMap featureMap = (FeatureMap)eGet(openFeature);
    ((FeatureMap.Internal)featureMap).unset(eFeature);
  }
  else
  {
    throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid changeable feature");
  }
}
项目:eclipse-avro    文件:BasicEObjectImpl.java   
public boolean eOpenIsSet(EStructuralFeature eFeature) 
{
  EStructuralFeature openFeature = ExtendedMetaData.INSTANCE.getAffiliation(eClass(), eFeature);
  if (openFeature != null)
  {
    if (!FeatureMapUtil.isFeatureMap(openFeature))
    {
      openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature);
    }
    FeatureMap featureMap = (FeatureMap)eGet(openFeature);
    return ((FeatureMap.Internal)featureMap).isSet(eFeature);
  }
  else
  {
    throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid feature");
  }
}
项目:eclipse-avro    文件:EStructuralFeatureImpl.java   
public FeatureMap.Entry.Internal getFeatureMapEntryPrototype()
{
  if (prototypeFeatureMapEntry == null)
  {
    EReference eOpposite = getEOpposite();
    if (eOpposite != null)
    {
      prototypeFeatureMapEntry = new InverseUpdatingFeatureMapEntry(this, null);
    }
    else if (isContainment())
    {
      // create containment one.
      prototypeFeatureMapEntry = new ContainmentUpdatingFeatureMapEntry(this, null);
    }
    else if (ExtendedMetaData.INSTANCE.getFeatureKind(this) == ExtendedMetaData.SIMPLE_FEATURE)
    {
      prototypeFeatureMapEntry = new SimpleContentFeatureMapEntry(this);
    }
    else
    {
      prototypeFeatureMapEntry = new SimpleFeatureMapEntry(this, null);
    }
  }
  return prototypeFeatureMapEntry;
}
项目:citygml4emf    文件:XALModelWizard.java   
/**
 * Returns the names of the features representing global elements.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames() {
    if (initialObjectNames == null) {
        initialObjectNames = new ArrayList<String>();
        for (EStructuralFeature eStructuralFeature : ExtendedMetaData.INSTANCE.getAllElements(ExtendedMetaData.INSTANCE.getDocumentRoot(xalPackage))) {
            if (eStructuralFeature.isChangeable()) {
                EClassifier eClassifier = eStructuralFeature.getEType();
                if (eClassifier instanceof EClass) {
                    EClass eClass = (EClass)eClassifier;
                    if (!eClass.isAbstract()) {
                        initialObjectNames.add(eStructuralFeature.getName());
                    }
                }
            }
        }
        Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
    }
    return initialObjectNames;
}
项目:citygml4emf    文件:XlinkModelWizard.java   
/**
 * Returns the names of the features representing global elements.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames() {
    if (initialObjectNames == null) {
        initialObjectNames = new ArrayList<String>();
        for (EStructuralFeature eStructuralFeature : ExtendedMetaData.INSTANCE.getAllElements(ExtendedMetaData.INSTANCE.getDocumentRoot(xlinkPackage))) {
            if (eStructuralFeature.isChangeable()) {
                EClassifier eClassifier = eStructuralFeature.getEType();
                if (eClassifier instanceof EClass) {
                    EClass eClass = (EClass)eClassifier;
                    if (!eClass.isAbstract()) {
                        initialObjectNames.add(eStructuralFeature.getName());
                    }
                }
            }
        }
        Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
    }
    return initialObjectNames;
}
项目:citygml4emf    文件:NamespaceModelWizard.java   
/**
 * Returns the names of the features representing global elements.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames() {
    if (initialObjectNames == null) {
        initialObjectNames = new ArrayList<String>();
        for (EStructuralFeature eStructuralFeature : ExtendedMetaData.INSTANCE.getAllElements(ExtendedMetaData.INSTANCE.getDocumentRoot(namespacePackage))) {
            if (eStructuralFeature.isChangeable()) {
                EClassifier eClassifier = eStructuralFeature.getEType();
                if (eClassifier instanceof EClass) {
                    EClass eClass = (EClass)eClassifier;
                    if (!eClass.isAbstract()) {
                        initialObjectNames.add(eStructuralFeature.getName());
                    }
                }
            }
        }
        Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
    }
    return initialObjectNames;
}
项目:citygml4emf    文件:Smil20ModelWizard.java   
/**
 * Returns the names of the features representing global elements.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames() {
    if (initialObjectNames == null) {
        initialObjectNames = new ArrayList<String>();
        for (EStructuralFeature eStructuralFeature : ExtendedMetaData.INSTANCE.getAllElements(ExtendedMetaData.INSTANCE.getDocumentRoot(smil20Package))) {
            if (eStructuralFeature.isChangeable()) {
                EClassifier eClassifier = eStructuralFeature.getEType();
                if (eClassifier instanceof EClass) {
                    EClass eClass = (EClass)eClassifier;
                    if (!eClass.isAbstract()) {
                        initialObjectNames.add(eStructuralFeature.getName());
                    }
                }
            }
        }
        Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
    }
    return initialObjectNames;
}
项目:citygml4emf    文件:LanguageModelWizard.java   
/**
 * Returns the names of the features representing global elements.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames() {
    if (initialObjectNames == null) {
        initialObjectNames = new ArrayList<String>();
        for (EStructuralFeature eStructuralFeature : ExtendedMetaData.INSTANCE.getAllElements(ExtendedMetaData.INSTANCE.getDocumentRoot(languagePackage))) {
            if (eStructuralFeature.isChangeable()) {
                EClassifier eClassifier = eStructuralFeature.getEType();
                if (eClassifier instanceof EClass) {
                    EClass eClass = (EClass)eClassifier;
                    if (!eClass.isAbstract()) {
                        initialObjectNames.add(eStructuralFeature.getName());
                    }
                }
            }
        }
        Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
    }
    return initialObjectNames;
}
项目:citygml4emf    文件:CityfurnitureModelWizard.java   
/**
 * Returns the names of the features representing global elements.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames() {
    if (initialObjectNames == null) {
        initialObjectNames = new ArrayList<String>();
        for (EStructuralFeature eStructuralFeature : ExtendedMetaData.INSTANCE.getAllElements(ExtendedMetaData.INSTANCE.getDocumentRoot(cityfurniturePackage))) {
            if (eStructuralFeature.isChangeable()) {
                EClassifier eClassifier = eStructuralFeature.getEType();
                if (eClassifier instanceof EClass) {
                    EClass eClass = (EClass)eClassifier;
                    if (!eClass.isAbstract()) {
                        initialObjectNames.add(eStructuralFeature.getName());
                    }
                }
            }
        }
        Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
    }
    return initialObjectNames;
}
项目:citygml4emf    文件:GenericsModelWizard.java   
/**
 * Returns the names of the features representing global elements.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames() {
    if (initialObjectNames == null) {
        initialObjectNames = new ArrayList<String>();
        for (EStructuralFeature eStructuralFeature : ExtendedMetaData.INSTANCE.getAllElements(ExtendedMetaData.INSTANCE.getDocumentRoot(genericsPackage))) {
            if (eStructuralFeature.isChangeable()) {
                EClassifier eClassifier = eStructuralFeature.getEType();
                if (eClassifier instanceof EClass) {
                    EClass eClass = (EClass)eClassifier;
                    if (!eClass.isAbstract()) {
                        initialObjectNames.add(eStructuralFeature.getName());
                    }
                }
            }
        }
        Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
    }
    return initialObjectNames;
}
项目:citygml4emf    文件:TexturedsurfaceModelWizard.java   
/**
 * Returns the names of the features representing global elements.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames() {
    if (initialObjectNames == null) {
        initialObjectNames = new ArrayList<String>();
        for (EStructuralFeature eStructuralFeature : ExtendedMetaData.INSTANCE.getAllElements(ExtendedMetaData.INSTANCE.getDocumentRoot(texturedsurfacePackage))) {
            if (eStructuralFeature.isChangeable()) {
                EClassifier eClassifier = eStructuralFeature.getEType();
                if (eClassifier instanceof EClass) {
                    EClass eClass = (EClass)eClassifier;
                    if (!eClass.isAbstract()) {
                        initialObjectNames.add(eStructuralFeature.getName());
                    }
                }
            }
        }
        Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
    }
    return initialObjectNames;
}
项目:citygml4emf    文件:CityobjectgroupModelWizard.java   
/**
 * Returns the names of the features representing global elements.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames() {
    if (initialObjectNames == null) {
        initialObjectNames = new ArrayList<String>();
        for (EStructuralFeature eStructuralFeature : ExtendedMetaData.INSTANCE.getAllElements(ExtendedMetaData.INSTANCE.getDocumentRoot(cityobjectgroupPackage))) {
            if (eStructuralFeature.isChangeable()) {
                EClassifier eClassifier = eStructuralFeature.getEType();
                if (eClassifier instanceof EClass) {
                    EClass eClass = (EClass)eClassifier;
                    if (!eClass.isAbstract()) {
                        initialObjectNames.add(eStructuralFeature.getName());
                    }
                }
            }
        }
        Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
    }
    return initialObjectNames;
}
项目:citygml4emf    文件:CitygmlModelWizard.java   
/**
 * Returns the names of the features representing global elements.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames() {
    if (initialObjectNames == null) {
        initialObjectNames = new ArrayList<String>();
        for (EStructuralFeature eStructuralFeature : ExtendedMetaData.INSTANCE.getAllElements(ExtendedMetaData.INSTANCE.getDocumentRoot(citygmlPackage))) {
            if (eStructuralFeature.isChangeable()) {
                EClassifier eClassifier = eStructuralFeature.getEType();
                if (eClassifier instanceof EClass) {
                    EClass eClass = (EClass)eClassifier;
                    if (!eClass.isAbstract()) {
                        initialObjectNames.add(eStructuralFeature.getName());
                    }
                }
            }
        }
        Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
    }
    return initialObjectNames;
}
项目:citygml4emf    文件:TransportationModelWizard.java   
/**
 * Returns the names of the features representing global elements.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames() {
    if (initialObjectNames == null) {
        initialObjectNames = new ArrayList<String>();
        for (EStructuralFeature eStructuralFeature : ExtendedMetaData.INSTANCE.getAllElements(ExtendedMetaData.INSTANCE.getDocumentRoot(transportationPackage))) {
            if (eStructuralFeature.isChangeable()) {
                EClassifier eClassifier = eStructuralFeature.getEType();
                if (eClassifier instanceof EClass) {
                    EClass eClass = (EClass)eClassifier;
                    if (!eClass.isAbstract()) {
                        initialObjectNames.add(eStructuralFeature.getName());
                    }
                }
            }
        }
        Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
    }
    return initialObjectNames;
}
项目:citygml4emf    文件:BuildingModelWizard.java   
/**
 * Returns the names of the features representing global elements.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames() {
    if (initialObjectNames == null) {
        initialObjectNames = new ArrayList<String>();
        for (EStructuralFeature eStructuralFeature : ExtendedMetaData.INSTANCE.getAllElements(ExtendedMetaData.INSTANCE.getDocumentRoot(buildingPackage))) {
            if (eStructuralFeature.isChangeable()) {
                EClassifier eClassifier = eStructuralFeature.getEType();
                if (eClassifier instanceof EClass) {
                    EClass eClass = (EClass)eClassifier;
                    if (!eClass.isAbstract()) {
                        initialObjectNames.add(eStructuralFeature.getName());
                    }
                }
            }
        }
        Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
    }
    return initialObjectNames;
}
项目:citygml4emf    文件:AppearanceModelWizard.java   
/**
 * Returns the names of the features representing global elements.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames() {
    if (initialObjectNames == null) {
        initialObjectNames = new ArrayList<String>();
        for (EStructuralFeature eStructuralFeature : ExtendedMetaData.INSTANCE.getAllElements(ExtendedMetaData.INSTANCE.getDocumentRoot(appearancePackage))) {
            if (eStructuralFeature.isChangeable()) {
                EClassifier eClassifier = eStructuralFeature.getEType();
                if (eClassifier instanceof EClass) {
                    EClass eClass = (EClass)eClassifier;
                    if (!eClass.isAbstract()) {
                        initialObjectNames.add(eStructuralFeature.getName());
                    }
                }
            }
        }
        Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
    }
    return initialObjectNames;
}
项目:citygml4emf    文件:LanduseModelWizard.java   
/**
 * Returns the names of the features representing global elements.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames() {
    if (initialObjectNames == null) {
        initialObjectNames = new ArrayList<String>();
        for (EStructuralFeature eStructuralFeature : ExtendedMetaData.INSTANCE.getAllElements(ExtendedMetaData.INSTANCE.getDocumentRoot(landusePackage))) {
            if (eStructuralFeature.isChangeable()) {
                EClassifier eClassifier = eStructuralFeature.getEType();
                if (eClassifier instanceof EClass) {
                    EClass eClass = (EClass)eClassifier;
                    if (!eClass.isAbstract()) {
                        initialObjectNames.add(eStructuralFeature.getName());
                    }
                }
            }
        }
        Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
    }
    return initialObjectNames;
}
项目:citygml4emf    文件:ReliefModelWizard.java   
/**
 * Returns the names of the features representing global elements.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames() {
    if (initialObjectNames == null) {
        initialObjectNames = new ArrayList<String>();
        for (EStructuralFeature eStructuralFeature : ExtendedMetaData.INSTANCE.getAllElements(ExtendedMetaData.INSTANCE.getDocumentRoot(reliefPackage))) {
            if (eStructuralFeature.isChangeable()) {
                EClassifier eClassifier = eStructuralFeature.getEType();
                if (eClassifier instanceof EClass) {
                    EClass eClass = (EClass)eClassifier;
                    if (!eClass.isAbstract()) {
                        initialObjectNames.add(eStructuralFeature.getName());
                    }
                }
            }
        }
        Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
    }
    return initialObjectNames;
}
项目:citygml4emf    文件:VegetationModelWizard.java   
/**
 * Returns the names of the features representing global elements.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames() {
    if (initialObjectNames == null) {
        initialObjectNames = new ArrayList<String>();
        for (EStructuralFeature eStructuralFeature : ExtendedMetaData.INSTANCE.getAllElements(ExtendedMetaData.INSTANCE.getDocumentRoot(vegetationPackage))) {
            if (eStructuralFeature.isChangeable()) {
                EClassifier eClassifier = eStructuralFeature.getEType();
                if (eClassifier instanceof EClass) {
                    EClass eClass = (EClass)eClassifier;
                    if (!eClass.isAbstract()) {
                        initialObjectNames.add(eStructuralFeature.getName());
                    }
                }
            }
        }
        Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
    }
    return initialObjectNames;
}
项目:citygml4emf    文件:WaterbodyModelWizard.java   
/**
 * Returns the names of the features representing global elements.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames() {
    if (initialObjectNames == null) {
        initialObjectNames = new ArrayList<String>();
        for (EStructuralFeature eStructuralFeature : ExtendedMetaData.INSTANCE.getAllElements(ExtendedMetaData.INSTANCE.getDocumentRoot(waterbodyPackage))) {
            if (eStructuralFeature.isChangeable()) {
                EClassifier eClassifier = eStructuralFeature.getEType();
                if (eClassifier instanceof EClass) {
                    EClass eClass = (EClass)eClassifier;
                    if (!eClass.isAbstract()) {
                        initialObjectNames.add(eStructuralFeature.getName());
                    }
                }
            }
        }
        Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
    }
    return initialObjectNames;
}
项目:citygml4emf    文件:GmlModelWizard.java   
/**
 * Returns the names of the features representing global elements.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames() {
    if (initialObjectNames == null) {
        initialObjectNames = new ArrayList<String>();
        for (EStructuralFeature eStructuralFeature : ExtendedMetaData.INSTANCE.getAllElements(ExtendedMetaData.INSTANCE.getDocumentRoot(gmlPackage))) {
            if (eStructuralFeature.isChangeable()) {
                EClassifier eClassifier = eStructuralFeature.getEType();
                if (eClassifier instanceof EClass) {
                    EClass eClass = (EClass)eClassifier;
                    if (!eClass.isAbstract()) {
                        initialObjectNames.add(eStructuralFeature.getName());
                    }
                }
            }
        }
        Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
    }
    return initialObjectNames;
}
项目:clickwatch    文件:XMLTypeValidator.java   
protected void reportXMLGregorianCalendarViolation
  (EDataType eDataType, XMLGregorianCalendar value, DiagnosticChain diagnostics, Map<Object, Object> context)
{
  createDiagnostic
    (Diagnostic.ERROR,
     DIAGNOSTIC_SOURCE,
     WELL_FORMED_XML_GREGORIAN_CALENDAR,
     "_UI_BadXMLGregorianCalendar_diagnostic",
     new Object []
     {
       getValueLabel(eDataType, value, context),
       ExtendedMetaData.INSTANCE.getName(eDataType)
     },
     new Object [] { value },
     context);
}
项目:clickwatch    文件:EPackageImpl.java   
protected void fixEStructuralFeatures(EClass eClass)
{
  List<EStructuralFeature> features = eClass.getEStructuralFeatures();
  if (!features.isEmpty())
  {
    // The container class must be null for the open content features of the document root
    // to ensure that they are looked up in the actual eClass() 
    // rather than assumed to be a feature with a feature ID relative to the actual class.
    // Otherwise, it's good to have this optimization.
    //
    Class<?> containerClass = ExtendedMetaData.INSTANCE.getDocumentRoot(this) == eClass ? null : eClass.getInstanceClass();

    int id = eClass.getFeatureID(features.get(0));

    for (Iterator<EStructuralFeature> i = features.iterator(); i.hasNext(); )
    {
      EStructuralFeatureImpl eStructuralFeature = (EStructuralFeatureImpl)i.next();
      eStructuralFeature.setFeatureID(id++);
      eStructuralFeature.setContainerClass(containerClass);
    }
  }
}
项目:clickwatch    文件:BasicEObjectImpl.java   
public Object eOpenGet(EStructuralFeature eFeature, boolean resolve)
{
  EStructuralFeature openFeature = ExtendedMetaData.INSTANCE.getAffiliation(eClass(), eFeature);
  if (openFeature != null)
  {
    if (!FeatureMapUtil.isFeatureMap(openFeature))
    {
      openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature);
    }
    FeatureMap featureMap = (FeatureMap)eGet(openFeature);
    return ((FeatureMap.Internal)featureMap).get(eFeature, resolve);
  }
  else
  {
    throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid feature");
  }
}
项目:clickwatch    文件:BasicEObjectImpl.java   
public void eOpenSet(EStructuralFeature eFeature, Object newValue) 
{
  EStructuralFeature openFeature = ExtendedMetaData.INSTANCE.getAffiliation(eClass(), eFeature);
  if (openFeature != null)
  {
    if (!FeatureMapUtil.isFeatureMap(openFeature))
    {
      openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature);
    }
    FeatureMap featureMap = (FeatureMap)eGet(openFeature);
    ((FeatureMap.Internal)featureMap).set(eFeature, newValue);
  }
  else
  {
    throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid changeable feature");
  }
}
项目:clickwatch    文件:BasicEObjectImpl.java   
public void eOpenUnset(EStructuralFeature eFeature) 
{
  EStructuralFeature openFeature = ExtendedMetaData.INSTANCE.getAffiliation(eClass(), eFeature);
  if (openFeature != null)
  {
    if (!FeatureMapUtil.isFeatureMap(openFeature))
    {
      openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature);
    }
    FeatureMap featureMap = (FeatureMap)eGet(openFeature);
    ((FeatureMap.Internal)featureMap).unset(eFeature);
  }
  else
  {
    throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid changeable feature");
  }
}
项目:clickwatch    文件:BasicEObjectImpl.java   
public boolean eOpenIsSet(EStructuralFeature eFeature) 
{
  EStructuralFeature openFeature = ExtendedMetaData.INSTANCE.getAffiliation(eClass(), eFeature);
  if (openFeature != null)
  {
    if (!FeatureMapUtil.isFeatureMap(openFeature))
    {
      openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature);
    }
    FeatureMap featureMap = (FeatureMap)eGet(openFeature);
    return ((FeatureMap.Internal)featureMap).isSet(eFeature);
  }
  else
  {
    throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid feature");
  }
}
项目:clickwatch    文件:EStructuralFeatureImpl.java   
public FeatureMap.Entry.Internal getFeatureMapEntryPrototype()
{
  if (prototypeFeatureMapEntry == null)
  {
    EReference eOpposite = getEOpposite();
    if (eOpposite != null)
    {
      prototypeFeatureMapEntry = new InverseUpdatingFeatureMapEntry(this, null);
    }
    else if (isContainment())
    {
      // create containment one.
      prototypeFeatureMapEntry = new ContainmentUpdatingFeatureMapEntry(this, null);
    }
    else if (ExtendedMetaData.INSTANCE.getFeatureKind(this) == ExtendedMetaData.SIMPLE_FEATURE)
    {
      prototypeFeatureMapEntry = new SimpleContentFeatureMapEntry(this);
    }
    else
    {
      prototypeFeatureMapEntry = new SimpleFeatureMapEntry(this, null);
    }
  }
  return prototypeFeatureMapEntry;
}
项目:kie-wb-common    文件:Bpmn2JsonUnmarshaller.java   
private void createDockersForBoundaryEvent(BoundaryEvent boundaryEvent) {
    List<Point> dockers = _dockers.get(boundaryEvent.getId());
    StringBuffer dockerBuff = new StringBuffer();
    for (int i = 0; i < dockers.size(); i++) {
        dockerBuff.append(dockers.get(i).getX());
        dockerBuff.append("^");
        dockerBuff.append(dockers.get(i).getY());
        dockerBuff.append("|");
    }
    ExtendedMetaData metadata = ExtendedMetaData.INSTANCE;
    EAttributeImpl extensionAttribute = (EAttributeImpl) metadata.demandFeature(
            "http://www.jboss.org/drools",
            "dockerinfo",
            false,
            false);
    SimpleFeatureMapEntry extensionEntry = new SimpleFeatureMapEntry(extensionAttribute,
                                                                     dockerBuff.toString());
    boundaryEvent.getAnyAttribute().add(extensionEntry);
}