Java Code Examples for org.eclipse.emf.ecore.EClassifier

The following are top voted examples for showing how to use org.eclipse.emf.ecore.EClassifier. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: BIMplatform   File: IfcModel.java   Source Code and License 6 votes vote down vote up
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);
			}
		}
	}
}
 
Example 2
Project: time4sys   File: DesignModelWizard.java   Source Code and License 6 votes vote down vote up
/**
 * 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;
}
 
Example 3
Project: OCCI-Studio   File: PlatformModelWizard.java   Source Code and License 6 votes vote down vote up
/**
 * 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;
}
 
Example 4
Project: OCCI-Studio   File: CrtpModelWizard.java   Source Code and License 6 votes vote down vote up
/**
 * 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;
}
 
Example 5
Project: BIMplatform   File: PackageMetaData.java   Source Code and License 6 votes vote down vote up
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");
	}
}
 
Example 6
Project: time4sys   File: GrmModelWizard.java   Source Code and License 6 votes vote down vote up
/**
 * 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;
}
 
Example 7
Project: BIMplatform   File: IfcModel.java   Source Code and License 6 votes vote down vote up
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);
		}
	}
}
 
Example 8
Project: time4sys   File: AnalysisModelWizard.java   Source Code and License 6 votes vote down vote up
/**
 * 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;
}
 
Example 9
Project: neoscada   File: ProfileModelWizard.java   Source Code and License 6 votes vote down vote up
/**
 * 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;
}
 
Example 10
Project: gemoc-studio   File: FsmModelWizard.java   Source Code and License 6 votes vote down vote up
/**
 * 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;
}
 
Example 11
Project: time4sys   File: SrmModelWizard.java   Source Code and License 6 votes vote down vote up
/**
 * 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;
}
 
Example 12
Project: gemoc-studio-modeldebugging   File: TracingannotationsModelWizard.java   Source Code and License 6 votes vote down vote up
/**
 * 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;
}
 
Example 13
Project: BIMplatform   File: PackageMetaData.java   Source Code and License 6 votes vote down vote up
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));
		}
	}
}
 
Example 14
Project: neoscada   File: WorldModelWizard.java   Source Code and License 6 votes vote down vote up
/**
 * 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;
}
 
Example 15
Project: n4js   File: TokenTypeRewriter.java   Source Code and License 6 votes vote down vote up
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);
					}
				}
			}
		}
	}
}
 
Example 16
Project: neoscada   File: ProtocolModelWizard.java   Source Code and License 6 votes vote down vote up
/**
 * 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;
}
 
Example 17
Project: n4js   File: EcoreUtilN4Test.java   Source Code and License 5 votes vote down vote up
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;
}
 
Example 18
Project: ttc2017smartGrids   File: DataclassesPackageImpl.java   Source Code and License 5 votes vote down vote up
/**
 * 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);
	}
}
 
Example 19
Project: BIMplatform   File: PackageMetaData.java   Source Code and License 5 votes vote down vote up
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());
			}
		}
	}
}
 
Example 20
Project: BIMplatform   File: MetaDataManager.java   Source Code and License 5 votes vote down vote up
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()));
					}
				}
			}
		}
	}
}
 
Example 21
Project: ttc2017smartGrids   File: LNGroupYPackageImpl.java   Source Code and License 5 votes vote down vote up
/**
 * 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);
	}
}
 
Example 22
Project: ttc2017smartGrids   File: LNGroupZPackageImpl.java   Source Code and License 5 votes vote down vote up
/**
 * 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);
	}
}
 
Example 23
Project: BIMplatform   File: LogPackageImpl.java   Source Code and License 5 votes vote down vote up
/**
 * 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);
	}
}
 
Example 24
Project: BIMplatform   File: PackageMetaData.java   Source Code and License 5 votes vote down vote up
private void initUnsettedLengths() {
	for (EClassifier eClassifier : ePackage.getEClassifiers()) {
		if (eClassifier instanceof EClass) {
			EClass eClass = (EClass)eClassifier;
			calculateUnsettedLength(eClass);
		}
	}
}
 
Example 25
Project: ttc2017smartGrids   File: LNGroupCPackageImpl.java   Source Code and License 5 votes vote down vote up
/**
 * 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);
	}
}
 
Example 26
Project: ttc2017smartGrids   File: LNGroupPPackageImpl.java   Source Code and License 5 votes vote down vote up
/**
 * 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);
	}
}
 
Example 27
Project: ttc2017smartGrids   File: LNGroupXPackageImpl.java   Source Code and License 5 votes vote down vote up
/**
 * 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);
	}
}
 
Example 28
Project: ttc2017smartGrids   File: COSEMObjectsPackageImpl.java   Source Code and License 5 votes vote down vote up
/**
 * 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);
	}
}
 
Example 29
Project: rgse.ttc17.emoflon.tgg   File: MeasPackageImpl.java   Source Code and License 5 votes vote down vote up
/**
 * 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);
	}
}
 
Example 30
Project: rgse.ttc17.emoflon.tgg   File: LNGroupMPackageImpl.java   Source Code and License 5 votes vote down vote up
/**
 * 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);
	}
}
 
Example 31
Project: ttc2017smartGrids   File: COSEMPackageImpl.java   Source Code and License 5 votes vote down vote up
/**
 * 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);
	}
}
 
Example 32
Project: ttc2017smartGrids   File: ReservationPackageImpl.java   Source Code and License 5 votes vote down vote up
/**
 * 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);
	}
}
 
Example 33
Project: ttc2017smartGrids   File: PackageDependenciesPackageImpl.java   Source Code and License 5 votes vote down vote up
/**
 * 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);
	}
}
 
Example 34
Project: ttc2017smartGrids   File: CommonPackageImpl.java   Source Code and License 5 votes vote down vote up
/**
 * 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);
	}
}
 
Example 35
Project: ttc2017smartGrids   File: EnergySchedulingPackageImpl.java   Source Code and License 5 votes vote down vote up
/**
 * 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);
	}
}
 
Example 36
Project: rgse.ttc17.emoflon.tgg   File: MeteringPackageImpl.java   Source Code and License 5 votes vote down vote up
/**
 * 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);
	}
}
 
Example 37
Project: rgse.ttc17.emoflon.tgg   File: InfAssetsPackageImpl.java   Source Code and License 5 votes vote down vote up
/**
 * 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);
	}
}
 
Example 38
Project: rgse.ttc17.emoflon.tgg   File: Task1PackageImpl.java   Source Code and License 5 votes vote down vote up
/**
 * 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);
	}
}
 
Example 39
Project: BIMplatform   File: IfcStepStreamingDeserializer.java   Source Code and License 5 votes vote down vote up
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);
	}
}
 
Example 40
Project: rgse.ttc17.emoflon.tgg   File: RulesPackageImpl.java   Source Code and License 5 votes vote down vote up
/**
 * 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);
	}
}