-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c7fbaee
commit 1412676
Showing
23 changed files
with
1,450 additions
and
1,450 deletions.
There are no files selected for viewing
30 changes: 0 additions & 30 deletions
30
...aselineOfOntoUMLTransformationFramework/BaselineOfOntoUMLTransformationFramework.class.st
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
...aselineOfOpenPonkOntoUMLTransformations/BaselineOfOpenPonkOntoUMLTransformations.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Class { | ||
#name : 'BaselineOfOpenPonkOntoUMLTransformations', | ||
#superclass : 'BaselineOf', | ||
#category : 'BaselineOfOpenPonkOntoUMLTransformations', | ||
#package : 'BaselineOfOpenPonkOntoUMLTransformations' | ||
} | ||
|
||
{ #category : 'baselines' } | ||
BaselineOfOpenPonkOntoUMLTransformations >> baseline: spec [ | ||
<baseline> | ||
spec | ||
for: #common | ||
do: [ spec | ||
baseline: 'OpenPonkOntoUMLModelQuery-Plugin' | ||
with: [ spec | ||
className: 'BaselineOfOpenPonkOntoUMLModelQuery'; | ||
repository: 'github://openponk/ontouml-modelquery'; | ||
loads: 'plugin' ]. | ||
spec | ||
project: 'OpenPonkOntoUMLModelQuery' | ||
copyFrom: 'OpenPonkOntoUMLModelQuery-Plugin' | ||
with: [ spec loads: 'default' ]. | ||
spec package: 'OpenPonk-OntoUML-Transformations'. | ||
spec | ||
group: 'plugin' | ||
with: #('OpenPonkOntoUMLModelQuery-Plugin' 'OpenPonk-OntoUML-Transformations'). | ||
spec | ||
group: 'default' | ||
with: #(OpenPonkOntoUMLModelQuery 'OpenPonk-OntoUML-Transformations') ] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Package { #name : 'BaselineOfOpenPonkOntoUMLTransformations' } |
This file was deleted.
Oops, something went wrong.
62 changes: 31 additions & 31 deletions
62
...rk/OntoUMLAssociationTransformer.class.st → ...ns/OntoUMLAssociationTransformer.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
Class { | ||
#name : 'OntoUMLAssociationTransformer', | ||
#superclass : 'OntoUMLTransformer', | ||
#category : 'OntoUML-TransformationFramework-Transformers', | ||
#package : 'OntoUML-TransformationFramework', | ||
#tag : 'Transformers' | ||
} | ||
|
||
{ #category : 'accessing' } | ||
OntoUMLAssociationTransformer class >> defaultTransformation [ | ||
^ OntoUMLTransformAssociation. | ||
] | ||
|
||
{ #category : 'transforming' } | ||
OntoUMLAssociationTransformer class >> getTransformation: aAssocitaion [ | ||
| stereotypeClass | | ||
stereotypeClass := OntoUMLModelQuery getStereotypeClass: aAssocitaion. | ||
^ super getTransformation: stereotypeClass. | ||
] | ||
|
||
{ #category : 'transforming' } | ||
OntoUMLAssociationTransformer class >> initializeTransformationIndex [ | ||
transformationIndex := Dictionary new. | ||
transformationIndex add: (OntoUMLSubQuantityOf -> OntoUMLTransformSubQuantityOf). | ||
] | ||
|
||
{ #category : 'transforming' } | ||
OntoUMLAssociationTransformer >> transform [ | ||
transformed memberEnds first type = transformed memberEnds second type ifTrue: [ ^nil. ]. | ||
^ (self class getTransformation: transformed) transform: transformed withController: controller withTransformer: self. | ||
] | ||
Class { | ||
#name : 'OntoUMLAssociationTransformer', | ||
#superclass : 'OntoUMLTransformer', | ||
#category : 'OpenPonk-OntoUML-Transformations-Transformers', | ||
#package : 'OpenPonk-OntoUML-Transformations', | ||
#tag : 'Transformers' | ||
} | ||
|
||
{ #category : 'accessing' } | ||
OntoUMLAssociationTransformer class >> defaultTransformation [ | ||
^ OntoUMLTransformAssociation. | ||
] | ||
|
||
{ #category : 'transforming' } | ||
OntoUMLAssociationTransformer class >> getTransformation: aAssocitaion [ | ||
| stereotypeClass | | ||
stereotypeClass := OntoUMLModelQuery getStereotypeClass: aAssocitaion. | ||
^ super getTransformation: stereotypeClass. | ||
] | ||
|
||
{ #category : 'transforming' } | ||
OntoUMLAssociationTransformer class >> initializeTransformationIndex [ | ||
transformationIndex := Dictionary new. | ||
transformationIndex add: (OntoUMLSubQuantityOf -> OntoUMLTransformSubQuantityOf). | ||
] | ||
|
||
{ #category : 'transforming' } | ||
OntoUMLAssociationTransformer >> transform [ | ||
transformed memberEnds first type = transformed memberEnds second type ifTrue: [ ^nil. ]. | ||
^ (self class getTransformation: transformed) transform: transformed withController: controller withTransformer: self. | ||
] |
60 changes: 30 additions & 30 deletions
60
...ramework/OntoUMLClassTransformer.class.st → ...rmations/OntoUMLClassTransformer.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
Class { | ||
#name : 'OntoUMLClassTransformer', | ||
#superclass : 'OntoUMLTransformer', | ||
#category : 'OntoUML-TransformationFramework-Transformers', | ||
#package : 'OntoUML-TransformationFramework', | ||
#tag : 'Transformers' | ||
} | ||
|
||
{ #category : 'transforming' } | ||
OntoUMLClassTransformer class >> defaultTransformation [ | ||
^ OntoUMLTransformClass. | ||
] | ||
|
||
{ #category : 'transforming' } | ||
OntoUMLClassTransformer class >> getTransformation: aClass [ | ||
| stereotypeClass | | ||
stereotypeClass := OntoUMLModelQuery getStereotypeClass: aClass. | ||
^ super getTransformation: stereotypeClass. | ||
] | ||
|
||
{ #category : 'transforming' } | ||
OntoUMLClassTransformer class >> initializeTransformationIndex [ | ||
transformationIndex := Dictionary new. | ||
"Currently there are no class specific transformations." | ||
] | ||
|
||
{ #category : 'transforming' } | ||
OntoUMLClassTransformer >> transform [ | ||
^ (self class getTransformation: transformed) transform: transformed withController: controller withTransformer: self. | ||
] | ||
Class { | ||
#name : 'OntoUMLClassTransformer', | ||
#superclass : 'OntoUMLTransformer', | ||
#category : 'OpenPonk-OntoUML-Transformations-Transformers', | ||
#package : 'OpenPonk-OntoUML-Transformations', | ||
#tag : 'Transformers' | ||
} | ||
|
||
{ #category : 'transforming' } | ||
OntoUMLClassTransformer class >> defaultTransformation [ | ||
^ OntoUMLTransformClass. | ||
] | ||
|
||
{ #category : 'transforming' } | ||
OntoUMLClassTransformer class >> getTransformation: aClass [ | ||
| stereotypeClass | | ||
stereotypeClass := OntoUMLModelQuery getStereotypeClass: aClass. | ||
^ super getTransformation: stereotypeClass. | ||
] | ||
|
||
{ #category : 'transforming' } | ||
OntoUMLClassTransformer class >> initializeTransformationIndex [ | ||
transformationIndex := Dictionary new. | ||
"Currently there are no class specific transformations." | ||
] | ||
|
||
{ #category : 'transforming' } | ||
OntoUMLClassTransformer >> transform [ | ||
^ (self class getTransformation: transformed) transform: transformed withController: controller withTransformer: self. | ||
] |
192 changes: 96 additions & 96 deletions
192
...oUMLGeneralizationSetTransformer.class.st → ...oUMLGeneralizationSetTransformer.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,96 +1,96 @@ | ||
Class { | ||
#name : 'OntoUMLGeneralizationSetTransformer', | ||
#superclass : 'OntoUMLTransformer', | ||
#instVars : [ | ||
'generalizations', | ||
'name' | ||
], | ||
#classInstVars : [ | ||
'savedTransformation' | ||
], | ||
#category : 'OntoUML-TransformationFramework-Transformers', | ||
#package : 'OntoUML-TransformationFramework', | ||
#tag : 'Transformers' | ||
} | ||
|
||
{ #category : 'transforming' } | ||
OntoUMLGeneralizationSetTransformer class >> defaultTransformation [ | ||
^ [ :generalizations :controller :transformer | OntoUMLTransformGeneralizationSet transform: generalizations withController: controller withTransformer: transformer. ]. | ||
] | ||
|
||
{ #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' } | ||
OntoUMLGeneralizationSetTransformer class >> initializeTransformationIndex [ | ||
transformationIndex := Dictionary new. | ||
transformationIndex add: ('Phase' -> [ :generalizations :controller :transformer | OntoUMLTransformGeneralizationSet transformAsComposition: generalizations withController: controller withTransformer: transformer. ]). | ||
transformationIndex add: ('Role' -> [ :generalizations :controller :transformer | OntoUMLTransformGeneralizationSet transformAsComposition: generalizations withController: controller withTransformer: transformer. ]). | ||
transformationIndex add: ('RoleMixin' -> [ :generalizations :controller :transformer | OntoUMLTransformGeneralizationSet transformAsComposition: generalizations withController: controller withTransformer: transformer. ]). | ||
transformationIndex add: ('Mixin' -> [ :generalizations :controller :transformer | OntoUMLTransformGeneralizationSet transformAsComposition: generalizations withController: controller withTransformer: transformer. ]). | ||
] | ||
|
||
{ #category : 'accessing' } | ||
OntoUMLGeneralizationSetTransformer class >> savedTransformation [ | ||
|
||
^ savedTransformation | ||
] | ||
|
||
{ #category : 'accessing' } | ||
OntoUMLGeneralizationSetTransformer class >> savedTransformation: anObject [ | ||
|
||
savedTransformation := anObject | ||
] | ||
|
||
{ #category : 'accessing' } | ||
OntoUMLGeneralizationSetTransformer >> general [ | ||
^ controller getTransfomedElementFrom: transformed generalizations first general. | ||
] | ||
|
||
{ #category : 'accessing' } | ||
OntoUMLGeneralizationSetTransformer >> name [ | ||
|
||
^ name | ||
] | ||
|
||
{ #category : 'accessing' } | ||
OntoUMLGeneralizationSetTransformer >> name: anObject [ | ||
|
||
name := anObject | ||
] | ||
|
||
{ #category : 'transforming' } | ||
OntoUMLGeneralizationSetTransformer >> transform [ | ||
transformed generalizations ifEmpty: [ ^{}. ]. | ||
(OntoUMLModelQuery isStereotypeOf: transformed generalizations first general oclKindOf: 'Sortal') | ||
ifTrue: [ ^ self transformSortalGenSet. ] | ||
ifFalse: [ ^ self transformNonSortalGenSet. ]. | ||
] | ||
|
||
{ #category : 'transforming' } | ||
OntoUMLGeneralizationSetTransformer >> transformGroup: aGroup [ | ||
| transformedGeneralizations transformation result | | ||
transformedGeneralizations := generalizations select: [ :generalization | OntoUMLModelQuery isStereotypeOf: generalization specific oclKindOf: aGroup. ]. | ||
transformedGeneralizations ifEmpty: [ ^{}. ]. | ||
transformation := self class getTransformation: aGroup. | ||
result := transformation value: transformedGeneralizations value: controller value: self. | ||
generalizations removeAll: transformedGeneralizations. | ||
^ result. | ||
] | ||
|
||
{ #category : 'transforming' } | ||
OntoUMLGeneralizationSetTransformer >> transformNonSortalGenSet [ | ||
generalizations := OrderedCollection new. | ||
generalizations addAll: transformed generalizations. | ||
^ OntoUMLTransformGeneralizationSet transformWithoutCombination: generalizations withController: controller withTransformer: self. | ||
] | ||
|
||
{ #category : 'transforming' } | ||
OntoUMLGeneralizationSetTransformer >> transformSortalGenSet [ | ||
generalizations := OrderedCollection new. | ||
generalizations addAll: transformed generalizations. | ||
^ self class generalizationSetGroups collect: [ :group | self transformGroup: group. ]. | ||
] | ||
Class { | ||
#name : 'OntoUMLGeneralizationSetTransformer', | ||
#superclass : 'OntoUMLTransformer', | ||
#instVars : [ | ||
'generalizations', | ||
'name' | ||
], | ||
#classInstVars : [ | ||
'savedTransformation' | ||
], | ||
#category : 'OpenPonk-OntoUML-Transformations-Transformers', | ||
#package : 'OpenPonk-OntoUML-Transformations', | ||
#tag : 'Transformers' | ||
} | ||
|
||
{ #category : 'transforming' } | ||
OntoUMLGeneralizationSetTransformer class >> defaultTransformation [ | ||
^ [ :generalizations :controller :transformer | OntoUMLTransformGeneralizationSet transform: generalizations withController: controller withTransformer: transformer. ]. | ||
] | ||
|
||
{ #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' } | ||
OntoUMLGeneralizationSetTransformer class >> initializeTransformationIndex [ | ||
transformationIndex := Dictionary new. | ||
transformationIndex add: ('Phase' -> [ :generalizations :controller :transformer | OntoUMLTransformGeneralizationSet transformAsComposition: generalizations withController: controller withTransformer: transformer. ]). | ||
transformationIndex add: ('Role' -> [ :generalizations :controller :transformer | OntoUMLTransformGeneralizationSet transformAsComposition: generalizations withController: controller withTransformer: transformer. ]). | ||
transformationIndex add: ('RoleMixin' -> [ :generalizations :controller :transformer | OntoUMLTransformGeneralizationSet transformAsComposition: generalizations withController: controller withTransformer: transformer. ]). | ||
transformationIndex add: ('Mixin' -> [ :generalizations :controller :transformer | OntoUMLTransformGeneralizationSet transformAsComposition: generalizations withController: controller withTransformer: transformer. ]). | ||
] | ||
|
||
{ #category : 'accessing' } | ||
OntoUMLGeneralizationSetTransformer class >> savedTransformation [ | ||
|
||
^ savedTransformation | ||
] | ||
|
||
{ #category : 'accessing' } | ||
OntoUMLGeneralizationSetTransformer class >> savedTransformation: anObject [ | ||
|
||
savedTransformation := anObject | ||
] | ||
|
||
{ #category : 'accessing' } | ||
OntoUMLGeneralizationSetTransformer >> general [ | ||
^ controller getTransfomedElementFrom: transformed generalizations first general. | ||
] | ||
|
||
{ #category : 'accessing' } | ||
OntoUMLGeneralizationSetTransformer >> name [ | ||
|
||
^ name | ||
] | ||
|
||
{ #category : 'accessing' } | ||
OntoUMLGeneralizationSetTransformer >> name: anObject [ | ||
|
||
name := anObject | ||
] | ||
|
||
{ #category : 'transforming' } | ||
OntoUMLGeneralizationSetTransformer >> transform [ | ||
transformed generalizations ifEmpty: [ ^{}. ]. | ||
(OntoUMLModelQuery isStereotypeOf: transformed generalizations first general oclKindOf: 'Sortal') | ||
ifTrue: [ ^ self transformSortalGenSet. ] | ||
ifFalse: [ ^ self transformNonSortalGenSet. ]. | ||
] | ||
|
||
{ #category : 'transforming' } | ||
OntoUMLGeneralizationSetTransformer >> transformGroup: aGroup [ | ||
| transformedGeneralizations transformation result | | ||
transformedGeneralizations := generalizations select: [ :generalization | OntoUMLModelQuery isStereotypeOf: generalization specific oclKindOf: aGroup. ]. | ||
transformedGeneralizations ifEmpty: [ ^{}. ]. | ||
transformation := self class getTransformation: aGroup. | ||
result := transformation value: transformedGeneralizations value: controller value: self. | ||
generalizations removeAll: transformedGeneralizations. | ||
^ result. | ||
] | ||
|
||
{ #category : 'transforming' } | ||
OntoUMLGeneralizationSetTransformer >> transformNonSortalGenSet [ | ||
generalizations := OrderedCollection new. | ||
generalizations addAll: transformed generalizations. | ||
^ OntoUMLTransformGeneralizationSet transformWithoutCombination: generalizations withController: controller withTransformer: self. | ||
] | ||
|
||
{ #category : 'transforming' } | ||
OntoUMLGeneralizationSetTransformer >> transformSortalGenSet [ | ||
generalizations := OrderedCollection new. | ||
generalizations addAll: transformed generalizations. | ||
^ self class generalizationSetGroups collect: [ :group | self transformGroup: group. ]. | ||
] |
Oops, something went wrong.