]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.layer0/graph/Layer0Migration.pgraph
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.layer0 / graph / Layer0Migration.pgraph
1 L0 = <http://www.simantics.org/Layer0-1.1>\r
2 \r
3 \r
4 L0.Migration <T L0.Entity\r
5     >-- L0.Migration.from --> L0.Integer <R L0.HasProperty : L0.TotalFunction\r
6     >-- L0.Migration.format --> L0.String <R L0.HasProperty : L0.TotalFunction\r
7     >-- L0.Migration.step --> L0.MigrationStep <R L0.HasProperty\r
8     >-- L0.Migration.priority --> L0.Double <R L0.HasProperty : L0.TotalFunction\r
9 \r
10 /* \r
11  * Migration step\r
12  */\r
13 L0.MigrationStep <T L0.Entity\r
14    \r
15 \r
16 /*\r
17  * A sequence of migration steps\r
18  */\r
19 L0.MigrationSequence <T L0.MigrationStep <T L0.List\r
20 \r
21 \r
22 /* \r
23  * If a migration step inherits SCLMigrationStep,\r
24  * the migration step action is obtained with scl command L0.MigrationStep.stepAction\r
25  * Given SCL expression must return MigrationStep\r
26  */\r
27 L0.SCLMigrationStep <T L0.Entity\r
28     >-- L0.MigrationStep.stepAction --> L0.SCLMigrationStep.SCLMigrationStepAction <R L0.HasProperty : L0.FunctionalRelation\r
29 \r
30 L0.SCLMigrationStep.SCLMigrationStepAction <T L0.SCLValue\r
31     @L0.assert L0.HasValueType "MigrationStep"      \r
32     \r
33     \r
34 /*\r
35  * Namespace migration is a basic transformation needed for import\r
36  *\r
37  * Consists of L0.NamespaceMigrationStep.Prefix\r
38  */\r
39 L0.NamespaceMigrationStep <T L0.MigrationStep  <T L0.List\r
40 \r
41 L0.NamespaceMigrationStep.Prefix <T L0.Entity\r
42     >-- L0.NamespaceMigrationStep.Prefix.base --> L0.String <R L0.HasProperty : L0.TotalFunction\r
43     >-- L0.NamespaceMigrationStep.Prefix.from --> L0.String <R L0.HasProperty : L0.TotalFunction\r
44     >-- L0.NamespaceMigrationStep.Prefix.to --> L0.String <R L0.HasProperty : L0.TotalFunction\r
45 \r
46 /*\r
47  * Ordered sets may be replaced with lists.\r
48  * Consists of L0.OrderedSetToListStep.change\r
49  */\r
50 L0.OrderedSetToListMigrationStep <T L0.MigrationStep <T L0.List\r
51 \r
52 L0.OrderedSetToListMigrationStep.Change <T L0.Entity\r
53     >-- L0.OrderedSetToListMigrationStep.entityType --> L0.String <T L0.HasProperty : L0.TotalFunction\r
54     >-- L0.OrderedSetToListMigrationStep.orderedSetRelation --> L0.String <T L0.HasProperty : L0.TotalFunction\r
55     >-- L0.OrderedSetToListMigrationStep.orderedSetType --> L0.String <T L0.HasProperty : L0.TotalFunction\r
56     >-- L0.OrderedSetToListMigrationStep.listRelation --> L0.String <T L0.HasProperty : L0.TotalFunction\r
57     >-- L0.OrderedSetToListMigrationStep.listType --> L0.String <T L0.HasProperty : L0.TotalFunction\r