Skip to content

Commit 834d52d

Browse files
author
David Baum
committed
remove WorkflowComponentWithConfig
1 parent 0d202d6 commit 834d52d

12 files changed

Lines changed: 51 additions & 69 deletions

File tree

generator/org.svis.generator.run/src/org/svis/generator/run/city/Famix2City2DB.mwe2

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
module org.svis.generator.run.city
22

33
var inputPath = "./input/famix"
4-
var configPath = "config.json"
54

65
Workflow {
76

@@ -34,7 +33,6 @@ Workflow {
3433

3534
component = org.svis.generator.famix.Famix2DB {
3635
modelSlot = 'metadata'
37-
config = configPath
3836
}
3937

4038
//transformation 2: from City to City

generator/org.svis.generator.run/src/org/svis/generator/run/db/Famix2DB.mwe2

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
module org.svis.generator.run.db
22

33
var path = "./input/famix"
4-
var configPath = "config.json"
54

65
Workflow {
76

@@ -24,13 +23,11 @@ Workflow {
2423
// delete unnecessary objects
2524
component = org.svis.generator.famix.Famix2Famix {
2625
modelSlot = "famix"
27-
config = configPath
2826
}
2927

3028
// transform famix into disks (s2m)
3129
component = org.svis.generator.rd.s2m.Famix2RD {
3230
modelSlot = "famix"
33-
config = configPath
3431
}
3532

3633
//transformation 1: from FAMIX to CITY
@@ -40,7 +37,6 @@ Workflow {
4037

4138
component = org.svis.generator.famix.Famix2DB {
4239
modelSlot = "famix"
43-
config = configPath
4440
}
4541

4642
// calculate rd layout (m2m)
@@ -50,7 +46,6 @@ Workflow {
5046

5147
component = org.svis.generator.rd.m2t.RD2DB {
5248
modelSlot = 'rdextended'
53-
config = configPath
5449
}
5550

5651
//transformation 2: from City to City
@@ -60,6 +55,5 @@ Workflow {
6055

6156
component = org.svis.generator.city.m2t.City2DB {
6257
modelSlot = 'CITYv2'
63-
config = configPath
6458
}
6559
}

generator/org.svis.generator.run/src/org/svis/generator/run/rd/Famix2RD2DB.mwe2

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
module org.svis.generator.run.rd
22

33
var path = "./input/famix"
4-
var configPath = "config.json"
54

65
Workflow {
76

@@ -24,18 +23,15 @@ Workflow {
2423
// delete unnecessary objects
2524
component = org.svis.generator.famix.Famix2Famix {
2625
modelSlot = "famix"
27-
config = configPath
2826
}
2927

3028
// transform famix into disks (s2m)
3129
component = org.svis.generator.rd.s2m.Famix2RD {
3230
modelSlot = "famix"
33-
config = configPath
3431
}
3532

3633
component = org.svis.generator.famix.Famix2DB {
3734
modelSlot = "famix"
38-
config = configPath
3935
}
4036

4137
// calculate rd layout (m2m)
@@ -45,6 +41,5 @@ Workflow {
4541

4642
component = org.svis.generator.rd.m2t.RD2DB {
4743
modelSlot = 'rdextended'
48-
config = configPath
4944
}
5045
}

generator/org.svis.generator/src/org/svis/generator/WorkflowComponentWithConfig.xtend

Lines changed: 0 additions & 26 deletions
This file was deleted.

generator/org.svis.generator/src/org/svis/generator/city/m2t/City2DB.xtend

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,21 @@ package org.svis.generator.city.m2t
22

33
import org.svis.lib.database.Database
44
import org.svis.xtext.city.District
5-
import org.svis.generator.WorkflowComponentWithConfig
65
import org.eclipse.emf.mwe.core.WorkflowContext
76
import org.eclipse.emf.mwe.core.monitor.ProgressMonitor
87
import org.eclipse.emf.mwe.core.issues.Issues
98
import org.neo4j.graphdb.GraphDatabaseService
109
import org.svis.xtext.city.Root
1110
import org.neo4j.graphdb.ConstraintViolationException
1211
import org.svis.lib.database.DBConnector
12+
import org.eclipse.emf.mwe.core.lib.WorkflowComponentWithModelSlot
13+
import org.apache.commons.logging.LogFactory
14+
import org.svis.generator.SettingsConfiguration
1315

14-
class City2DB extends WorkflowComponentWithConfig {
15-
16+
class City2DB extends WorkflowComponentWithModelSlot {
17+
18+
val config = SettingsConfiguration.instance
19+
val log = LogFactory::getLog(class)
1620
var GraphDatabaseService graphDb
1721
var DBConnector dbconnector
1822

@@ -22,7 +26,7 @@ class City2DB extends WorkflowComponentWithConfig {
2226
dbconnector = new DBConnector(graphDb)
2327
val resource = (ctx.get("CITYv2writer") as Root).document
2428
val tx = graphDb.beginTx
25-
val configSnapshotId = config.snapshotID
29+
val configSnapshotId = ""//config.snapshotID
2630
try {
2731
dbconnector.createCityNode(configSnapshotId)
2832
resource.entities.filter(District).filter[level == 1].forEach[dbconnector.addToDB(it)]

generator/org.svis.generator/src/org/svis/generator/famix/Famix2DB.xtend

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import org.svis.xtext.famix.FAMIXMethod
88
import org.svis.xtext.famix.FAMIXAttribute
99
import org.svis.xtext.famix.FAMIXEnumValue
1010
import org.neo4j.graphdb.ConstraintViolationException
11-
import org.svis.generator.WorkflowComponentWithConfig
1211
import org.eclipse.emf.mwe.core.WorkflowContext
1312
import org.eclipse.emf.mwe.core.monitor.ProgressMonitor
1413
import org.eclipse.emf.mwe.core.issues.Issues
@@ -20,8 +19,13 @@ import org.svis.lib.database.Database
2019
import org.neo4j.graphdb.GraphDatabaseService
2120
import java.util.Map
2221
import org.svis.lib.database.DBConnector
22+
import org.eclipse.emf.mwe.core.lib.WorkflowComponentWithModelSlot
23+
import org.svis.generator.SettingsConfiguration
24+
import org.apache.commons.logging.LogFactory
2325

24-
class Famix2DB extends WorkflowComponentWithConfig {
26+
class Famix2DB extends WorkflowComponentWithModelSlot {
27+
val config = SettingsConfiguration.instance
28+
val log = LogFactory::getLog(class)
2529
var GraphDatabaseService graphDb
2630
var DBConnector dbconnector
2731
var Node rootNode
@@ -76,12 +80,12 @@ class Famix2DB extends WorkflowComponentWithConfig {
7680
val Map<String, String> nodeProperties = newHashMap
7781
nodeProperties.put("repositoryName", config.repositoryName)
7882
nodeProperties.put("repositoryOwner", config.repositoryOwner)
79-
nodeProperties.put("systemId", config.systemID)
80-
nodeProperties.put("repositoryUrl", config.repositoryUrl)
81-
nodeProperties.put("language", config.language)
82-
nodeProperties.put("commitOrder", config.commitOrder.toString)
83-
nodeProperties.put("snapshotId", config.snapshotID)
84-
nodeProperties.put("commit" , config.commit)
83+
//nodeProperties.put("systemId", config.systemID)
84+
//nodeProperties.put("repositoryUrl", config.repositoryUrl)
85+
//nodeProperties.put("language", config.language)
86+
//nodeProperties.put("commitOrder", config.commitOrder.toString)
87+
//nodeProperties.put("snapshotId", config.snapshotID)
88+
//nodeProperties.put("commit" , config.commit)
8589
return nodeProperties
8690
}
8791

generator/org.svis.generator/src/org/svis/generator/multisphere/m2m/Graph2MultiSphere.xtend

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ import org.svis.xtext.graph.Edge
1010
import org.svis.xtext.graph.Model
1111
import org.svis.xtext.graph.Node
1212
import org.svis.xtext.graph.impl.GraphFactoryImpl
13-
import org.svis.generator.WorkflowComponentWithConfig
13+
import org.eclipse.emf.mwe.core.lib.WorkflowComponentWithModelSlot
14+
import org.apache.commons.logging.LogFactory
1415

15-
class Graph2MultiSphere extends WorkflowComponentWithConfig {
16-
16+
class Graph2MultiSphere extends WorkflowComponentWithModelSlot {
17+
//val config = SettingsConfiguration.instance
18+
val log = LogFactory::getLog(class)
1719
var Model graphRoot
1820
var myGraphFactory = new GraphFactoryImpl
1921

generator/org.svis.generator/src/org/svis/generator/multisphere/m2m/Graph2MultiSphereBU.xtend

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ import org.eclipse.emf.mwe.core.monitor.ProgressMonitor
88
import org.svis.xtext.graph.Model
99
import org.svis.xtext.graph.Node
1010
import org.svis.xtext.graph.impl.GraphFactoryImpl
11-
import org.svis.generator.WorkflowComponentWithConfig
11+
import org.eclipse.emf.mwe.core.lib.WorkflowComponentWithModelSlot
12+
import org.apache.commons.logging.LogFactory
1213

13-
class Graph2MultiSphereBU extends WorkflowComponentWithConfig {
14-
14+
class Graph2MultiSphereBU extends WorkflowComponentWithModelSlot {
15+
//val config = SettingsConfiguration.instance
16+
val log = LogFactory::getLog(class)
1517
var Model graphRoot
1618
var myGraphFactory = new GraphFactoryImpl
1719

generator/org.svis.generator/src/org/svis/generator/multisphere/m2m/Graph2MultiSphereRings.xtend

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ import org.abego.treelayout.util.DefaultTreeForTreeLayout
1717
import org.abego.treelayout.util.DefaultConfiguration
1818
import org.abego.treelayout.util.FixedNodeExtentProvider
1919
import org.abego.treelayout.TreeLayout
20-
import org.svis.generator.WorkflowComponentWithConfig
20+
import org.eclipse.emf.mwe.core.lib.WorkflowComponentWithModelSlot
21+
import org.apache.commons.logging.LogFactory
2122

22-
class Graph2MultiSphereRings extends WorkflowComponentWithConfig {
23-
23+
class Graph2MultiSphereRings extends WorkflowComponentWithModelSlot {
24+
//val config = SettingsConfiguration.instance
25+
val log = LogFactory::getLog(class)
2426
var Model graphRoot
2527
var myGraphFactory = new GraphFactoryImpl
2628

generator/org.svis.generator/src/org/svis/generator/multisphere/m2m/Graph2MultiSphereTD.xtend

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ import org.eclipse.emf.mwe.core.monitor.ProgressMonitor
88
import org.svis.xtext.graph.Model
99
import org.svis.xtext.graph.Node
1010
import org.svis.xtext.graph.impl.GraphFactoryImpl
11-
import org.svis.generator.WorkflowComponentWithConfig
11+
import org.eclipse.emf.mwe.core.lib.WorkflowComponentWithModelSlot
12+
import org.apache.commons.logging.LogFactory
1213

13-
class Graph2MultiSphereTD extends WorkflowComponentWithConfig {
14-
14+
class Graph2MultiSphereTD extends WorkflowComponentWithModelSlot{
15+
//val config = SettingsConfiguration.instance
16+
val log = LogFactory::getLog(class)
1517
var Model graphRoot
1618
var myGraphFactory = new GraphFactoryImpl
1719

0 commit comments

Comments
 (0)