public void buildNameIndex() { nameIndex = new HashMap<EClass, Map<String, IdEObject>>(); for (EClassifier classifier : objects.values().iterator().next().eClass().getEPackage().getEClassifiers()) { if (classifier instanceof EClass) { Map<String, IdEObject> map = new TreeMap<String, IdEObject>(); nameIndex.put((EClass) classifier, map); } } for (Long key : objects.keySet()) { IdEObject value = objects.get((Long) key); if (value instanceof IfcRoot) { IfcRoot ifcRoot = (IfcRoot) value; if (ifcRoot.getName() != null) { nameIndex.get(value.eClass()).put(ifcRoot.getName(), value); } } } }
/** * Returns the names of the types that can be created as the root object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Collection<String> getInitialObjectNames() { if (initialObjectNames == null) { initialObjectNames = new ArrayList<String>(); for (EClassifier eClassifier : designPackage.getEClassifiers()) { if (eClassifier instanceof EClass) { EClass eClass = (EClass)eClassifier; if (!eClass.isAbstract()) { initialObjectNames.add(eClass.getName()); } } } Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator()); } return initialObjectNames; }
/** * Returns the names of the types that can be created as the root object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Collection<String> getInitialObjectNames() { if (initialObjectNames == null) { initialObjectNames = new ArrayList<String>(); for (EClassifier eClassifier : platformPackage.getEClassifiers()) { if (eClassifier instanceof EClass) { EClass eClass = (EClass)eClassifier; if (!eClass.isAbstract()) { initialObjectNames.add(eClass.getName()); } } } Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator()); } return initialObjectNames; }
/** * Returns the names of the types that can be created as the root object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Collection<String> getInitialObjectNames() { if (initialObjectNames == null) { initialObjectNames = new ArrayList<String>(); for (EClassifier eClassifier : crtpPackage.getEClassifiers()) { if (eClassifier instanceof EClass) { EClass eClass = (EClass)eClassifier; if (!eClass.isAbstract()) { initialObjectNames.add(eClass.getName()); } } } Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator()); } return initialObjectNames; }
public EEnumLiteral getEEnumLiteral(String enumName, String literalName) { EClassifier eClassifier = ePackage.getEClassifier(enumName); if (eClassifier == null) { throw new RuntimeException("Classifier " + enumName + " not found in package " + ePackage.getName()); } if (eClassifier instanceof EEnum) { EEnum eEnum = (EEnum)eClassifier; EEnumLiteral literal = eEnum.getEEnumLiteral(literalName); if (literal == null) { throw new RuntimeException("No enum literal " + literalName + " found on " + ePackage.getName() + "." + enumName); } return literal; } else { throw new RuntimeException("Classifier " + enumName + " is not of type enum"); } }
/** * Returns the names of the types that can be created as the root object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Collection<String> getInitialObjectNames() { if (initialObjectNames == null) { initialObjectNames = new ArrayList<String>(); for (EClassifier eClassifier : grmPackage.getEClassifiers()) { if (eClassifier instanceof EClass) { EClass eClass = (EClass)eClassifier; if (!eClass.isAbstract()) { initialObjectNames.add(eClass.getName()); } } } Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator()); } return initialObjectNames; }
public void buildGuidIndex() { guidIndex = new HashMap<EClass, Map<String, IdEObject>>(); if (objects.isEmpty()) { return; } for (EClassifier classifier : objects.values().iterator().next().eClass().getEPackage().getEClassifiers()) { if (classifier instanceof EClass) { Map<String, IdEObject> map = new TreeMap<String, IdEObject>(); guidIndex.put((EClass) classifier, map); } } for (Long key : objects.keySet()) { IdEObject value = objects.get((Long) key); if (value instanceof IfcRoot) { IfcRoot ifcRoot = (IfcRoot) value; guidIndex.get(value.eClass()).put(ifcRoot.getGlobalId(), value); } } }
/** * Returns the names of the types that can be created as the root object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Collection<String> getInitialObjectNames() { if (initialObjectNames == null) { initialObjectNames = new ArrayList<String>(); for (EClassifier eClassifier : analysisPackage.getEClassifiers()) { if (eClassifier instanceof EClass) { EClass eClass = (EClass)eClassifier; if (!eClass.isAbstract()) { initialObjectNames.add(eClass.getName()); } } } Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator()); } return initialObjectNames; }
/** * Returns the names of the types that can be created as the root object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Collection<String> getInitialObjectNames () { if ( initialObjectNames == null ) { initialObjectNames = new ArrayList<String> (); for ( EClassifier eClassifier : profilePackage.getEClassifiers () ) { if ( eClassifier instanceof EClass ) { EClass eClass = (EClass)eClassifier; if ( !eClass.isAbstract () ) { initialObjectNames.add ( eClass.getName () ); } } } Collections.sort ( initialObjectNames, CommonPlugin.INSTANCE.getComparator () ); } return initialObjectNames; }
/** * Returns the names of the types that can be created as the root object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Collection<String> getInitialObjectNames() { if (initialObjectNames == null) { initialObjectNames = new ArrayList<String>(); for (EClassifier eClassifier : fsmPackage.getEClassifiers()) { if (eClassifier instanceof EClass) { EClass eClass = (EClass)eClassifier; if (!eClass.isAbstract()) { initialObjectNames.add(eClass.getName()); } } } Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator()); } return initialObjectNames; }
/** * Returns the names of the types that can be created as the root object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Collection<String> getInitialObjectNames() { if (initialObjectNames == null) { initialObjectNames = new ArrayList<String>(); for (EClassifier eClassifier : srmPackage.getEClassifiers()) { if (eClassifier instanceof EClass) { EClass eClass = (EClass)eClassifier; if (!eClass.isAbstract()) { initialObjectNames.add(eClass.getName()); } } } Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator()); } return initialObjectNames; }
/** * Returns the names of the types that can be created as the root object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Collection<String> getInitialObjectNames() { if (initialObjectNames == null) { initialObjectNames = new ArrayList<String>(); for (EClassifier eClassifier : tracingannotationsPackage.getEClassifiers()) { if (eClassifier instanceof EClass) { EClass eClass = (EClass)eClassifier; if (!eClass.isAbstract()) { initialObjectNames.add(eClass.getName()); } } } Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator()); } return initialObjectNames; }
private void initOppositeInfo() { for (EClassifier eClassifier : ePackage.getEClassifiers()) { if (eClassifier instanceof EClass) { EClass eClass = (EClass)eClassifier; boolean hasOpposites = false; boolean hasManyOpposites = false; for (EReference eReference : eClass.getEAllReferences()) { if (eReference.getEOpposite() != null) { hasOpposites = true; if (eReference.isMany()) { hasManyOpposites = true; } } } oppositeInfos.put(eClass, new OppositeInfo(hasOpposites, hasManyOpposites)); } } }
/** * Returns the names of the types that can be created as the root object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ protected Collection<String> getInitialObjectNames () { if ( this.initialObjectNames == null ) { this.initialObjectNames = new ArrayList<String> (); for ( EClassifier eClassifier : this.worldPackage.getEClassifiers () ) { if ( eClassifier instanceof EClass ) { EClass eClass = (EClass)eClassifier; if ( !eClass.isAbstract () ) { this.initialObjectNames.add ( eClass.getName () ); } } } Collections.sort ( this.initialObjectNames, CommonPlugin.INSTANCE.getComparator () ); } return this.initialObjectNames; }
private static void rewriteTypeReferences(N4JSGrammarAccess ga, ImmutableMap.Builder<AbstractElement, Integer> builder) { for (ParserRule rule : GrammarUtil.allParserRules(ga.getGrammar())) { for (EObject obj : EcoreUtil2.eAllContents(rule.getAlternatives())) { if (obj instanceof Assignment) { Assignment assignment = (Assignment) obj; AbstractElement terminal = assignment.getTerminal(); if (terminal instanceof RuleCall) { AbstractRule calledRule = ((RuleCall) terminal).getRule(); EClassifier classifier = calledRule.getType().getClassifier(); if (classifier instanceof EClass && TypeRefsPackage.Literals.TYPE_REF.isSuperTypeOf((EClass) classifier)) { builder.put(assignment, TYPE_REF_TOKEN); } } } } } }
/** * Returns the names of the types that can be created as the root object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Collection<String> getInitialObjectNames () { if ( initialObjectNames == null ) { initialObjectNames = new ArrayList<String> (); for ( EClassifier eClassifier : protocolPackage.getEClassifiers () ) { if ( eClassifier instanceof EClass ) { EClass eClass = (EClass)eClassifier; if ( !eClass.isAbstract () ) { initialObjectNames.add ( eClass.getName () ); } } } Collections.sort ( initialObjectNames, CommonPlugin.INSTANCE.getComparator () ); } return initialObjectNames; }
private EPackage epack(String n, EObject... contents) { EPackage p = EcoreFactory.eINSTANCE.createEPackage(); p.setName(n); for (EObject eobj : contents) { if (eobj instanceof EPackage) { p.getESubpackages().add((EPackage) eobj); } else { p.getEClassifiers().add((EClassifier) eobj); } } return p; }
/** * Sets the instance class on the given classifier. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected void fixInstanceClass(EClassifier eClassifier) { if (eClassifier.getInstanceClassName() == null) { eClassifier.setInstanceClassName("gluemodel.substationStandard.Dataclasses." + eClassifier.getName()); setGeneratedClassName(eClassifier); } }
private void initEClassClassMap() { for (EClassifier eClassifier : ePackage.getEClassifiers()) { if (eClassifier instanceof EClass) { if (eClassifier.getInstanceClass() != null) { EClass eClass = (EClass) eClassifier; eClassClassMap.put(eClass, eClass.getInstanceClass()); } } } }
private void initDependencies() { for (PackageMetaData packageMetaData : ePackages.values()) { for (EClassifier eClassifier : packageMetaData.getEPackage().getEClassifiers()) { if (eClassifier instanceof EClass) { EClass eClass = (EClass)eClassifier; for (EReference eReference : eClass.getEReferences()) { if (eReference.getEType().getEPackage() != packageMetaData.getEPackage()) { packageMetaData.addDependency(getPackageMetaData(eReference.getEType().getEPackage().getName())); } } } } } }
/** * Sets the instance class on the given classifier. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected void fixInstanceClass(EClassifier eClassifier) { if (eClassifier.getInstanceClassName() == null) { eClassifier.setInstanceClassName("gluemodel.substationStandard.LNNodes.LNGroupY." + eClassifier.getName()); setGeneratedClassName(eClassifier); } }
/** * Sets the instance class on the given classifier. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected void fixInstanceClass(EClassifier eClassifier) { if (eClassifier.getInstanceClassName() == null) { eClassifier.setInstanceClassName("gluemodel.substationStandard.LNNodes.LNGroupZ." + eClassifier.getName()); setGeneratedClassName(eClassifier); } }
/** * Sets the instance class on the given classifier. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected void fixInstanceClass(EClassifier eClassifier) { if (eClassifier.getInstanceClassName() == null) { eClassifier.setInstanceClassName("cn.dlb.bim.models.log." + eClassifier.getName()); setGeneratedClassName(eClassifier); } }
private void initUnsettedLengths() { for (EClassifier eClassifier : ePackage.getEClassifiers()) { if (eClassifier instanceof EClass) { EClass eClass = (EClass)eClassifier; calculateUnsettedLength(eClass); } } }
/** * Sets the instance class on the given classifier. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected void fixInstanceClass(EClassifier eClassifier) { if (eClassifier.getInstanceClassName() == null) { eClassifier.setInstanceClassName("gluemodel.substationStandard.LNNodes.LNGroupC." + eClassifier.getName()); setGeneratedClassName(eClassifier); } }
/** * Sets the instance class on the given classifier. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected void fixInstanceClass(EClassifier eClassifier) { if (eClassifier.getInstanceClassName() == null) { eClassifier.setInstanceClassName("gluemodel.substationStandard.LNNodes.LNGroupP." + eClassifier.getName()); setGeneratedClassName(eClassifier); } }
/** * Sets the instance class on the given classifier. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected void fixInstanceClass(EClassifier eClassifier) { if (eClassifier.getInstanceClassName() == null) { eClassifier.setInstanceClassName("gluemodel.substationStandard.LNNodes.LNGroupX." + eClassifier.getName()); setGeneratedClassName(eClassifier); } }
/** * Sets the instance class on the given classifier. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected void fixInstanceClass(EClassifier eClassifier) { if (eClassifier.getInstanceClassName() == null) { eClassifier.setInstanceClassName("gluemodel.COSEM.COSEMObjects." + eClassifier.getName()); setGeneratedClassName(eClassifier); } }
/** * Sets the instance class on the given classifier. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected void fixInstanceClass(EClassifier eClassifier) { if (eClassifier.getInstanceClassName() == null) { eClassifier.setInstanceClassName("gluemodel.CIM.IEC61970.Meas." + eClassifier.getName()); setGeneratedClassName(eClassifier); } }
/** * Sets the instance class on the given classifier. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected void fixInstanceClass(EClassifier eClassifier) { if (eClassifier.getInstanceClassName() == null) { eClassifier.setInstanceClassName("gluemodel.substationStandard.LNNodes.LNGroupM." + eClassifier.getName()); setGeneratedClassName(eClassifier); } }
/** * Sets the instance class on the given classifier. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected void fixInstanceClass(EClassifier eClassifier) { if (eClassifier.getInstanceClassName() == null) { eClassifier.setInstanceClassName("gluemodel.COSEM." + eClassifier.getName()); setGeneratedClassName(eClassifier); } }
/** * Sets the instance class on the given classifier. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected void fixInstanceClass(EClassifier eClassifier) { if (eClassifier.getInstanceClassName() == null) { eClassifier.setInstanceClassName("CIM.IEC61970.Informative.Reservation." + eClassifier.getName()); setGeneratedClassName(eClassifier); } }
/** * Sets the instance class on the given classifier. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected void fixInstanceClass(EClassifier eClassifier) { if (eClassifier.getInstanceClassName() == null) { eClassifier.setInstanceClassName("gluemodel.CIM.PackageDependencies." + eClassifier.getName()); setGeneratedClassName(eClassifier); } }
/** * Sets the instance class on the given classifier. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected void fixInstanceClass(EClassifier eClassifier) { if (eClassifier.getInstanceClassName() == null) { eClassifier.setInstanceClassName("gluemodel.CIM.IEC61968.Common." + eClassifier.getName()); setGeneratedClassName(eClassifier); } }
/** * Sets the instance class on the given classifier. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected void fixInstanceClass(EClassifier eClassifier) { if (eClassifier.getInstanceClassName() == null) { eClassifier.setInstanceClassName("CIM.IEC61970.Informative.EnergyScheduling." + eClassifier.getName()); setGeneratedClassName(eClassifier); } }
/** * Sets the instance class on the given classifier. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected void fixInstanceClass(EClassifier eClassifier) { if (eClassifier.getInstanceClassName() == null) { eClassifier.setInstanceClassName("gluemodel.CIM.IEC61968.Metering." + eClassifier.getName()); setGeneratedClassName(eClassifier); } }
/** * Sets the instance class on the given classifier. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected void fixInstanceClass(EClassifier eClassifier) { if (eClassifier.getInstanceClassName() == null) { eClassifier.setInstanceClassName("gluemodel.CIM.IEC61970.Informative.InfAssets." + eClassifier.getName()); setGeneratedClassName(eClassifier); } }
/** * Sets the instance class on the given classifier. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected void fixInstanceClass(EClassifier eClassifier) { if (eClassifier.getInstanceClassName() == null) { eClassifier.setInstanceClassName("rgse.ttc17.emoflon.tgg.task1." + eClassifier.getName()); setGeneratedClassName(eClassifier); } }
private Object processInline(EClassifier classifier, String value) throws DeserializeException, MetaDataException, DatabaseException { if (value.indexOf("(") != -1) { String typeName = value.substring(0, value.indexOf("(")).trim(); String v = value.substring(value.indexOf("(") + 1, value.length() - 1); EClassifier eClassifier = getPackageMetaData().getEClassifierCaseInsensitive(typeName); if (eClassifier instanceof EClass) { return convert(eClassifier, v); } else { throw new DeserializeException(lineNumber, typeName + " is not an existing IFC entity"); } } else { return IfcParserWriterUtils.convertSimpleValue(getPackageMetaData(), classifier.getInstanceClass(), value, lineNumber); } }
/** * Sets the instance class on the given classifier. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected void fixInstanceClass(EClassifier eClassifier) { if (eClassifier.getInstanceClassName() == null) { eClassifier.setInstanceClassName("rgse.ttc17.emoflon.tgg.task2.Rules." + eClassifier.getName()); setGeneratedClassName(eClassifier); } }