diff --git a/src/BaselineOfOntoUMLTransformationFramework/BaselineOfOntoUMLTransformationFramework.class.st b/src/BaselineOfOntoUMLTransformationFramework/BaselineOfOntoUMLTransformationFramework.class.st index 519ecea..f1426a2 100644 --- a/src/BaselineOfOntoUMLTransformationFramework/BaselineOfOntoUMLTransformationFramework.class.st +++ b/src/BaselineOfOntoUMLTransformationFramework/BaselineOfOntoUMLTransformationFramework.class.st @@ -1,10 +1,11 @@ Class { - #name : #BaselineOfOntoUMLTransformationFramework, - #superclass : #BaselineOf, - #category : #BaselineOfOntoUMLTransformationFramework + #name : 'BaselineOfOntoUMLTransformationFramework', + #superclass : 'BaselineOf', + #category : 'BaselineOfOntoUMLTransformationFramework', + #package : 'BaselineOfOntoUMLTransformationFramework' } -{ #category : #baselines } +{ #category : 'baselines' } BaselineOfOntoUMLTransformationFramework >> baseline: spec [ spec diff --git a/src/BaselineOfOntoUMLTransformationFramework/package.st b/src/BaselineOfOntoUMLTransformationFramework/package.st index 277b0de..3f5744f 100644 --- a/src/BaselineOfOntoUMLTransformationFramework/package.st +++ b/src/BaselineOfOntoUMLTransformationFramework/package.st @@ -1 +1 @@ -Package { #name : #BaselineOfOntoUMLTransformationFramework } +Package { #name : 'BaselineOfOntoUMLTransformationFramework' } diff --git a/src/OntoUML-TransformationFramework/OntoUMLAssociationTransformer.class.st b/src/OntoUML-TransformationFramework/OntoUMLAssociationTransformer.class.st index 310721a..2aa8400 100644 --- a/src/OntoUML-TransformationFramework/OntoUMLAssociationTransformer.class.st +++ b/src/OntoUML-TransformationFramework/OntoUMLAssociationTransformer.class.st @@ -1,28 +1,30 @@ Class { - #name : #OntoUMLAssociationTransformer, - #superclass : #OntoUMLTransformer, - #category : #'OntoUML-TransformationFramework-Transformers' + #name : 'OntoUMLAssociationTransformer', + #superclass : 'OntoUMLTransformer', + #category : 'OntoUML-TransformationFramework-Transformers', + #package : 'OntoUML-TransformationFramework', + #tag : 'Transformers' } -{ #category : #accessing } +{ #category : 'accessing' } OntoUMLAssociationTransformer class >> defaultTransformation [ ^ OntoUMLTransformAssociation. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLAssociationTransformer class >> getTransformation: aAssocitaion [ | stereotypeClass | stereotypeClass := OntoUMLModelQuery getStereotypeClass: aAssocitaion. ^ super getTransformation: stereotypeClass. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLAssociationTransformer class >> initializeTransformationIndex [ transformationIndex := Dictionary new. transformationIndex add: (OntoUMLSubQuantityOf -> OntoUMLTransformSubQuantityOf). ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLAssociationTransformer >> transform [ transformed memberEnds first type = transformed memberEnds second type ifTrue: [ ^nil. ]. ^ (self class getTransformation: transformed) transform: transformed withController: controller withTransformer: self. diff --git a/src/OntoUML-TransformationFramework/OntoUMLClassTransformer.class.st b/src/OntoUML-TransformationFramework/OntoUMLClassTransformer.class.st index 553c6f7..5c7df7b 100644 --- a/src/OntoUML-TransformationFramework/OntoUMLClassTransformer.class.st +++ b/src/OntoUML-TransformationFramework/OntoUMLClassTransformer.class.st @@ -1,28 +1,30 @@ Class { - #name : #OntoUMLClassTransformer, - #superclass : #OntoUMLTransformer, - #category : #'OntoUML-TransformationFramework-Transformers' + #name : 'OntoUMLClassTransformer', + #superclass : 'OntoUMLTransformer', + #category : 'OntoUML-TransformationFramework-Transformers', + #package : 'OntoUML-TransformationFramework', + #tag : 'Transformers' } -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLClassTransformer class >> defaultTransformation [ ^ OntoUMLTransformClass. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLClassTransformer class >> getTransformation: aClass [ | stereotypeClass | stereotypeClass := OntoUMLModelQuery getStereotypeClass: aClass. ^ super getTransformation: stereotypeClass. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLClassTransformer class >> initializeTransformationIndex [ transformationIndex := Dictionary new. "Currently there are no class specific transformations." ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLClassTransformer >> transform [ ^ (self class getTransformation: transformed) transform: transformed withController: controller withTransformer: self. ] diff --git a/src/OntoUML-TransformationFramework/OntoUMLGeneralizationSetTransformer.class.st b/src/OntoUML-TransformationFramework/OntoUMLGeneralizationSetTransformer.class.st index 0d4042d..f7e7361 100644 --- a/src/OntoUML-TransformationFramework/OntoUMLGeneralizationSetTransformer.class.st +++ b/src/OntoUML-TransformationFramework/OntoUMLGeneralizationSetTransformer.class.st @@ -1,6 +1,6 @@ Class { - #name : #OntoUMLGeneralizationSetTransformer, - #superclass : #OntoUMLTransformer, + #name : 'OntoUMLGeneralizationSetTransformer', + #superclass : 'OntoUMLTransformer', #instVars : [ 'generalizations', 'name' @@ -8,21 +8,23 @@ Class { #classInstVars : [ 'savedTransformation' ], - #category : #'OntoUML-TransformationFramework-Transformers' + #category : 'OntoUML-TransformationFramework-Transformers', + #package : 'OntoUML-TransformationFramework', + #tag : 'Transformers' } -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLGeneralizationSetTransformer class >> defaultTransformation [ ^ [ :generalizations :controller :transformer | OntoUMLTransformGeneralizationSet transform: generalizations withController: controller withTransformer: transformer. ]. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLGeneralizationSetTransformer class >> generalizationSetGroups [ "Order of elements in collection determines order of the transformation" ^ { 'Phase'. 'Role'. 'RoleMixin'. 'Mixin'. 'Object'. "Object = all remaining GenSet groups" }. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLGeneralizationSetTransformer class >> initializeTransformationIndex [ transformationIndex := Dictionary new. transformationIndex add: ('Phase' -> [ :generalizations :controller :transformer | OntoUMLTransformGeneralizationSet transformAsComposition: generalizations withController: controller withTransformer: transformer. ]). @@ -31,36 +33,36 @@ OntoUMLGeneralizationSetTransformer class >> initializeTransformationIndex [ transformationIndex add: ('Mixin' -> [ :generalizations :controller :transformer | OntoUMLTransformGeneralizationSet transformAsComposition: generalizations withController: controller withTransformer: transformer. ]). ] -{ #category : #accessing } +{ #category : 'accessing' } OntoUMLGeneralizationSetTransformer class >> savedTransformation [ ^ savedTransformation ] -{ #category : #accessing } +{ #category : 'accessing' } OntoUMLGeneralizationSetTransformer class >> savedTransformation: anObject [ savedTransformation := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } OntoUMLGeneralizationSetTransformer >> general [ ^ controller getTransfomedElementFrom: transformed generalizations first general. ] -{ #category : #accessing } +{ #category : 'accessing' } OntoUMLGeneralizationSetTransformer >> name [ ^ name ] -{ #category : #accessing } +{ #category : 'accessing' } OntoUMLGeneralizationSetTransformer >> name: anObject [ name := anObject ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLGeneralizationSetTransformer >> transform [ transformed generalizations ifEmpty: [ ^{}. ]. (OntoUMLModelQuery isStereotypeOf: transformed generalizations first general oclKindOf: 'Sortal') @@ -68,7 +70,7 @@ OntoUMLGeneralizationSetTransformer >> transform [ ifFalse: [ ^ self transformNonSortalGenSet. ]. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLGeneralizationSetTransformer >> transformGroup: aGroup [ | transformedGeneralizations transformation result | transformedGeneralizations := generalizations select: [ :generalization | OntoUMLModelQuery isStereotypeOf: generalization specific oclKindOf: aGroup. ]. @@ -79,14 +81,14 @@ OntoUMLGeneralizationSetTransformer >> transformGroup: aGroup [ ^ result. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLGeneralizationSetTransformer >> transformNonSortalGenSet [ generalizations := OrderedCollection new. generalizations addAll: transformed generalizations. ^ OntoUMLTransformGeneralizationSet transformWithoutCombination: generalizations withController: controller withTransformer: self. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLGeneralizationSetTransformer >> transformSortalGenSet [ generalizations := OrderedCollection new. generalizations addAll: transformed generalizations. diff --git a/src/OntoUML-TransformationFramework/OntoUMLGeneralizationTransformer.class.st b/src/OntoUML-TransformationFramework/OntoUMLGeneralizationTransformer.class.st index 0126862..1590817 100644 --- a/src/OntoUML-TransformationFramework/OntoUMLGeneralizationTransformer.class.st +++ b/src/OntoUML-TransformationFramework/OntoUMLGeneralizationTransformer.class.st @@ -1,22 +1,24 @@ Class { - #name : #OntoUMLGeneralizationTransformer, - #superclass : #OntoUMLTransformer, - #category : #'OntoUML-TransformationFramework-Transformers' + #name : 'OntoUMLGeneralizationTransformer', + #superclass : 'OntoUMLTransformer', + #category : 'OntoUML-TransformationFramework-Transformers', + #package : 'OntoUML-TransformationFramework', + #tag : 'Transformers' } -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLGeneralizationTransformer class >> defaultTransformation [ ^ OntoUMLTransformGeneralization. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLGeneralizationTransformer class >> getTransformation: aClass [ | stereotypeClass | stereotypeClass := OntoUMLModelQuery getStereotypeClass: aClass. ^ super getTransformation: stereotypeClass. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLGeneralizationTransformer class >> initializeTransformationIndex [ transformationIndex := Dictionary new. transformationIndex add: (OntoUMLPhase -> OntoUMLTransformComposition). @@ -26,12 +28,12 @@ OntoUMLGeneralizationTransformer class >> initializeTransformationIndex [ ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLGeneralizationTransformer >> name [ ^ ''. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLGeneralizationTransformer >> transform [ ^ (self class getTransformation: transformed specific) transform: transformed withController: controller withTransformer: self. ] diff --git a/src/OntoUML-TransformationFramework/OntoUMLTransformAssociation.class.st b/src/OntoUML-TransformationFramework/OntoUMLTransformAssociation.class.st index 974552d..1f11ff4 100644 --- a/src/OntoUML-TransformationFramework/OntoUMLTransformAssociation.class.st +++ b/src/OntoUML-TransformationFramework/OntoUMLTransformAssociation.class.st @@ -1,10 +1,12 @@ Class { - #name : #OntoUMLTransformAssociation, - #superclass : #OntoUMLTransformation, - #category : #'OntoUML-TransformationFramework-Transformations' + #name : 'OntoUMLTransformAssociation', + #superclass : 'OntoUMLTransformation', + #category : 'OntoUML-TransformationFramework-Transformations', + #package : 'OntoUML-TransformationFramework', + #tag : 'Transformations' } -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformAssociation >> createAssociation [ | association | association := OPUMLAssociation new. @@ -17,7 +19,7 @@ OntoUMLTransformAssociation >> createAssociation [ ^ association. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformAssociation >> tranformAssociationEnd: aAssociationEnd forAssociation: aAssociation [ ^ OPUMLProperty new name: aAssociationEnd name; @@ -36,7 +38,7 @@ OntoUMLTransformAssociation >> tranformAssociationEnd: aAssociationEnd forAssoci ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformAssociation >> transform [ | association | association := self createAssociation. diff --git a/src/OntoUML-TransformationFramework/OntoUMLTransformAssociationTest.class.st b/src/OntoUML-TransformationFramework/OntoUMLTransformAssociationTest.class.st index 8be5fb7..c806aee 100644 --- a/src/OntoUML-TransformationFramework/OntoUMLTransformAssociationTest.class.st +++ b/src/OntoUML-TransformationFramework/OntoUMLTransformAssociationTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #OntoUMLTransformAssociationTest, - #superclass : #OntoUMLTransformationTest, - #category : #'OntoUML-TransformationFramework-Transformations' + #name : 'OntoUMLTransformAssociationTest', + #superclass : 'OntoUMLTransformationTest', + #category : 'OntoUML-TransformationFramework-Transformations', + #package : 'OntoUML-TransformationFramework', + #tag : 'Transformations' } -{ #category : #constants } +{ #category : 'constants' } OntoUMLTransformAssociationTest >> getAssociation [ | source target association | source := OPUMLClass new name: 'source'. diff --git a/src/OntoUML-TransformationFramework/OntoUMLTransformClass.class.st b/src/OntoUML-TransformationFramework/OntoUMLTransformClass.class.st index 0418384..e537824 100644 --- a/src/OntoUML-TransformationFramework/OntoUMLTransformClass.class.st +++ b/src/OntoUML-TransformationFramework/OntoUMLTransformClass.class.st @@ -1,17 +1,19 @@ Class { - #name : #OntoUMLTransformClass, - #superclass : #OntoUMLTransformation, - #category : #'OntoUML-TransformationFramework-Transformations' + #name : 'OntoUMLTransformClass', + #superclass : 'OntoUMLTransformation', + #category : 'OntoUML-TransformationFramework-Transformations', + #package : 'OntoUML-TransformationFramework', + #tag : 'Transformations' } -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformClass >> copyAttribute: aAttribute for: aEntity [ (aAttribute isKindOf: OPUMLProperty) ifTrue: [ ^ self copyProperty: aAttribute for: aEntity. ]. (aAttribute isKindOf: OPUMLOperation) ifTrue: [ ^ self copyOperation: aAttribute for: aEntity. ]. ^ {}. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformClass >> copyAttributes: aAttributesCollection for: aEntity [ | copy | copy := aAttributesCollection copyEmpty. @@ -19,7 +21,7 @@ OntoUMLTransformClass >> copyAttributes: aAttributesCollection for: aEntity [ ^ copy. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformClass >> copyMultiplicity: aMultiplicity [ | copy | aMultiplicity ifNil: [ ^ nil. ]. @@ -29,7 +31,7 @@ OntoUMLTransformClass >> copyMultiplicity: aMultiplicity [ ^ copy ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformClass >> copyOperation: aOperation for: aEntity [ | copy | copy := OPUMLOperation new. @@ -42,7 +44,7 @@ OntoUMLTransformClass >> copyOperation: aOperation for: aEntity [ ^ { copy. }. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformClass >> copyProperty: aProperty for: aEntity [ | copy | aProperty association ifNotNil: [ ^ {}. ]. @@ -61,7 +63,7 @@ OntoUMLTransformClass >> copyProperty: aProperty for: aEntity [ ^ { copy. } ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformClass >> createClassFor: aEntity [ | createdClass | createdClass := OPUMLClass new. @@ -72,7 +74,7 @@ OntoUMLTransformClass >> createClassFor: aEntity [ ^ createdClass. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformClass >> transform [ | entityClass | entityClass := self createClassFor: transformed. diff --git a/src/OntoUML-TransformationFramework/OntoUMLTransformComposition.class.st b/src/OntoUML-TransformationFramework/OntoUMLTransformComposition.class.st index be453a3..14fb6ab 100644 --- a/src/OntoUML-TransformationFramework/OntoUMLTransformComposition.class.st +++ b/src/OntoUML-TransformationFramework/OntoUMLTransformComposition.class.st @@ -1,10 +1,12 @@ Class { - #name : #OntoUMLTransformComposition, - #superclass : #OntoUMLTransformation, - #category : #'OntoUML-TransformationFramework-Transformations' + #name : 'OntoUMLTransformComposition', + #superclass : 'OntoUMLTransformation', + #category : 'OntoUML-TransformationFramework-Transformations', + #package : 'OntoUML-TransformationFramework', + #tag : 'Transformations' } -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformComposition >> createComposition [ | composition | composition := OPUMLAssociation new. @@ -15,7 +17,7 @@ OntoUMLTransformComposition >> createComposition [ ^ composition. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformComposition >> createCompositionEndFor: aComposition withEndType: aEndType withOpposingEnd: aOpposingEndType navigable: aBoolean [ | end | end := OPUMLProperty new @@ -28,7 +30,7 @@ OntoUMLTransformComposition >> createCompositionEndFor: aComposition withEndType ^ end. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformComposition >> transform [ | composition | composition := self createComposition. diff --git a/src/OntoUML-TransformationFramework/OntoUMLTransformGeneralization.class.st b/src/OntoUML-TransformationFramework/OntoUMLTransformGeneralization.class.st index 3d63e6e..bbf444c 100644 --- a/src/OntoUML-TransformationFramework/OntoUMLTransformGeneralization.class.st +++ b/src/OntoUML-TransformationFramework/OntoUMLTransformGeneralization.class.st @@ -1,10 +1,12 @@ Class { - #name : #OntoUMLTransformGeneralization, - #superclass : #OntoUMLTransformation, - #category : #'OntoUML-TransformationFramework-Transformations' + #name : 'OntoUMLTransformGeneralization', + #superclass : 'OntoUMLTransformation', + #category : 'OntoUML-TransformationFramework-Transformations', + #package : 'OntoUML-TransformationFramework', + #tag : 'Transformations' } -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformGeneralization >> transform [ | generalization | generalization := OPUMLGeneralization new. diff --git a/src/OntoUML-TransformationFramework/OntoUMLTransformGeneralizationSet.class.st b/src/OntoUML-TransformationFramework/OntoUMLTransformGeneralizationSet.class.st index dcb2f95..7c353a6 100644 --- a/src/OntoUML-TransformationFramework/OntoUMLTransformGeneralizationSet.class.st +++ b/src/OntoUML-TransformationFramework/OntoUMLTransformGeneralizationSet.class.st @@ -1,43 +1,45 @@ Class { - #name : #OntoUMLTransformGeneralizationSet, - #superclass : #OntoUMLTransformation, + #name : 'OntoUMLTransformGeneralizationSet', + #superclass : 'OntoUMLTransformation', #instVars : [ 'elements', 'index', 'combinationSelector' ], - #category : #'OntoUML-TransformationFramework-Transformations' + #category : 'OntoUML-TransformationFramework-Transformations', + #package : 'OntoUML-TransformationFramework', + #tag : 'Transformations' } -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformGeneralizationSet class >> transformAsComposition: aTransformed withController: aController withTransformer: aTransformer [ | instance | instance := self newWithTransformed: aTransformed withController: aController withTransformer: aTransformer. ^ instance transformAsComposition. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformGeneralizationSet class >> transformAsGeneralization: aTransformed withController: aController withTransformer: aTransformer [ | instance | instance := self newWithTransformed: aTransformed withController: aController withTransformer: aTransformer. ^ instance transformAsGeneralization. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformGeneralizationSet class >> transformAsGeneralizationAndComposition: aTransformed withController: aController withTransformer: aTransformer [ | instance | instance := self newWithTransformed: aTransformed withController: aController withTransformer: aTransformer. ^ instance transformAsGeneralizationAndComposition. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformGeneralizationSet class >> transformWithoutCombination: aTransformed withController: aController withTransformer: aTransformer [ | instance | instance := self newWithTransformed: aTransformed withController: aController withTransformer: aTransformer. ^ instance transformDisjointGeneralization. ] -{ #category : #'private - transforming - generalization' } +{ #category : 'private - transforming - generalization' } OntoUMLTransformGeneralizationSet >> calculateIndex: aIndex for: aElementPosition [ | positionOffset | positionOffset := 2 raisedTo: (aElementPosition - 1). @@ -46,7 +48,7 @@ OntoUMLTransformGeneralizationSet >> calculateIndex: aIndex for: aElementPositio ifFalse: [ ^ 0. ]. ] -{ #category : #'private - transforming - generalization' } +{ #category : 'private - transforming - generalization' } OntoUMLTransformGeneralizationSet >> calculateIndexesFrom: aIndex [ | sumOfIndexes | sumOfIndexes := 0. @@ -56,25 +58,25 @@ OntoUMLTransformGeneralizationSet >> calculateIndexesFrom: aIndex [ ^ sumOfIndexes. ] -{ #category : #accessing } +{ #category : 'accessing' } OntoUMLTransformGeneralizationSet >> combinationSelector [ ^ combinationSelector ] -{ #category : #accessing } +{ #category : 'accessing' } OntoUMLTransformGeneralizationSet >> combinationSelector: anObject [ combinationSelector := anObject ] -{ #category : #'private - transforming - generalization' } +{ #category : 'private - transforming - generalization' } OntoUMLTransformGeneralizationSet >> combineClass: aAddedClass with: aCompositeClass [ ^ self combinationSelector value: aAddedClass value: aCompositeClass. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformGeneralizationSet >> combineUsingGeneralization: aAddedClass with: aCompositeClass [ aCompositeClass name: aCompositeClass name, aAddedClass name. self copyAttributesFrom: aAddedClass in: aCompositeClass. @@ -82,14 +84,14 @@ OntoUMLTransformGeneralizationSet >> combineUsingGeneralization: aAddedClass wit ^ {}. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformGeneralizationSet >> combineUsingGeneralizationAndComposition: aAddedClass with: aCompositeClass [ aCompositeClass name: aCompositeClass name, aAddedClass name. ^ { self createCompositionWithSource: (controller getTransfomedElementFrom: aAddedClass) withTarget: aCompositeClass. }. ] -{ #category : #'private - transforming - generalization' } +{ #category : 'private - transforming - generalization' } OntoUMLTransformGeneralizationSet >> copyAttribute: aAttribute for: aClass [ | copy | aAttribute association ifNotNil: [ ^ {}. ]. @@ -99,7 +101,7 @@ OntoUMLTransformGeneralizationSet >> copyAttribute: aAttribute for: aClass [ aClass ownedAttributes add: copy. ] -{ #category : #'private - transforming - generalization' } +{ #category : 'private - transforming - generalization' } OntoUMLTransformGeneralizationSet >> copyAttributesFrom: aAddedClass in: aCompositeClass [ | attributes | attributes := aAddedClass ownedAttributes. @@ -107,12 +109,12 @@ OntoUMLTransformGeneralizationSet >> copyAttributesFrom: aAddedClass in: aCompos attributes do: [ :attribute | self copyAttribute: attribute for: aCompositeClass. ]. ] -{ #category : #'private - transforming - generalization' } +{ #category : 'private - transforming - generalization' } OntoUMLTransformGeneralizationSet >> copyOperationsFor: aCompositeClass [ aCompositeClass ownedOperations addAll: (aCompositeClass ownedAttributes select: [ :att | att isKindOf: OPUMLOperation ]). ] -{ #category : #'private - transforming - generalization' } +{ #category : 'private - transforming - generalization' } OntoUMLTransformGeneralizationSet >> createClassCombination [ | newClass results | results := OrderedCollection new. @@ -128,7 +130,7 @@ OntoUMLTransformGeneralizationSet >> createClassCombination [ ^ results. ] -{ #category : #'private - transforming - composition' } +{ #category : 'private - transforming - composition' } OntoUMLTransformGeneralizationSet >> createCompositionEndFor: aComposition withEndType: aEndType withOpposingEnd: aOpposingEndType navigable: aBoolean [ | end | end := OPUMLProperty new @@ -141,7 +143,7 @@ OntoUMLTransformGeneralizationSet >> createCompositionEndFor: aComposition withE ^ end. ] -{ #category : #'private - transforming - composition' } +{ #category : 'private - transforming - composition' } OntoUMLTransformGeneralizationSet >> createCompositionWithSource: aSource withTarget: aTarget [ | composition | composition := OPUMLAssociation new. @@ -151,12 +153,12 @@ OntoUMLTransformGeneralizationSet >> createCompositionWithSource: aSource withTa ^ composition. ] -{ #category : #'private - transforming - generalization' } +{ #category : 'private - transforming - generalization' } OntoUMLTransformGeneralizationSet >> createGeneralizationFor: aSpecific [ ^ self createGeneralizationWithGeneral: (controller getTransfomedElementFrom: transformed first general) withSpecific: aSpecific. ] -{ #category : #'private - transforming - generalization' } +{ #category : 'private - transforming - generalization' } OntoUMLTransformGeneralizationSet >> createGeneralizationWithGeneral: aGeneral withSpecific: aSpecific [ | generalization | generalization := OPUMLGeneralization new. @@ -165,7 +167,7 @@ OntoUMLTransformGeneralizationSet >> createGeneralizationWithGeneral: aGeneral w ^ generalization. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformGeneralizationSet >> getSelection [ | transformation | transformation := transformer class savedTransformation. @@ -173,7 +175,7 @@ OntoUMLTransformGeneralizationSet >> getSelection [ ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformGeneralizationSet >> getSelectionUsingModalWindow [ | dialogWindow | dialogWindow := TransformGeneralizationSetUI basicNew. @@ -185,25 +187,25 @@ OntoUMLTransformGeneralizationSet >> getSelectionUsingModalWindow [ ] -{ #category : #initialization } +{ #category : 'initialization' } OntoUMLTransformGeneralizationSet >> initializeArrays [ elements := (transformed collect: [ :generalization | generalization specific. ]) asArray. index := Array new: elements size. ] -{ #category : #'private - transforming - generalization' } +{ #category : 'private - transforming - generalization' } OntoUMLTransformGeneralizationSet >> setGeneralProperties [ transformer transformed isDisjoint ifTrue: [ self setName. ]. transformer transformed isCovering ifTrue: [ transformer general isAbstract: true. ]. ] -{ #category : #'private - transforming - composition' } +{ #category : 'private - transforming - composition' } OntoUMLTransformGeneralizationSet >> setName [ ((transformer name ifNil: [ '' ]) endsWith: 'XOR') ifTrue: [ ^ self. ]. transformer name: (transformer transformed name ifNil: [ transformer general name ]) , ' - XOR'. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformGeneralizationSet >> transform [ | selection | transformer transformed isDisjoint ifTrue: [ ^ self transformDisjointGeneralization. ]. @@ -214,36 +216,36 @@ OntoUMLTransformGeneralizationSet >> transform [ ^ nil. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformGeneralizationSet >> transformAsComposition [ transformer transformed isDisjoint ifTrue: [ self setName. ]. ^ transformed collect: [ :generalization | OntoUMLTransformComposition transform: generalization withController: controller withTransformer: transformer. ]. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformGeneralizationSet >> transformAsGeneralization [ ^ self transformWithCombination: [ :addedClass :composedClass | self combineUsingGeneralization: addedClass with: composedClass. ]. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformGeneralizationSet >> transformAsGeneralizationAndComposition [ ^ self transformWithCombination: [ :addedClass :composedClass | self combineUsingGeneralizationAndComposition: addedClass with: composedClass. ]. ] -{ #category : #'private - transforming - generalization' } +{ #category : 'private - transforming - generalization' } OntoUMLTransformGeneralizationSet >> transformClassCombination: aIndex [ (self calculateIndexesFrom: aIndex) < 2 ifTrue: [ ^ {}. ]. ^ self createClassCombination. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformGeneralizationSet >> transformDisjointGeneralization [ self initializeArrays. ^ elements collect: [ :element | self createGeneralizationFor: (controller getTransfomedElementFrom: element). ]. ] -{ #category : #'private - transforming - generalization' } +{ #category : 'private - transforming - generalization' } OntoUMLTransformGeneralizationSet >> transformWithCombination: aCombinationSelector [ | maxIndex results | self setGeneralProperties. diff --git a/src/OntoUML-TransformationFramework/OntoUMLTransformSubQuantityOf.class.st b/src/OntoUML-TransformationFramework/OntoUMLTransformSubQuantityOf.class.st index ee9e412..c8e6c91 100644 --- a/src/OntoUML-TransformationFramework/OntoUMLTransformSubQuantityOf.class.st +++ b/src/OntoUML-TransformationFramework/OntoUMLTransformSubQuantityOf.class.st @@ -1,10 +1,12 @@ Class { - #name : #OntoUMLTransformSubQuantityOf, - #superclass : #OntoUMLTransformation, - #category : #'OntoUML-TransformationFramework-Transformations' + #name : 'OntoUMLTransformSubQuantityOf', + #superclass : 'OntoUMLTransformation', + #category : 'OntoUML-TransformationFramework-Transformations', + #package : 'OntoUML-TransformationFramework', + #tag : 'Transformations' } -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformSubQuantityOf >> transform [ | association | association := OntoUMLTransformAssociation transform: transformed withController: controller withTransformer: transformer. @@ -13,13 +15,13 @@ OntoUMLTransformSubQuantityOf >> transform [ ^ association. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformSubQuantityOf >> transformEnd: aEnd forAssociation: aAssociation [ ({ 'shared'. 'composite'. } includes: aEnd aggregation) ifTrue: [ aEnd owningClass: (aAssociation memberEnds reject: [ :end | end = aEnd. ]) first type. ]. aEnd aggregation: 'none'. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformSubQuantityOf >> transformName: aAssociation [ (aAssociation name notNil and: [ aAssociation name ~= ''. ]) ifFalse: [ aAssociation name: 'containment'. ]. ] diff --git a/src/OntoUML-TransformationFramework/OntoUMLTransformation.class.st b/src/OntoUML-TransformationFramework/OntoUMLTransformation.class.st index 98173f0..a1042b1 100644 --- a/src/OntoUML-TransformationFramework/OntoUMLTransformation.class.st +++ b/src/OntoUML-TransformationFramework/OntoUMLTransformation.class.st @@ -1,15 +1,17 @@ Class { - #name : #OntoUMLTransformation, - #superclass : #Object, + #name : 'OntoUMLTransformation', + #superclass : 'Object', #instVars : [ 'transformed', 'controller', 'transformer' ], - #category : #'OntoUML-TransformationFramework-Transformations' + #category : 'OntoUML-TransformationFramework-Transformations', + #package : 'OntoUML-TransformationFramework', + #tag : 'Transformations' } -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformation class >> newWithTransformed: aTransformed withController: aController withTransformer: aTransformer [ | instance | instance := self new. @@ -19,7 +21,7 @@ OntoUMLTransformation class >> newWithTransformed: aTransformed withController: ^ instance. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformation class >> transform: aTransformed withController: aController withTransformer: aTransformer [ ^ (self newWithTransformed: aTransformed withController: aController @@ -27,52 +29,52 @@ OntoUMLTransformation class >> transform: aTransformed withController: aControll transform. ] -{ #category : #accessing } +{ #category : 'accessing' } OntoUMLTransformation >> controller [ ^ controller ] -{ #category : #accessing } +{ #category : 'accessing' } OntoUMLTransformation >> controller: anObject [ controller := anObject ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformation >> copyCommentFrom: aComment [ ^ OPUMLComment new body: aComment body; yourself. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformation >> copyCommentsFrom: aOriginalElement to: aTransformedElement [ aTransformedElement ownedComments: (aOriginalElement ownedComments collect: [ :comment | self copyCommentFrom: comment. ]). ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformation >> transform [ ^ self subclassResponsibility. ] -{ #category : #accessing } +{ #category : 'accessing' } OntoUMLTransformation >> transformed [ ^ transformed ] -{ #category : #accessing } +{ #category : 'accessing' } OntoUMLTransformation >> transformed: anObject [ transformed := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } OntoUMLTransformation >> transformer [ ^ transformer ] -{ #category : #accessing } +{ #category : 'accessing' } OntoUMLTransformation >> transformer: anObject [ transformer := anObject diff --git a/src/OntoUML-TransformationFramework/OntoUMLTransformationController.class.st b/src/OntoUML-TransformationFramework/OntoUMLTransformationController.class.st index a8ed562..b122cbf 100644 --- a/src/OntoUML-TransformationFramework/OntoUMLTransformationController.class.st +++ b/src/OntoUML-TransformationFramework/OntoUMLTransformationController.class.st @@ -1,15 +1,17 @@ Class { - #name : #OntoUMLTransformationController, - #superclass : #Object, + #name : 'OntoUMLTransformationController', + #superclass : 'Object', #instVars : [ 'originalModel', 'transformedModel', 'transformedElements' ], - #category : #'OntoUML-TransformationFramework-Controllers' + #category : 'OntoUML-TransformationFramework-Controllers', + #package : 'OntoUML-TransformationFramework', + #tag : 'Controllers' } -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformationController class >> transformModel: aModel [ | instance | instance := self new. @@ -17,57 +19,57 @@ OntoUMLTransformationController class >> transformModel: aModel [ ^ instance transform. ] -{ #category : #accessing } +{ #category : 'accessing' } OntoUMLTransformationController >> addElementToTransformedModel: aElement [ transformedModel packagedElements add: aElement. ] -{ #category : #accessing } +{ #category : 'accessing' } OntoUMLTransformationController >> addTranformationLinkBetween: aOriginalElement and: aTransformedElement [ transformedElements add: (aOriginalElement -> aTransformedElement). ] -{ #category : #accessing } +{ #category : 'accessing' } OntoUMLTransformationController >> getTransfomedElementFrom: aOriginalElement [ ^ transformedElements at: aOriginalElement. ] -{ #category : #initialization } +{ #category : 'initialization' } OntoUMLTransformationController >> initialize [ self initializeTransformedModel. transformedElements := Dictionary new. ] -{ #category : #initialization } +{ #category : 'initialization' } OntoUMLTransformationController >> initializeTransformedModel [ transformedModel := OPUMLPackage new name: 'UML Model'. ] -{ #category : #accessing } +{ #category : 'accessing' } OntoUMLTransformationController >> originalModel [ ^ originalModel ] -{ #category : #accessing } +{ #category : 'accessing' } OntoUMLTransformationController >> originalModel: anObject [ originalModel := anObject ] -{ #category : #'private - transforming' } +{ #category : 'private - transforming' } OntoUMLTransformationController >> tranformAssociations [ (OntoUMLModelQuery getAssociationsFrom: originalModel) do: [ :association | OntoUMLAssociationTransformer transform: association withController: self. ]. ] -{ #category : #'private - transforming' } +{ #category : 'private - transforming' } OntoUMLTransformationController >> tranformClasses [ (OntoUMLModelQuery getEntitiesFrom: originalModel) do: [ :entity | OntoUMLClassTransformer transform: entity withController: self. ]. ] -{ #category : #'private - transforming' } +{ #category : 'private - transforming' } OntoUMLTransformationController >> tranformGeneralizationSets [ | genSets | genSets := OntoUMLModelQuery getGeneralizationSetsFrom: originalModel. @@ -77,7 +79,7 @@ OntoUMLTransformationController >> tranformGeneralizationSets [ ] -{ #category : #'private - transforming' } +{ #category : 'private - transforming' } OntoUMLTransformationController >> tranformGeneralizations [ | generalizations | generalizations := OntoUMLModelQuery getGeneralizationsWithoutGenSetsFrom: originalModel. @@ -85,19 +87,19 @@ OntoUMLTransformationController >> tranformGeneralizations [ generalizations do: [ :generalization | OntoUMLGeneralizationTransformer transform: generalization withController: self. ]. ] -{ #category : #accessing } +{ #category : 'accessing' } OntoUMLTransformationController >> transfomedElements [ ^ transformedElements ] -{ #category : #accessing } +{ #category : 'accessing' } OntoUMLTransformationController >> transfomedElements: anObject [ transformedElements := anObject ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformationController >> transform [ self tranformClasses. self tranformAssociations. @@ -106,13 +108,13 @@ OntoUMLTransformationController >> transform [ ^ transformedModel. ] -{ #category : #accessing } +{ #category : 'accessing' } OntoUMLTransformationController >> transformedModel [ ^ transformedModel ] -{ #category : #accessing } +{ #category : 'accessing' } OntoUMLTransformationController >> transformedModel: anObject [ transformedModel := anObject diff --git a/src/OntoUML-TransformationFramework/OntoUMLTransformationTest.class.st b/src/OntoUML-TransformationFramework/OntoUMLTransformationTest.class.st index 683e5d1..d6ae3e6 100644 --- a/src/OntoUML-TransformationFramework/OntoUMLTransformationTest.class.st +++ b/src/OntoUML-TransformationFramework/OntoUMLTransformationTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #OntoUMLTransformationTest, - #superclass : #TestCase, - #category : #'OntoUML-TransformationFramework-Transformations' + #name : 'OntoUMLTransformationTest', + #superclass : 'TestCase', + #category : 'OntoUML-TransformationFramework-Transformations', + #package : 'OntoUML-TransformationFramework', + #tag : 'Transformations' } -{ #category : #utility } +{ #category : 'utility' } OntoUMLTransformationTest >> createAssociationFrom: aSource to: aEnd [ | association | association := OPUMLAssociation new. @@ -24,7 +26,7 @@ OntoUMLTransformationTest >> createAssociationFrom: aSource to: aEnd [ ^ association ] -{ #category : #utility } +{ #category : 'utility' } OntoUMLTransformationTest >> createAssociationFrom: aSource to: aEnd with: aStereotype [ | association | association := self createAssociationFrom: aSource to: aEnd. @@ -32,12 +34,12 @@ OntoUMLTransformationTest >> createAssociationFrom: aSource to: aEnd with: aSter ^ association. ] -{ #category : #constants } +{ #category : 'constants' } OntoUMLTransformationTest >> getTestedClass [ ^ OntoUMLTransformation. ] -{ #category : #tests } +{ #category : 'tests' } OntoUMLTransformationTest >> testController [ | tested controller alternativeController | tested := self getTestedClass new. @@ -50,7 +52,7 @@ OntoUMLTransformationTest >> testController [ ] -{ #category : #tests } +{ #category : 'tests' } OntoUMLTransformationTest >> testNewWithTransformedWithControllerWithTransformer [ | testedClass testedInstance controller transformed transformer | testedClass := self getTestedClass. @@ -64,7 +66,7 @@ OntoUMLTransformationTest >> testNewWithTransformedWithControllerWithTransformer self assert: testedInstance transformed equals: transformed. ] -{ #category : #tests } +{ #category : 'tests' } OntoUMLTransformationTest >> testTransformed [ | tested transformed alternativeTransformed | tested := self getTestedClass new. @@ -77,7 +79,7 @@ OntoUMLTransformationTest >> testTransformed [ ] -{ #category : #tests } +{ #category : 'tests' } OntoUMLTransformationTest >> testTransformer [ | tested transformer alternativeTransformer | tested := OntoUMLTransformation new. diff --git a/src/OntoUML-TransformationFramework/OntoUMLTransformer.class.st b/src/OntoUML-TransformationFramework/OntoUMLTransformer.class.st index 991151a..0580689 100644 --- a/src/OntoUML-TransformationFramework/OntoUMLTransformer.class.st +++ b/src/OntoUML-TransformationFramework/OntoUMLTransformer.class.st @@ -1,6 +1,6 @@ Class { - #name : #OntoUMLTransformer, - #superclass : #Object, + #name : 'OntoUMLTransformer', + #superclass : 'Object', #instVars : [ 'transformed', 'controller' @@ -8,26 +8,28 @@ Class { #classInstVars : [ 'transformationIndex' ], - #category : #'OntoUML-TransformationFramework-Transformers' + #category : 'OntoUML-TransformationFramework-Transformers', + #package : 'OntoUML-TransformationFramework', + #tag : 'Transformers' } -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformer class >> defaultTransformation [ ^ self subclassResponsibility. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformer class >> getTransformation: aSelector [ transformationIndex ifNil: [ self initializeTransformationIndex ]. ^ transformationIndex at: aSelector ifAbsent: [ self defaultTransformation. ]. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformer class >> initializeTransformationIndex [ ^self subclassResponsibility. ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformer class >> transform: aTransformed withController: aController [ | instance | instance := self new. @@ -36,29 +38,29 @@ OntoUMLTransformer class >> transform: aTransformed withController: aController ^ instance transform. ] -{ #category : #accessing } +{ #category : 'accessing' } OntoUMLTransformer >> controller [ ^ controller ] -{ #category : #accessing } +{ #category : 'accessing' } OntoUMLTransformer >> controller: anObject [ controller := anObject ] -{ #category : #transforming } +{ #category : 'transforming' } OntoUMLTransformer >> transform [ ^ self subclassResponsibility. ] -{ #category : #accessing } +{ #category : 'accessing' } OntoUMLTransformer >> transformed [ ^ transformed ] -{ #category : #accessing } +{ #category : 'accessing' } OntoUMLTransformer >> transformed: anObject [ transformed := anObject diff --git a/src/OntoUML-TransformationFramework/TransformGeneralizationSetUI.class.st b/src/OntoUML-TransformationFramework/TransformGeneralizationSetUI.class.st index af1ae7f..e59daaf 100644 --- a/src/OntoUML-TransformationFramework/TransformGeneralizationSetUI.class.st +++ b/src/OntoUML-TransformationFramework/TransformGeneralizationSetUI.class.st @@ -1,6 +1,6 @@ Class { - #name : #TransformGeneralizationSetUI, - #superclass : #SpPresenter, + #name : 'TransformGeneralizationSetUI', + #superclass : 'SpPresenter', #instVars : [ 'diagram', 'transformation', @@ -16,10 +16,12 @@ Class { 'model', 'useForAll' ], - #category : #'OntoUML-TransformationFramework-UI' + #category : 'OntoUML-TransformationFramework-UI', + #package : 'OntoUML-TransformationFramework', + #tag : 'UI' } -{ #category : #specs } +{ #category : 'specs' } TransformGeneralizationSetUI class >> bottomLayout [ ^ SpBoxLayout newLeftToRight beNotHomogeneous; @@ -32,7 +34,7 @@ TransformGeneralizationSetUI class >> bottomLayout [ yourself. ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } TransformGeneralizationSetUI class >> defaultLayout [ ^ SpBoxLayout newTopToBottom beNotHomogeneous; @@ -41,18 +43,18 @@ TransformGeneralizationSetUI class >> defaultLayout [ yourself ] -{ #category : #specs } +{ #category : 'specs' } TransformGeneralizationSetUI class >> open [