From 7e50434905cbb7f5d03636033b698e17a9075e9d Mon Sep 17 00:00:00 2001 From: OszkarSemerath Date: Sat, 13 Jan 2018 19:33:26 +0100 Subject: Initial commit of the configuration language and application --- .../ApplicationConfigurationAdapterFactory.java | 373 +++++++++++++++++++ .../util/ApplicationConfigurationSwitch.java | 405 +++++++++++++++++++++ 2 files changed, 778 insertions(+) create mode 100644 Application/hu.bme.mit.inf.dslreasoner.application/src-gen/hu/bme/mit/inf/dslreasoner/application/applicationConfiguration/util/ApplicationConfigurationAdapterFactory.java create mode 100644 Application/hu.bme.mit.inf.dslreasoner.application/src-gen/hu/bme/mit/inf/dslreasoner/application/applicationConfiguration/util/ApplicationConfigurationSwitch.java (limited to 'Application/hu.bme.mit.inf.dslreasoner.application/src-gen/hu/bme/mit/inf/dslreasoner/application/applicationConfiguration/util') diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/src-gen/hu/bme/mit/inf/dslreasoner/application/applicationConfiguration/util/ApplicationConfigurationAdapterFactory.java b/Application/hu.bme.mit.inf.dslreasoner.application/src-gen/hu/bme/mit/inf/dslreasoner/application/applicationConfiguration/util/ApplicationConfigurationAdapterFactory.java new file mode 100644 index 00000000..67d9c396 --- /dev/null +++ b/Application/hu.bme.mit.inf.dslreasoner.application/src-gen/hu/bme/mit/inf/dslreasoner/application/applicationConfiguration/util/ApplicationConfigurationAdapterFactory.java @@ -0,0 +1,373 @@ +/** + * generated by Xtext 2.10.0 + */ +package hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.util; + +import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.*; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ApplicationConfigurationPackage + * @generated + */ +public class ApplicationConfigurationAdapterFactory extends AdapterFactoryImpl +{ + /** + * The cached model package. + * + * + * @generated + */ + protected static ApplicationConfigurationPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public ApplicationConfigurationAdapterFactory() + { + if (modelPackage == null) + { + modelPackage = ApplicationConfigurationPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) + { + if (object == modelPackage) + { + return true; + } + if (object instanceof EObject) + { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected ApplicationConfigurationSwitch modelSwitch = + new ApplicationConfigurationSwitch() + { + @Override + public Adapter caseConfigurationScript(ConfigurationScript object) + { + return createConfigurationScriptAdapter(); + } + @Override + public Adapter caseCommand(Command object) + { + return createCommandAdapter(); + } + @Override + public Adapter caseDeclaration(Declaration object) + { + return createDeclarationAdapter(); + } + @Override + public Adapter caseImport(Import object) + { + return createImportAdapter(); + } + @Override + public Adapter caseEPackageImport(EPackageImport object) + { + return createEPackageImportAdapter(); + } + @Override + public Adapter caseViatraImport(ViatraImport object) + { + return createViatraImportAdapter(); + } + @Override + public Adapter caseMetamodelSpecification(MetamodelSpecification object) + { + return createMetamodelSpecificationAdapter(); + } + @Override + public Adapter caseMetamodelEntry(MetamodelEntry object) + { + return createMetamodelEntryAdapter(); + } + @Override + public Adapter caseAllPackageEntry(AllPackageEntry object) + { + return createAllPackageEntryAdapter(); + } + @Override + public Adapter caseMetamodelElement(MetamodelElement object) + { + return createMetamodelElementAdapter(); + } + @Override + public Adapter caseMetamodelDeclaration(MetamodelDeclaration object) + { + return createMetamodelDeclarationAdapter(); + } + @Override + public Adapter caseMetamodelReference(MetamodelReference object) + { + return createMetamodelReferenceAdapter(); + } + @Override + public Adapter caseMetamodel(Metamodel object) + { + return createMetamodelAdapter(); + } + @Override + public Adapter defaultCase(EObject object) + { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) + { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ConfigurationScript Configuration Script}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ConfigurationScript + * @generated + */ + public Adapter createConfigurationScriptAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.Command Command}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.Command + * @generated + */ + public Adapter createCommandAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.Declaration Declaration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.Declaration + * @generated + */ + public Adapter createDeclarationAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.Import Import}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.Import + * @generated + */ + public Adapter createImportAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.EPackageImport EPackage Import}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.EPackageImport + * @generated + */ + public Adapter createEPackageImportAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ViatraImport Viatra Import}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ViatraImport + * @generated + */ + public Adapter createViatraImportAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.MetamodelSpecification Metamodel Specification}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.MetamodelSpecification + * @generated + */ + public Adapter createMetamodelSpecificationAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.MetamodelEntry Metamodel Entry}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.MetamodelEntry + * @generated + */ + public Adapter createMetamodelEntryAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.AllPackageEntry All Package Entry}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.AllPackageEntry + * @generated + */ + public Adapter createAllPackageEntryAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.MetamodelElement Metamodel Element}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.MetamodelElement + * @generated + */ + public Adapter createMetamodelElementAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.MetamodelDeclaration Metamodel Declaration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.MetamodelDeclaration + * @generated + */ + public Adapter createMetamodelDeclarationAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.MetamodelReference Metamodel Reference}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.MetamodelReference + * @generated + */ + public Adapter createMetamodelReferenceAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.Metamodel Metamodel}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.Metamodel + * @generated + */ + public Adapter createMetamodelAdapter() + { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() + { + return null; + } + +} //ApplicationConfigurationAdapterFactory diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/src-gen/hu/bme/mit/inf/dslreasoner/application/applicationConfiguration/util/ApplicationConfigurationSwitch.java b/Application/hu.bme.mit.inf.dslreasoner.application/src-gen/hu/bme/mit/inf/dslreasoner/application/applicationConfiguration/util/ApplicationConfigurationSwitch.java new file mode 100644 index 00000000..673ffe08 --- /dev/null +++ b/Application/hu.bme.mit.inf.dslreasoner.application/src-gen/hu/bme/mit/inf/dslreasoner/application/applicationConfiguration/util/ApplicationConfigurationSwitch.java @@ -0,0 +1,405 @@ +/** + * generated by Xtext 2.10.0 + */ +package hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.util; + +import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.*; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ApplicationConfigurationPackage + * @generated + */ +public class ApplicationConfigurationSwitch extends Switch +{ + /** + * The cached model package + * + * + * @generated + */ + protected static ApplicationConfigurationPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public ApplicationConfigurationSwitch() + { + if (modelPackage == null) + { + modelPackage = ApplicationConfigurationPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @param ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) + { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) + { + switch (classifierID) + { + case ApplicationConfigurationPackage.CONFIGURATION_SCRIPT: + { + ConfigurationScript configurationScript = (ConfigurationScript)theEObject; + T result = caseConfigurationScript(configurationScript); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ApplicationConfigurationPackage.COMMAND: + { + Command command = (Command)theEObject; + T result = caseCommand(command); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ApplicationConfigurationPackage.DECLARATION: + { + Declaration declaration = (Declaration)theEObject; + T result = caseDeclaration(declaration); + if (result == null) result = caseCommand(declaration); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ApplicationConfigurationPackage.IMPORT: + { + Import import_ = (Import)theEObject; + T result = caseImport(import_); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ApplicationConfigurationPackage.EPACKAGE_IMPORT: + { + EPackageImport ePackageImport = (EPackageImport)theEObject; + T result = caseEPackageImport(ePackageImport); + if (result == null) result = caseImport(ePackageImport); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ApplicationConfigurationPackage.VIATRA_IMPORT: + { + ViatraImport viatraImport = (ViatraImport)theEObject; + T result = caseViatraImport(viatraImport); + if (result == null) result = caseImport(viatraImport); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ApplicationConfigurationPackage.METAMODEL_SPECIFICATION: + { + MetamodelSpecification metamodelSpecification = (MetamodelSpecification)theEObject; + T result = caseMetamodelSpecification(metamodelSpecification); + if (result == null) result = caseMetamodel(metamodelSpecification); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ApplicationConfigurationPackage.METAMODEL_ENTRY: + { + MetamodelEntry metamodelEntry = (MetamodelEntry)theEObject; + T result = caseMetamodelEntry(metamodelEntry); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ApplicationConfigurationPackage.ALL_PACKAGE_ENTRY: + { + AllPackageEntry allPackageEntry = (AllPackageEntry)theEObject; + T result = caseAllPackageEntry(allPackageEntry); + if (result == null) result = caseMetamodelEntry(allPackageEntry); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ApplicationConfigurationPackage.METAMODEL_ELEMENT: + { + MetamodelElement metamodelElement = (MetamodelElement)theEObject; + T result = caseMetamodelElement(metamodelElement); + if (result == null) result = caseMetamodelEntry(metamodelElement); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ApplicationConfigurationPackage.METAMODEL_DECLARATION: + { + MetamodelDeclaration metamodelDeclaration = (MetamodelDeclaration)theEObject; + T result = caseMetamodelDeclaration(metamodelDeclaration); + if (result == null) result = caseDeclaration(metamodelDeclaration); + if (result == null) result = caseCommand(metamodelDeclaration); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ApplicationConfigurationPackage.METAMODEL_REFERENCE: + { + MetamodelReference metamodelReference = (MetamodelReference)theEObject; + T result = caseMetamodelReference(metamodelReference); + if (result == null) result = caseMetamodel(metamodelReference); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ApplicationConfigurationPackage.METAMODEL: + { + Metamodel metamodel = (Metamodel)theEObject; + T result = caseMetamodel(metamodel); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Configuration Script'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Configuration Script'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseConfigurationScript(ConfigurationScript object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Command'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Command'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCommand(Command object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Declaration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Declaration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDeclaration(Declaration object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Import'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Import'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseImport(Import object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EPackage Import'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EPackage Import'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseEPackageImport(EPackageImport object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Viatra Import'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Viatra Import'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseViatraImport(ViatraImport object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Metamodel Specification'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Metamodel Specification'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseMetamodelSpecification(MetamodelSpecification object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Metamodel Entry'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Metamodel Entry'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseMetamodelEntry(MetamodelEntry object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'All Package Entry'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'All Package Entry'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAllPackageEntry(AllPackageEntry object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Metamodel Element'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Metamodel Element'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseMetamodelElement(MetamodelElement object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Metamodel Declaration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Metamodel Declaration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseMetamodelDeclaration(MetamodelDeclaration object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Metamodel Reference'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Metamodel Reference'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseMetamodelReference(MetamodelReference object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Metamodel'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Metamodel'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseMetamodel(Metamodel object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) + { + return null; + } + +} //ApplicationConfigurationSwitch -- cgit v1.2.3-54-g00ecf