diff --git a/assets/models/ModelJoinLibrary.ecore b/assets/models/ModelJoinLibrary.ecore index 68671c4ce0c595ce48f18b8b6c2b50f395e94c67..d61f6714269948a8b96af965647770daa6cde0ab 100644 --- a/assets/models/ModelJoinLibrary.ecore +++ b/assets/models/ModelJoinLibrary.ecore @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="UTF-8"?> <ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="EclipseLibrary" nsURI="http://www.example.org/eclipselibrary" + xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="eclipselibrary" nsURI="http://www.example.org/eclipselibrary" nsPrefix="elib"> - <eClassifiers xsi:type="ecore:EClass" name="Item"> + <eClassifiers xsi:type="ecore:EClass" name="Item" abstract="true"> <eStructuralFeatures xsi:type="ecore:EAttribute" name="publicationDate" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDate"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="title" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="Periodical" eSuperTypes="#//Item"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="title" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="issuesPerYear" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> </eClassifiers> @@ -15,16 +15,14 @@ <eLiterals name="ScienceFiction" value="1"/> <eLiterals name="Biography" value="2"/> </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="CirculatingItem" eSuperTypes="#//Item"/> + <eClassifiers xsi:type="ecore:EClass" name="CirculatingItem" abstract="true" eSuperTypes="#//Item"/> <eClassifiers xsi:type="ecore:EClass" name="Book" eSuperTypes="#//CirculatingItem"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="title" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="pages" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="category" eType="#//BookCategory"/> <eStructuralFeatures xsi:type="ecore:EReference" name="author" lowerBound="1" eType="#//Writer" eOpposite="#//Writer/books"/> </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="AudioVisualItem" eSuperTypes="#//CirculatingItem"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="title" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eClassifiers xsi:type="ecore:EClass" name="AudioVisualItem" abstract="true" eSuperTypes="#//CirculatingItem"> <eStructuralFeatures xsi:type="ecore:EAttribute" name="minutesLength" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="damaged" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> diff --git a/src/main/scala/org/rosi_project/model_sync/generator/PackageNames.scala b/src/main/scala/org/rosi_project/model_sync/generator/PackageNames.scala index 96b9467e7d7cd779ea967ae48c42f64ee0e2214d..d16632e5d0a0dd77ad50fc5bde43795de91250fc 100644 --- a/src/main/scala/org/rosi_project/model_sync/generator/PackageNames.scala +++ b/src/main/scala/org/rosi_project/model_sync/generator/PackageNames.scala @@ -4,7 +4,7 @@ object PackageNames { val multiInhertitanceWithTraits = false - val sourcePkgPrefix: String = "sum." + val sourcePkgPrefix: String = "" //sync. , sum. val viewPkgName: String = "view" val viewPostName: String = "View" diff --git a/src/main/scala/org/rosi_project/model_sync/generator/conversion/EmfTypeTranslator.scala b/src/main/scala/org/rosi_project/model_sync/generator/conversion/EmfTypeTranslator.scala index ec1ea7f800a84025ab434afb41480ab845af7208..0fb4d447e4edf8c1181c9ba359f5d5168ee3392b 100644 --- a/src/main/scala/org/rosi_project/model_sync/generator/conversion/EmfTypeTranslator.scala +++ b/src/main/scala/org/rosi_project/model_sync/generator/conversion/EmfTypeTranslator.scala @@ -15,7 +15,7 @@ import org.rosi_project.model_sync.generator.acr_model.types.PredefEcoreTypes object EmfTypeTranslator { private val typeMap: Map[String, SType] = Map( - "Double" -> PredefTypes.Double, + "Double" -> PredefTypes.Double, //map normal data types to its normal data types "Float" -> PredefTypes.Float, "Int" -> PredefTypes.Integer, "Char" -> PredefTypes.Char, @@ -24,7 +24,7 @@ object EmfTypeTranslator { "Long" -> PredefTypes.Long, "Short" -> PredefTypes.Short, "String" -> PredefTypes.String, - "EBoolean" -> PredefTypes.Boolean, + "EBoolean" -> PredefTypes.Boolean, //map EMF data types to its normal data types "EByte" -> PredefTypes.Byte, "EChar" -> PredefTypes.Char, "EDate" -> PredefTypes.Date, diff --git a/src/main/scala/org/rosi_project/model_sync/generator/test/ApplicationTest.scala b/src/main/scala/org/rosi_project/model_sync/generator/test/ApplicationTest.scala index a3719805cc1f6806d84ad1e28907a7495575295f..783f243e88610320d3583f7ad32a3d9a9d5e110e 100644 --- a/src/main/scala/org/rosi_project/model_sync/generator/test/ApplicationTest.scala +++ b/src/main/scala/org/rosi_project/model_sync/generator/test/ApplicationTest.scala @@ -8,12 +8,12 @@ import org.rosi_project.model_sync.generator.Creation object ApplicationTest extends App { //runTestLibrary(Creation.rolesum) - //runCombinedTest(Creation.rolecomb) + runCombinedTest(Creation.rolecomb) //runShrinkingModel(Creation.rolesum) //runTestAML(Creation.rolesum) //TTC Case examples - runTestEmfLibrary(Creation.rolecomb) + //runTestEmfLibrary(Creation.rolecomb) //runTTC2019(Creation.rolecomb) //runTTC2019(Creation.rolesync) //runTTCLive2019(Creation.rolesync)