|
a/src/main/java/net/timbusproject/extractors/modules/tavernaextractor/TavernaExtractorOSGi.java |
|
b/src/main/java/net/timbusproject/extractors/modules/tavernaextractor/TavernaExtractorOSGi.java |
|
... |
|
... |
4 |
import net.timbusproject.extractors.modules.tavernaextractor.utils.SSHManager;
|
4 |
import net.timbusproject.extractors.modules.tavernaextractor.utils.SSHManager;
|
5 |
import org.osgi.framework.BundleContext;
|
5 |
import org.osgi.framework.BundleContext;
|
6 |
import org.osgi.framework.Version;
|
6 |
import org.osgi.framework.Version;
|
7 |
import org.slf4j.Logger;
|
7 |
import org.slf4j.Logger;
|
8 |
import org.slf4j.LoggerFactory;
|
8 |
import org.slf4j.LoggerFactory;
|
|
|
9 |
|
9 |
import org.springframework.beans.factory.annotation.Autowired;
|
10 |
import org.springframework.beans.factory.annotation.Autowired;
|
10 |
|
11 |
|
11 |
import java.nio.file.Paths;
|
12 |
import java.nio.file.Paths;
|
12 |
import java.util.EnumSet;
|
13 |
import java.util.EnumSet;
|
13 |
import java.util.HashMap;
|
14 |
import java.util.HashMap;
|
|
... |
|
... |
16 |
* munterberger@sba-research.org
|
17 |
* munterberger@sba-research.org
|
17 |
*/
|
18 |
*/
|
18 |
public class TavernaExtractorOSGi implements IExtractor{
|
19 |
public class TavernaExtractorOSGi implements IExtractor{
|
19 |
|
20 |
|
20 |
private Logger LOGGER = LoggerFactory.getLogger(TavernaExtractorOSGi.class);
|
21 |
private Logger LOGGER = LoggerFactory.getLogger(TavernaExtractorOSGi.class);
|
21 |
|
|
|
22 |
public TavernaExtractorOSGi() {}
|
22 |
public TavernaExtractorOSGi() {}
|
23 |
|
23 |
|
24 |
@Autowired
|
24 |
@Autowired
|
25 |
private BundleContext bundleContext;
|
25 |
private BundleContext bundleContext;
|
26 |
|
26 |
|
|
... |
|
... |
75 |
TavernaExtractor.setTavernaHome(Paths.get(tavernaHome));
|
75 |
TavernaExtractor.setTavernaHome(Paths.get(tavernaHome));
|
76 |
TavernaExtractor.setArchimateOutputPath(Paths.get(archimateOutputPath));
|
76 |
TavernaExtractor.setArchimateOutputPath(Paths.get(archimateOutputPath));
|
77 |
TavernaExtractor.setInputFileName(Paths.get(inputFileName));
|
77 |
TavernaExtractor.setInputFileName(Paths.get(inputFileName));
|
78 |
|
78 |
|
79 |
// starts the execution
|
79 |
// starts the execution
|
80 |
extractor.process();
|
80 |
extractor.process(true); //true = remote execution
|
81 |
|
81 |
|
82 |
return "Result is available at "+archimateOutputPath;
|
82 |
return "Result is available at "+archimateOutputPath;
|
83 |
}
|
83 |
}
|
84 |
}
|
84 |
}
|