mirror of
https://github.com/eMoflon/emoflon-neo.git
synced 2024-06-03 10:31:42 +00:00
Removed generated files
This commit is contained in:
parent
ffdae4b2ed
commit
19025f2a16
|
@ -1,123 +0,0 @@
|
|||
import "platform:/resource/ClassInhHier2DB/src/metamodels/ClassInheritanceHierarchy.msl"
|
||||
import "platform:/resource/ClassInhHier2DB/src/metamodels/Database.msl"
|
||||
|
||||
tripleGrammar ClassInhHier2DB {
|
||||
source {
|
||||
ClassInheritanceHierarchy
|
||||
}
|
||||
|
||||
target {
|
||||
Database
|
||||
}
|
||||
|
||||
correspondence {
|
||||
ClassPackage <- PackageToDatabase -> DB
|
||||
Clazz <- ClazzToTable -> Table
|
||||
Attribute <- AttributeToColumn -> Column
|
||||
}
|
||||
|
||||
rules {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
}
|
||||
}
|
||||
|
||||
tripleRule PackageToDatabaseRule : ClassInhHier2DB {
|
||||
source {
|
||||
++ classpackage : ClassPackage {
|
||||
.name := <packageName>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
target {
|
||||
++ db : DB {
|
||||
.title := <packageName>
|
||||
}
|
||||
}
|
||||
|
||||
correspondence {
|
||||
++ classpackage <-:PackageToDatabase-> db
|
||||
}
|
||||
} forbid src(packageNameIsTaken)
|
||||
|
||||
pattern packageNameIsTaken {
|
||||
classpackage : ClassPackage {
|
||||
.name : <packageName>
|
||||
}
|
||||
}
|
||||
|
||||
tripleRule ClassToTableRule : ClassInhHier2DB {
|
||||
source {
|
||||
classpackage:ClassPackage
|
||||
++clazz:Clazz {
|
||||
++ - package->classpackage
|
||||
.name := <clazzname>
|
||||
}
|
||||
}
|
||||
|
||||
target {
|
||||
db:DB {
|
||||
++ - tables->table
|
||||
}
|
||||
++table:Table {
|
||||
.heading := <clazzname>
|
||||
}
|
||||
}
|
||||
|
||||
correspondence {
|
||||
classpackage <-:PackageToDatabase-> db
|
||||
++ clazz <-:ClazzToTable-> table
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
tripleRule SubClassToTableRule : ClassInhHier2DB {
|
||||
source {
|
||||
++subClazz:Clazz {
|
||||
++ - superClass->clazz
|
||||
++ - package->classpackage
|
||||
}
|
||||
classpackage:ClassPackage
|
||||
clazz:Clazz {
|
||||
- package->classpackage
|
||||
}
|
||||
}
|
||||
|
||||
target {
|
||||
table:Table
|
||||
}
|
||||
|
||||
correspondence {
|
||||
clazz <-:ClazzToTable-> table
|
||||
++ subClazz <-:ClazzToTable-> table
|
||||
}
|
||||
}
|
||||
|
||||
tripleRule AttributeToColumnRule : ClassInhHier2DB {
|
||||
source {
|
||||
clazz:Clazz {
|
||||
++ - attributes->attribute
|
||||
}
|
||||
++attribute:Attribute {
|
||||
.name := <attributeName>
|
||||
}
|
||||
}
|
||||
|
||||
target {
|
||||
++column:Column {
|
||||
.name := <attributeName>
|
||||
}
|
||||
table:Table {
|
||||
++ - columns->column
|
||||
}
|
||||
}
|
||||
|
||||
correspondence {
|
||||
clazz <-:ClazzToTable-> table
|
||||
++ attribute <-:AttributeToColumn-> column
|
||||
}
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
metamodel ClassInheritanceHierarchy {
|
||||
ClassPackage {
|
||||
.name : EString
|
||||
<+>-classes(0..*)-> Clazz
|
||||
}
|
||||
|
||||
Clazz {
|
||||
.name : EString
|
||||
-package(1..1)-> ClassPackage
|
||||
-subClass(0..*)-> Clazz
|
||||
-superClass(1..1)-> Clazz
|
||||
<+>-attributes(0..*)->Attribute
|
||||
}
|
||||
|
||||
Attribute {
|
||||
.name : EString
|
||||
.type : EString
|
||||
-clazz(1..1)-> Clazz
|
||||
}
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
metamodel Database {
|
||||
DB {
|
||||
.title : EString
|
||||
<+>-tables(0..*)-> Table
|
||||
}
|
||||
|
||||
Table {
|
||||
.heading : EString
|
||||
<+>-columns(0..*)-> Column
|
||||
}
|
||||
|
||||
Column {
|
||||
.name : EString
|
||||
}
|
||||
}
|
||||
|
|
@ -1,90 +0,0 @@
|
|||
import "platform:/resource/CompanyToIT/src/metamodels/Company.msl"
|
||||
import "platform:/resource/CompanyToIT/src/metamodels/IT.msl"
|
||||
|
||||
model ES {
|
||||
andy:CEO {
|
||||
.name : "Andy"
|
||||
|
||||
-employee->marius
|
||||
-employee->tony
|
||||
}
|
||||
|
||||
ES:Company {
|
||||
.name : "ES"
|
||||
|
||||
-ceo->andy
|
||||
-admin->ingo
|
||||
-employee->tony
|
||||
-employee->marius
|
||||
}
|
||||
|
||||
ingo:Admin {
|
||||
.name : "Ingo"
|
||||
-ceo->andy
|
||||
}
|
||||
|
||||
tony:Employee {
|
||||
.name : "Tony"
|
||||
}
|
||||
|
||||
marius:Employee {
|
||||
.name : "Marius"
|
||||
}
|
||||
}
|
||||
|
||||
model ExampleTriple {
|
||||
c:Company {
|
||||
.name : "MiddleEarth"
|
||||
-admin->a1
|
||||
-admin->a2
|
||||
-corr->it {
|
||||
._type_ : "CompanyToIT"
|
||||
}
|
||||
-ceo->ceo
|
||||
}
|
||||
|
||||
ceo:CEO {
|
||||
.name : "Galadriel"
|
||||
}
|
||||
|
||||
a1:Admin {
|
||||
.name : "Sauron"
|
||||
-ceo->ceo
|
||||
-corr->r1 {
|
||||
._type_ : "AdminToRouter"
|
||||
}
|
||||
}
|
||||
|
||||
a2:Admin {
|
||||
.name : "Aragorn"
|
||||
-ceo->ceo
|
||||
-corr->r2 {
|
||||
._type_ : "AdminToRouter"
|
||||
}
|
||||
}
|
||||
|
||||
// Trg
|
||||
|
||||
it:IT {
|
||||
.name : "MiddleEarth"
|
||||
-router->r1
|
||||
-router->r2
|
||||
-network->n1
|
||||
-network->n2
|
||||
}
|
||||
|
||||
r1:Router {
|
||||
.name : "Radargast"
|
||||
-network->n1
|
||||
}
|
||||
r2:Router {
|
||||
.name : "Gandalf"
|
||||
-network->n2
|
||||
}
|
||||
n1:Network {
|
||||
.name : "Mordor"
|
||||
}
|
||||
n2:Network {
|
||||
.name : "Gondor"
|
||||
}
|
||||
}
|
|
@ -1,158 +0,0 @@
|
|||
import "platform:/resource/ClassInhHier2DB/src/metamodels/ClassInheritanceHierarchy.msl"
|
||||
import "platform:/resource/ClassInhHier2DB/src/metamodels/Database.msl"
|
||||
|
||||
grammar ClassInhHier2DB_BWD {
|
||||
rules {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
}
|
||||
}
|
||||
|
||||
rule PackageToDatabaseRule {
|
||||
++classpackage:ClassPackage {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->db
|
||||
{
|
||||
._type_ := "PackageToDatabase"
|
||||
}
|
||||
.name := db::title
|
||||
}
|
||||
|
||||
db:DB {
|
||||
.enamespace : <__trgModelName>
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
} when PackageToDatabaseRuleNAC
|
||||
|
||||
constraint PackageToDatabaseRuleNAC = forbid PackageToDatabaseRule_packageNameIsTaken
|
||||
|
||||
pattern PackageToDatabaseRule_packageNameIsTaken {
|
||||
classpackage : ClassPackage {
|
||||
.enamespace : <__srcModelName>
|
||||
.name : db::title
|
||||
}
|
||||
|
||||
db : DB {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
}
|
||||
|
||||
rule ClassToTableRule {
|
||||
classpackage:ClassPackage {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->db
|
||||
{
|
||||
._type_ : "PackageToDatabase"
|
||||
}
|
||||
}
|
||||
|
||||
++clazz:Clazz {
|
||||
.enamespace := <__srcModelName>
|
||||
++-package->classpackage
|
||||
++-corr->table
|
||||
{
|
||||
._type_ := "ClazzToTable"
|
||||
}
|
||||
.name := table::heading
|
||||
}
|
||||
|
||||
db:DB {
|
||||
.enamespace : <__trgModelName>
|
||||
-tables->table
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule SubClassToTableRule {
|
||||
++subClazz:Clazz {
|
||||
.enamespace := <__srcModelName>
|
||||
++-superClass->clazz
|
||||
++-package->classpackage
|
||||
++-corr->table
|
||||
{
|
||||
._type_ := "ClazzToTable"
|
||||
}
|
||||
}
|
||||
|
||||
classpackage:ClassPackage {
|
||||
.enamespace : <__srcModelName>
|
||||
}
|
||||
|
||||
clazz:Clazz {
|
||||
.enamespace : <__srcModelName>
|
||||
-package->classpackage
|
||||
-corr->table
|
||||
{
|
||||
._type_ : "ClazzToTable"
|
||||
}
|
||||
}
|
||||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule AttributeToColumnRule {
|
||||
clazz:Clazz {
|
||||
.enamespace : <__srcModelName>
|
||||
++-attributes->attribute
|
||||
-corr->table
|
||||
{
|
||||
._type_ : "ClazzToTable"
|
||||
}
|
||||
}
|
||||
|
||||
++attribute:Attribute {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->column
|
||||
{
|
||||
._type_ := "AttributeToColumn"
|
||||
}
|
||||
.name := column::name
|
||||
}
|
||||
|
||||
column:Column {
|
||||
.enamespace : <__trgModelName>
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
-columns->column
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
|
@ -1,129 +0,0 @@
|
|||
import "platform:/resource/ClassInhHier2DB/src/metamodels/ClassInheritanceHierarchy.msl"
|
||||
import "platform:/resource/ClassInhHier2DB/src/metamodels/Database.msl"
|
||||
|
||||
grammar ClassInhHier2DB_BWD_OPT {
|
||||
rules {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
}
|
||||
}
|
||||
|
||||
rule PackageToDatabaseRule {
|
||||
++classpackage:ClassPackage {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->db
|
||||
{
|
||||
._type_ := "PackageToDatabase"
|
||||
}
|
||||
.name := db::title
|
||||
}
|
||||
|
||||
db:DB {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule ClassToTableRule {
|
||||
classpackage:ClassPackage {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->db
|
||||
{
|
||||
._type_ : "PackageToDatabase"
|
||||
}
|
||||
}
|
||||
|
||||
++clazz:Clazz {
|
||||
.enamespace := <__srcModelName>
|
||||
++-package->classpackage
|
||||
++-corr->table
|
||||
{
|
||||
._type_ := "ClazzToTable"
|
||||
}
|
||||
.name := table::heading
|
||||
}
|
||||
|
||||
db:DB {
|
||||
.enamespace : <__trgModelName>
|
||||
-tables->table
|
||||
}
|
||||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule SubClassToTableRule {
|
||||
++subClazz:Clazz {
|
||||
.enamespace := <__srcModelName>
|
||||
++-superClass->clazz
|
||||
++-package->classpackage
|
||||
++-corr->table
|
||||
{
|
||||
._type_ := "ClazzToTable"
|
||||
}
|
||||
}
|
||||
|
||||
classpackage:ClassPackage {
|
||||
.enamespace : <__srcModelName>
|
||||
}
|
||||
|
||||
clazz:Clazz {
|
||||
.enamespace : <__srcModelName>
|
||||
-package->classpackage
|
||||
-corr->table
|
||||
{
|
||||
._type_ : "ClazzToTable"
|
||||
}
|
||||
}
|
||||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule AttributeToColumnRule {
|
||||
clazz:Clazz {
|
||||
.enamespace : <__srcModelName>
|
||||
++-attributes->attribute
|
||||
-corr->table
|
||||
{
|
||||
._type_ : "ClazzToTable"
|
||||
}
|
||||
}
|
||||
|
||||
++attribute:Attribute {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->column
|
||||
{
|
||||
._type_ := "AttributeToColumn"
|
||||
}
|
||||
.name := column::name
|
||||
}
|
||||
|
||||
column:Column {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
-columns->column
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
|
@ -1,129 +0,0 @@
|
|||
import "platform:/resource/ClassInhHier2DB/src/metamodels/ClassInheritanceHierarchy.msl"
|
||||
import "platform:/resource/ClassInhHier2DB/src/metamodels/Database.msl"
|
||||
|
||||
grammar ClassInhHier2DB_CC {
|
||||
rules {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
}
|
||||
}
|
||||
|
||||
rule PackageToDatabaseRule {
|
||||
classpackage:ClassPackage {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->db
|
||||
{
|
||||
._type_ := "PackageToDatabase"
|
||||
}
|
||||
}
|
||||
|
||||
db:DB {
|
||||
.enamespace : <__trgModelName>
|
||||
.title : classpackage::name
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule ClassToTableRule {
|
||||
classpackage:ClassPackage {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->db
|
||||
{
|
||||
._type_ : "PackageToDatabase"
|
||||
}
|
||||
}
|
||||
|
||||
clazz:Clazz {
|
||||
.enamespace : <__srcModelName>
|
||||
-package->classpackage
|
||||
++-corr->table
|
||||
{
|
||||
._type_ := "ClazzToTable"
|
||||
}
|
||||
.name : table::heading
|
||||
}
|
||||
|
||||
db:DB {
|
||||
.enamespace : <__trgModelName>
|
||||
-tables->table
|
||||
}
|
||||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule SubClassToTableRule {
|
||||
subClazz:Clazz {
|
||||
.enamespace : <__srcModelName>
|
||||
-superClass->clazz
|
||||
-package->classpackage
|
||||
++-corr->table
|
||||
{
|
||||
._type_ := "ClazzToTable"
|
||||
}
|
||||
}
|
||||
|
||||
classpackage:ClassPackage {
|
||||
.enamespace : <__srcModelName>
|
||||
}
|
||||
|
||||
clazz:Clazz {
|
||||
.enamespace : <__srcModelName>
|
||||
-package->classpackage
|
||||
-corr->table
|
||||
{
|
||||
._type_ : "ClazzToTable"
|
||||
}
|
||||
}
|
||||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule AttributeToColumnRule {
|
||||
clazz:Clazz {
|
||||
.enamespace : <__srcModelName>
|
||||
-attributes->attribute
|
||||
-corr->table
|
||||
{
|
||||
._type_ : "ClazzToTable"
|
||||
}
|
||||
}
|
||||
|
||||
attribute:Attribute {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->column
|
||||
{
|
||||
._type_ := "AttributeToColumn"
|
||||
}
|
||||
.name : column::name
|
||||
}
|
||||
|
||||
column:Column {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
-columns->column
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
|
@ -1,129 +0,0 @@
|
|||
import "platform:/resource/ClassInhHier2DB/src/metamodels/ClassInheritanceHierarchy.msl"
|
||||
import "platform:/resource/ClassInhHier2DB/src/metamodels/Database.msl"
|
||||
|
||||
grammar ClassInhHier2DB_CO {
|
||||
rules {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
}
|
||||
}
|
||||
|
||||
rule PackageToDatabaseRule {
|
||||
classpackage:ClassPackage {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->db
|
||||
{
|
||||
._type_ : "PackageToDatabase"
|
||||
}
|
||||
}
|
||||
|
||||
db:DB {
|
||||
.enamespace : <__trgModelName>
|
||||
.title : classpackage::name
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule ClassToTableRule {
|
||||
classpackage:ClassPackage {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->db
|
||||
{
|
||||
._type_ : "PackageToDatabase"
|
||||
}
|
||||
}
|
||||
|
||||
clazz:Clazz {
|
||||
.enamespace : <__srcModelName>
|
||||
-package->classpackage
|
||||
-corr->table
|
||||
{
|
||||
._type_ : "ClazzToTable"
|
||||
}
|
||||
.name : table::heading
|
||||
}
|
||||
|
||||
db:DB {
|
||||
.enamespace : <__trgModelName>
|
||||
-tables->table
|
||||
}
|
||||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule SubClassToTableRule {
|
||||
subClazz:Clazz {
|
||||
.enamespace : <__srcModelName>
|
||||
-superClass->clazz
|
||||
-package->classpackage
|
||||
-corr->table
|
||||
{
|
||||
._type_ : "ClazzToTable"
|
||||
}
|
||||
}
|
||||
|
||||
classpackage:ClassPackage {
|
||||
.enamespace : <__srcModelName>
|
||||
}
|
||||
|
||||
clazz:Clazz {
|
||||
.enamespace : <__srcModelName>
|
||||
-package->classpackage
|
||||
-corr->table
|
||||
{
|
||||
._type_ : "ClazzToTable"
|
||||
}
|
||||
}
|
||||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule AttributeToColumnRule {
|
||||
clazz:Clazz {
|
||||
.enamespace : <__srcModelName>
|
||||
-attributes->attribute
|
||||
-corr->table
|
||||
{
|
||||
._type_ : "ClazzToTable"
|
||||
}
|
||||
}
|
||||
|
||||
attribute:Attribute {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->column
|
||||
{
|
||||
._type_ : "AttributeToColumn"
|
||||
}
|
||||
}
|
||||
|
||||
column:Column {
|
||||
.enamespace : <__trgModelName>
|
||||
.name : attribute::name
|
||||
}
|
||||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
-columns->column
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
|
@ -1,160 +0,0 @@
|
|||
import "platform:/resource/ClassInhHier2DB/src/metamodels/ClassInheritanceHierarchy.msl"
|
||||
import "platform:/resource/ClassInhHier2DB/src/metamodels/Database.msl"
|
||||
|
||||
grammar ClassInhHier2DB_FWD {
|
||||
rules {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
}
|
||||
}
|
||||
|
||||
rule PackageToDatabaseRule {
|
||||
classpackage:ClassPackage {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->db
|
||||
{
|
||||
._type_ := "PackageToDatabase"
|
||||
}
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
++db:DB {
|
||||
.enamespace := <__trgModelName>
|
||||
.title := classpackage::name
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule ClassToTableRule {
|
||||
classpackage:ClassPackage {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->db
|
||||
{
|
||||
._type_ : "PackageToDatabase"
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
clazz:Clazz {
|
||||
.enamespace : <__srcModelName>
|
||||
-package->classpackage
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
++-corr->table
|
||||
{
|
||||
._type_ := "ClazzToTable"
|
||||
}
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
db:DB {
|
||||
.enamespace : <__trgModelName>
|
||||
++-tables->table
|
||||
}
|
||||
|
||||
++table:Table {
|
||||
.enamespace := <__trgModelName>
|
||||
.heading := clazz::name
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule SubClassToTableRule {
|
||||
subClazz:Clazz {
|
||||
.enamespace : <__srcModelName>
|
||||
-superClass->clazz
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
-package->classpackage
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
++-corr->table
|
||||
{
|
||||
._type_ := "ClazzToTable"
|
||||
}
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
classpackage:ClassPackage {
|
||||
.enamespace : <__srcModelName>
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
clazz:Clazz {
|
||||
.enamespace : <__srcModelName>
|
||||
-package->classpackage
|
||||
{
|
||||
~_tr_ : true
|
||||
}
|
||||
-corr->table
|
||||
{
|
||||
._type_ : "ClazzToTable"
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule AttributeToColumnRule {
|
||||
clazz:Clazz {
|
||||
.enamespace : <__srcModelName>
|
||||
-attributes->attribute
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
-corr->table
|
||||
{
|
||||
._type_ : "ClazzToTable"
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
attribute:Attribute {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->column
|
||||
{
|
||||
._type_ := "AttributeToColumn"
|
||||
}
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
++column:Column {
|
||||
.enamespace := <__trgModelName>
|
||||
.name := attribute::name
|
||||
}
|
||||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
++-columns->column
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
|
@ -1,129 +0,0 @@
|
|||
import "platform:/resource/ClassInhHier2DB/src/metamodels/ClassInheritanceHierarchy.msl"
|
||||
import "platform:/resource/ClassInhHier2DB/src/metamodels/Database.msl"
|
||||
|
||||
grammar ClassInhHier2DB_FWD_OPT {
|
||||
rules {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
}
|
||||
}
|
||||
|
||||
rule PackageToDatabaseRule {
|
||||
classpackage:ClassPackage {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->db
|
||||
{
|
||||
._type_ := "PackageToDatabase"
|
||||
}
|
||||
}
|
||||
|
||||
++db:DB {
|
||||
.enamespace := <__trgModelName>
|
||||
.title := classpackage::name
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule ClassToTableRule {
|
||||
classpackage:ClassPackage {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->db
|
||||
{
|
||||
._type_ : "PackageToDatabase"
|
||||
}
|
||||
}
|
||||
|
||||
clazz:Clazz {
|
||||
.enamespace : <__srcModelName>
|
||||
-package->classpackage
|
||||
++-corr->table
|
||||
{
|
||||
._type_ := "ClazzToTable"
|
||||
}
|
||||
}
|
||||
|
||||
db:DB {
|
||||
.enamespace : <__trgModelName>
|
||||
++-tables->table
|
||||
}
|
||||
|
||||
++table:Table {
|
||||
.enamespace := <__trgModelName>
|
||||
.heading := clazz::name
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule SubClassToTableRule {
|
||||
subClazz:Clazz {
|
||||
.enamespace : <__srcModelName>
|
||||
-superClass->clazz
|
||||
-package->classpackage
|
||||
++-corr->table
|
||||
{
|
||||
._type_ := "ClazzToTable"
|
||||
}
|
||||
}
|
||||
|
||||
classpackage:ClassPackage {
|
||||
.enamespace : <__srcModelName>
|
||||
}
|
||||
|
||||
clazz:Clazz {
|
||||
.enamespace : <__srcModelName>
|
||||
-package->classpackage
|
||||
-corr->table
|
||||
{
|
||||
._type_ : "ClazzToTable"
|
||||
}
|
||||
}
|
||||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule AttributeToColumnRule {
|
||||
clazz:Clazz {
|
||||
.enamespace : <__srcModelName>
|
||||
-attributes->attribute
|
||||
-corr->table
|
||||
{
|
||||
._type_ : "ClazzToTable"
|
||||
}
|
||||
}
|
||||
|
||||
attribute:Attribute {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->column
|
||||
{
|
||||
._type_ := "AttributeToColumn"
|
||||
}
|
||||
}
|
||||
|
||||
++column:Column {
|
||||
.enamespace := <__trgModelName>
|
||||
.name := attribute::name
|
||||
}
|
||||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
++-columns->column
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
|
@ -1,141 +0,0 @@
|
|||
import "platform:/resource/ClassInhHier2DB/src/metamodels/ClassInheritanceHierarchy.msl"
|
||||
import "platform:/resource/ClassInhHier2DB/src/metamodels/Database.msl"
|
||||
|
||||
grammar ClassInhHier2DB_GEN {
|
||||
rules {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
}
|
||||
}
|
||||
|
||||
rule PackageToDatabaseRule {
|
||||
++classpackage:ClassPackage {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->db
|
||||
{
|
||||
._type_ := "PackageToDatabase"
|
||||
}
|
||||
.name := <packageName>
|
||||
}
|
||||
|
||||
++db:DB {
|
||||
.enamespace := <__trgModelName>
|
||||
.title := <packageName>
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
} when PackageToDatabaseRuleNAC
|
||||
|
||||
constraint PackageToDatabaseRuleNAC = forbid PackageToDatabaseRule_packageNameIsTaken
|
||||
|
||||
pattern PackageToDatabaseRule_packageNameIsTaken {
|
||||
classpackage : ClassPackage {
|
||||
.enamespace : <__srcModelName>
|
||||
.name : <packageName>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
rule ClassToTableRule {
|
||||
classpackage:ClassPackage {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->db
|
||||
{
|
||||
._type_ : "PackageToDatabase"
|
||||
}
|
||||
}
|
||||
|
||||
++clazz:Clazz {
|
||||
.enamespace := <__srcModelName>
|
||||
++-package->classpackage
|
||||
++-corr->table
|
||||
{
|
||||
._type_ := "ClazzToTable"
|
||||
}
|
||||
.name := <clazzname>
|
||||
}
|
||||
|
||||
db:DB {
|
||||
.enamespace : <__trgModelName>
|
||||
++-tables->table
|
||||
}
|
||||
|
||||
++table:Table {
|
||||
.enamespace := <__trgModelName>
|
||||
.heading := <clazzname>
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule SubClassToTableRule {
|
||||
++subClazz:Clazz {
|
||||
.enamespace := <__srcModelName>
|
||||
++-superClass->clazz
|
||||
++-package->classpackage
|
||||
++-corr->table
|
||||
{
|
||||
._type_ := "ClazzToTable"
|
||||
}
|
||||
}
|
||||
|
||||
classpackage:ClassPackage {
|
||||
.enamespace : <__srcModelName>
|
||||
}
|
||||
|
||||
clazz:Clazz {
|
||||
.enamespace : <__srcModelName>
|
||||
-package->classpackage
|
||||
-corr->table
|
||||
{
|
||||
._type_ : "ClazzToTable"
|
||||
}
|
||||
}
|
||||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule AttributeToColumnRule {
|
||||
clazz:Clazz {
|
||||
.enamespace : <__srcModelName>
|
||||
++-attributes->attribute
|
||||
-corr->table
|
||||
{
|
||||
._type_ : "ClazzToTable"
|
||||
}
|
||||
}
|
||||
|
||||
++attribute:Attribute {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->column
|
||||
{
|
||||
._type_ := "AttributeToColumn"
|
||||
}
|
||||
.name := <attributeName>
|
||||
}
|
||||
|
||||
++column:Column {
|
||||
.enamespace := <__trgModelName>
|
||||
.name := <attributeName>
|
||||
}
|
||||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
++-columns->column
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -1,151 +0,0 @@
|
|||
/**
|
||||
* EMSL-API generated by eMoflon::Neo - Do not edit as this file will be overwritten
|
||||
*/
|
||||
package org.emoflon.neo.api.classinhhier2db;
|
||||
|
||||
import org.emoflon.neo.cypher.common.*;
|
||||
import org.emoflon.neo.cypher.constraints.*;
|
||||
import org.emoflon.neo.cypher.factories.*;
|
||||
import org.emoflon.neo.cypher.models.*;
|
||||
import org.emoflon.neo.cypher.patterns.*;
|
||||
import org.emoflon.neo.cypher.rules.*;
|
||||
import org.emoflon.neo.engine.api.patterns.*;
|
||||
import org.emoflon.neo.engine.api.constraints.*;
|
||||
import org.emoflon.neo.engine.api.rules.*;
|
||||
import org.emoflon.neo.emsl.eMSL.*;
|
||||
import org.emoflon.neo.emsl.util.*;
|
||||
import org.neo4j.driver.Value;
|
||||
import org.neo4j.driver.Record;
|
||||
import org.eclipse.emf.common.util.URI;
|
||||
import org.emoflon.neo.api.classinhhier2db.API_Common;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.Optional;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class API_ClassInhHier2DB {
|
||||
private EMSL_Spec spec;
|
||||
private NeoCoreBuilder builder;
|
||||
|
||||
/** Use this constructor for default values */
|
||||
public API_ClassInhHier2DB(NeoCoreBuilder builder) {
|
||||
this(builder, API_Common.PLATFORM_RESOURCE_URI, API_Common.PLATFORM_PLUGIN_URI, API_Common.NEOCORE_URI_INSTALLED);
|
||||
}
|
||||
|
||||
/** Use this constructor to configure values for loading EMSL files */
|
||||
public API_ClassInhHier2DB(NeoCoreBuilder builder, String platformResourceURIRoot, String platformPluginURIRoot, String neocoreURI){
|
||||
this((EMSL_Spec) EMSLUtil.loadSpecification("platform:/resource/ClassInhHier2DB/src/ClassInhHier2DB.msl", platformResourceURIRoot, platformPluginURIRoot, neocoreURI), builder);
|
||||
}
|
||||
|
||||
public API_ClassInhHier2DB(EMSL_Spec spec, NeoCoreBuilder builder) {
|
||||
this.spec = spec;
|
||||
this.builder = builder;
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/src/ClassInhHier2DB.msl#//@entities.0
|
||||
public void exportMetamodelsForClassInhHier2DB() throws FlattenerException {
|
||||
{
|
||||
var api = new org.emoflon.neo.api.classinhhier2db.metamodels.API_ClassInheritanceHierarchy(builder, API_Common.PLATFORM_RESOURCE_URI, API_Common.PLATFORM_PLUGIN_URI, API_Common.NEOCORE_URI_INSTALLED);
|
||||
builder.exportEMSLEntityToNeo4j(api.getMetamodel_ClassInheritanceHierarchy());
|
||||
}
|
||||
{
|
||||
var api = new org.emoflon.neo.api.classinhhier2db.metamodels.API_Database(builder, API_Common.PLATFORM_RESOURCE_URI, API_Common.PLATFORM_PLUGIN_URI, API_Common.NEOCORE_URI_INSTALLED);
|
||||
builder.exportEMSLEntityToNeo4j(api.getMetamodel_Database());
|
||||
}
|
||||
}
|
||||
|
||||
public Collection<TripleRule> getTripleRulesOfClassInhHier2DB(){
|
||||
var rules = new HashSet<TripleRule>();
|
||||
var rs = spec.eResource().getResourceSet();
|
||||
{
|
||||
var uri = "platform:/resource/ClassInhHier2DB/src/ClassInhHier2DB.msl#//@entities.1";
|
||||
rules.add((TripleRule) rs.getEObject(URI.createURI(uri), true));
|
||||
}
|
||||
{
|
||||
var uri = "platform:/resource/ClassInhHier2DB/src/ClassInhHier2DB.msl#//@entities.3";
|
||||
rules.add((TripleRule) rs.getEObject(URI.createURI(uri), true));
|
||||
}
|
||||
{
|
||||
var uri = "platform:/resource/ClassInhHier2DB/src/ClassInhHier2DB.msl#//@entities.4";
|
||||
rules.add((TripleRule) rs.getEObject(URI.createURI(uri), true));
|
||||
}
|
||||
{
|
||||
var uri = "platform:/resource/ClassInhHier2DB/src/ClassInhHier2DB.msl#//@entities.5";
|
||||
rules.add((TripleRule) rs.getEObject(URI.createURI(uri), true));
|
||||
}
|
||||
return rules;
|
||||
}
|
||||
|
||||
public Collection<IConstraint> getConstraintsOfClassInhHier2DB(){
|
||||
var constraints = new HashSet<IConstraint>();
|
||||
var rs = spec.eResource().getResourceSet();
|
||||
return constraints;
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/src/ClassInhHier2DB.msl#//@entities.1
|
||||
public static final String ClassInhHier2DB__PackageToDatabaseRule = "PackageToDatabaseRule";
|
||||
public static final String ClassInhHier2DB__PackageToDatabaseRule__classpackage = "classpackage";
|
||||
public static final String ClassInhHier2DB__PackageToDatabaseRule__db = "db";
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/src/ClassInhHier2DB.msl#//@entities.2
|
||||
public PackageNameIsTakenAccess getPattern_PackageNameIsTaken() {
|
||||
return new PackageNameIsTakenAccess();
|
||||
}
|
||||
|
||||
public class PackageNameIsTakenAccess extends NeoPatternAccess<PackageNameIsTakenData, PackageNameIsTakenMask> {
|
||||
public final String _classpackage = "classpackage";
|
||||
|
||||
public final String _param__packageName = "packageName";
|
||||
|
||||
@Override
|
||||
public NeoPattern pattern(){
|
||||
var p = (Pattern) spec.getEntities().get(2);
|
||||
return NeoPatternFactory.createNeoPattern(p, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<PackageNameIsTakenData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new PackageNameIsTakenData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public PackageNameIsTakenMask mask() {
|
||||
return new PackageNameIsTakenMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class PackageNameIsTakenData extends NeoData {
|
||||
public PackageNameIsTakenData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class PackageNameIsTakenMask extends NeoMask {
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/src/ClassInhHier2DB.msl#//@entities.3
|
||||
public static final String ClassInhHier2DB__ClassToTableRule = "ClassToTableRule";
|
||||
public static final String ClassInhHier2DB__ClassToTableRule__classpackage = "classpackage";
|
||||
public static final String ClassInhHier2DB__ClassToTableRule__clazz = "clazz";
|
||||
public static final String ClassInhHier2DB__ClassToTableRule__db = "db";
|
||||
public static final String ClassInhHier2DB__ClassToTableRule__table = "table";
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/src/ClassInhHier2DB.msl#//@entities.4
|
||||
public static final String ClassInhHier2DB__SubClassToTableRule = "SubClassToTableRule";
|
||||
public static final String ClassInhHier2DB__SubClassToTableRule__subClazz = "subClazz";
|
||||
public static final String ClassInhHier2DB__SubClassToTableRule__classpackage = "classpackage";
|
||||
public static final String ClassInhHier2DB__SubClassToTableRule__clazz = "clazz";
|
||||
public static final String ClassInhHier2DB__SubClassToTableRule__table = "table";
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/src/ClassInhHier2DB.msl#//@entities.5
|
||||
public static final String ClassInhHier2DB__AttributeToColumnRule = "AttributeToColumnRule";
|
||||
public static final String ClassInhHier2DB__AttributeToColumnRule__clazz = "clazz";
|
||||
public static final String ClassInhHier2DB__AttributeToColumnRule__attribute = "attribute";
|
||||
public static final String ClassInhHier2DB__AttributeToColumnRule__column = "column";
|
||||
public static final String ClassInhHier2DB__AttributeToColumnRule__table = "table";
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
/**
|
||||
* EMSL-API generated by eMoflon::Neo - Do not edit as this file will be overwritten
|
||||
*/
|
||||
package org.emoflon.neo.api.classinhhier2db;
|
||||
import org.emoflon.neo.cypher.models.*;
|
||||
|
||||
public class API_Common {
|
||||
// Default values (might have to be changed)
|
||||
public static final String PLATFORM_PLUGIN_URI = "/C:/Users/admin/git/emoflon-neo/";
|
||||
public static final String NEOCORE_URI_INSTALLED = "/C:/Users/admin/git/emoflon-neo/org.emoflon.neo.neocore/";
|
||||
public static final String PLATFORM_RESOURCE_URI = "../";
|
||||
|
||||
public static NeoCoreBuilder createBuilder() {
|
||||
return new NeoCoreBuilder("bolt://localhost:7687", "neo4j", "test", -5.0, 5.0, -1.0);
|
||||
}
|
||||
}
|
|
@ -1,57 +0,0 @@
|
|||
/**
|
||||
* EMSL-API generated by eMoflon::Neo - Do not edit as this file will be overwritten
|
||||
*/
|
||||
package org.emoflon.neo.api.classinhhier2db.metamodels;
|
||||
|
||||
import org.emoflon.neo.cypher.common.*;
|
||||
import org.emoflon.neo.cypher.constraints.*;
|
||||
import org.emoflon.neo.cypher.factories.*;
|
||||
import org.emoflon.neo.cypher.models.*;
|
||||
import org.emoflon.neo.cypher.patterns.*;
|
||||
import org.emoflon.neo.cypher.rules.*;
|
||||
import org.emoflon.neo.engine.api.patterns.*;
|
||||
import org.emoflon.neo.engine.api.constraints.*;
|
||||
import org.emoflon.neo.engine.api.rules.*;
|
||||
import org.emoflon.neo.emsl.eMSL.*;
|
||||
import org.emoflon.neo.emsl.util.*;
|
||||
import org.neo4j.driver.Value;
|
||||
import org.neo4j.driver.Record;
|
||||
import org.eclipse.emf.common.util.URI;
|
||||
import org.emoflon.neo.api.classinhhier2db.API_Common;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.Optional;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class API_ClassInheritanceHierarchy {
|
||||
private EMSL_Spec spec;
|
||||
private NeoCoreBuilder builder;
|
||||
|
||||
/** Use this constructor for default values */
|
||||
public API_ClassInheritanceHierarchy(NeoCoreBuilder builder) {
|
||||
this(builder, API_Common.PLATFORM_RESOURCE_URI, API_Common.PLATFORM_PLUGIN_URI, API_Common.NEOCORE_URI_INSTALLED);
|
||||
}
|
||||
|
||||
/** Use this constructor to configure values for loading EMSL files */
|
||||
public API_ClassInheritanceHierarchy(NeoCoreBuilder builder, String platformResourceURIRoot, String platformPluginURIRoot, String neocoreURI){
|
||||
this((EMSL_Spec) EMSLUtil.loadSpecification("platform:/resource/ClassInhHier2DB/src/metamodels/ClassInheritanceHierarchy.msl", platformResourceURIRoot, platformPluginURIRoot, neocoreURI), builder);
|
||||
}
|
||||
|
||||
public API_ClassInheritanceHierarchy(EMSL_Spec spec, NeoCoreBuilder builder) {
|
||||
this.spec = spec;
|
||||
this.builder = builder;
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/src/metamodels/ClassInheritanceHierarchy.msl#//@entities.0
|
||||
public Metamodel getMetamodel_ClassInheritanceHierarchy(){
|
||||
return (Metamodel) spec.getEntities().get(0);
|
||||
}
|
||||
|
||||
public static final String ClassInheritanceHierarchy__ClassPackage = "ClassInheritanceHierarchy__ClassPackage";
|
||||
public static final String ClassInheritanceHierarchy__Clazz = "ClassInheritanceHierarchy__Clazz";
|
||||
public static final String ClassInheritanceHierarchy__Attribute = "ClassInheritanceHierarchy__Attribute";
|
||||
}
|
|
@ -1,57 +0,0 @@
|
|||
/**
|
||||
* EMSL-API generated by eMoflon::Neo - Do not edit as this file will be overwritten
|
||||
*/
|
||||
package org.emoflon.neo.api.classinhhier2db.metamodels;
|
||||
|
||||
import org.emoflon.neo.cypher.common.*;
|
||||
import org.emoflon.neo.cypher.constraints.*;
|
||||
import org.emoflon.neo.cypher.factories.*;
|
||||
import org.emoflon.neo.cypher.models.*;
|
||||
import org.emoflon.neo.cypher.patterns.*;
|
||||
import org.emoflon.neo.cypher.rules.*;
|
||||
import org.emoflon.neo.engine.api.patterns.*;
|
||||
import org.emoflon.neo.engine.api.constraints.*;
|
||||
import org.emoflon.neo.engine.api.rules.*;
|
||||
import org.emoflon.neo.emsl.eMSL.*;
|
||||
import org.emoflon.neo.emsl.util.*;
|
||||
import org.neo4j.driver.Value;
|
||||
import org.neo4j.driver.Record;
|
||||
import org.eclipse.emf.common.util.URI;
|
||||
import org.emoflon.neo.api.classinhhier2db.API_Common;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.Optional;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class API_Database {
|
||||
private EMSL_Spec spec;
|
||||
private NeoCoreBuilder builder;
|
||||
|
||||
/** Use this constructor for default values */
|
||||
public API_Database(NeoCoreBuilder builder) {
|
||||
this(builder, API_Common.PLATFORM_RESOURCE_URI, API_Common.PLATFORM_PLUGIN_URI, API_Common.NEOCORE_URI_INSTALLED);
|
||||
}
|
||||
|
||||
/** Use this constructor to configure values for loading EMSL files */
|
||||
public API_Database(NeoCoreBuilder builder, String platformResourceURIRoot, String platformPluginURIRoot, String neocoreURI){
|
||||
this((EMSL_Spec) EMSLUtil.loadSpecification("platform:/resource/ClassInhHier2DB/src/metamodels/Database.msl", platformResourceURIRoot, platformPluginURIRoot, neocoreURI), builder);
|
||||
}
|
||||
|
||||
public API_Database(EMSL_Spec spec, NeoCoreBuilder builder) {
|
||||
this.spec = spec;
|
||||
this.builder = builder;
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/src/metamodels/Database.msl#//@entities.0
|
||||
public Metamodel getMetamodel_Database(){
|
||||
return (Metamodel) spec.getEntities().get(0);
|
||||
}
|
||||
|
||||
public static final String Database__DB = "Database__DB";
|
||||
public static final String Database__Table = "Database__Table";
|
||||
public static final String Database__Column = "Database__Column";
|
||||
}
|
|
@ -1,58 +0,0 @@
|
|||
/**
|
||||
* EMSL-API generated by eMoflon::Neo - Do not edit as this file will be overwritten
|
||||
*/
|
||||
package org.emoflon.neo.api.classinhhier2db.models;
|
||||
|
||||
import org.emoflon.neo.cypher.common.*;
|
||||
import org.emoflon.neo.cypher.constraints.*;
|
||||
import org.emoflon.neo.cypher.factories.*;
|
||||
import org.emoflon.neo.cypher.models.*;
|
||||
import org.emoflon.neo.cypher.patterns.*;
|
||||
import org.emoflon.neo.cypher.rules.*;
|
||||
import org.emoflon.neo.engine.api.patterns.*;
|
||||
import org.emoflon.neo.engine.api.constraints.*;
|
||||
import org.emoflon.neo.engine.api.rules.*;
|
||||
import org.emoflon.neo.emsl.eMSL.*;
|
||||
import org.emoflon.neo.emsl.util.*;
|
||||
import org.neo4j.driver.Value;
|
||||
import org.neo4j.driver.Record;
|
||||
import org.eclipse.emf.common.util.URI;
|
||||
import org.emoflon.neo.api.classinhhier2db.API_Common;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.Optional;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class API_FG_ES {
|
||||
private EMSL_Spec spec;
|
||||
private NeoCoreBuilder builder;
|
||||
|
||||
/** Use this constructor for default values */
|
||||
public API_FG_ES(NeoCoreBuilder builder) {
|
||||
this(builder, API_Common.PLATFORM_RESOURCE_URI, API_Common.PLATFORM_PLUGIN_URI, API_Common.NEOCORE_URI_INSTALLED);
|
||||
}
|
||||
|
||||
/** Use this constructor to configure values for loading EMSL files */
|
||||
public API_FG_ES(NeoCoreBuilder builder, String platformResourceURIRoot, String platformPluginURIRoot, String neocoreURI){
|
||||
this((EMSL_Spec) EMSLUtil.loadSpecification("platform:/resource/ClassInhHier2DB/src/models/FG_ES.msl", platformResourceURIRoot, platformPluginURIRoot, neocoreURI), builder);
|
||||
}
|
||||
|
||||
public API_FG_ES(EMSL_Spec spec, NeoCoreBuilder builder) {
|
||||
this.spec = spec;
|
||||
this.builder = builder;
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/src/models/FG_ES.msl#//@entities.0
|
||||
public Model getModel_ES(){
|
||||
return (Model) spec.getEntities().get(0);
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/src/models/FG_ES.msl#//@entities.1
|
||||
public Model getModel_ExampleTriple(){
|
||||
return (Model) spec.getEntities().get(1);
|
||||
}
|
||||
}
|
|
@ -1,328 +0,0 @@
|
|||
/**
|
||||
* EMSL-API generated by eMoflon::Neo - Do not edit as this file will be overwritten
|
||||
*/
|
||||
package org.emoflon.neo.api.classinhhier2db.tgg;
|
||||
|
||||
import org.emoflon.neo.cypher.common.*;
|
||||
import org.emoflon.neo.cypher.constraints.*;
|
||||
import org.emoflon.neo.cypher.factories.*;
|
||||
import org.emoflon.neo.cypher.models.*;
|
||||
import org.emoflon.neo.cypher.patterns.*;
|
||||
import org.emoflon.neo.cypher.rules.*;
|
||||
import org.emoflon.neo.engine.api.patterns.*;
|
||||
import org.emoflon.neo.engine.api.constraints.*;
|
||||
import org.emoflon.neo.engine.api.rules.*;
|
||||
import org.emoflon.neo.emsl.eMSL.*;
|
||||
import org.emoflon.neo.emsl.util.*;
|
||||
import org.neo4j.driver.Value;
|
||||
import org.neo4j.driver.Record;
|
||||
import org.eclipse.emf.common.util.URI;
|
||||
import org.emoflon.neo.api.classinhhier2db.API_Common;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.Optional;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class API_ClassInhHier2DB_BWD {
|
||||
private EMSL_Spec spec;
|
||||
private NeoCoreBuilder builder;
|
||||
|
||||
/** Use this constructor for default values */
|
||||
public API_ClassInhHier2DB_BWD(NeoCoreBuilder builder) {
|
||||
this(builder, API_Common.PLATFORM_RESOURCE_URI, API_Common.PLATFORM_PLUGIN_URI, API_Common.NEOCORE_URI_INSTALLED);
|
||||
}
|
||||
|
||||
/** Use this constructor to configure values for loading EMSL files */
|
||||
public API_ClassInhHier2DB_BWD(NeoCoreBuilder builder, String platformResourceURIRoot, String platformPluginURIRoot, String neocoreURI){
|
||||
this((EMSL_Spec) EMSLUtil.loadSpecification("platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_BWD.msl", platformResourceURIRoot, platformPluginURIRoot, neocoreURI), builder);
|
||||
}
|
||||
|
||||
public API_ClassInhHier2DB_BWD(EMSL_Spec spec, NeoCoreBuilder builder) {
|
||||
this.spec = spec;
|
||||
this.builder = builder;
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_BWD.msl#//@entities.0
|
||||
public Collection<NeoRule> getAllRulesForClassInhHier2DB_BWD() {
|
||||
Collection<NeoRule> rules = new HashSet<>();
|
||||
|
||||
rules.add(getRule_PackageToDatabaseRule().rule());
|
||||
rules.add(getRule_ClassToTableRule().rule());
|
||||
rules.add(getRule_SubClassToTableRule().rule());
|
||||
rules.add(getRule_AttributeToColumnRule().rule());
|
||||
return rules;
|
||||
}
|
||||
|
||||
public Collection<NeoConstraint> getAllConstraintsForClassInhHier2DB_BWD() {
|
||||
Collection<NeoConstraint> constraints = new HashSet<>();
|
||||
return constraints;
|
||||
}
|
||||
|
||||
public Collection<Rule> getAllEMSLRulesForClassInhHier2DB_BWD(){
|
||||
var rules = new HashSet<Rule>();
|
||||
rules.add((Rule) spec.getEntities().get(1));
|
||||
rules.add((Rule) spec.getEntities().get(4));
|
||||
rules.add((Rule) spec.getEntities().get(5));
|
||||
rules.add((Rule) spec.getEntities().get(6));
|
||||
return rules;
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_BWD.msl#//@entities.1
|
||||
public PackageToDatabaseRuleAccess getRule_PackageToDatabaseRule() {
|
||||
return new PackageToDatabaseRuleAccess();
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRuleAccess extends NeoRuleCoAccess<PackageToDatabaseRuleData, PackageToDatabaseRuleCoData, PackageToDatabaseRuleMask> {
|
||||
public final String _classpackage = "classpackage";
|
||||
public final String _db = "db";
|
||||
|
||||
public final String _param____srcModelName = "__srcModelName";
|
||||
public final String _param____trgModelName = "__trgModelName";
|
||||
|
||||
@Override
|
||||
public NeoRule rule(){
|
||||
var r = (Rule) spec.getEntities().get(1);
|
||||
return NeoRuleFactory.createNeoRule(r, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<PackageToDatabaseRuleData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new PackageToDatabaseRuleData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<PackageToDatabaseRuleCoData> codata(Collection<NeoCoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new PackageToDatabaseRuleCoData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public PackageToDatabaseRuleMask mask() {
|
||||
return new PackageToDatabaseRuleMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRuleData extends NeoData {
|
||||
public PackageToDatabaseRuleData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRuleCoData extends NeoData {
|
||||
public PackageToDatabaseRuleCoData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRuleMask extends NeoMask {
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_BWD.msl#//@entities.2
|
||||
public IConstraint getConstraint_PackageToDatabaseRuleNAC() {
|
||||
var c = (Constraint) spec.getEntities().get(2);
|
||||
return NeoConstraintFactory.createNeoConstraint(c, builder);
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_BWD.msl#//@entities.3
|
||||
public PackageToDatabaseRule_packageNameIsTakenAccess getPattern_PackageToDatabaseRule_packageNameIsTaken() {
|
||||
return new PackageToDatabaseRule_packageNameIsTakenAccess();
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRule_packageNameIsTakenAccess extends NeoPatternAccess<PackageToDatabaseRule_packageNameIsTakenData, PackageToDatabaseRule_packageNameIsTakenMask> {
|
||||
public final String _classpackage = "classpackage";
|
||||
public final String _db = "db";
|
||||
|
||||
public final String _param____srcModelName = "__srcModelName";
|
||||
public final String _param____trgModelName = "__trgModelName";
|
||||
|
||||
@Override
|
||||
public NeoPattern pattern(){
|
||||
var p = (Pattern) spec.getEntities().get(3);
|
||||
return NeoPatternFactory.createNeoPattern(p, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<PackageToDatabaseRule_packageNameIsTakenData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new PackageToDatabaseRule_packageNameIsTakenData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public PackageToDatabaseRule_packageNameIsTakenMask mask() {
|
||||
return new PackageToDatabaseRule_packageNameIsTakenMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRule_packageNameIsTakenData extends NeoData {
|
||||
public PackageToDatabaseRule_packageNameIsTakenData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRule_packageNameIsTakenMask extends NeoMask {
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_BWD.msl#//@entities.4
|
||||
public ClassToTableRuleAccess getRule_ClassToTableRule() {
|
||||
return new ClassToTableRuleAccess();
|
||||
}
|
||||
|
||||
public class ClassToTableRuleAccess extends NeoRuleCoAccess<ClassToTableRuleData, ClassToTableRuleCoData, ClassToTableRuleMask> {
|
||||
public final String _classpackage = "classpackage";
|
||||
public final String _clazz = "clazz";
|
||||
public final String _db = "db";
|
||||
public final String _table = "table";
|
||||
|
||||
public final String _param____srcModelName = "__srcModelName";
|
||||
public final String _param____trgModelName = "__trgModelName";
|
||||
|
||||
@Override
|
||||
public NeoRule rule(){
|
||||
var r = (Rule) spec.getEntities().get(4);
|
||||
return NeoRuleFactory.createNeoRule(r, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<ClassToTableRuleData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new ClassToTableRuleData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<ClassToTableRuleCoData> codata(Collection<NeoCoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new ClassToTableRuleCoData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClassToTableRuleMask mask() {
|
||||
return new ClassToTableRuleMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class ClassToTableRuleData extends NeoData {
|
||||
public ClassToTableRuleData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class ClassToTableRuleCoData extends NeoData {
|
||||
public ClassToTableRuleCoData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class ClassToTableRuleMask extends NeoMask {
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_BWD.msl#//@entities.5
|
||||
public SubClassToTableRuleAccess getRule_SubClassToTableRule() {
|
||||
return new SubClassToTableRuleAccess();
|
||||
}
|
||||
|
||||
public class SubClassToTableRuleAccess extends NeoRuleCoAccess<SubClassToTableRuleData, SubClassToTableRuleCoData, SubClassToTableRuleMask> {
|
||||
public final String _subClazz = "subClazz";
|
||||
public final String _classpackage = "classpackage";
|
||||
public final String _clazz = "clazz";
|
||||
public final String _table = "table";
|
||||
|
||||
public final String _param____srcModelName = "__srcModelName";
|
||||
public final String _param____trgModelName = "__trgModelName";
|
||||
|
||||
@Override
|
||||
public NeoRule rule(){
|
||||
var r = (Rule) spec.getEntities().get(5);
|
||||
return NeoRuleFactory.createNeoRule(r, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<SubClassToTableRuleData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new SubClassToTableRuleData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<SubClassToTableRuleCoData> codata(Collection<NeoCoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new SubClassToTableRuleCoData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public SubClassToTableRuleMask mask() {
|
||||
return new SubClassToTableRuleMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class SubClassToTableRuleData extends NeoData {
|
||||
public SubClassToTableRuleData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class SubClassToTableRuleCoData extends NeoData {
|
||||
public SubClassToTableRuleCoData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class SubClassToTableRuleMask extends NeoMask {
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_BWD.msl#//@entities.6
|
||||
public AttributeToColumnRuleAccess getRule_AttributeToColumnRule() {
|
||||
return new AttributeToColumnRuleAccess();
|
||||
}
|
||||
|
||||
public class AttributeToColumnRuleAccess extends NeoRuleCoAccess<AttributeToColumnRuleData, AttributeToColumnRuleCoData, AttributeToColumnRuleMask> {
|
||||
public final String _clazz = "clazz";
|
||||
public final String _attribute = "attribute";
|
||||
public final String _column = "column";
|
||||
public final String _table = "table";
|
||||
|
||||
public final String _param____srcModelName = "__srcModelName";
|
||||
public final String _param____trgModelName = "__trgModelName";
|
||||
|
||||
@Override
|
||||
public NeoRule rule(){
|
||||
var r = (Rule) spec.getEntities().get(6);
|
||||
return NeoRuleFactory.createNeoRule(r, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<AttributeToColumnRuleData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new AttributeToColumnRuleData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<AttributeToColumnRuleCoData> codata(Collection<NeoCoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new AttributeToColumnRuleCoData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public AttributeToColumnRuleMask mask() {
|
||||
return new AttributeToColumnRuleMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class AttributeToColumnRuleData extends NeoData {
|
||||
public AttributeToColumnRuleData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class AttributeToColumnRuleCoData extends NeoData {
|
||||
public AttributeToColumnRuleCoData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class AttributeToColumnRuleMask extends NeoMask {
|
||||
}
|
||||
}
|
|
@ -1,283 +0,0 @@
|
|||
/**
|
||||
* EMSL-API generated by eMoflon::Neo - Do not edit as this file will be overwritten
|
||||
*/
|
||||
package org.emoflon.neo.api.classinhhier2db.tgg;
|
||||
|
||||
import org.emoflon.neo.cypher.common.*;
|
||||
import org.emoflon.neo.cypher.constraints.*;
|
||||
import org.emoflon.neo.cypher.factories.*;
|
||||
import org.emoflon.neo.cypher.models.*;
|
||||
import org.emoflon.neo.cypher.patterns.*;
|
||||
import org.emoflon.neo.cypher.rules.*;
|
||||
import org.emoflon.neo.engine.api.patterns.*;
|
||||
import org.emoflon.neo.engine.api.constraints.*;
|
||||
import org.emoflon.neo.engine.api.rules.*;
|
||||
import org.emoflon.neo.emsl.eMSL.*;
|
||||
import org.emoflon.neo.emsl.util.*;
|
||||
import org.neo4j.driver.Value;
|
||||
import org.neo4j.driver.Record;
|
||||
import org.eclipse.emf.common.util.URI;
|
||||
import org.emoflon.neo.api.classinhhier2db.API_Common;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.Optional;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class API_ClassInhHier2DB_BWD_OPT {
|
||||
private EMSL_Spec spec;
|
||||
private NeoCoreBuilder builder;
|
||||
|
||||
/** Use this constructor for default values */
|
||||
public API_ClassInhHier2DB_BWD_OPT(NeoCoreBuilder builder) {
|
||||
this(builder, API_Common.PLATFORM_RESOURCE_URI, API_Common.PLATFORM_PLUGIN_URI, API_Common.NEOCORE_URI_INSTALLED);
|
||||
}
|
||||
|
||||
/** Use this constructor to configure values for loading EMSL files */
|
||||
public API_ClassInhHier2DB_BWD_OPT(NeoCoreBuilder builder, String platformResourceURIRoot, String platformPluginURIRoot, String neocoreURI){
|
||||
this((EMSL_Spec) EMSLUtil.loadSpecification("platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_BWD_OPT.msl", platformResourceURIRoot, platformPluginURIRoot, neocoreURI), builder);
|
||||
}
|
||||
|
||||
public API_ClassInhHier2DB_BWD_OPT(EMSL_Spec spec, NeoCoreBuilder builder) {
|
||||
this.spec = spec;
|
||||
this.builder = builder;
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_BWD_OPT.msl#//@entities.0
|
||||
public Collection<NeoRule> getAllRulesForClassInhHier2DB_BWD_OPT() {
|
||||
Collection<NeoRule> rules = new HashSet<>();
|
||||
|
||||
rules.add(getRule_PackageToDatabaseRule().rule());
|
||||
rules.add(getRule_ClassToTableRule().rule());
|
||||
rules.add(getRule_SubClassToTableRule().rule());
|
||||
rules.add(getRule_AttributeToColumnRule().rule());
|
||||
return rules;
|
||||
}
|
||||
|
||||
public Collection<NeoConstraint> getAllConstraintsForClassInhHier2DB_BWD_OPT() {
|
||||
Collection<NeoConstraint> constraints = new HashSet<>();
|
||||
return constraints;
|
||||
}
|
||||
|
||||
public Collection<Rule> getAllEMSLRulesForClassInhHier2DB_BWD_OPT(){
|
||||
var rules = new HashSet<Rule>();
|
||||
rules.add((Rule) spec.getEntities().get(1));
|
||||
rules.add((Rule) spec.getEntities().get(2));
|
||||
rules.add((Rule) spec.getEntities().get(3));
|
||||
rules.add((Rule) spec.getEntities().get(4));
|
||||
return rules;
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_BWD_OPT.msl#//@entities.1
|
||||
public PackageToDatabaseRuleAccess getRule_PackageToDatabaseRule() {
|
||||
return new PackageToDatabaseRuleAccess();
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRuleAccess extends NeoRuleCoAccess<PackageToDatabaseRuleData, PackageToDatabaseRuleCoData, PackageToDatabaseRuleMask> {
|
||||
public final String _classpackage = "classpackage";
|
||||
public final String _db = "db";
|
||||
|
||||
public final String _param____srcModelName = "__srcModelName";
|
||||
public final String _param____trgModelName = "__trgModelName";
|
||||
|
||||
@Override
|
||||
public NeoRule rule(){
|
||||
var r = (Rule) spec.getEntities().get(1);
|
||||
return NeoRuleFactory.createNeoRule(r, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<PackageToDatabaseRuleData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new PackageToDatabaseRuleData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<PackageToDatabaseRuleCoData> codata(Collection<NeoCoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new PackageToDatabaseRuleCoData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public PackageToDatabaseRuleMask mask() {
|
||||
return new PackageToDatabaseRuleMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRuleData extends NeoData {
|
||||
public PackageToDatabaseRuleData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRuleCoData extends NeoData {
|
||||
public PackageToDatabaseRuleCoData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRuleMask extends NeoMask {
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_BWD_OPT.msl#//@entities.2
|
||||
public ClassToTableRuleAccess getRule_ClassToTableRule() {
|
||||
return new ClassToTableRuleAccess();
|
||||
}
|
||||
|
||||
public class ClassToTableRuleAccess extends NeoRuleCoAccess<ClassToTableRuleData, ClassToTableRuleCoData, ClassToTableRuleMask> {
|
||||
public final String _classpackage = "classpackage";
|
||||
public final String _clazz = "clazz";
|
||||
public final String _db = "db";
|
||||
public final String _table = "table";
|
||||
|
||||
public final String _param____srcModelName = "__srcModelName";
|
||||
public final String _param____trgModelName = "__trgModelName";
|
||||
|
||||
@Override
|
||||
public NeoRule rule(){
|
||||
var r = (Rule) spec.getEntities().get(2);
|
||||
return NeoRuleFactory.createNeoRule(r, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<ClassToTableRuleData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new ClassToTableRuleData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<ClassToTableRuleCoData> codata(Collection<NeoCoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new ClassToTableRuleCoData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClassToTableRuleMask mask() {
|
||||
return new ClassToTableRuleMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class ClassToTableRuleData extends NeoData {
|
||||
public ClassToTableRuleData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class ClassToTableRuleCoData extends NeoData {
|
||||
public ClassToTableRuleCoData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class ClassToTableRuleMask extends NeoMask {
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_BWD_OPT.msl#//@entities.3
|
||||
public SubClassToTableRuleAccess getRule_SubClassToTableRule() {
|
||||
return new SubClassToTableRuleAccess();
|
||||
}
|
||||
|
||||
public class SubClassToTableRuleAccess extends NeoRuleCoAccess<SubClassToTableRuleData, SubClassToTableRuleCoData, SubClassToTableRuleMask> {
|
||||
public final String _subClazz = "subClazz";
|
||||
public final String _classpackage = "classpackage";
|
||||
public final String _clazz = "clazz";
|
||||
public final String _table = "table";
|
||||
|
||||
public final String _param____srcModelName = "__srcModelName";
|
||||
public final String _param____trgModelName = "__trgModelName";
|
||||
|
||||
@Override
|
||||
public NeoRule rule(){
|
||||
var r = (Rule) spec.getEntities().get(3);
|
||||
return NeoRuleFactory.createNeoRule(r, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<SubClassToTableRuleData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new SubClassToTableRuleData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<SubClassToTableRuleCoData> codata(Collection<NeoCoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new SubClassToTableRuleCoData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public SubClassToTableRuleMask mask() {
|
||||
return new SubClassToTableRuleMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class SubClassToTableRuleData extends NeoData {
|
||||
public SubClassToTableRuleData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class SubClassToTableRuleCoData extends NeoData {
|
||||
public SubClassToTableRuleCoData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class SubClassToTableRuleMask extends NeoMask {
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_BWD_OPT.msl#//@entities.4
|
||||
public AttributeToColumnRuleAccess getRule_AttributeToColumnRule() {
|
||||
return new AttributeToColumnRuleAccess();
|
||||
}
|
||||
|
||||
public class AttributeToColumnRuleAccess extends NeoRuleCoAccess<AttributeToColumnRuleData, AttributeToColumnRuleCoData, AttributeToColumnRuleMask> {
|
||||
public final String _clazz = "clazz";
|
||||
public final String _attribute = "attribute";
|
||||
public final String _column = "column";
|
||||
public final String _table = "table";
|
||||
|
||||
public final String _param____srcModelName = "__srcModelName";
|
||||
public final String _param____trgModelName = "__trgModelName";
|
||||
|
||||
@Override
|
||||
public NeoRule rule(){
|
||||
var r = (Rule) spec.getEntities().get(4);
|
||||
return NeoRuleFactory.createNeoRule(r, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<AttributeToColumnRuleData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new AttributeToColumnRuleData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<AttributeToColumnRuleCoData> codata(Collection<NeoCoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new AttributeToColumnRuleCoData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public AttributeToColumnRuleMask mask() {
|
||||
return new AttributeToColumnRuleMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class AttributeToColumnRuleData extends NeoData {
|
||||
public AttributeToColumnRuleData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class AttributeToColumnRuleCoData extends NeoData {
|
||||
public AttributeToColumnRuleCoData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class AttributeToColumnRuleMask extends NeoMask {
|
||||
}
|
||||
}
|
|
@ -1,283 +0,0 @@
|
|||
/**
|
||||
* EMSL-API generated by eMoflon::Neo - Do not edit as this file will be overwritten
|
||||
*/
|
||||
package org.emoflon.neo.api.classinhhier2db.tgg;
|
||||
|
||||
import org.emoflon.neo.cypher.common.*;
|
||||
import org.emoflon.neo.cypher.constraints.*;
|
||||
import org.emoflon.neo.cypher.factories.*;
|
||||
import org.emoflon.neo.cypher.models.*;
|
||||
import org.emoflon.neo.cypher.patterns.*;
|
||||
import org.emoflon.neo.cypher.rules.*;
|
||||
import org.emoflon.neo.engine.api.patterns.*;
|
||||
import org.emoflon.neo.engine.api.constraints.*;
|
||||
import org.emoflon.neo.engine.api.rules.*;
|
||||
import org.emoflon.neo.emsl.eMSL.*;
|
||||
import org.emoflon.neo.emsl.util.*;
|
||||
import org.neo4j.driver.Value;
|
||||
import org.neo4j.driver.Record;
|
||||
import org.eclipse.emf.common.util.URI;
|
||||
import org.emoflon.neo.api.classinhhier2db.API_Common;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.Optional;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class API_ClassInhHier2DB_CC {
|
||||
private EMSL_Spec spec;
|
||||
private NeoCoreBuilder builder;
|
||||
|
||||
/** Use this constructor for default values */
|
||||
public API_ClassInhHier2DB_CC(NeoCoreBuilder builder) {
|
||||
this(builder, API_Common.PLATFORM_RESOURCE_URI, API_Common.PLATFORM_PLUGIN_URI, API_Common.NEOCORE_URI_INSTALLED);
|
||||
}
|
||||
|
||||
/** Use this constructor to configure values for loading EMSL files */
|
||||
public API_ClassInhHier2DB_CC(NeoCoreBuilder builder, String platformResourceURIRoot, String platformPluginURIRoot, String neocoreURI){
|
||||
this((EMSL_Spec) EMSLUtil.loadSpecification("platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_CC.msl", platformResourceURIRoot, platformPluginURIRoot, neocoreURI), builder);
|
||||
}
|
||||
|
||||
public API_ClassInhHier2DB_CC(EMSL_Spec spec, NeoCoreBuilder builder) {
|
||||
this.spec = spec;
|
||||
this.builder = builder;
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_CC.msl#//@entities.0
|
||||
public Collection<NeoRule> getAllRulesForClassInhHier2DB_CC() {
|
||||
Collection<NeoRule> rules = new HashSet<>();
|
||||
|
||||
rules.add(getRule_PackageToDatabaseRule().rule());
|
||||
rules.add(getRule_ClassToTableRule().rule());
|
||||
rules.add(getRule_SubClassToTableRule().rule());
|
||||
rules.add(getRule_AttributeToColumnRule().rule());
|
||||
return rules;
|
||||
}
|
||||
|
||||
public Collection<NeoConstraint> getAllConstraintsForClassInhHier2DB_CC() {
|
||||
Collection<NeoConstraint> constraints = new HashSet<>();
|
||||
return constraints;
|
||||
}
|
||||
|
||||
public Collection<Rule> getAllEMSLRulesForClassInhHier2DB_CC(){
|
||||
var rules = new HashSet<Rule>();
|
||||
rules.add((Rule) spec.getEntities().get(1));
|
||||
rules.add((Rule) spec.getEntities().get(2));
|
||||
rules.add((Rule) spec.getEntities().get(3));
|
||||
rules.add((Rule) spec.getEntities().get(4));
|
||||
return rules;
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_CC.msl#//@entities.1
|
||||
public PackageToDatabaseRuleAccess getRule_PackageToDatabaseRule() {
|
||||
return new PackageToDatabaseRuleAccess();
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRuleAccess extends NeoRuleCoAccess<PackageToDatabaseRuleData, PackageToDatabaseRuleCoData, PackageToDatabaseRuleMask> {
|
||||
public final String _classpackage = "classpackage";
|
||||
public final String _db = "db";
|
||||
|
||||
public final String _param____srcModelName = "__srcModelName";
|
||||
public final String _param____trgModelName = "__trgModelName";
|
||||
|
||||
@Override
|
||||
public NeoRule rule(){
|
||||
var r = (Rule) spec.getEntities().get(1);
|
||||
return NeoRuleFactory.createNeoRule(r, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<PackageToDatabaseRuleData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new PackageToDatabaseRuleData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<PackageToDatabaseRuleCoData> codata(Collection<NeoCoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new PackageToDatabaseRuleCoData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public PackageToDatabaseRuleMask mask() {
|
||||
return new PackageToDatabaseRuleMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRuleData extends NeoData {
|
||||
public PackageToDatabaseRuleData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRuleCoData extends NeoData {
|
||||
public PackageToDatabaseRuleCoData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRuleMask extends NeoMask {
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_CC.msl#//@entities.2
|
||||
public ClassToTableRuleAccess getRule_ClassToTableRule() {
|
||||
return new ClassToTableRuleAccess();
|
||||
}
|
||||
|
||||
public class ClassToTableRuleAccess extends NeoRuleCoAccess<ClassToTableRuleData, ClassToTableRuleCoData, ClassToTableRuleMask> {
|
||||
public final String _classpackage = "classpackage";
|
||||
public final String _clazz = "clazz";
|
||||
public final String _db = "db";
|
||||
public final String _table = "table";
|
||||
|
||||
public final String _param____srcModelName = "__srcModelName";
|
||||
public final String _param____trgModelName = "__trgModelName";
|
||||
|
||||
@Override
|
||||
public NeoRule rule(){
|
||||
var r = (Rule) spec.getEntities().get(2);
|
||||
return NeoRuleFactory.createNeoRule(r, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<ClassToTableRuleData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new ClassToTableRuleData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<ClassToTableRuleCoData> codata(Collection<NeoCoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new ClassToTableRuleCoData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClassToTableRuleMask mask() {
|
||||
return new ClassToTableRuleMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class ClassToTableRuleData extends NeoData {
|
||||
public ClassToTableRuleData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class ClassToTableRuleCoData extends NeoData {
|
||||
public ClassToTableRuleCoData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class ClassToTableRuleMask extends NeoMask {
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_CC.msl#//@entities.3
|
||||
public SubClassToTableRuleAccess getRule_SubClassToTableRule() {
|
||||
return new SubClassToTableRuleAccess();
|
||||
}
|
||||
|
||||
public class SubClassToTableRuleAccess extends NeoRuleCoAccess<SubClassToTableRuleData, SubClassToTableRuleCoData, SubClassToTableRuleMask> {
|
||||
public final String _subClazz = "subClazz";
|
||||
public final String _classpackage = "classpackage";
|
||||
public final String _clazz = "clazz";
|
||||
public final String _table = "table";
|
||||
|
||||
public final String _param____srcModelName = "__srcModelName";
|
||||
public final String _param____trgModelName = "__trgModelName";
|
||||
|
||||
@Override
|
||||
public NeoRule rule(){
|
||||
var r = (Rule) spec.getEntities().get(3);
|
||||
return NeoRuleFactory.createNeoRule(r, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<SubClassToTableRuleData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new SubClassToTableRuleData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<SubClassToTableRuleCoData> codata(Collection<NeoCoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new SubClassToTableRuleCoData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public SubClassToTableRuleMask mask() {
|
||||
return new SubClassToTableRuleMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class SubClassToTableRuleData extends NeoData {
|
||||
public SubClassToTableRuleData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class SubClassToTableRuleCoData extends NeoData {
|
||||
public SubClassToTableRuleCoData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class SubClassToTableRuleMask extends NeoMask {
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_CC.msl#//@entities.4
|
||||
public AttributeToColumnRuleAccess getRule_AttributeToColumnRule() {
|
||||
return new AttributeToColumnRuleAccess();
|
||||
}
|
||||
|
||||
public class AttributeToColumnRuleAccess extends NeoRuleCoAccess<AttributeToColumnRuleData, AttributeToColumnRuleCoData, AttributeToColumnRuleMask> {
|
||||
public final String _clazz = "clazz";
|
||||
public final String _attribute = "attribute";
|
||||
public final String _column = "column";
|
||||
public final String _table = "table";
|
||||
|
||||
public final String _param____srcModelName = "__srcModelName";
|
||||
public final String _param____trgModelName = "__trgModelName";
|
||||
|
||||
@Override
|
||||
public NeoRule rule(){
|
||||
var r = (Rule) spec.getEntities().get(4);
|
||||
return NeoRuleFactory.createNeoRule(r, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<AttributeToColumnRuleData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new AttributeToColumnRuleData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<AttributeToColumnRuleCoData> codata(Collection<NeoCoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new AttributeToColumnRuleCoData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public AttributeToColumnRuleMask mask() {
|
||||
return new AttributeToColumnRuleMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class AttributeToColumnRuleData extends NeoData {
|
||||
public AttributeToColumnRuleData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class AttributeToColumnRuleCoData extends NeoData {
|
||||
public AttributeToColumnRuleCoData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class AttributeToColumnRuleMask extends NeoMask {
|
||||
}
|
||||
}
|
|
@ -1,283 +0,0 @@
|
|||
/**
|
||||
* EMSL-API generated by eMoflon::Neo - Do not edit as this file will be overwritten
|
||||
*/
|
||||
package org.emoflon.neo.api.classinhhier2db.tgg;
|
||||
|
||||
import org.emoflon.neo.cypher.common.*;
|
||||
import org.emoflon.neo.cypher.constraints.*;
|
||||
import org.emoflon.neo.cypher.factories.*;
|
||||
import org.emoflon.neo.cypher.models.*;
|
||||
import org.emoflon.neo.cypher.patterns.*;
|
||||
import org.emoflon.neo.cypher.rules.*;
|
||||
import org.emoflon.neo.engine.api.patterns.*;
|
||||
import org.emoflon.neo.engine.api.constraints.*;
|
||||
import org.emoflon.neo.engine.api.rules.*;
|
||||
import org.emoflon.neo.emsl.eMSL.*;
|
||||
import org.emoflon.neo.emsl.util.*;
|
||||
import org.neo4j.driver.Value;
|
||||
import org.neo4j.driver.Record;
|
||||
import org.eclipse.emf.common.util.URI;
|
||||
import org.emoflon.neo.api.classinhhier2db.API_Common;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.Optional;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class API_ClassInhHier2DB_CO {
|
||||
private EMSL_Spec spec;
|
||||
private NeoCoreBuilder builder;
|
||||
|
||||
/** Use this constructor for default values */
|
||||
public API_ClassInhHier2DB_CO(NeoCoreBuilder builder) {
|
||||
this(builder, API_Common.PLATFORM_RESOURCE_URI, API_Common.PLATFORM_PLUGIN_URI, API_Common.NEOCORE_URI_INSTALLED);
|
||||
}
|
||||
|
||||
/** Use this constructor to configure values for loading EMSL files */
|
||||
public API_ClassInhHier2DB_CO(NeoCoreBuilder builder, String platformResourceURIRoot, String platformPluginURIRoot, String neocoreURI){
|
||||
this((EMSL_Spec) EMSLUtil.loadSpecification("platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_CO.msl", platformResourceURIRoot, platformPluginURIRoot, neocoreURI), builder);
|
||||
}
|
||||
|
||||
public API_ClassInhHier2DB_CO(EMSL_Spec spec, NeoCoreBuilder builder) {
|
||||
this.spec = spec;
|
||||
this.builder = builder;
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_CO.msl#//@entities.0
|
||||
public Collection<NeoRule> getAllRulesForClassInhHier2DB_CO() {
|
||||
Collection<NeoRule> rules = new HashSet<>();
|
||||
|
||||
rules.add(getRule_PackageToDatabaseRule().rule());
|
||||
rules.add(getRule_ClassToTableRule().rule());
|
||||
rules.add(getRule_SubClassToTableRule().rule());
|
||||
rules.add(getRule_AttributeToColumnRule().rule());
|
||||
return rules;
|
||||
}
|
||||
|
||||
public Collection<NeoConstraint> getAllConstraintsForClassInhHier2DB_CO() {
|
||||
Collection<NeoConstraint> constraints = new HashSet<>();
|
||||
return constraints;
|
||||
}
|
||||
|
||||
public Collection<Rule> getAllEMSLRulesForClassInhHier2DB_CO(){
|
||||
var rules = new HashSet<Rule>();
|
||||
rules.add((Rule) spec.getEntities().get(1));
|
||||
rules.add((Rule) spec.getEntities().get(2));
|
||||
rules.add((Rule) spec.getEntities().get(3));
|
||||
rules.add((Rule) spec.getEntities().get(4));
|
||||
return rules;
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_CO.msl#//@entities.1
|
||||
public PackageToDatabaseRuleAccess getRule_PackageToDatabaseRule() {
|
||||
return new PackageToDatabaseRuleAccess();
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRuleAccess extends NeoRuleCoAccess<PackageToDatabaseRuleData, PackageToDatabaseRuleCoData, PackageToDatabaseRuleMask> {
|
||||
public final String _classpackage = "classpackage";
|
||||
public final String _db = "db";
|
||||
|
||||
public final String _param____srcModelName = "__srcModelName";
|
||||
public final String _param____trgModelName = "__trgModelName";
|
||||
|
||||
@Override
|
||||
public NeoRule rule(){
|
||||
var r = (Rule) spec.getEntities().get(1);
|
||||
return NeoRuleFactory.createNeoRule(r, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<PackageToDatabaseRuleData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new PackageToDatabaseRuleData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<PackageToDatabaseRuleCoData> codata(Collection<NeoCoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new PackageToDatabaseRuleCoData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public PackageToDatabaseRuleMask mask() {
|
||||
return new PackageToDatabaseRuleMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRuleData extends NeoData {
|
||||
public PackageToDatabaseRuleData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRuleCoData extends NeoData {
|
||||
public PackageToDatabaseRuleCoData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRuleMask extends NeoMask {
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_CO.msl#//@entities.2
|
||||
public ClassToTableRuleAccess getRule_ClassToTableRule() {
|
||||
return new ClassToTableRuleAccess();
|
||||
}
|
||||
|
||||
public class ClassToTableRuleAccess extends NeoRuleCoAccess<ClassToTableRuleData, ClassToTableRuleCoData, ClassToTableRuleMask> {
|
||||
public final String _classpackage = "classpackage";
|
||||
public final String _clazz = "clazz";
|
||||
public final String _db = "db";
|
||||
public final String _table = "table";
|
||||
|
||||
public final String _param____srcModelName = "__srcModelName";
|
||||
public final String _param____trgModelName = "__trgModelName";
|
||||
|
||||
@Override
|
||||
public NeoRule rule(){
|
||||
var r = (Rule) spec.getEntities().get(2);
|
||||
return NeoRuleFactory.createNeoRule(r, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<ClassToTableRuleData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new ClassToTableRuleData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<ClassToTableRuleCoData> codata(Collection<NeoCoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new ClassToTableRuleCoData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClassToTableRuleMask mask() {
|
||||
return new ClassToTableRuleMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class ClassToTableRuleData extends NeoData {
|
||||
public ClassToTableRuleData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class ClassToTableRuleCoData extends NeoData {
|
||||
public ClassToTableRuleCoData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class ClassToTableRuleMask extends NeoMask {
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_CO.msl#//@entities.3
|
||||
public SubClassToTableRuleAccess getRule_SubClassToTableRule() {
|
||||
return new SubClassToTableRuleAccess();
|
||||
}
|
||||
|
||||
public class SubClassToTableRuleAccess extends NeoRuleCoAccess<SubClassToTableRuleData, SubClassToTableRuleCoData, SubClassToTableRuleMask> {
|
||||
public final String _subClazz = "subClazz";
|
||||
public final String _classpackage = "classpackage";
|
||||
public final String _clazz = "clazz";
|
||||
public final String _table = "table";
|
||||
|
||||
public final String _param____srcModelName = "__srcModelName";
|
||||
public final String _param____trgModelName = "__trgModelName";
|
||||
|
||||
@Override
|
||||
public NeoRule rule(){
|
||||
var r = (Rule) spec.getEntities().get(3);
|
||||
return NeoRuleFactory.createNeoRule(r, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<SubClassToTableRuleData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new SubClassToTableRuleData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<SubClassToTableRuleCoData> codata(Collection<NeoCoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new SubClassToTableRuleCoData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public SubClassToTableRuleMask mask() {
|
||||
return new SubClassToTableRuleMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class SubClassToTableRuleData extends NeoData {
|
||||
public SubClassToTableRuleData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class SubClassToTableRuleCoData extends NeoData {
|
||||
public SubClassToTableRuleCoData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class SubClassToTableRuleMask extends NeoMask {
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_CO.msl#//@entities.4
|
||||
public AttributeToColumnRuleAccess getRule_AttributeToColumnRule() {
|
||||
return new AttributeToColumnRuleAccess();
|
||||
}
|
||||
|
||||
public class AttributeToColumnRuleAccess extends NeoRuleCoAccess<AttributeToColumnRuleData, AttributeToColumnRuleCoData, AttributeToColumnRuleMask> {
|
||||
public final String _clazz = "clazz";
|
||||
public final String _attribute = "attribute";
|
||||
public final String _column = "column";
|
||||
public final String _table = "table";
|
||||
|
||||
public final String _param____srcModelName = "__srcModelName";
|
||||
public final String _param____trgModelName = "__trgModelName";
|
||||
|
||||
@Override
|
||||
public NeoRule rule(){
|
||||
var r = (Rule) spec.getEntities().get(4);
|
||||
return NeoRuleFactory.createNeoRule(r, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<AttributeToColumnRuleData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new AttributeToColumnRuleData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<AttributeToColumnRuleCoData> codata(Collection<NeoCoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new AttributeToColumnRuleCoData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public AttributeToColumnRuleMask mask() {
|
||||
return new AttributeToColumnRuleMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class AttributeToColumnRuleData extends NeoData {
|
||||
public AttributeToColumnRuleData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class AttributeToColumnRuleCoData extends NeoData {
|
||||
public AttributeToColumnRuleCoData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class AttributeToColumnRuleMask extends NeoMask {
|
||||
}
|
||||
}
|
|
@ -1,283 +0,0 @@
|
|||
/**
|
||||
* EMSL-API generated by eMoflon::Neo - Do not edit as this file will be overwritten
|
||||
*/
|
||||
package org.emoflon.neo.api.classinhhier2db.tgg;
|
||||
|
||||
import org.emoflon.neo.cypher.common.*;
|
||||
import org.emoflon.neo.cypher.constraints.*;
|
||||
import org.emoflon.neo.cypher.factories.*;
|
||||
import org.emoflon.neo.cypher.models.*;
|
||||
import org.emoflon.neo.cypher.patterns.*;
|
||||
import org.emoflon.neo.cypher.rules.*;
|
||||
import org.emoflon.neo.engine.api.patterns.*;
|
||||
import org.emoflon.neo.engine.api.constraints.*;
|
||||
import org.emoflon.neo.engine.api.rules.*;
|
||||
import org.emoflon.neo.emsl.eMSL.*;
|
||||
import org.emoflon.neo.emsl.util.*;
|
||||
import org.neo4j.driver.Value;
|
||||
import org.neo4j.driver.Record;
|
||||
import org.eclipse.emf.common.util.URI;
|
||||
import org.emoflon.neo.api.classinhhier2db.API_Common;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.Optional;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class API_ClassInhHier2DB_FWD {
|
||||
private EMSL_Spec spec;
|
||||
private NeoCoreBuilder builder;
|
||||
|
||||
/** Use this constructor for default values */
|
||||
public API_ClassInhHier2DB_FWD(NeoCoreBuilder builder) {
|
||||
this(builder, API_Common.PLATFORM_RESOURCE_URI, API_Common.PLATFORM_PLUGIN_URI, API_Common.NEOCORE_URI_INSTALLED);
|
||||
}
|
||||
|
||||
/** Use this constructor to configure values for loading EMSL files */
|
||||
public API_ClassInhHier2DB_FWD(NeoCoreBuilder builder, String platformResourceURIRoot, String platformPluginURIRoot, String neocoreURI){
|
||||
this((EMSL_Spec) EMSLUtil.loadSpecification("platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_FWD.msl", platformResourceURIRoot, platformPluginURIRoot, neocoreURI), builder);
|
||||
}
|
||||
|
||||
public API_ClassInhHier2DB_FWD(EMSL_Spec spec, NeoCoreBuilder builder) {
|
||||
this.spec = spec;
|
||||
this.builder = builder;
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_FWD.msl#//@entities.0
|
||||
public Collection<NeoRule> getAllRulesForClassInhHier2DB_FWD() {
|
||||
Collection<NeoRule> rules = new HashSet<>();
|
||||
|
||||
rules.add(getRule_PackageToDatabaseRule().rule());
|
||||
rules.add(getRule_ClassToTableRule().rule());
|
||||
rules.add(getRule_SubClassToTableRule().rule());
|
||||
rules.add(getRule_AttributeToColumnRule().rule());
|
||||
return rules;
|
||||
}
|
||||
|
||||
public Collection<NeoConstraint> getAllConstraintsForClassInhHier2DB_FWD() {
|
||||
Collection<NeoConstraint> constraints = new HashSet<>();
|
||||
return constraints;
|
||||
}
|
||||
|
||||
public Collection<Rule> getAllEMSLRulesForClassInhHier2DB_FWD(){
|
||||
var rules = new HashSet<Rule>();
|
||||
rules.add((Rule) spec.getEntities().get(1));
|
||||
rules.add((Rule) spec.getEntities().get(2));
|
||||
rules.add((Rule) spec.getEntities().get(3));
|
||||
rules.add((Rule) spec.getEntities().get(4));
|
||||
return rules;
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_FWD.msl#//@entities.1
|
||||
public PackageToDatabaseRuleAccess getRule_PackageToDatabaseRule() {
|
||||
return new PackageToDatabaseRuleAccess();
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRuleAccess extends NeoRuleCoAccess<PackageToDatabaseRuleData, PackageToDatabaseRuleCoData, PackageToDatabaseRuleMask> {
|
||||
public final String _classpackage = "classpackage";
|
||||
public final String _db = "db";
|
||||
|
||||
public final String _param____srcModelName = "__srcModelName";
|
||||
public final String _param____trgModelName = "__trgModelName";
|
||||
|
||||
@Override
|
||||
public NeoRule rule(){
|
||||
var r = (Rule) spec.getEntities().get(1);
|
||||
return NeoRuleFactory.createNeoRule(r, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<PackageToDatabaseRuleData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new PackageToDatabaseRuleData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<PackageToDatabaseRuleCoData> codata(Collection<NeoCoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new PackageToDatabaseRuleCoData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public PackageToDatabaseRuleMask mask() {
|
||||
return new PackageToDatabaseRuleMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRuleData extends NeoData {
|
||||
public PackageToDatabaseRuleData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRuleCoData extends NeoData {
|
||||
public PackageToDatabaseRuleCoData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRuleMask extends NeoMask {
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_FWD.msl#//@entities.2
|
||||
public ClassToTableRuleAccess getRule_ClassToTableRule() {
|
||||
return new ClassToTableRuleAccess();
|
||||
}
|
||||
|
||||
public class ClassToTableRuleAccess extends NeoRuleCoAccess<ClassToTableRuleData, ClassToTableRuleCoData, ClassToTableRuleMask> {
|
||||
public final String _classpackage = "classpackage";
|
||||
public final String _clazz = "clazz";
|
||||
public final String _db = "db";
|
||||
public final String _table = "table";
|
||||
|
||||
public final String _param____srcModelName = "__srcModelName";
|
||||
public final String _param____trgModelName = "__trgModelName";
|
||||
|
||||
@Override
|
||||
public NeoRule rule(){
|
||||
var r = (Rule) spec.getEntities().get(2);
|
||||
return NeoRuleFactory.createNeoRule(r, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<ClassToTableRuleData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new ClassToTableRuleData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<ClassToTableRuleCoData> codata(Collection<NeoCoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new ClassToTableRuleCoData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClassToTableRuleMask mask() {
|
||||
return new ClassToTableRuleMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class ClassToTableRuleData extends NeoData {
|
||||
public ClassToTableRuleData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class ClassToTableRuleCoData extends NeoData {
|
||||
public ClassToTableRuleCoData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class ClassToTableRuleMask extends NeoMask {
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_FWD.msl#//@entities.3
|
||||
public SubClassToTableRuleAccess getRule_SubClassToTableRule() {
|
||||
return new SubClassToTableRuleAccess();
|
||||
}
|
||||
|
||||
public class SubClassToTableRuleAccess extends NeoRuleCoAccess<SubClassToTableRuleData, SubClassToTableRuleCoData, SubClassToTableRuleMask> {
|
||||
public final String _subClazz = "subClazz";
|
||||
public final String _classpackage = "classpackage";
|
||||
public final String _clazz = "clazz";
|
||||
public final String _table = "table";
|
||||
|
||||
public final String _param____srcModelName = "__srcModelName";
|
||||
public final String _param____trgModelName = "__trgModelName";
|
||||
|
||||
@Override
|
||||
public NeoRule rule(){
|
||||
var r = (Rule) spec.getEntities().get(3);
|
||||
return NeoRuleFactory.createNeoRule(r, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<SubClassToTableRuleData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new SubClassToTableRuleData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<SubClassToTableRuleCoData> codata(Collection<NeoCoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new SubClassToTableRuleCoData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public SubClassToTableRuleMask mask() {
|
||||
return new SubClassToTableRuleMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class SubClassToTableRuleData extends NeoData {
|
||||
public SubClassToTableRuleData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class SubClassToTableRuleCoData extends NeoData {
|
||||
public SubClassToTableRuleCoData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class SubClassToTableRuleMask extends NeoMask {
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_FWD.msl#//@entities.4
|
||||
public AttributeToColumnRuleAccess getRule_AttributeToColumnRule() {
|
||||
return new AttributeToColumnRuleAccess();
|
||||
}
|
||||
|
||||
public class AttributeToColumnRuleAccess extends NeoRuleCoAccess<AttributeToColumnRuleData, AttributeToColumnRuleCoData, AttributeToColumnRuleMask> {
|
||||
public final String _clazz = "clazz";
|
||||
public final String _attribute = "attribute";
|
||||
public final String _column = "column";
|
||||
public final String _table = "table";
|
||||
|
||||
public final String _param____srcModelName = "__srcModelName";
|
||||
public final String _param____trgModelName = "__trgModelName";
|
||||
|
||||
@Override
|
||||
public NeoRule rule(){
|
||||
var r = (Rule) spec.getEntities().get(4);
|
||||
return NeoRuleFactory.createNeoRule(r, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<AttributeToColumnRuleData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new AttributeToColumnRuleData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<AttributeToColumnRuleCoData> codata(Collection<NeoCoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new AttributeToColumnRuleCoData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public AttributeToColumnRuleMask mask() {
|
||||
return new AttributeToColumnRuleMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class AttributeToColumnRuleData extends NeoData {
|
||||
public AttributeToColumnRuleData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class AttributeToColumnRuleCoData extends NeoData {
|
||||
public AttributeToColumnRuleCoData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class AttributeToColumnRuleMask extends NeoMask {
|
||||
}
|
||||
}
|
|
@ -1,283 +0,0 @@
|
|||
/**
|
||||
* EMSL-API generated by eMoflon::Neo - Do not edit as this file will be overwritten
|
||||
*/
|
||||
package org.emoflon.neo.api.classinhhier2db.tgg;
|
||||
|
||||
import org.emoflon.neo.cypher.common.*;
|
||||
import org.emoflon.neo.cypher.constraints.*;
|
||||
import org.emoflon.neo.cypher.factories.*;
|
||||
import org.emoflon.neo.cypher.models.*;
|
||||
import org.emoflon.neo.cypher.patterns.*;
|
||||
import org.emoflon.neo.cypher.rules.*;
|
||||
import org.emoflon.neo.engine.api.patterns.*;
|
||||
import org.emoflon.neo.engine.api.constraints.*;
|
||||
import org.emoflon.neo.engine.api.rules.*;
|
||||
import org.emoflon.neo.emsl.eMSL.*;
|
||||
import org.emoflon.neo.emsl.util.*;
|
||||
import org.neo4j.driver.Value;
|
||||
import org.neo4j.driver.Record;
|
||||
import org.eclipse.emf.common.util.URI;
|
||||
import org.emoflon.neo.api.classinhhier2db.API_Common;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.Optional;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class API_ClassInhHier2DB_FWD_OPT {
|
||||
private EMSL_Spec spec;
|
||||
private NeoCoreBuilder builder;
|
||||
|
||||
/** Use this constructor for default values */
|
||||
public API_ClassInhHier2DB_FWD_OPT(NeoCoreBuilder builder) {
|
||||
this(builder, API_Common.PLATFORM_RESOURCE_URI, API_Common.PLATFORM_PLUGIN_URI, API_Common.NEOCORE_URI_INSTALLED);
|
||||
}
|
||||
|
||||
/** Use this constructor to configure values for loading EMSL files */
|
||||
public API_ClassInhHier2DB_FWD_OPT(NeoCoreBuilder builder, String platformResourceURIRoot, String platformPluginURIRoot, String neocoreURI){
|
||||
this((EMSL_Spec) EMSLUtil.loadSpecification("platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_FWD_OPT.msl", platformResourceURIRoot, platformPluginURIRoot, neocoreURI), builder);
|
||||
}
|
||||
|
||||
public API_ClassInhHier2DB_FWD_OPT(EMSL_Spec spec, NeoCoreBuilder builder) {
|
||||
this.spec = spec;
|
||||
this.builder = builder;
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_FWD_OPT.msl#//@entities.0
|
||||
public Collection<NeoRule> getAllRulesForClassInhHier2DB_FWD_OPT() {
|
||||
Collection<NeoRule> rules = new HashSet<>();
|
||||
|
||||
rules.add(getRule_PackageToDatabaseRule().rule());
|
||||
rules.add(getRule_ClassToTableRule().rule());
|
||||
rules.add(getRule_SubClassToTableRule().rule());
|
||||
rules.add(getRule_AttributeToColumnRule().rule());
|
||||
return rules;
|
||||
}
|
||||
|
||||
public Collection<NeoConstraint> getAllConstraintsForClassInhHier2DB_FWD_OPT() {
|
||||
Collection<NeoConstraint> constraints = new HashSet<>();
|
||||
return constraints;
|
||||
}
|
||||
|
||||
public Collection<Rule> getAllEMSLRulesForClassInhHier2DB_FWD_OPT(){
|
||||
var rules = new HashSet<Rule>();
|
||||
rules.add((Rule) spec.getEntities().get(1));
|
||||
rules.add((Rule) spec.getEntities().get(2));
|
||||
rules.add((Rule) spec.getEntities().get(3));
|
||||
rules.add((Rule) spec.getEntities().get(4));
|
||||
return rules;
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_FWD_OPT.msl#//@entities.1
|
||||
public PackageToDatabaseRuleAccess getRule_PackageToDatabaseRule() {
|
||||
return new PackageToDatabaseRuleAccess();
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRuleAccess extends NeoRuleCoAccess<PackageToDatabaseRuleData, PackageToDatabaseRuleCoData, PackageToDatabaseRuleMask> {
|
||||
public final String _classpackage = "classpackage";
|
||||
public final String _db = "db";
|
||||
|
||||
public final String _param____srcModelName = "__srcModelName";
|
||||
public final String _param____trgModelName = "__trgModelName";
|
||||
|
||||
@Override
|
||||
public NeoRule rule(){
|
||||
var r = (Rule) spec.getEntities().get(1);
|
||||
return NeoRuleFactory.createNeoRule(r, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<PackageToDatabaseRuleData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new PackageToDatabaseRuleData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<PackageToDatabaseRuleCoData> codata(Collection<NeoCoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new PackageToDatabaseRuleCoData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public PackageToDatabaseRuleMask mask() {
|
||||
return new PackageToDatabaseRuleMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRuleData extends NeoData {
|
||||
public PackageToDatabaseRuleData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRuleCoData extends NeoData {
|
||||
public PackageToDatabaseRuleCoData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRuleMask extends NeoMask {
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_FWD_OPT.msl#//@entities.2
|
||||
public ClassToTableRuleAccess getRule_ClassToTableRule() {
|
||||
return new ClassToTableRuleAccess();
|
||||
}
|
||||
|
||||
public class ClassToTableRuleAccess extends NeoRuleCoAccess<ClassToTableRuleData, ClassToTableRuleCoData, ClassToTableRuleMask> {
|
||||
public final String _classpackage = "classpackage";
|
||||
public final String _clazz = "clazz";
|
||||
public final String _db = "db";
|
||||
public final String _table = "table";
|
||||
|
||||
public final String _param____srcModelName = "__srcModelName";
|
||||
public final String _param____trgModelName = "__trgModelName";
|
||||
|
||||
@Override
|
||||
public NeoRule rule(){
|
||||
var r = (Rule) spec.getEntities().get(2);
|
||||
return NeoRuleFactory.createNeoRule(r, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<ClassToTableRuleData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new ClassToTableRuleData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<ClassToTableRuleCoData> codata(Collection<NeoCoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new ClassToTableRuleCoData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClassToTableRuleMask mask() {
|
||||
return new ClassToTableRuleMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class ClassToTableRuleData extends NeoData {
|
||||
public ClassToTableRuleData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class ClassToTableRuleCoData extends NeoData {
|
||||
public ClassToTableRuleCoData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class ClassToTableRuleMask extends NeoMask {
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_FWD_OPT.msl#//@entities.3
|
||||
public SubClassToTableRuleAccess getRule_SubClassToTableRule() {
|
||||
return new SubClassToTableRuleAccess();
|
||||
}
|
||||
|
||||
public class SubClassToTableRuleAccess extends NeoRuleCoAccess<SubClassToTableRuleData, SubClassToTableRuleCoData, SubClassToTableRuleMask> {
|
||||
public final String _subClazz = "subClazz";
|
||||
public final String _classpackage = "classpackage";
|
||||
public final String _clazz = "clazz";
|
||||
public final String _table = "table";
|
||||
|
||||
public final String _param____srcModelName = "__srcModelName";
|
||||
public final String _param____trgModelName = "__trgModelName";
|
||||
|
||||
@Override
|
||||
public NeoRule rule(){
|
||||
var r = (Rule) spec.getEntities().get(3);
|
||||
return NeoRuleFactory.createNeoRule(r, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<SubClassToTableRuleData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new SubClassToTableRuleData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<SubClassToTableRuleCoData> codata(Collection<NeoCoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new SubClassToTableRuleCoData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public SubClassToTableRuleMask mask() {
|
||||
return new SubClassToTableRuleMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class SubClassToTableRuleData extends NeoData {
|
||||
public SubClassToTableRuleData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class SubClassToTableRuleCoData extends NeoData {
|
||||
public SubClassToTableRuleCoData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class SubClassToTableRuleMask extends NeoMask {
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_FWD_OPT.msl#//@entities.4
|
||||
public AttributeToColumnRuleAccess getRule_AttributeToColumnRule() {
|
||||
return new AttributeToColumnRuleAccess();
|
||||
}
|
||||
|
||||
public class AttributeToColumnRuleAccess extends NeoRuleCoAccess<AttributeToColumnRuleData, AttributeToColumnRuleCoData, AttributeToColumnRuleMask> {
|
||||
public final String _clazz = "clazz";
|
||||
public final String _attribute = "attribute";
|
||||
public final String _column = "column";
|
||||
public final String _table = "table";
|
||||
|
||||
public final String _param____srcModelName = "__srcModelName";
|
||||
public final String _param____trgModelName = "__trgModelName";
|
||||
|
||||
@Override
|
||||
public NeoRule rule(){
|
||||
var r = (Rule) spec.getEntities().get(4);
|
||||
return NeoRuleFactory.createNeoRule(r, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<AttributeToColumnRuleData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new AttributeToColumnRuleData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<AttributeToColumnRuleCoData> codata(Collection<NeoCoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new AttributeToColumnRuleCoData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public AttributeToColumnRuleMask mask() {
|
||||
return new AttributeToColumnRuleMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class AttributeToColumnRuleData extends NeoData {
|
||||
public AttributeToColumnRuleData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class AttributeToColumnRuleCoData extends NeoData {
|
||||
public AttributeToColumnRuleCoData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class AttributeToColumnRuleMask extends NeoMask {
|
||||
}
|
||||
}
|
|
@ -1,330 +0,0 @@
|
|||
/**
|
||||
* EMSL-API generated by eMoflon::Neo - Do not edit as this file will be overwritten
|
||||
*/
|
||||
package org.emoflon.neo.api.classinhhier2db.tgg;
|
||||
|
||||
import org.emoflon.neo.cypher.common.*;
|
||||
import org.emoflon.neo.cypher.constraints.*;
|
||||
import org.emoflon.neo.cypher.factories.*;
|
||||
import org.emoflon.neo.cypher.models.*;
|
||||
import org.emoflon.neo.cypher.patterns.*;
|
||||
import org.emoflon.neo.cypher.rules.*;
|
||||
import org.emoflon.neo.engine.api.patterns.*;
|
||||
import org.emoflon.neo.engine.api.constraints.*;
|
||||
import org.emoflon.neo.engine.api.rules.*;
|
||||
import org.emoflon.neo.emsl.eMSL.*;
|
||||
import org.emoflon.neo.emsl.util.*;
|
||||
import org.neo4j.driver.Value;
|
||||
import org.neo4j.driver.Record;
|
||||
import org.eclipse.emf.common.util.URI;
|
||||
import org.emoflon.neo.api.classinhhier2db.API_Common;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.Optional;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class API_ClassInhHier2DB_GEN {
|
||||
private EMSL_Spec spec;
|
||||
private NeoCoreBuilder builder;
|
||||
|
||||
/** Use this constructor for default values */
|
||||
public API_ClassInhHier2DB_GEN(NeoCoreBuilder builder) {
|
||||
this(builder, API_Common.PLATFORM_RESOURCE_URI, API_Common.PLATFORM_PLUGIN_URI, API_Common.NEOCORE_URI_INSTALLED);
|
||||
}
|
||||
|
||||
/** Use this constructor to configure values for loading EMSL files */
|
||||
public API_ClassInhHier2DB_GEN(NeoCoreBuilder builder, String platformResourceURIRoot, String platformPluginURIRoot, String neocoreURI){
|
||||
this((EMSL_Spec) EMSLUtil.loadSpecification("platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_GEN.msl", platformResourceURIRoot, platformPluginURIRoot, neocoreURI), builder);
|
||||
}
|
||||
|
||||
public API_ClassInhHier2DB_GEN(EMSL_Spec spec, NeoCoreBuilder builder) {
|
||||
this.spec = spec;
|
||||
this.builder = builder;
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_GEN.msl#//@entities.0
|
||||
public Collection<NeoRule> getAllRulesForClassInhHier2DB_GEN() {
|
||||
Collection<NeoRule> rules = new HashSet<>();
|
||||
|
||||
rules.add(getRule_PackageToDatabaseRule().rule());
|
||||
rules.add(getRule_ClassToTableRule().rule());
|
||||
rules.add(getRule_SubClassToTableRule().rule());
|
||||
rules.add(getRule_AttributeToColumnRule().rule());
|
||||
return rules;
|
||||
}
|
||||
|
||||
public Collection<NeoConstraint> getAllConstraintsForClassInhHier2DB_GEN() {
|
||||
Collection<NeoConstraint> constraints = new HashSet<>();
|
||||
return constraints;
|
||||
}
|
||||
|
||||
public Collection<Rule> getAllEMSLRulesForClassInhHier2DB_GEN(){
|
||||
var rules = new HashSet<Rule>();
|
||||
rules.add((Rule) spec.getEntities().get(1));
|
||||
rules.add((Rule) spec.getEntities().get(4));
|
||||
rules.add((Rule) spec.getEntities().get(5));
|
||||
rules.add((Rule) spec.getEntities().get(6));
|
||||
return rules;
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_GEN.msl#//@entities.1
|
||||
public PackageToDatabaseRuleAccess getRule_PackageToDatabaseRule() {
|
||||
return new PackageToDatabaseRuleAccess();
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRuleAccess extends NeoRuleCoAccess<PackageToDatabaseRuleData, PackageToDatabaseRuleCoData, PackageToDatabaseRuleMask> {
|
||||
public final String _classpackage = "classpackage";
|
||||
public final String _db = "db";
|
||||
|
||||
public final String _param____srcModelName = "__srcModelName";
|
||||
public final String _param__packageName = "packageName";
|
||||
public final String _param____trgModelName = "__trgModelName";
|
||||
|
||||
@Override
|
||||
public NeoRule rule(){
|
||||
var r = (Rule) spec.getEntities().get(1);
|
||||
return NeoRuleFactory.createNeoRule(r, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<PackageToDatabaseRuleData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new PackageToDatabaseRuleData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<PackageToDatabaseRuleCoData> codata(Collection<NeoCoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new PackageToDatabaseRuleCoData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public PackageToDatabaseRuleMask mask() {
|
||||
return new PackageToDatabaseRuleMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRuleData extends NeoData {
|
||||
public PackageToDatabaseRuleData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRuleCoData extends NeoData {
|
||||
public PackageToDatabaseRuleCoData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRuleMask extends NeoMask {
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_GEN.msl#//@entities.2
|
||||
public IConstraint getConstraint_PackageToDatabaseRuleNAC() {
|
||||
var c = (Constraint) spec.getEntities().get(2);
|
||||
return NeoConstraintFactory.createNeoConstraint(c, builder);
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_GEN.msl#//@entities.3
|
||||
public PackageToDatabaseRule_packageNameIsTakenAccess getPattern_PackageToDatabaseRule_packageNameIsTaken() {
|
||||
return new PackageToDatabaseRule_packageNameIsTakenAccess();
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRule_packageNameIsTakenAccess extends NeoPatternAccess<PackageToDatabaseRule_packageNameIsTakenData, PackageToDatabaseRule_packageNameIsTakenMask> {
|
||||
public final String _classpackage = "classpackage";
|
||||
|
||||
public final String _param____srcModelName = "__srcModelName";
|
||||
public final String _param__packageName = "packageName";
|
||||
|
||||
@Override
|
||||
public NeoPattern pattern(){
|
||||
var p = (Pattern) spec.getEntities().get(3);
|
||||
return NeoPatternFactory.createNeoPattern(p, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<PackageToDatabaseRule_packageNameIsTakenData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new PackageToDatabaseRule_packageNameIsTakenData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public PackageToDatabaseRule_packageNameIsTakenMask mask() {
|
||||
return new PackageToDatabaseRule_packageNameIsTakenMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRule_packageNameIsTakenData extends NeoData {
|
||||
public PackageToDatabaseRule_packageNameIsTakenData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class PackageToDatabaseRule_packageNameIsTakenMask extends NeoMask {
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_GEN.msl#//@entities.4
|
||||
public ClassToTableRuleAccess getRule_ClassToTableRule() {
|
||||
return new ClassToTableRuleAccess();
|
||||
}
|
||||
|
||||
public class ClassToTableRuleAccess extends NeoRuleCoAccess<ClassToTableRuleData, ClassToTableRuleCoData, ClassToTableRuleMask> {
|
||||
public final String _classpackage = "classpackage";
|
||||
public final String _clazz = "clazz";
|
||||
public final String _db = "db";
|
||||
public final String _table = "table";
|
||||
|
||||
public final String _param____srcModelName = "__srcModelName";
|
||||
public final String _param__clazzname = "clazzname";
|
||||
public final String _param____trgModelName = "__trgModelName";
|
||||
|
||||
@Override
|
||||
public NeoRule rule(){
|
||||
var r = (Rule) spec.getEntities().get(4);
|
||||
return NeoRuleFactory.createNeoRule(r, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<ClassToTableRuleData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new ClassToTableRuleData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<ClassToTableRuleCoData> codata(Collection<NeoCoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new ClassToTableRuleCoData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClassToTableRuleMask mask() {
|
||||
return new ClassToTableRuleMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class ClassToTableRuleData extends NeoData {
|
||||
public ClassToTableRuleData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class ClassToTableRuleCoData extends NeoData {
|
||||
public ClassToTableRuleCoData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class ClassToTableRuleMask extends NeoMask {
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_GEN.msl#//@entities.5
|
||||
public SubClassToTableRuleAccess getRule_SubClassToTableRule() {
|
||||
return new SubClassToTableRuleAccess();
|
||||
}
|
||||
|
||||
public class SubClassToTableRuleAccess extends NeoRuleCoAccess<SubClassToTableRuleData, SubClassToTableRuleCoData, SubClassToTableRuleMask> {
|
||||
public final String _subClazz = "subClazz";
|
||||
public final String _classpackage = "classpackage";
|
||||
public final String _clazz = "clazz";
|
||||
public final String _table = "table";
|
||||
|
||||
public final String _param____srcModelName = "__srcModelName";
|
||||
public final String _param____trgModelName = "__trgModelName";
|
||||
|
||||
@Override
|
||||
public NeoRule rule(){
|
||||
var r = (Rule) spec.getEntities().get(5);
|
||||
return NeoRuleFactory.createNeoRule(r, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<SubClassToTableRuleData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new SubClassToTableRuleData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<SubClassToTableRuleCoData> codata(Collection<NeoCoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new SubClassToTableRuleCoData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public SubClassToTableRuleMask mask() {
|
||||
return new SubClassToTableRuleMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class SubClassToTableRuleData extends NeoData {
|
||||
public SubClassToTableRuleData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class SubClassToTableRuleCoData extends NeoData {
|
||||
public SubClassToTableRuleCoData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class SubClassToTableRuleMask extends NeoMask {
|
||||
}
|
||||
|
||||
//:~> platform:/resource/ClassInhHier2DB/tgg-gen/tgg/ClassInhHier2DB_GEN.msl#//@entities.6
|
||||
public AttributeToColumnRuleAccess getRule_AttributeToColumnRule() {
|
||||
return new AttributeToColumnRuleAccess();
|
||||
}
|
||||
|
||||
public class AttributeToColumnRuleAccess extends NeoRuleCoAccess<AttributeToColumnRuleData, AttributeToColumnRuleCoData, AttributeToColumnRuleMask> {
|
||||
public final String _clazz = "clazz";
|
||||
public final String _attribute = "attribute";
|
||||
public final String _column = "column";
|
||||
public final String _table = "table";
|
||||
|
||||
public final String _param____srcModelName = "__srcModelName";
|
||||
public final String _param__attributeName = "attributeName";
|
||||
public final String _param____trgModelName = "__trgModelName";
|
||||
|
||||
@Override
|
||||
public NeoRule rule(){
|
||||
var r = (Rule) spec.getEntities().get(6);
|
||||
return NeoRuleFactory.createNeoRule(r, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<AttributeToColumnRuleData> data(Collection<NeoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new AttributeToColumnRuleData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<AttributeToColumnRuleCoData> codata(Collection<NeoCoMatch> matches) {
|
||||
var data = NeoMatch.getData(matches);
|
||||
return data.stream().map(d -> new AttributeToColumnRuleCoData(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public AttributeToColumnRuleMask mask() {
|
||||
return new AttributeToColumnRuleMask();
|
||||
}
|
||||
}
|
||||
|
||||
public class AttributeToColumnRuleData extends NeoData {
|
||||
public AttributeToColumnRuleData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class AttributeToColumnRuleCoData extends NeoData {
|
||||
public AttributeToColumnRuleCoData(Record data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class AttributeToColumnRuleMask extends NeoMask {
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -45,7 +45,6 @@ grammar ClassInhHier2DB_CC {
|
|||
{
|
||||
._type_ := "ClazzToTable"
|
||||
}
|
||||
.name : table::heading
|
||||
}
|
||||
|
||||
db:DB {
|
||||
|
@ -55,6 +54,7 @@ grammar ClassInhHier2DB_CC {
|
|||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
.heading : clazz::name
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
|
@ -111,11 +111,11 @@ grammar ClassInhHier2DB_CC {
|
|||
{
|
||||
._type_ := "AttributeToColumn"
|
||||
}
|
||||
.name : column::name
|
||||
}
|
||||
|
||||
column:Column {
|
||||
.enamespace : <__trgModelName>
|
||||
.name : attribute::name
|
||||
}
|
||||
|
||||
table:Table {
|
||||
|
|
|
@ -45,7 +45,6 @@ grammar ClassInhHier2DB_CO {
|
|||
{
|
||||
._type_ : "ClazzToTable"
|
||||
}
|
||||
.name : table::heading
|
||||
}
|
||||
|
||||
db:DB {
|
||||
|
@ -55,6 +54,7 @@ grammar ClassInhHier2DB_CO {
|
|||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
.heading : clazz::name
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
|
@ -111,11 +111,11 @@ grammar ClassInhHier2DB_CO {
|
|||
{
|
||||
._type_ : "AttributeToColumn"
|
||||
}
|
||||
.name : column::name
|
||||
}
|
||||
|
||||
column:Column {
|
||||
.enamespace : <__trgModelName>
|
||||
.name : attribute::name
|
||||
}
|
||||
|
||||
table:Table {
|
||||
|
|
|
@ -45,12 +45,12 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ : "PackageToDatabase"
|
||||
}
|
||||
.name : db::title
|
||||
~_ex_ : true
|
||||
}
|
||||
|
||||
db:DB {
|
||||
.enamespace : <__trgModelName>
|
||||
.title : classpackage::name
|
||||
~_ex_ : true
|
||||
}
|
||||
|
||||
|
@ -65,12 +65,12 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ := "PackageToDatabase"
|
||||
}
|
||||
.name : db::title
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
db:DB {
|
||||
.enamespace : <__trgModelName>
|
||||
.title : classpackage::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -726,12 +726,12 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ : "AttributeToColumn"
|
||||
}
|
||||
.name : column::name
|
||||
~_ex_ : true
|
||||
}
|
||||
|
||||
column:Column {
|
||||
.enamespace : <__trgModelName>
|
||||
.name : attribute::name
|
||||
~_ex_ : true
|
||||
}
|
||||
|
||||
|
@ -766,12 +766,12 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ := "AttributeToColumn"
|
||||
}
|
||||
.name : column::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
column:Column {
|
||||
.enamespace : <__trgModelName>
|
||||
.name : attribute::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -806,12 +806,12 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ : "AttributeToColumn"
|
||||
}
|
||||
.name : column::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
column:Column {
|
||||
.enamespace : <__trgModelName>
|
||||
.name : attribute::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -843,12 +843,12 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ := "AttributeToColumn"
|
||||
}
|
||||
.name : column::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
column:Column {
|
||||
.enamespace : <__trgModelName>
|
||||
.name : attribute::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -913,12 +913,12 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ : "AttributeToColumn"
|
||||
}
|
||||
.name : column::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
column:Column {
|
||||
.enamespace : <__trgModelName>
|
||||
.name : attribute::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -950,12 +950,12 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ := "AttributeToColumn"
|
||||
}
|
||||
.name : column::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
column:Column {
|
||||
.enamespace : <__trgModelName>
|
||||
.name : attribute::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
|
|
@ -1,97 +0,0 @@
|
|||
package run.emf.modelimport;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.eclipse.emf.common.util.URI;
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
import org.eclipse.emf.ecore.EPackage;
|
||||
import org.eclipse.emf.ecore.resource.Resource;
|
||||
import org.eclipse.emf.ecore.resource.ResourceSet;
|
||||
import org.eclipse.xtext.resource.XtextResourceSet;
|
||||
import org.eclipse.xtext.xbase.lib.CollectionLiterals;
|
||||
import org.eclipse.xtext.xbase.lib.Exceptions;
|
||||
import org.emoflon.neo.api.exttype2doc_concsync.API_Common;
|
||||
import org.emoflon.neo.api.exttype2doc_concsync.run.emf.modelimport.API_IbexToENeo;
|
||||
import org.emoflon.neo.cypher.models.NeoCoreBuilder;
|
||||
import org.emoflon.neo.cypher.rules.NeoRule;
|
||||
import org.emoflon.neo.emf.Neo4jImporter;
|
||||
import org.emoflon.neo.engine.modules.updatepolicies.CheckOnlyOperationalStrategy;
|
||||
import org.emoflon.neo.neocore.ENeoUtil;
|
||||
import run.ExtType2Doc_ConcSync_CO_Run;
|
||||
|
||||
@SuppressWarnings("all")
|
||||
public class EMFImportToENeo {
|
||||
private static final Logger logger = Logger.getLogger(EMFImportToENeo.class);
|
||||
|
||||
private static NeoCoreBuilder builder = API_Common.createBuilder();
|
||||
|
||||
public static void main(final String[] args) {
|
||||
try {
|
||||
EMFImportToENeo.loadModelsAndMetamodels("./emf/metamodels/", "./emf/gen-models/presDel-scaled_n64_c1_H/", "src.xmi", "trg.xmi", "corr.xmi");
|
||||
final ExtType2Doc_ConcSync_CO_Run app = new ExtType2Doc_ConcSync_CO_Run();
|
||||
final CheckOnlyOperationalStrategy result = app.runCheckOnly("src.xmi", "trg.xmi");
|
||||
Collection<Long> _determineInconsistentElements = result.determineInconsistentElements();
|
||||
String _plus = ("inconsistent elements: " + _determineInconsistentElements);
|
||||
EMFImportToENeo.logger.info(_plus);
|
||||
} catch (final Throwable _t) {
|
||||
if (_t instanceof Exception) {
|
||||
final Exception e = (Exception)_t;
|
||||
String _message = e.getMessage();
|
||||
String _plus_1 = ("Loading models and metamodels failed: " + _message);
|
||||
EMFImportToENeo.logger.info(_plus_1);
|
||||
} else {
|
||||
throw Exceptions.sneakyThrow(_t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static XtextResourceSet createResourceSet() {
|
||||
return ENeoUtil.createEMSLStandaloneResourceSet(".");
|
||||
}
|
||||
|
||||
private static void loadModel(final ResourceSet rs, final String uri, final String label) {
|
||||
final Resource resource = rs.getResource(URI.createURI(uri), true);
|
||||
resource.setURI(URI.createURI(label));
|
||||
}
|
||||
|
||||
private static void loadMetamodel(final ResourceSet rs, final String uri) {
|
||||
Resource resource = rs.getResource(URI.createURI(uri), true);
|
||||
EObject _get = resource.getContents().get(0);
|
||||
final EPackage root = ((EPackage) _get);
|
||||
resource.setURI(URI.createURI(root.getNsURI()));
|
||||
}
|
||||
|
||||
public static void loadModelsAndMetamodels(final String metamodelPath, final String modelPath, final String srcModel, final String trgModel, final String corrModel) {
|
||||
try {
|
||||
EMFImportToENeo.builder.clearDataBase();
|
||||
final Neo4jImporter importer = new Neo4jImporter();
|
||||
final String boltURL = "bolt://localhost:7687";
|
||||
final String dbName = "neo4j";
|
||||
final String passw = "test";
|
||||
final XtextResourceSet rs = EMFImportToENeo.createResourceSet();
|
||||
EMFImportToENeo.loadMetamodel(rs, (metamodelPath + "ExtDocModel.ecore"));
|
||||
EMFImportToENeo.loadMetamodel(rs, (metamodelPath + "ExtTypeModel.ecore"));
|
||||
EMFImportToENeo.loadMetamodel(rs, (metamodelPath + "ExtType2Doc_ShortCut.ecore"));
|
||||
EMFImportToENeo.loadModel(rs, (modelPath + srcModel), srcModel);
|
||||
EMFImportToENeo.loadModel(rs, (modelPath + trgModel), trgModel);
|
||||
EMFImportToENeo.loadModel(rs, (modelPath + corrModel), corrModel);
|
||||
importer.importEMFModels(rs, boltURL, dbName, passw);
|
||||
final API_IbexToENeo ruleAPI = new API_IbexToENeo(EMFImportToENeo.builder);
|
||||
NeoRule _rule = ruleAPI.getRule_MigrateProject2DocContainer().rule();
|
||||
NeoRule _rule_1 = ruleAPI.getRule_MigratePackage2Folder().rule();
|
||||
NeoRule _rule_2 = ruleAPI.getRule_MigrateType2Doc().rule();
|
||||
NeoRule _rule_3 = ruleAPI.getRule_MigrateMethod2Entry().rule();
|
||||
NeoRule _rule_4 = ruleAPI.getRule_MigrateParam2Entry().rule();
|
||||
NeoRule _rule_5 = ruleAPI.getRule_MigrateField2Entry().rule();
|
||||
NeoRule _rule_6 = ruleAPI.getRule_MigrateJDoc2Annotation().rule();
|
||||
for (final NeoRule rule : Collections.<NeoRule>unmodifiableSet(CollectionLiterals.<NeoRule>newHashSet(_rule, _rule_1, _rule_2, _rule_3, _rule_4, _rule_5, _rule_6))) {
|
||||
rule.applyAll(rule.determineMatches());
|
||||
}
|
||||
EMFImportToENeo.logger.info("Migrated all corrs");
|
||||
EMFImportToENeo.builder.close();
|
||||
} catch (Throwable _e) {
|
||||
throw Exceptions.sneakyThrow(_e);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,111 +0,0 @@
|
|||
import "platform:/resource/JavaToDoc/src/metamodels/SimpleJava.msl"
|
||||
import "platform:/resource/JavaToDoc/src/metamodels/SimpleDoc.msl"
|
||||
|
||||
tripleGrammar JavaToDoc {
|
||||
source {
|
||||
SimpleJava
|
||||
}
|
||||
|
||||
target {
|
||||
SimpleDoc
|
||||
}
|
||||
|
||||
correspondence {
|
||||
Package <- PackageToFolder -> Folder
|
||||
Clazz <- ClazzToDoc -> Doc
|
||||
}
|
||||
|
||||
rules {
|
||||
ClazzToDocRule
|
||||
RootToRootRule
|
||||
SubToSubRule
|
||||
}
|
||||
}
|
||||
|
||||
tripleRule ClazzToDocRule : JavaToDoc {
|
||||
source {
|
||||
p : Package {
|
||||
++ -clazzes->c
|
||||
}
|
||||
++ c : Clazz {
|
||||
.name := <clazzName>
|
||||
}
|
||||
}
|
||||
|
||||
target {
|
||||
f : Folder {
|
||||
++ -docs->doc
|
||||
}
|
||||
++ doc : Doc {
|
||||
.name := <clazzName>
|
||||
}
|
||||
}
|
||||
|
||||
correspondence {
|
||||
p <-:PackageToFolder-> f
|
||||
++ c <-:ClazzToDoc-> doc
|
||||
}
|
||||
}
|
||||
|
||||
//forbid src(clazzNameIsTaken)
|
||||
|
||||
pattern clazzNameIsTaken {
|
||||
clazz : Clazz {
|
||||
.name : <clazzName>
|
||||
}
|
||||
}
|
||||
|
||||
tripleRule RootToRootRule : JavaToDoc {
|
||||
source {
|
||||
++ p : Package {
|
||||
.name := <packageName>
|
||||
}
|
||||
}
|
||||
|
||||
target {
|
||||
++ f : Folder {
|
||||
.name := <packageName>
|
||||
}
|
||||
}
|
||||
|
||||
correspondence {
|
||||
++ p <-:PackageToFolder-> f
|
||||
}
|
||||
}
|
||||
// forbid src(packageNameIsTaken)
|
||||
|
||||
pattern packageNameIsTaken {
|
||||
package : Package {
|
||||
.name : <packageName>
|
||||
}
|
||||
}
|
||||
|
||||
tripleRule SubToSubRule : JavaToDoc {
|
||||
source {
|
||||
p : Package {
|
||||
++ -subPackages->subP
|
||||
}
|
||||
++ subP : Package {
|
||||
.name := <packageName>
|
||||
}
|
||||
}
|
||||
|
||||
target {
|
||||
f : Folder {
|
||||
++ -subFolders->subF
|
||||
}
|
||||
++ subF : Folder {
|
||||
++ -docs->doc
|
||||
.name := <packageName>
|
||||
}
|
||||
++ doc : Doc {
|
||||
.name := <packageName>
|
||||
}
|
||||
}
|
||||
|
||||
correspondence {
|
||||
p <-:PackageToFolder-> f
|
||||
++ subP <-:PackageToFolder-> subF
|
||||
}
|
||||
}
|
||||
//forbid src(packageNameIsTaken)
|
|
@ -1,11 +0,0 @@
|
|||
metamodel SimpleDoc {
|
||||
Folder {
|
||||
.name : EString
|
||||
<+>-docs(0..*)-> Doc
|
||||
<+>-subFolders(0..*)-> Folder
|
||||
}
|
||||
|
||||
Doc {
|
||||
.name : EString
|
||||
}
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
metamodel SimpleJava {
|
||||
Package {
|
||||
.name : EString
|
||||
<+>-clazzes(0..*)-> Clazz
|
||||
<+>-subPackages(0..*)-> Package
|
||||
}
|
||||
|
||||
Clazz {
|
||||
.name : EString
|
||||
}
|
||||
}
|
||||
|
|
@ -1,123 +0,0 @@
|
|||
import "platform:/resource/JavaToDoc/src/metamodels/SimpleJava.msl"
|
||||
import "platform:/resource/JavaToDoc/src/metamodels/SimpleDoc.msl"
|
||||
|
||||
model moflon {
|
||||
|
||||
// Java
|
||||
orgC:Package {
|
||||
.name : "org"
|
||||
-subPackages->esC
|
||||
-corr->orgD {
|
||||
._type_ : "PackageToFolder"
|
||||
}
|
||||
}
|
||||
|
||||
esC:Package {
|
||||
.name : "es"
|
||||
-clazzes->EcoreUtilC
|
||||
-subPackages->emoflonC
|
||||
-subPackages->cmoflonC
|
||||
-corr->esD {
|
||||
._type_ : "PackageToFolder"
|
||||
}
|
||||
}
|
||||
|
||||
EcoreUtilC:Clazz {
|
||||
.name : "EcoreUtil"
|
||||
-corr->EcoreUtilD {
|
||||
._type_ : "ClazzToDoc"
|
||||
}
|
||||
}
|
||||
|
||||
emoflonC:Package {
|
||||
.name : "emoflon"
|
||||
-clazzes->TGGC
|
||||
-subPackages->ibexC
|
||||
-corr->emoflonD {
|
||||
._type_ : "PackageToFolder"
|
||||
}
|
||||
}
|
||||
|
||||
TGGC:Clazz {
|
||||
.name : "TGG"
|
||||
-corr->TGGD {
|
||||
._type_ : "ClazzToDoc"
|
||||
}
|
||||
}
|
||||
|
||||
ibexC:Package {
|
||||
.name : "ibex"
|
||||
-clazzes->IPMC
|
||||
-corr->ibexD {
|
||||
._type_ : "PackageToFolder"
|
||||
}
|
||||
}
|
||||
|
||||
IPMC:Clazz {
|
||||
.name : "IPM"
|
||||
-corr->IPMD {
|
||||
._type_ : "ClazzToDoc"
|
||||
}
|
||||
}
|
||||
|
||||
cmoflonC:Package {
|
||||
.name : "cmoflon"
|
||||
-clazzes->GTC
|
||||
-corr->cmoflonD {
|
||||
._type_ : "PackageToFolder"
|
||||
}
|
||||
}
|
||||
|
||||
GTC:Clazz {
|
||||
.name : "GT"
|
||||
-corr->GTD {
|
||||
._type_ : "ClazzToDoc"
|
||||
}
|
||||
}
|
||||
|
||||
// Doc
|
||||
orgD:Folder {
|
||||
.name : "org"
|
||||
-subFolders->esD
|
||||
}
|
||||
|
||||
esD:Folder {
|
||||
.name : "es"
|
||||
-docs->EcoreUtilD
|
||||
-subFolders->emoflonD
|
||||
-subFolders->cmoflonD
|
||||
}
|
||||
|
||||
EcoreUtilD:Doc {
|
||||
.name : "EcoreUtil"
|
||||
}
|
||||
|
||||
emoflonD:Folder {
|
||||
.name : "emoflon"
|
||||
-docs->TGGD
|
||||
-subFolders->ibexD
|
||||
}
|
||||
|
||||
TGGD:Doc {
|
||||
.name : "TGG"
|
||||
}
|
||||
|
||||
ibexD:Folder {
|
||||
.name : "ibex"
|
||||
-docs->IPMD
|
||||
}
|
||||
|
||||
IPMD:Doc {
|
||||
.name : "IPM"
|
||||
}
|
||||
|
||||
cmoflonD:Folder {
|
||||
.name : "cmoflon"
|
||||
-docs->GTD
|
||||
}
|
||||
|
||||
GTD:Doc {
|
||||
.name : "GT"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,287 +0,0 @@
|
|||
import "platform:/resource/JavaToDocSLE/src/metamodels/SimpleJavaSLE.msl"
|
||||
import "platform:/resource/JavaToDocSLE/src/metamodels/SimpleDocSLE.msl"
|
||||
|
||||
tripleGrammar JavaToDocSLE {
|
||||
source {
|
||||
SimpleJavaSLE
|
||||
}
|
||||
|
||||
target {
|
||||
SimpleDocSLE
|
||||
}
|
||||
|
||||
correspondence {
|
||||
Clazz <- ClazzToDoc -> Doc
|
||||
Method <- MethodToEntry -> Entry
|
||||
Parameter <- ParamToEntry -> Entry
|
||||
Field <- FieldToEntry -> Entry
|
||||
}
|
||||
|
||||
rules {
|
||||
ClazzToDocRule
|
||||
SubClazzToSubDocRule
|
||||
MethodToEntryRule
|
||||
AddParameterRule
|
||||
FieldToEntryRule
|
||||
AddGlossaryRule
|
||||
LinkGlossaryEntryRule
|
||||
AddGlossaryEntryRule
|
||||
}
|
||||
|
||||
constraints{
|
||||
// NoTwoGlossaries
|
||||
// NoDoubleGlossaryLink
|
||||
// NoTripleInheritance
|
||||
// NoEmptyDoc
|
||||
// SameHrefSameGlossaryEntry
|
||||
}
|
||||
}
|
||||
|
||||
tripleRule ClazzToDocRule : JavaToDocSLE {
|
||||
source {
|
||||
++ c : Clazz {
|
||||
.name := <clazzName>
|
||||
}
|
||||
}
|
||||
|
||||
target {
|
||||
++ d : Doc {
|
||||
.name := <clazzName>
|
||||
}
|
||||
}
|
||||
|
||||
correspondence {
|
||||
++ c <-:ClazzToDoc-> d
|
||||
}
|
||||
}
|
||||
|
||||
tripleRule SubClazzToSubDocRule : JavaToDocSLE {
|
||||
source {
|
||||
c : Clazz {
|
||||
++ -subTypes->sc
|
||||
}
|
||||
++ sc : Clazz {
|
||||
.name := <subClazzName>
|
||||
}
|
||||
}
|
||||
|
||||
target {
|
||||
d : Doc {
|
||||
++ -hrefs->sd
|
||||
}
|
||||
++ sd : Doc {
|
||||
.name := <subClazzName>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
correspondence {
|
||||
c <-:ClazzToDoc-> d
|
||||
++ sc <-:ClazzToDoc-> sd
|
||||
}
|
||||
}
|
||||
|
||||
tripleRule MethodToEntryRule : JavaToDocSLE {
|
||||
source {
|
||||
c : Clazz {
|
||||
++ -methods-> m
|
||||
}
|
||||
++ m : Method {
|
||||
.name := <methodName>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
target {
|
||||
d : Doc {
|
||||
++ -entries-> e
|
||||
}
|
||||
++ e : Entry {
|
||||
.name := <methodName>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
correspondence {
|
||||
c <-:ClazzToDoc-> d
|
||||
++ m <-:MethodToEntry-> e
|
||||
}
|
||||
}
|
||||
|
||||
tripleRule AddParameterRule : JavaToDocSLE {
|
||||
source {
|
||||
m : Method {
|
||||
.name : <entryName>
|
||||
++ -parameters-> p
|
||||
}
|
||||
++ p : Parameter {
|
||||
.name := <paramName>
|
||||
}
|
||||
}
|
||||
|
||||
target {
|
||||
e : Entry {
|
||||
.name : <entryName>
|
||||
}
|
||||
}
|
||||
|
||||
correspondence {
|
||||
m <-:MethodToEntry-> e
|
||||
++ p <-:ParamToEntry-> e
|
||||
}
|
||||
}
|
||||
|
||||
tripleRule FieldToEntryRule : JavaToDocSLE {
|
||||
source {
|
||||
c : Clazz {
|
||||
++ -fields-> f
|
||||
}
|
||||
++ f : Field {
|
||||
.name := <fieldName>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
target {
|
||||
d : Doc {
|
||||
++ -entries-> e
|
||||
}
|
||||
++ e : Entry {
|
||||
.name := <fieldName>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
correspondence {
|
||||
c <-:ClazzToDoc-> d
|
||||
++ f <-:FieldToEntry-> e
|
||||
}
|
||||
}
|
||||
|
||||
tripleRule AddGlossaryRule : JavaToDocSLE {
|
||||
source {
|
||||
|
||||
}
|
||||
|
||||
target {
|
||||
++ g : Glossary {
|
||||
.name := <glossaryName>
|
||||
}
|
||||
}
|
||||
|
||||
correspondence {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
tripleRule LinkGlossaryEntryRule : JavaToDocSLE {
|
||||
|
||||
source {
|
||||
|
||||
}
|
||||
|
||||
target {
|
||||
e : Entry {
|
||||
++ -gEntries-> ge
|
||||
}
|
||||
|
||||
ge : GlossaryEntry {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
correspondence {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
tripleRule AddGlossaryEntryRule : JavaToDocSLE {
|
||||
source {
|
||||
|
||||
}
|
||||
|
||||
target {
|
||||
g : Glossary {
|
||||
++ -gEntries-> ge
|
||||
}
|
||||
|
||||
++ ge : GlossaryEntry {
|
||||
.name := <glossaryEntryName>
|
||||
}
|
||||
}
|
||||
|
||||
correspondence {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//pattern TwoGlossaries {
|
||||
// g1 : Glossary
|
||||
// g2 : Glossary
|
||||
//}
|
||||
//
|
||||
//constraint NoTwoGlossaries = forbid TwoGlossaries
|
||||
//
|
||||
//pattern DoubleGlossaryLink {
|
||||
// ge : GlossaryEntry
|
||||
//
|
||||
// e : Entry {
|
||||
// -gEntries->ge
|
||||
// -gEntries->ge
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//constraint NoDoubleGlossaryLink = forbid DoubleGlossaryLink
|
||||
//
|
||||
//pattern TripleInheritance {
|
||||
// c1: Clazz {
|
||||
// -subTypes-> c2
|
||||
// }
|
||||
//
|
||||
// c2: Clazz {
|
||||
// -subTypes-> c3
|
||||
// }
|
||||
//
|
||||
// c3: Clazz
|
||||
//}
|
||||
//
|
||||
//constraint NoTripleInheritance = forbid TripleInheritance
|
||||
//
|
||||
//pattern ADoc {
|
||||
// d : Doc
|
||||
//}
|
||||
//
|
||||
//pattern DocHasEntry {
|
||||
// d : Doc {
|
||||
// -entries-> e
|
||||
// }
|
||||
//
|
||||
// e : Entry
|
||||
//}
|
||||
//
|
||||
//constraint NoEmptyDoc = if ADoc then DocHasEntry
|
||||
//
|
||||
//pattern EntriesWithSameHref {
|
||||
//
|
||||
// d : Doc {
|
||||
// -entries->e1
|
||||
// -entries->e2
|
||||
// }
|
||||
//
|
||||
// e1 : Entry
|
||||
// e2 : Entry
|
||||
//}
|
||||
//
|
||||
//pattern EntriesWithSameGlossaryEntry -> EntriesWithSameHref {
|
||||
// e1 : Entry {
|
||||
// -gEntries-> ge
|
||||
// }
|
||||
//
|
||||
// e2 : Entry {
|
||||
// -gEntries-> ge
|
||||
// }
|
||||
//
|
||||
// ge: GlossaryEntry
|
||||
//}
|
||||
//
|
||||
//constraint SameHrefSameGlossaryEntry = if EntriesWithSameHref then EntriesWithSameGlossaryEntry
|
|
@ -1,22 +0,0 @@
|
|||
metamodel SimpleDocSLE {
|
||||
Doc {
|
||||
.name : EString
|
||||
<+>-hrefs(0..*)-> Doc
|
||||
<+>-entries(0..*)-> Entry
|
||||
}
|
||||
|
||||
Entry {
|
||||
.name : EString
|
||||
<+>-gEntries(0..*)-> GlossaryEntry
|
||||
//-href(1..1)-> Doc
|
||||
}
|
||||
|
||||
GlossaryEntry {
|
||||
.name : EString
|
||||
}
|
||||
|
||||
Glossary {
|
||||
.name : EString
|
||||
<+>-gEntries(0..*)-> GlossaryEntry
|
||||
}
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
metamodel SimpleJavaSLE {
|
||||
Clazz {
|
||||
.name : EString
|
||||
<+>-subTypes(0..*)-> Clazz
|
||||
<+>-methods(0..*)-> Method
|
||||
<+>-fields(0..*)-> Field
|
||||
}
|
||||
|
||||
Method {
|
||||
.name : EString
|
||||
<+>-parameters(0..*)-> Parameter
|
||||
//-type(1..1)-> Clazz
|
||||
}
|
||||
|
||||
Field {
|
||||
.name : EString
|
||||
//-type(1..1)-> Clazz
|
||||
}
|
||||
|
||||
Parameter {
|
||||
.name : EString
|
||||
//-type(1..1)-> Clazz
|
||||
}
|
||||
}
|
||||
|
|
@ -1,134 +0,0 @@
|
|||
import "platform:/resource/JavaToDocSLE/src/metamodels/SimpleJavaSLE.msl"
|
||||
import "platform:/resource/JavaToDocSLE/src/metamodels/SimpleDocSLE.msl"
|
||||
|
||||
model moflon {
|
||||
|
||||
// Java
|
||||
C1:Clazz {
|
||||
.name : "C1"
|
||||
-fields-> f4b
|
||||
-fields-> f4
|
||||
-fields-> f5
|
||||
-fields-> f7
|
||||
-methods-> m6
|
||||
}
|
||||
|
||||
C2:Clazz {
|
||||
.name : "C2"
|
||||
-fields->f7
|
||||
-methods-> m8
|
||||
}
|
||||
|
||||
C3:Clazz {
|
||||
.name : "C3"
|
||||
-subTypes-> C2
|
||||
-fields-> f7
|
||||
}
|
||||
|
||||
f4b:Field {
|
||||
.name : "f4b"
|
||||
}
|
||||
|
||||
f4:Field {
|
||||
.name : "f4"
|
||||
}
|
||||
|
||||
f5:Field {
|
||||
.name : "f5"
|
||||
}
|
||||
|
||||
f7:Field {
|
||||
.name : "f7"
|
||||
}
|
||||
|
||||
m6:Method {
|
||||
.name : "m6"
|
||||
-parameters-> p9
|
||||
-parameters-> p10
|
||||
}
|
||||
|
||||
m8:Method {
|
||||
.name : "m8"
|
||||
-parameters-> p10
|
||||
-parameters-> p11
|
||||
}
|
||||
|
||||
p9:Parameter {
|
||||
.name : "p9"
|
||||
}
|
||||
|
||||
p10:Parameter {
|
||||
.name : "p10"
|
||||
}
|
||||
|
||||
p11:Parameter {
|
||||
.name : "p11"
|
||||
}
|
||||
|
||||
// Doc
|
||||
D1:Doc {
|
||||
.name : "D1"
|
||||
-entries-> e4f
|
||||
-entries-> e4
|
||||
-entries-> e5
|
||||
-entries-> e6
|
||||
-entries-> e7
|
||||
}
|
||||
|
||||
D2:Doc {
|
||||
.name : "D2"
|
||||
-entries-> e7
|
||||
-entries-> e8
|
||||
}
|
||||
|
||||
D3:Doc {
|
||||
.name : "D3"
|
||||
-hrefs-> D2
|
||||
-entries-> e7
|
||||
}
|
||||
|
||||
e4f:Entry {
|
||||
.name : "e4f"
|
||||
}
|
||||
|
||||
e4:Entry {
|
||||
.name : "e4"
|
||||
-gEntries-> ge12
|
||||
}
|
||||
|
||||
e5:Entry {
|
||||
.name : "e5"
|
||||
-gEntries-> ge12
|
||||
}
|
||||
|
||||
e6:Entry {
|
||||
.name : "e6"
|
||||
-gEntries-> ge12
|
||||
}
|
||||
|
||||
e7:Entry {
|
||||
.name : "e7"
|
||||
-gEntries-> ge12
|
||||
-gEntries-> ge13
|
||||
}
|
||||
|
||||
e8:Entry {
|
||||
.name : "e8"
|
||||
-gEntries-> ge13
|
||||
}
|
||||
|
||||
ge12:GlossaryEntry{
|
||||
.name : "ge12"
|
||||
}
|
||||
|
||||
ge13:GlossaryEntry{
|
||||
.name : "ge13"
|
||||
}
|
||||
|
||||
ge14:Glossary{
|
||||
.name : "ge14"
|
||||
-gEntries-> ge12
|
||||
-gEntries-> ge13
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in a new issue