Salome HOME
Porting to Mandrake 10.1 and new products:
[modules/kernel.git] / resources / salomeCommonModel.spml
1 #definition of the model
2 salomeCommonModel = Model(id="salomeCommonModel")
3
4 # Description of all intrinsic types
5 dataString = Intrinsic(id='Datastring',
6                      modelOwner=salomeCommonModel,
7                      relatedType='STRING')
8 identification = Intrinsic(id='Identification',
9                      modelOwner=salomeCommonModel,
10                      relatedType='STRING')
11 salomeRef = Intrinsic(id='SalomeRef',
12                      modelOwner=salomeCommonModel,
13                      relatedType='SALOME_OBJECT_REFERENCE')
14 dataReal = Intrinsic(id='Datareal',
15                      modelOwner=salomeCommonModel,
16                      relatedType='REAL')
17 dataInteger = Intrinsic(id='Datainteger',
18                      modelOwner=salomeCommonModel,
19                      relatedType='INTEGER')
20
21 # Description of units.
22 units = Entity(id='Units',
23                modelOwner=salomeCommonModel,
24                stereotype='CONCRETE')
25 units_name = SimpleField(id='name',
26                   relatedType=dataString,
27                   definitionMode='FORCED',
28                   stereotype='IDENTIFICATION',
29                   uiInformation=AttributeUi(defaultLabel='Name',
30                                             defaultComment='Name of the unit',
31                                             reentrantMode='NOT_REENTRANT'),
32                   datatype='PERSISTENT',
33                   evaluationMode='NONE')
34 units_abreviation = SimpleField(id='abreviation',
35                   relatedType=dataString,
36                   definitionMode='FORCED',
37                   stereotype='AGREGATION',
38                   uiInformation=AttributeUi(defaultLabel='abreviation',
39                                             defaultComment='Abreviation',
40                                             reentrantMode='NOT_REENTRANT'),
41                   datatype='PERSISTENT',
42                   evaluationMode='NONE')
43
44 units.fields = [units_name,units_abreviation]
45
46 units.uiInformation = EntityUi(defaultLabel='Units definition',
47                                 defaultComment='Definition of units',
48                                 reentrantMode='REENTRANT')
49