You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ri...@apache.org on 2022/04/21 21:15:08 UTC
[incubator-streampipes] 04/04: [hotfix] Remove code generation module
This is an automated email from the ASF dual-hosted git repository.
riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit 3359f8f0d5bb777c7e6edfb108e039abaee9a96e
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Thu Apr 21 23:09:55 2022 +0200
[hotfix] Remove code generation module
---
pom.xml | 1 -
streampipes-code-generation/pom.xml | 82 ------------
.../codegeneration/ControllerGenerator.java | 144 ---------------------
.../streampipes/codegeneration/Generator.java | 65 ----------
.../codegeneration/api/CodeGenerator.java | 55 --------
.../codegeneration/api/IDeclareModelGenerator.java | 27 ----
.../api/ImplementationCodeGenerator.java | 86 ------------
.../declarer/DeclareModelGenerator.java | 21 ---
.../codegeneration/flink/ConfigGenerator.java | 59 ---------
.../codegeneration/flink/FlinkCodeGenerator.java | 72 -----------
.../codegeneration/flink/InitGenerator.java | 64 ---------
.../codegeneration/flink/XmlGenerator.java | 46 -------
.../flink/sec/FlinkSecCodeGenerator.java | 50 -------
.../flink/sec/FlinkSecControllerGenerator.java | 82 ------------
.../flink/sec/FlinkSecProgramGenerator.java | 64 ---------
.../flink/sepa/FlinkSepaCodeGenerator.java | 59 ---------
.../flink/sepa/FlinkSepaControllerGenerator.java | 110 ----------------
.../flink/sepa/FlinkSepaProgramGenerator.java | 65 ----------
.../flink/sepa/ImplementationGenerator.java | 61 ---------
.../flink/sepa/ParametersGenerator.java | 83 ------------
.../codegeneration/utils/DirectoryBuilder.java | 51 --------
.../streampipes/codegeneration/utils/JFC.java | 98 --------------
.../streampipes/codegeneration/utils/Utils.java | 121 -----------------
streampipes-code-generation/src/main/resources/pom | 59 ---------
streampipes-code-generation/src/main/resources/web | 20 ---
.../streampipes/codegeneration/AllTests.java | 27 ----
.../codegeneration/ControllerGeneratorTest.java | 122 -----------------
.../streampipes/codegeneration/TestDeployment.java | 49 -------
.../codegeneration/api/CodeGeneratorTest.java | 32 -----
.../codegeneration/flink/ConfigGeneratorTest.java | 31 -----
.../codegeneration/flink/InitGeneratorTest.java | 33 -----
.../flink/sec/FlinkSecCodeGeneratorTest.java | 33 -----
.../flink/sec/FlinkSecControllerGeneratorTest.java | 65 ----------
.../flink/sec/FlinkSecProgramGeneratorTest.java | 34 -----
.../flink/sepa/FlinkSepaCodeGeneratorTest.java | 33 -----
.../sepa/FlinkSepaControllerGeneratorTest.java | 70 ----------
.../flink/sepa/FlinkSepaProgramGeneratorTest.java | 30 -----
.../flink/sepa/ImplementationGeneratorTest.java | 30 -----
.../flink/sepa/ParametersGeneratorTest.java | 51 --------
.../codegeneration/utils/DirectoryBuilderTest.java | 57 --------
.../streampipes/codegeneration/utils/TV.java | 98 --------------
.../codegeneration/utils/UtilsTest.java | 81 ------------
.../manager/generation/CodeGenerationManager.java | 41 ------
43 files changed, 2562 deletions(-)
diff --git a/pom.xml b/pom.xml
index 566b61f64..97a05bdd9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -894,7 +894,6 @@ IoT data streams.
<module>archetypes/streampipes-archetype-pe-processors-flink</module>
<module>streampipes-backend</module>
<module>streampipes-client</module>
- <module>streampipes-code-generation</module>
<module>streampipes-commons</module>
<module>streampipes-config</module>
<module>streampipes-connect</module>
diff --git a/streampipes-code-generation/pom.xml b/streampipes-code-generation/pom.xml
deleted file mode 100644
index 1d815a513..000000000
--- a/streampipes-code-generation/pom.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- ~
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.streampipes</groupId>
- <artifactId>streampipes-parent</artifactId>
- <version>0.70.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>streampipes-code-generation</artifactId>
- <packaging>jar</packaging>
-
- <name>StreamPipes Code Generation Module</name>
- <url>http://maven.apache.org</url>
-
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- </properties>
-
- <dependencies>
- <!-- StreamPipes dependencies -->
- <dependency>
- <groupId>org.apache.streampipes</groupId>
- <artifactId>streampipes-container-standalone</artifactId>
- <version>0.70.0-SNAPSHOT</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.streampipes</groupId>
- <artifactId>streampipes-model-client</artifactId>
- <version>0.70.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.streampipes</groupId>
- <artifactId>streampipes-sdk</artifactId>
- <version>0.70.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.streampipes</groupId>
- <artifactId>streampipes-serializers-json</artifactId>
- <version>0.70.0-SNAPSHOT</version>
- </dependency>
-
- <!-- External dependencies -->
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- </dependency>
- <dependency>
- <groupId>com.squareup</groupId>
- <artifactId>javapoet</artifactId>
- </dependency>
-
- <!-- Test dependencies -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
diff --git a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/ControllerGenerator.java b/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/ControllerGenerator.java
deleted file mode 100644
index 27a842d01..000000000
--- a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/ControllerGenerator.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration;
-
-import com.squareup.javapoet.ClassName;
-import com.squareup.javapoet.MethodSpec;
-import com.squareup.javapoet.MethodSpec.Builder;
-import org.apache.streampipes.codegeneration.utils.JFC;
-import org.apache.streampipes.model.SpDataStream;
-import org.apache.streampipes.model.base.ConsumableStreamPipesEntity;
-import org.apache.streampipes.model.graph.DataProcessorDescription;
-import org.apache.streampipes.model.grounding.EventGrounding;
-import org.apache.streampipes.model.output.AppendOutputStrategy;
-import org.apache.streampipes.model.output.CustomOutputStrategy;
-import org.apache.streampipes.model.output.OutputStrategy;
-import org.apache.streampipes.model.schema.EventProperty;
-
-import java.util.List;
-
-import javax.lang.model.element.Modifier;
-
-public abstract class ControllerGenerator extends Generator {
- public ControllerGenerator(ConsumableStreamPipesEntity element, String name, String packageName) {
- super(element, name, packageName);
- }
-
- public Builder getEventStream(Builder b, SpDataStream spDataStream, int n) {
- b = getEventProperties(b, spDataStream.getEventSchema().getEventProperties(), n);
- b.addStatement(
- "$T stream$L = $T.createStream($S, $S, $S).schema($T.create().properties(eventProperties$L).build()).build()",
- JFC.EVENT_STREAM, n, JFC.STREAM_BUILDER, spDataStream.getName(), spDataStream.getDescription(),
- spDataStream.getUri(), JFC.SCHEMA_BUILDER, n);
-
- return b;
- }
-
- public Builder getEventProperties(Builder b, List<EventProperty> eventProperties, int n) {
- b.addStatement("$T<$T> eventProperties$L = new $T<$T>()", JFC.LIST, JFC.EVENT_PROPERTY, n, JFC.ARRAY_LIST,
- JFC.EVENT_PROPERTY);
-
- for (int i = 0; i < eventProperties.size(); i++) {
- // TODO check for type
- if (eventProperties.get(i).getDomainProperties() != null && eventProperties.get(i).getDomainProperties().size() > 0) {
-// b.addStatement("$T e$L = $T.createPropertyRestriction($S).build()", JFC.EVENT_PROPERTY, i,
-// JFC.PRIMITIVE_PROPERTY_BUILDER, eventProperties.get(i).getDomainProperties().get(0));
- b.addStatement("eventProperties$L.add(e$L)", n, i);
- }
- }
-
- return b;
- }
-
- public Builder getCustomOutputStrategy(Builder b, CustomOutputStrategy cos, int n) {
- b.addStatement("$T outputStrategy$L = new $T()", JFC.APPEND_OUTPUT_STRATEGY, n, JFC.APPEND_OUTPUT_STRATEGY);
-
- return b;
- }
-
- public Builder getAppendOutputStrategy(Builder b, AppendOutputStrategy aos, int n) {
- b.addStatement("$T outputStrategy$L = new $T()", JFC.APPEND_OUTPUT_STRATEGY, n, JFC.APPEND_OUTPUT_STRATEGY);
- b.addStatement("$T<$T> appendProperties = new $T<$T>()", JFC.LIST, JFC.EVENT_PROPERTY, JFC.ARRAY_LIST,
- JFC.EVENT_PROPERTY);
-
- for (EventProperty ep : aos.getEventProperties()) {
- // TODO
- b.addStatement("appendProperties.add($T.stringEp($S, $S))", JFC.EP_PROPERTIES, ep.getRuntimeName(),
- ep.getDomainProperties().get(0).toString());
- }
-
- b.addStatement("outputStrategy$L.setEventProperties(appendProperties)", n);
-
- return b;
- }
-
- public Builder getOutputStrategies(Builder b, List<OutputStrategy> outputStrategies) {
- b.addStatement("$T<$T> strategies = new $T<$T>()", JFC.LIST, JFC.OUTPUT_STRATEGY, JFC.ARRAY_LIST,
- JFC.OUTPUT_STRATEGY);
- for (int i = 0; i < outputStrategies.size(); i++) {
- OutputStrategy outputStrategy = outputStrategies.get(i);
- if (outputStrategy instanceof AppendOutputStrategy) {
- b = getAppendOutputStrategy(b, (AppendOutputStrategy) outputStrategy, i);
- } else if (outputStrategy instanceof CustomOutputStrategy) {
- b = getCustomOutputStrategy(b, (CustomOutputStrategy) outputStrategy, i);
- } else {
- // TODO add implementation for the other strategies
- try {
- throw new Exception("Not yet Implemented");
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- b.addStatement("strategies.add(outputStrategy$L)", i);
- }
-
- return b;
- }
-
- public Builder getSupportedGrounding(Builder b, EventGrounding grounding) {
- return b.addStatement("desc.setSupportedGrounding($T.getSupportedGrounding())", JFC.STANDARD_TRANSPORT_FORMAT);
- }
-
- public Builder getDeclareModelCode(ClassName desc) {
- Builder b = MethodSpec.methodBuilder("declareModel").addModifiers(Modifier.PUBLIC).addAnnotation(Override.class)
- .returns(desc);
-
- b.addStatement("$T desc = new $T($S, $S, $S)", desc, desc, element.getUri(),
- element.getName(), element.getDescription());
-
- for (int i = 0; i < element.getSpDataStreams().size(); i++) {
- // TODO
- b = getEventStream(b, element.getSpDataStreams().get(i), i);
- b.addStatement("desc.addEventStream(stream$L)", i);
- }
-
- //TODO find better solution
- if (element instanceof DataProcessorDescription) {
- b = getOutputStrategies(b, ((DataProcessorDescription) element).getOutputStrategies());
- b.addStatement("desc.setOutputStrategies(strategies)");
- }
-
- b = getSupportedGrounding(b, element.getSupportedGrounding());
-
- b.addStatement("return desc");
-
- return b;
- }
-}
\ No newline at end of file
diff --git a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/Generator.java b/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/Generator.java
deleted file mode 100644
index 5617115e4..000000000
--- a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/Generator.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration;
-
-import com.squareup.javapoet.JavaFile;
-
-import org.apache.streampipes.model.base.ConsumableStreamPipesEntity;
-
-public abstract class Generator {
- protected String name;
- protected String packageName;
- protected ConsumableStreamPipesEntity element;
-
- public Generator(ConsumableStreamPipesEntity element, String name, String packageName) {
- super();
- this.element = element;
- this.name = name;
- this.packageName = packageName;
- }
-
- public abstract JavaFile build();
-
- public ConsumableStreamPipesEntity getElement() {
- return element;
- }
-
- public void setElement(ConsumableStreamPipesEntity element) {
- this.element = element;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getPackageName() {
- return packageName;
- }
-
- public void setPackageName(String packageName) {
- this.packageName = packageName;
- }
-
-
-
-}
diff --git a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/api/CodeGenerator.java b/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/api/CodeGenerator.java
deleted file mode 100644
index 8bb3fa8f2..000000000
--- a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/api/CodeGenerator.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.api;
-
-import org.apache.streampipes.model.base.ConsumableStreamPipesEntity;
-import org.apache.streampipes.model.base.NamedStreamPipesEntity;
-import org.apache.streampipes.model.client.deployment.DeploymentConfiguration;
-import org.apache.streampipes.model.client.deployment.OutputType;
-import org.apache.streampipes.model.client.deployment.RuntimeType;
-import org.apache.streampipes.model.graph.DataProcessorDescription;
-import org.apache.streampipes.codegeneration.flink.sepa.FlinkSepaCodeGenerator;
-
-public abstract class CodeGenerator {
- protected ConsumableStreamPipesEntity element;
- protected DeploymentConfiguration config;
-
- public CodeGenerator(DeploymentConfiguration config, ConsumableStreamPipesEntity element) {
- this.config = config;
- this.element = element;
- }
-
- public static ImplementationCodeGenerator getCodeGenerator(DeploymentConfiguration config, NamedStreamPipesEntity element) {
-
- if (config.getOutputType() == OutputType.IMPLEMENTATION) {
- if (config.getRuntimeType() == RuntimeType.FLINK) {
- if (element instanceof DataProcessorDescription) {
- return new FlinkSepaCodeGenerator(config, (DataProcessorDescription) element, isStandalone(config));
- }
- }
- } else if (config.getOutputType() == OutputType.DESCRIPTION) {
- return new FlinkSepaCodeGenerator(config, (DataProcessorDescription) element, isStandalone(config));
- }
- return null;
- }
-
- private static boolean isStandalone(DeploymentConfiguration config) {
- return config.getOutputType() == OutputType.IMPLEMENTATION;
- }
-}
diff --git a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/api/IDeclareModelGenerator.java b/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/api/IDeclareModelGenerator.java
deleted file mode 100644
index 3d64b1ea1..000000000
--- a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/api/IDeclareModelGenerator.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.streampipes.codegeneration.api;
-
-import com.squareup.javapoet.MethodSpec.Builder;
-
-public class IDeclareModelGenerator {
-
- Builder outputStrategies() {
- return null;
- }
-}
diff --git a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/api/ImplementationCodeGenerator.java b/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/api/ImplementationCodeGenerator.java
deleted file mode 100644
index ad39cfe2a..000000000
--- a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/api/ImplementationCodeGenerator.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.api;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.lang3.RandomStringUtils;
-import org.apache.streampipes.commons.zip.ZipFileGenerator;
-import org.apache.streampipes.model.base.ConsumableStreamPipesEntity;
-import org.apache.streampipes.model.client.deployment.DeploymentConfiguration;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Date;
-
-public abstract class ImplementationCodeGenerator extends CodeGenerator {
-
- protected String tempFolder;
-
- public ImplementationCodeGenerator(DeploymentConfiguration config, ConsumableStreamPipesEntity element) {
- super(config, element);
- this.tempFolder = RandomStringUtils.randomAlphabetic(8) + config.getArtifactId();
- }
-
- public File createProject() {
- createFolder(getTempDir());
- create();
- File result = toZip();
- deleteFolder(getTempDir());
- return result;
- }
-
- private void createFolder(String folder) {
- File file = new File(folder);
- file.mkdir();
- }
-
- private void deleteFolder(String folder) {
- try {
- FileUtils.deleteDirectory(new File(folder));
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- //TODO change this
- public File getGeneratedFile() {
- return createProject();
- }
-
- protected abstract void create();
-
- protected abstract void createDirectoryStructure();
-
- public abstract String getDeclareModel();
-
- protected String getTempDir() {
- return System.getProperty("user.home") + File.separator +".streampipes" +File.separator + tempFolder + File.separator;
- }
-
- protected File toZip() {
- String generatedProjects = System.getProperty("user.home") + File.separator +".streampipes" +File.separator + "generated_projects"
- + File.separator;
- createFolder(generatedProjects);
-
- String zipFolder = generatedProjects + new Date().getTime() + "_";
- File outputFile = new File(zipFolder + config.getArtifactId() + ".zip");
- new ZipFileGenerator(new File(getTempDir()), outputFile).makeZipToFile();
- return outputFile;
- }
-}
diff --git a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/declarer/DeclareModelGenerator.java b/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/declarer/DeclareModelGenerator.java
deleted file mode 100644
index 2608d557d..000000000
--- a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/declarer/DeclareModelGenerator.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.streampipes.codegeneration.declarer;
-
-public class DeclareModelGenerator {
-}
diff --git a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/ConfigGenerator.java b/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/ConfigGenerator.java
deleted file mode 100644
index b63f1f0f4..000000000
--- a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/ConfigGenerator.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.flink;
-
-import com.squareup.javapoet.FieldSpec;
-import com.squareup.javapoet.JavaFile;
-import com.squareup.javapoet.TypeSpec;
-import org.apache.streampipes.model.base.ConsumableStreamPipesEntity;
-import org.apache.streampipes.codegeneration.Generator;
-import org.apache.streampipes.codegeneration.utils.JFC;
-
-import javax.lang.model.element.Modifier;
-
-public class ConfigGenerator extends Generator {
-
- public ConfigGenerator(ConsumableStreamPipesEntity sepa, String name, String packageName) {
- super(sepa, name, packageName);
- }
-
- @Override
- public JavaFile build() {
- FieldSpec jar = FieldSpec.builder(JFC.STRING, "JAR_FILE")
- .addModifiers(Modifier.PUBLIC, Modifier.FINAL, Modifier.STATIC)
- .initializer("$S" , "./" + name + "-0.66.0.jar")
- .build();
-
- FieldSpec flinkHost = FieldSpec.builder(JFC.STRING, "FLINK_HOST")
- .addModifiers(Modifier.PUBLIC, Modifier.FINAL, Modifier.STATIC)
-// .initializer("$T.INSTANCE.getFlinkHost()", JFC.CLIENT_CONFIGURATION)
- .build();
-
- FieldSpec flinkPort = FieldSpec.builder(int.class, "FLINK_PORT")
- .addModifiers(Modifier.PUBLIC, Modifier.FINAL, Modifier.STATIC)
-// .initializer("$T.INSTANCE.getFlinkPort()", JFC.CLIENT_CONFIGURATION)
- .build();
-
- TypeSpec parameterClass = TypeSpec.classBuilder("Config").addModifiers(Modifier.PUBLIC)
- .addField(jar).addField(flinkHost).addField(flinkPort).build();
-
- return JavaFile.builder(packageName, parameterClass).build();
- }
-
-}
diff --git a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/FlinkCodeGenerator.java b/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/FlinkCodeGenerator.java
deleted file mode 100644
index a85a2694c..000000000
--- a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/FlinkCodeGenerator.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.flink;
-
-import org.apache.streampipes.model.base.ConsumableStreamPipesEntity;
-import org.apache.streampipes.model.client.deployment.DeploymentConfiguration;
-import org.apache.streampipes.codegeneration.api.ImplementationCodeGenerator;
-import org.apache.streampipes.codegeneration.flink.sepa.FlinkSepaControllerGenerator;
-import org.apache.streampipes.codegeneration.utils.DirectoryBuilder;
-import org.apache.streampipes.codegeneration.utils.JFC;
-
-import java.io.File;
-
-public abstract class FlinkCodeGenerator extends ImplementationCodeGenerator {
- protected String packageName;
- protected String name;
- protected String version;
- protected String port;
-
- protected String src;
- protected String webInf;
-
- public FlinkCodeGenerator(DeploymentConfiguration config, ConsumableStreamPipesEntity element) {
- super(config, element);
- packageName = config.getGroupId() + "." + config.getArtifactId();
- name = config.getClassNamePrefix();
- version = "0.66.0";
- port = Integer.toString(config.getPort());
-
- src = getTempDir() + "src" + File.separator + "main" + File.separator + "java" + File.separator;
- webInf = getTempDir() + "src" + File.separator + "main" + File.separator + "webapp" + File.separator + "WEB-INF" + File.separator;
-
- }
-
- @Override
- protected void createDirectoryStructure() {
- String r = getTempDir();
- String dirs[] = {r + "target/", src, r + "src/api/resources/", r + "src/test/", webInf};
-
- boolean success = DirectoryBuilder.createDirectories(dirs);
-
- if (!success) {
- try {
- throw new Exception("Couldn't create folder structure");
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
-
- @Override
- public String getDeclareModel() {
- return new FlinkSepaControllerGenerator(element, name, packageName).getDeclareModelCode(JFC.SEPA_DESCRIPTION).build().toString();
- }
-
-}
diff --git a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/InitGenerator.java b/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/InitGenerator.java
deleted file mode 100644
index ffbe78f44..000000000
--- a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/InitGenerator.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.flink;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.lang.model.element.Modifier;
-
-import com.squareup.javapoet.*;
-import com.squareup.javapoet.MethodSpec.Builder;
-
-import org.apache.streampipes.model.base.ConsumableStreamPipesEntity;
-import org.apache.streampipes.codegeneration.Generator;
-import org.apache.streampipes.codegeneration.utils.JFC;
-
-public class InitGenerator extends Generator {
-
- private boolean standalone;
- public InitGenerator(ConsumableStreamPipesEntity sepa, String name, String packageName, boolean standalone) {
- super(sepa, name, packageName);
-
- this.standalone = standalone;
- }
-
- @Override
- public JavaFile build() {
- List<ClassName> controllers = new ArrayList<>();
- controllers.add(ClassName.get("", name + "Controller"));
-
- TypeSpec controllerClass = TypeSpec.classBuilder(name + "Init").addModifiers(Modifier.PUBLIC)
- .superclass(JFC.CONTAINER_MODEL_SUBMITTER).addMethod(getInit(controllers))
- .build();
- return JavaFile.builder(packageName, controllerClass).build();
- }
-
- private MethodSpec getInit(List<ClassName> controllers) {
- Builder b = MethodSpec.methodBuilder("init").addAnnotation(Override.class).returns(TypeName.VOID)
- .addModifiers(Modifier.PUBLIC);
- b.addStatement("$T.getInstance().setRoute($S)", JFC.DECLARERS_SINGLETON, name.toLowerCase());
- for (ClassName cn : controllers) {
- b.addStatement("$T.getInstance().add(new $S())", JFC.DECLARERS_SINGLETON, cn);
- }
-
- return b.build();
- }
-
-}
diff --git a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/XmlGenerator.java b/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/XmlGenerator.java
deleted file mode 100644
index 44156f8fc..000000000
--- a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/XmlGenerator.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.flink;
-
-import org.apache.streampipes.codegeneration.utils.Utils;
-
-public class XmlGenerator {
- private String name;
- private String packageName;
- private String version;
-
- public XmlGenerator(String name, String packageName, String version) {
- this.name = name;
- this.packageName = packageName;
- this.version = version;
- }
-
- public String getPomFile(boolean standalone) {
- String pom = Utils.readResourceFile("pom");
- pom = pom.replaceAll("####name####", name.toLowerCase());
- pom = pom.replaceAll("####version####", version);
- return pom;
- }
-
- public String getWebXmlFile() {
- String webXml = Utils.readResourceFile("web");
- webXml = webXml.replace("####name####", packageName + ".Init");
- return webXml;
- }
-}
diff --git a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/sec/FlinkSecCodeGenerator.java b/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/sec/FlinkSecCodeGenerator.java
deleted file mode 100644
index 2fe198506..000000000
--- a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/sec/FlinkSecCodeGenerator.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.flink.sec;
-
-import org.apache.streampipes.model.client.deployment.DeploymentConfiguration;
-import org.apache.streampipes.model.graph.DataSinkDescription;
-import org.apache.streampipes.codegeneration.flink.ConfigGenerator;
-import org.apache.streampipes.codegeneration.flink.FlinkCodeGenerator;
-import org.apache.streampipes.codegeneration.flink.XmlGenerator;
-import org.apache.streampipes.codegeneration.utils.Utils;
-
-public class FlinkSecCodeGenerator extends FlinkCodeGenerator {
-
- public FlinkSecCodeGenerator(DeploymentConfiguration config, DataSinkDescription element) {
- super(config, element);
- }
-
- @Override
- protected void create() {
- createDirectoryStructure();
-
- // source files
- Utils.writeToFile(new FlinkSecControllerGenerator(element, name, packageName).build(), src);
- Utils.writeToFile(new FlinkSecProgramGenerator(element, name, packageName).build(), src);
- Utils.writeToFile(new ConfigGenerator(element, name, packageName).build(), src);
-
- // xml files
- XmlGenerator xmlGenerator = new XmlGenerator(name, packageName, version);
- Utils.writeToFile(xmlGenerator.getPomFile(true), getTempDir() + "pom.xml");
- Utils.writeToFile(xmlGenerator.getWebXmlFile(), webInf + "web.xml");
-
- }
-
-}
diff --git a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/sec/FlinkSecControllerGenerator.java b/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/sec/FlinkSecControllerGenerator.java
deleted file mode 100644
index 15e2f1b82..000000000
--- a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/sec/FlinkSecControllerGenerator.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.flink.sec;
-
-import javax.lang.model.element.Modifier;
-
-import com.squareup.javapoet.ClassName;
-import com.squareup.javapoet.JavaFile;
-import com.squareup.javapoet.MethodSpec;
-import com.squareup.javapoet.MethodSpec.Builder;
-import com.squareup.javapoet.TypeSpec;
-
-import org.apache.streampipes.model.base.ConsumableStreamPipesEntity;
-import org.apache.streampipes.model.graph.DataSinkInvocation;
-import org.apache.streampipes.codegeneration.ControllerGenerator;
-import org.apache.streampipes.codegeneration.utils.JFC;
-
-public class FlinkSecControllerGenerator extends ControllerGenerator {
- private ClassName program;
- private ClassName config;
-
- public FlinkSecControllerGenerator(ConsumableStreamPipesEntity element, String name, String packageName) {
- super(element, name, packageName);
- program = ClassName.get(packageName, name + "Program");
- config = ClassName.get(packageName, "Config");
- }
-
- public Builder isVisualizable() {
- Builder b = MethodSpec.methodBuilder("isVisualizable").addAnnotation(Override.class)
- .addModifiers(Modifier.PUBLIC).addStatement("return false").returns(boolean.class);
-
- return b;
- }
-
- public Builder getHtml() {
- Builder b = MethodSpec.methodBuilder("getHtml").addAnnotation(Override.class).addModifiers(Modifier.PUBLIC)
- .addParameter(JFC.SEC_INVOCATION, "graph").addStatement("return null").returns(JFC.STRING);
-
- return b;
- }
-
- public Builder getRuntime() {
- Builder b = MethodSpec.methodBuilder("getRuntime").addAnnotation(Override.class)
- .addModifiers(Modifier.PROTECTED).addParameter(DataSinkInvocation.class, "graph")
- .addStatement("return new $T(graph, new $T($T.JAR_FILE, $T.FLINK_HOST, $T.FLINK_PORT))", program,
- JFC.FLINK_DEPLOYMENT_CONFIG, config, config, config)
- .returns(JFC.FLINK_SEC_RUNTIME);
-
- return b;
- }
-
- @Override
- public JavaFile build() {
- MethodSpec declareModel = getDeclareModelCode(JFC.SEC_DESCRIPTION).build();
- MethodSpec getRuntime = getRuntime().build();
- MethodSpec isVisualizable = isVisualizable().build();
- MethodSpec getHtml = getHtml().build();
-
- TypeSpec controllerClass = TypeSpec.classBuilder(name + "Controller").addModifiers(Modifier.PUBLIC)
- .superclass(JFC.ABSTRACT_FLINK_CONSUMER_DECLARER).addMethod(declareModel).addMethod(isVisualizable)
- .addMethod(getHtml).addMethod(getRuntime).build();
-
- return JavaFile.builder(packageName, controllerClass).build();
- }
-
-}
diff --git a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/sec/FlinkSecProgramGenerator.java b/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/sec/FlinkSecProgramGenerator.java
deleted file mode 100644
index c6de20647..000000000
--- a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/sec/FlinkSecProgramGenerator.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.flink.sec;
-
-import java.io.Serializable;
-
-import javax.lang.model.element.Modifier;
-
-import com.squareup.javapoet.JavaFile;
-import com.squareup.javapoet.MethodSpec;
-import com.squareup.javapoet.ParameterizedTypeName;
-import com.squareup.javapoet.TypeSpec;
-
-import org.apache.streampipes.model.base.ConsumableStreamPipesEntity;
-import org.apache.streampipes.codegeneration.Generator;
-import org.apache.streampipes.codegeneration.utils.JFC;
-
-public class FlinkSecProgramGenerator extends Generator {
-
- public FlinkSecProgramGenerator(ConsumableStreamPipesEntity element, String name, String packageName) {
- super(element, name, packageName);
- }
-
- @Override
- public JavaFile build() {
- ParameterizedTypeName mapStringObject = ParameterizedTypeName.get(JFC.MAP, JFC.STRING, JFC.OBJECT);
- ParameterizedTypeName dataStreamSink = ParameterizedTypeName.get(JFC.DATA_STREAM_SINK, mapStringObject);
- ParameterizedTypeName dataStream = ParameterizedTypeName.get(JFC.DATA_STREAM, mapStringObject);
-
- MethodSpec constructor = MethodSpec.constructorBuilder().addModifiers(Modifier.PUBLIC)
- .addParameter(JFC.SEC_INVOCATION, "graph").addStatement("super(graph)").build();
-
- MethodSpec constructorConfig = MethodSpec.constructorBuilder().addModifiers(Modifier.PUBLIC)
- .addParameter(JFC.SEC_INVOCATION, "graph").addParameter(JFC.FLINK_DEPLOYMENT_CONFIG, "config")
- .addStatement("super(graph, config)").build();
-
- MethodSpec getApplicationLogic = MethodSpec.methodBuilder("getSink").addAnnotation(JFC.OVERRIDE)
- .addModifiers(Modifier.PUBLIC).returns(dataStreamSink).addParameter(dataStream, "convertedStream")
- .addCode("// TODO implement\nreturn null;\n").build();
-
- TypeSpec programClass = TypeSpec.classBuilder(name + "Program").addModifiers(Modifier.PUBLIC)
- .superclass(JFC.FLINK_SEC_RUNTIME).addSuperinterface(Serializable.class).addMethod(constructor)
- .addMethod(constructorConfig).addMethod(getApplicationLogic).build();
-
- return JavaFile.builder(packageName, programClass).build();
- }
-
-}
diff --git a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/sepa/FlinkSepaCodeGenerator.java b/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/sepa/FlinkSepaCodeGenerator.java
deleted file mode 100644
index dc54e35b8..000000000
--- a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/sepa/FlinkSepaCodeGenerator.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.flink.sepa;
-
-import org.apache.streampipes.model.client.deployment.DeploymentConfiguration;
-import org.apache.streampipes.model.graph.DataProcessorDescription;
-import org.apache.streampipes.codegeneration.flink.ConfigGenerator;
-import org.apache.streampipes.codegeneration.flink.FlinkCodeGenerator;
-import org.apache.streampipes.codegeneration.flink.InitGenerator;
-import org.apache.streampipes.codegeneration.flink.XmlGenerator;
-import org.apache.streampipes.codegeneration.utils.Utils;
-
-public class FlinkSepaCodeGenerator extends FlinkCodeGenerator {
-
- private boolean standalone;
-
-
- public FlinkSepaCodeGenerator(DeploymentConfiguration config, DataProcessorDescription element, boolean standalone) {
- super(config, element);
- this.standalone = standalone;
- }
-
- @Override
- protected void create() {
- createDirectoryStructure();
-
- // source files
- Utils.writeToFile(new ParametersGenerator(element, name, packageName).build(), src);
- Utils.writeToFile(new FlinkSepaControllerGenerator(element, name, packageName).build(), src);
- Utils.writeToFile(new InitGenerator(element, name, packageName, standalone).build(), src);
- Utils.writeToFile(new FlinkSepaProgramGenerator(element, name, packageName).build(), src);
- Utils.writeToFile(new ConfigGenerator(element, name, packageName).build(), src);
-
- // xml files
- XmlGenerator xmlGenerator = new XmlGenerator(name, packageName, version);
- Utils.writeToFile(xmlGenerator.getPomFile(standalone), getTempDir() + "pom.xml");
- Utils.writeToFile(xmlGenerator.getWebXmlFile(), webInf + "web.xml");
-
- }
-
-
-
-}
diff --git a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/sepa/FlinkSepaControllerGenerator.java b/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/sepa/FlinkSepaControllerGenerator.java
deleted file mode 100644
index 2b4847618..000000000
--- a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/sepa/FlinkSepaControllerGenerator.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.flink.sepa;
-
-import com.squareup.javapoet.ClassName;
-import com.squareup.javapoet.JavaFile;
-import com.squareup.javapoet.MethodSpec;
-import com.squareup.javapoet.MethodSpec.Builder;
-import com.squareup.javapoet.ParameterizedTypeName;
-import com.squareup.javapoet.TypeSpec;
-import org.apache.streampipes.codegeneration.ControllerGenerator;
-import org.apache.streampipes.codegeneration.utils.JFC;
-import org.apache.streampipes.model.base.ConsumableStreamPipesEntity;
-import org.apache.streampipes.model.graph.DataProcessorInvocation;
-import org.apache.streampipes.model.staticproperty.FreeTextStaticProperty;
-import org.apache.streampipes.model.staticproperty.MappingProperty;
-import org.apache.streampipes.model.staticproperty.StaticProperty;
-
-import javax.lang.model.element.Modifier;
-
-public class FlinkSepaControllerGenerator extends ControllerGenerator {
-
- private ClassName parameters;
- private ClassName program;
- private ClassName config;
-
- public FlinkSepaControllerGenerator(ConsumableStreamPipesEntity element, String name, String packageName) {
- super(element, name, packageName);
- parameters = ClassName.get(packageName, name + "Parameters");
- program = ClassName.get(packageName, name + "Program");
- config = ClassName.get(packageName, "Config");
- }
-
- public Builder getRuntime() {
- Builder b = MethodSpec.methodBuilder("getRuntime").addAnnotation(Override.class)
- .addModifiers(Modifier.PROTECTED).addParameter(DataProcessorInvocation.class, "graph")
- .returns(ParameterizedTypeName.get(JFC.FLINK_SEPA_RUNTIME, parameters));
-
-
- for (StaticProperty sp : element.getStaticProperties()) {
- getStaticProperty(b, sp);
- }
-
- String staticParam = "$T staticParam = new $T(graph, ";
- for (StaticProperty sp : element.getStaticProperties()) {
- staticParam = staticParam + sp.getInternalName() + ", ";
- }
- staticParam = staticParam.subSequence(0, staticParam.length() - 2) + ")";
- b.addStatement(staticParam, parameters, parameters);
-
- b.addStatement("return new $T(staticParam, new $T($T.JAR_FILE, $T.FLINK_HOST, $T.FLINK_PORT))", program,
- JFC.FLINK_DEPLOYMENT_CONFIG, config, config, config);
-
- return b;
- }
-
- private Builder getStaticProperty(Builder b, StaticProperty sp) {
- String name = sp.getInternalName().replaceAll("-", "_").replaceAll("/", "_");
- if (sp instanceof MappingProperty) {
- // TODO use SDK
-// b.addStatement("String $L = $T.getMappingPropertyName(graph, $S)", name, JFC.SEPA_UTILS,
-// sp.getInternalName());
- } else if (sp instanceof FreeTextStaticProperty) {
- // TODO use SDK
-// b.addStatement("String $L = $T.getFreeTextStaticPropertyValue(graph, $S)", name, JFC.SEPA_UTILS,
-// sp.getInternalName());
- } else {
- // TODO add implementation for the other strategies
- try {
- throw new Exception("Not yet Implemented");
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- return b;
- }
-
- @Override
- public JavaFile build() {
- MethodSpec declareModel = getDeclareModelCode(JFC.SEPA_DESCRIPTION).build();
- MethodSpec getRuntime = getRuntime().build();
-
- TypeSpec controllerClass = TypeSpec.classBuilder(name + "Controller").addModifiers(Modifier.PUBLIC)
- .superclass(ParameterizedTypeName.get(JFC.ABSTRACT_FLINK_AGENT_DECLARER, parameters))
- .addMethod(declareModel).addMethod(getRuntime).build();
-
- return JavaFile.builder(packageName, controllerClass).build();
- }
-
- @Override
- public String toString() {
- return build().toString();
- }
-}
diff --git a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/sepa/FlinkSepaProgramGenerator.java b/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/sepa/FlinkSepaProgramGenerator.java
deleted file mode 100644
index c48f0332f..000000000
--- a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/sepa/FlinkSepaProgramGenerator.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.flink.sepa;
-
-import javax.lang.model.element.Modifier;
-
-import com.squareup.javapoet.ClassName;
-import com.squareup.javapoet.JavaFile;
-import com.squareup.javapoet.MethodSpec;
-import com.squareup.javapoet.ParameterizedTypeName;
-import com.squareup.javapoet.TypeSpec;
-
-import org.apache.streampipes.model.base.ConsumableStreamPipesEntity;
-import org.apache.streampipes.codegeneration.Generator;
-import org.apache.streampipes.codegeneration.utils.JFC;
-
-public class FlinkSepaProgramGenerator extends Generator {
-
- public FlinkSepaProgramGenerator(ConsumableStreamPipesEntity element, String name, String packageName) {
- super(element, name, packageName);
- }
-
- @Override
- public JavaFile build() {
- ClassName parameters = ClassName.get("", name + "Parameters");
- ParameterizedTypeName mapStringObject = ParameterizedTypeName.get(JFC.MAP, JFC.STRING, JFC.OBJECT);
- ParameterizedTypeName d = ParameterizedTypeName.get(JFC.DATA_STREAM, mapStringObject);
-
- MethodSpec constructor = MethodSpec.constructorBuilder().addModifiers(Modifier.PUBLIC)
- .addParameter(parameters, "params").addStatement("super(params)").build();
-
- MethodSpec constructorConfig = MethodSpec.constructorBuilder().addModifiers(Modifier.PUBLIC)
- .addParameter(parameters, "params").addParameter(JFC.FLINK_DEPLOYMENT_CONFIG, "config")
- .addStatement("super(params, config)").build();
-
- MethodSpec getApplicationLogic = MethodSpec.methodBuilder("getApplicationLogic").addAnnotation(JFC.OVERRIDE)
- .addModifiers(Modifier.PROTECTED).returns(d)
- .addParameter(d, "messageStream")
- .addCode("// TODO implement\nreturn messageStream;\n")
- .build();
-
- TypeSpec programClass = TypeSpec.classBuilder(name + "Program").addModifiers(Modifier.PUBLIC)
- .superclass(ParameterizedTypeName.get(JFC.FLINK_SEPA_RUNTIME, parameters)).addMethod(constructor)
- .addMethod(constructorConfig).addMethod(getApplicationLogic).build();
-
- return JavaFile.builder(packageName, programClass).build();
- }
-
-}
diff --git a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/sepa/ImplementationGenerator.java b/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/sepa/ImplementationGenerator.java
deleted file mode 100644
index e26932fe7..000000000
--- a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/sepa/ImplementationGenerator.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.flink.sepa;
-
-import javax.lang.model.element.Modifier;
-
-import com.squareup.javapoet.JavaFile;
-import com.squareup.javapoet.MethodSpec;
-import com.squareup.javapoet.ParameterizedTypeName;
-import com.squareup.javapoet.TypeName;
-import com.squareup.javapoet.TypeSpec;
-
-import org.apache.streampipes.model.base.ConsumableStreamPipesEntity;
-import org.apache.streampipes.codegeneration.Generator;
-import org.apache.streampipes.codegeneration.utils.JFC;
-
-public class ImplementationGenerator extends Generator {
-
- public ImplementationGenerator(ConsumableStreamPipesEntity element, String name, String packageName) {
- super(element, name, packageName);
- }
-
- @Override
- public JavaFile build() {
- ParameterizedTypeName mapStringObject = ParameterizedTypeName.get(JFC.MAP, JFC.STRING, JFC.OBJECT);
-
- MethodSpec constructor = MethodSpec.constructorBuilder().addModifiers(Modifier.PUBLIC)
- .addParameter(JFC.STRING, "propertyName").addStatement("this.$N = $N", "propertyName", "propertyName")
- .build();
-
- TypeName in = mapStringObject;
- TypeName out = ParameterizedTypeName.get(JFC.COLLECTOR, mapStringObject);
-
- MethodSpec flatMap = MethodSpec.methodBuilder("flatMap").addAnnotation(JFC.OVERRIDE).addModifiers(Modifier.PUBLIC)
- .addParameter(in, "in").addParameter(out, "out").addException(JFC.EXCEPTION)
- .addStatement("Object o = in.get(propertyName)").addCode("//TODO implement\n").build();
-
- TypeSpec parameterClass = TypeSpec.classBuilder(name).addModifiers(Modifier.PUBLIC)
- .addSuperinterface(ParameterizedTypeName.get(JFC.FLAT_MAP_FUNCTION, mapStringObject, mapStringObject))
- .addField(JFC.STRING, "propertyName", Modifier.PRIVATE).addMethod(constructor).addMethod(flatMap).build();
-
- return JavaFile.builder(packageName, parameterClass).build();
- }
-
-}
diff --git a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/sepa/ParametersGenerator.java b/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/sepa/ParametersGenerator.java
deleted file mode 100644
index e378cc014..000000000
--- a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/flink/sepa/ParametersGenerator.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.flink.sepa;
-
-import com.squareup.javapoet.JavaFile;
-import com.squareup.javapoet.MethodSpec;
-import com.squareup.javapoet.MethodSpec.Builder;
-import com.squareup.javapoet.TypeSpec;
-import org.apache.streampipes.codegeneration.Generator;
-import org.apache.streampipes.codegeneration.utils.JFC;
-import org.apache.streampipes.codegeneration.utils.Utils;
-import org.apache.streampipes.model.base.ConsumableStreamPipesEntity;
-import org.apache.streampipes.model.staticproperty.StaticProperty;
-
-import javax.lang.model.element.Modifier;
-
-public class ParametersGenerator extends Generator {
-
- public ParametersGenerator(ConsumableStreamPipesEntity element, String name, String packageName) {
- super(element, name, packageName);
- }
-
- public MethodSpec getConstructor() {
- Builder b = MethodSpec.constructorBuilder().addModifiers(Modifier.PUBLIC)
- .addParameter(JFC.SEPA_INVOCATION, "graph").addStatement("super(graph)");
-
- for (StaticProperty sp : element.getStaticProperties()) {
- String internalNameCamelCased = Utils.toCamelCase(sp.getInternalName());
- b.addParameter(JFC.STRING, internalNameCamelCased);
- b.addStatement("this.$N = $N", internalNameCamelCased, internalNameCamelCased);
- }
-
- return b.build();
-
- }
-
-
- @Override
- public JavaFile build() {
- MethodSpec constructor = getConstructor();
-
- TypeSpec.Builder parameterClass = TypeSpec.classBuilder(name + "Parameters").addModifiers(Modifier.PUBLIC)
- .superclass(JFC.EVENT_PROCESSOR_BINDING_PARAMS).addMethod(constructor);
-
- for (StaticProperty sp : element.getStaticProperties()) {
- String internalName = Utils.toCamelCase(sp.getInternalName());
- parameterClass.addField(JFC.STRING, internalName, Modifier.PRIVATE);
- MethodSpec getter = MethodSpec.methodBuilder(getterName(internalName)).addModifiers(Modifier.PUBLIC)
- .returns(JFC.STRING).addStatement("return " + internalName).build();
- parameterClass.addMethod(getter);
- }
-
-
- return JavaFile.builder(packageName, parameterClass.build()).build();
- }
-
- private String getterName(String s) {
- String result = s;
- if (s != null && s.length() > 0) {
- char first = Character.toUpperCase(s.charAt(0));
- result = "get" + first + s.substring(1);
- }
-
- return result;
- }
-
-}
diff --git a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/utils/DirectoryBuilder.java b/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/utils/DirectoryBuilder.java
deleted file mode 100644
index 47e6d9319..000000000
--- a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/utils/DirectoryBuilder.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.utils;
-
-import java.io.File;
-
-public abstract class DirectoryBuilder {
-
- /**
- * Use the / in the routes. It will be automatically replaced with File.seperator
- * @param dirs an array with directories that are created
- * @return whether the directory structure was created successfully
- */
- public static boolean createDirectories(String[] dirs) {
-
- for (String dir : dirs) {
- if (!createDirectory(dir)) {
- return false;
- }
- }
-
- return true;
- }
-
- private static boolean createDirectory(String dir) {
- String escapedSeparator = File.separator.equals("\\") ? "\\\\" : File.separator;
- dir = dir.replaceAll("/", escapedSeparator);
- if (dir != null) {
- return (new File(dir)).mkdirs();
- } else {
- return false;
- }
- }
-
-}
diff --git a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/utils/JFC.java b/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/utils/JFC.java
deleted file mode 100644
index eab732f2d..000000000
--- a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/utils/JFC.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.utils;
-
-
-import com.squareup.javapoet.ClassName;
-import org.apache.streampipes.container.init.DeclarersSingleton;
-import org.apache.streampipes.container.util.StandardTransportFormat;
-import org.apache.streampipes.model.SpDataStream;
-import org.apache.streampipes.model.graph.DataProcessorInvocation;
-import org.apache.streampipes.model.graph.DataSinkDescription;
-import org.apache.streampipes.model.graph.DataSinkInvocation;
-import org.apache.streampipes.model.output.AppendOutputStrategy;
-import org.apache.streampipes.model.output.OutputStrategy;
-import org.apache.streampipes.model.schema.EventProperty;
-import org.apache.streampipes.sdk.helpers.EpProperties;
-import org.apache.streampipes.sdk.stream.SchemaBuilder;
-import org.apache.streampipes.sdk.stream.StreamBuilder;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Java File Classes (JFC)
- * @author philipp
- *
- */
-public abstract class JFC {
-
- private static final String STREAMPIPES_MODEL_PACKAGE = "org.apache.streampipes.model";
- private static final String STREAMPIPES_MODEL_PACKAGE_GRAPH = STREAMPIPES_MODEL_PACKAGE + ".graph";
-
- private static final String SP_FLINK_PACKAGE = "org.apache.streampipes.wrapper.flink";
- private static final String SP_WRAPPER_PACKAGE = "org.apache.streampipes.wrapper";
-
- public static ClassName MAP = ClassName.get(Map.class);
- public static ClassName LIST = ClassName.get(List.class);
- public static ClassName ARRAY_LIST = ClassName.get(ArrayList.class);
-
- public static ClassName STRING = ClassName.get("", "String");
- public static ClassName OVERRIDE = ClassName.get("", "Override");
- public static ClassName OBJECT = ClassName.get("", "Object");
- public static ClassName EXCEPTION = ClassName.get("", "Exception");
-
- public static ClassName DATA_STREAM = ClassName.get("org.apache.flink.streaming.api.datastream", "DataStream");
- public static ClassName DATA_STREAM_SINK = ClassName.get("org.apache.flink.streaming.api.datastream", "DataStreamSink");
- public static ClassName FLAT_MAP_FUNCTION = ClassName.get("org.apache.flink.api.common.functions", "FlatMapFunction");
- public static ClassName COLLECTOR = ClassName.get("org.apache.flink.util", "Collector");
-
- public static ClassName SEPA_DESCRIPTION = ClassName.get(STREAMPIPES_MODEL_PACKAGE_GRAPH, "DataProcessorInvocation");
- public static ClassName SEC_DESCRIPTION = ClassName.get(DataSinkDescription.class);
- public static ClassName SEPA_INVOCATION = ClassName.get(DataProcessorInvocation.class);
- public static ClassName SEC_INVOCATION = ClassName.get(DataSinkInvocation.class);
- public static ClassName EVENT_STREAM = ClassName.get(SpDataStream.class);
- public static ClassName STREAM_BUILDER = ClassName.get(StreamBuilder.class);
- public static ClassName SCHEMA_BUILDER = ClassName.get(SchemaBuilder.class);
- public static ClassName EVENT_PROPERTY = ClassName.get(EventProperty.class);
- //public static ClassName PRIMITIVE_PROPERTY_BUILDER = ClassName.get(PrimitivePropertyBuilder
- // .class);
- public static ClassName APPEND_OUTPUT_STRATEGY = ClassName.get(AppendOutputStrategy.class);
- public static ClassName OUTPUT_STRATEGY = ClassName.get(OutputStrategy.class);
- public static ClassName EP_PROPERTIES = ClassName.get(EpProperties.class);
- public static ClassName STANDARD_TRANSPORT_FORMAT = ClassName.get(StandardTransportFormat.class);
-// public static ClassName EMBEDDED_MODEL_SUBMITTER = ClassName.get("EmbeddedModelSubmitter.class);
-// public static ClassName SEMANTIC_EVENT_PROCESSING_AGENT_DECLARER = ClassName.get(SemanticEventProcessingAgentDeclarer.class);
-// public static ClassName SEMANTIC_EVENT_PRODUCER_DECLARER = ClassName.get(SemanticEventProducerDeclarer.class);
-// public static ClassName SEMANTIC_EVENT_CONSUMER_DECLARER = ClassName.get(SemanticEventConsumerDeclarer.class);
-
- public static ClassName CONTAINER_MODEL_SUBMITTER = ClassName.get("de.fzi.cep.sepa.client.container.init", "ContainerModelSubmitter");
- public static ClassName DECLARERS_SINGLETON = ClassName.get(DeclarersSingleton.class);
-
-
-
- public static ClassName FLINK_DEPLOYMENT_CONFIG = ClassName.get(SP_FLINK_PACKAGE, "FlinkDeploymentConfig");
- public static ClassName FLINK_SEPA_RUNTIME = ClassName.get(SP_FLINK_PACKAGE, "FlinkDataProcessorRuntime");
- public static ClassName FLINK_SEC_RUNTIME = ClassName.get(SP_FLINK_PACKAGE, "FlinkDataSinkRuntime");
- public static ClassName ABSTRACT_FLINK_AGENT_DECLARER = ClassName.get(SP_FLINK_PACKAGE, "FlinkDataProcessorDeclarer");
- public static ClassName ABSTRACT_FLINK_CONSUMER_DECLARER = ClassName.get(SP_FLINK_PACKAGE, "DataSinkDeclarer");
-
- public static ClassName EVENT_PROCESSOR_BINDING_PARAMS = ClassName.get(SP_WRAPPER_PACKAGE +".params.binding", "EventProcessorBindingParams");
-}
diff --git a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/utils/Utils.java b/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/utils/Utils.java
deleted file mode 100644
index 8ca190356..000000000
--- a/streampipes-code-generation/src/main/java/org/apache/streampipes/codegeneration/utils/Utils.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.utils;
-
-import com.google.common.base.CaseFormat;
-import com.squareup.javapoet.JavaFile;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-
-
-public class Utils {
-
- private static final String PROPERTY_SEPARATOR = "-";
- private static final Logger LOG = LoggerFactory.getLogger(Utils.class);
-
- public static String readResourceFile(String fileName) {
-
- StringBuilder sb = new StringBuilder();
- ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
-
- InputStream input = classLoader.getResourceAsStream(fileName);
- BufferedReader reader = new BufferedReader(new InputStreamReader(input));
- String line;
- try {
- while ((line = reader.readLine()) != null) {
- sb.append(line);
- sb.append("\n");
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
-
- return sb.toString();
- }
-
- public static String readFile(String fileName) {
- BufferedReader br = null;
-
- try {
- br = new BufferedReader(new FileReader(fileName));
- StringBuilder sb = new StringBuilder();
- String line = br.readLine();
-
- while (line != null) {
- sb.append(line);
- sb.append("\n");
- line = br.readLine();
- }
- return sb.toString();
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- } finally {
- try {
- br.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- return "Couldn't read file: " + fileName;
- }
-
- public static void writeToFile(String content, String file) {
- Path path = Paths.get(file);
- byte[] b = content.getBytes();
- try {
- Files.write(path, b);
- } catch (IOException e) {
- LOG.error("Could not write to file", e);
- }
- }
-
- public static void writeToFile(JavaFile content, String location) {
- try {
- content.writeTo(new File(location));
- } catch (IOException e) {
- e.printStackTrace();
- LOG.error("Error: Could not write to file: {}", location, e);
- }
- }
-
- public static String toCamelCase(String propertyName) {
- if (propertyName.contains("-")) {
- return CaseFormat.LOWER_HYPHEN.to(CaseFormat.LOWER_CAMEL, propertyName);
- } else {
- return propertyName;
- }
-
- }
-
-
-}
diff --git a/streampipes-code-generation/src/main/resources/pom b/streampipes-code-generation/src/main/resources/pom
deleted file mode 100644
index 7476bb81c..000000000
--- a/streampipes-code-generation/src/main/resources/pom
+++ /dev/null
@@ -1,59 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <artifactId>####name####</artifactId>
- <groupId>org.apache.streampipes</groupId>
- <version>####version####</version>
- <packaging>war</packaging>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.streampipes</groupId>
- <artifactId>streampipes-container</artifactId>
- <version>####version####</version>
- </dependency>
- <dependency>
- <groupId>org.apache.streampipes</groupId>
- <artifactId>semantic-container-standalone</artifactId>
- <version>####version####</version>
- </dependency>
- <dependency>
- <groupId>org.apache.streampipes</groupId>
- <artifactId>streampipes-commons</artifactId>
- <version>####version####</version>
- </dependency>
- <dependency>
- <groupId>org.apache.streampipes</groupId>
- <artifactId>streampipes-wrapper-flink</artifactId>
- <version>####version####</version>
- </dependency>
- <dependency>
- <groupId>org.apache.streampipes</groupId>
- <artifactId>streampipes-sdk</artifactId>
- <version>####version####</version>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.1</version>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- <encoding>UTF-8</encoding>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <version>2.4</version>
- <configuration>
- <webXml>WebContent\WEB-INF\web.xml</webXml>
- </configuration>
- </plugin>
- </plugins>
- <finalName>####name####</finalName>
- </build>
-</project>
diff --git a/streampipes-code-generation/src/main/resources/web b/streampipes-code-generation/src/main/resources/web
deleted file mode 100644
index 1cc03599c..000000000
--- a/streampipes-code-generation/src/main/resources/web
+++ /dev/null
@@ -1,20 +0,0 @@
-<web-app>
- <display-name>Archetype Created Web Application</display-name>
-
- <context-param>
- <param-name>org.restlet.application</param-name>
- <param-value>
- ####name####
- </param-value>
- </context-param>
- <servlet>
- <servlet-name>RestletServlet</servlet-name>
- <servlet-class>
- org.restlet.ext.servlet.ServerServlet
- </servlet-class>
- </servlet>
- <servlet-mapping>
- <servlet-name>RestletServlet</servlet-name>
- <url-pattern>/</url-pattern>
- </servlet-mapping>
-</web-app>
\ No newline at end of file
diff --git a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/AllTests.java b/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/AllTests.java
deleted file mode 100644
index 7309296b5..000000000
--- a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/AllTests.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration;
-//@RunWith(Suite.class)
-//@SuiteClasses({ FlinkSepaControllerGeneratorTest.class, UtilsTest.class, InitGeneratorTest.class,
-// XmlGeneratorTest.class, FlinkSepaProgramGeneratorTest.class, ImplementationGeneratorTest.class,
-// ParametersGeneratorTest.class, ConfigGeneratorTest.class, DirectoryBuilderTest.class,
-// FlinkSecControllerGeneratorTest.class, FlinkSecProgramGeneratorTest.class})
-//public class AllTests {
-//
-//}
diff --git a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/ControllerGeneratorTest.java b/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/ControllerGeneratorTest.java
deleted file mode 100644
index 9e8f0194e..000000000
--- a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/ControllerGeneratorTest.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration;
-
-import static org.junit.Assert.assertEquals;
-
-public class ControllerGeneratorTest {
-
-// @Test
-// public void testGetEventStream() {
-//
-// Builder b = MethodSpec.methodBuilder("testMethod");
-// FlinkSepaControllerGenerator cb = new FlinkSepaControllerGenerator(null, "", "");
-// EventStream eventStream = StreamBuilder.createStream(TV.NAME, TV.DESCRIPTION, TV.PATH_NAME)
-// .schema(SchemaBuilder.create().build()).build();
-//
-// Builder actual = cb.getEventStream(b, eventStream, 0);
-// String expected = "void testMethod() {\n java.util.List<de.fzi.cep.sepa.model.impl.eventproperty.EventProperty> eventProperties0 = new java.util.ArrayList<de.fzi.cep.sepa.model.impl.eventproperty.EventProperty>();\n"
-// + " de.fzi.cep.sepa.model.impl.EventStream stream0 = de.fzi.cep.sepa.model.builder.StreamBuilder.createStream(\"TestProject\", \"Example description\", \"sepa/testProject\").schema(de.fzi.cep.sepa.model.builder.SchemaBuilder.create().properties(eventProperties0).build()).build();\n}\n";
-//
-// //TODO fix test
-//// assertEquals(expected, actual.build().toString());
-// }
-//
-// @Test
-// public void testGetEventProperties() {
-// Builder b = MethodSpec.methodBuilder("testMethod");
-// FlinkSepaControllerGenerator cb = new FlinkSepaControllerGenerator(null, "", "");
-// List<EventProperty> eventProperties = new ArrayList<EventProperty>();
-// eventProperties.add(PrimitivePropertyBuilder.createPropertyRestriction("http://test.org#mytest").build());
-//
-// String actual = cb.getEventProperties(b, eventProperties, 0).build().toString();
-// String expected = "void testMethod() {\n java.util.List<de.fzi.cep.sepa.model.impl.eventproperty.EventProperty> eventProperties0 = new java.util.ArrayList<de.fzi.cep.sepa.model.impl.eventproperty.EventProperty>();\n"
-// + " de.fzi.cep.sepa.model.impl.eventproperty.EventProperty e0 = de.fzi.cep.sepa.model.builder.PrimitivePropertyBuilder.createPropertyRestriction(\"http://test.org#mytest\").build();\n"
-// + " eventProperties0.add(e0);\n}\n";
-//
-// //TODO fix test
-//// assertEquals(expected, actual);
-// }
-//
-// @Test
-// public void testAppendGetOutputStrategyWithNoEventProperty() {
-// FlinkSepaControllerGenerator cb = new FlinkSepaControllerGenerator(null, "", "");
-// Builder b = MethodSpec.methodBuilder("testMethod");
-//
-// AppendOutputStrategy appendStrategy = new AppendOutputStrategy();
-//
-// String actual = cb.getAppendOutputStrategy(b, appendStrategy, 0).build().toString();
-// String expected = "void testMethod() {\n"
-// + " de.fzi.cep.sepa.model.impl.output.AppendOutputStrategy outputStrategy0 = new de.fzi.cep.sepa.model.impl.output.AppendOutputStrategy();\n"
-// + " java.util.List<de.fzi.cep.sepa.model.impl.eventproperty.EventProperty> appendProperties = new java.util.ArrayList<de.fzi.cep.sepa.model.impl.eventproperty.EventProperty>();\n"
-// + " outputStrategy0.setEventProperties(appendProperties);\n" + "}\n";
-//
-// assertEquals(expected, actual);
-// }
-//
-// @Test
-// public void testAppendGetOutputStrategyWithEventProperties() {
-// FlinkSepaControllerGenerator cb = new FlinkSepaControllerGenerator(null, "", "");
-// Builder b = MethodSpec.methodBuilder("testMethod");
-//
-// AppendOutputStrategy appendStrategy = new AppendOutputStrategy();
-// List<EventProperty> eventProperties = new ArrayList<EventProperty>();
-// eventProperties.add(new EventPropertyPrimitive(XSD._long.toString(), "testTime", "",
-// Utils.createURI("http://schema.org/Number")));
-// appendStrategy.setEventProperties(eventProperties);
-//
-// String actual = cb.getAppendOutputStrategy(b, appendStrategy, 0).build().toString();
-// String expected = "void testMethod() {\n"
-// + " de.fzi.cep.sepa.model.impl.output.AppendOutputStrategy outputStrategy0 = new de.fzi.cep.sepa.model.impl.output.AppendOutputStrategy();\n"
-// + " java.util.List<de.fzi.cep.sepa.model.impl.eventproperty.EventProperty> appendProperties = new java.util.ArrayList<de.fzi.cep.sepa.model.impl.eventproperty.EventProperty>();\n"
-// + " appendProperties.add(de.fzi.cep.sepa.model.builder.EpProperties.stringEp(\"testTime\", \"http://schema.org/Number\"));\n"
-// + " outputStrategy0.setEventProperties(appendProperties);\n" + "}\n";
-//
-// //TODO fixtest
-//// assertEquals(expected, actual);
-// }
-//
-// @Test
-// public void testGetOutputStrategies() {
-// FlinkSepaControllerGenerator cb = new FlinkSepaControllerGenerator(null, "", "");
-// Builder b = MethodSpec.methodBuilder("testMethod");
-//
-// List<OutputStrategy> strategies = new ArrayList<OutputStrategy>();
-//
-// String actual = cb.getOutputStrategies(b, strategies).build().toString();
-// String expected = "void testMethod() {\n"
-// + " java.util.List<de.fzi.cep.sepa.model.impl.output.OutputStrategy> strategies = new java.util.ArrayList<de.fzi.cep.sepa.model.impl.output.OutputStrategy>();\n"
-// + "}\n";
-//
-// assertEquals(expected, actual);
-// }
-//
-// @Test
-// public void testGetSupportedGrounding() {
-// FlinkSepaControllerGenerator cb = new FlinkSepaControllerGenerator(null, "", "");
-// Builder b = MethodSpec.methodBuilder("testMethod");
-//
-// String actual = cb.getSupportedGrounding(b, null).build().toString();
-// String expected = "void testMethod() {\n"
-// + " desc.setSupportedGrounding(de.fzi.cep.sepa.client.util.StandardTransportFormat.getSupportedGrounding());\n"
-// + "}\n";
-//
-// assertEquals(expected, actual);
-// }
-}
diff --git a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/TestDeployment.java b/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/TestDeployment.java
deleted file mode 100644
index f577dc29a..000000000
--- a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/TestDeployment.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.streampipes.codegeneration;
-
-import com.google.common.base.Charsets;
-import com.google.common.io.Resources;
-import org.apache.streampipes.codegeneration.api.CodeGenerator;
-import org.apache.streampipes.model.client.deployment.DeploymentConfiguration;
-import org.apache.streampipes.model.graph.DataProcessorDescription;
-import org.apache.streampipes.serializers.json.GsonSerializer;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-
-public class TestDeployment {
-
- public static void main(String[] args) {
- DeploymentConfiguration deploymentConfiguration = GsonSerializer.getGsonWithIds().fromJson(fromResources("DeploymentConfig.json"), DeploymentConfiguration.class);
- DataProcessorDescription dataProcessorDescription = GsonSerializer.getGsonWithIds().fromJson(fromResources("Entity.json"), DataProcessorDescription.class);
-
- File f = CodeGenerator.getCodeGenerator(deploymentConfiguration, dataProcessorDescription).getGeneratedFile();
- }
-
- private static String fromResources(String filename) {
- URL url = Resources.getResource(filename);
- try {
- return Resources.toString(url, Charsets.UTF_8);
- } catch (IOException e) {
- e.printStackTrace();
- return "";
- }
- }
-}
diff --git a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/api/CodeGeneratorTest.java b/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/api/CodeGeneratorTest.java
deleted file mode 100644
index 8d0bb9f07..000000000
--- a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/api/CodeGeneratorTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.api;
-
-public class CodeGeneratorTest {
-// @Test
-// public void getGeneratorImplementationFlinkSepaStandalone() throws Exception {
-// DeploymentConfiguration config = new DeploymentConfiguration();
-// config.setOutputType(OutputType.IMPLEMENTATION);
-// config.setRuntimeType(RuntimeType.FLINK);
-// config.setDeploymentType(DeploymentType.STANDALONE);
-//
-// assertThat(CodeGenerator.getCodeGenerator(config, new SepaDescription()),instanceOf(FlinkSepaCodeGenerator.class));
-// }
-
-}
\ No newline at end of file
diff --git a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/flink/ConfigGeneratorTest.java b/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/flink/ConfigGeneratorTest.java
deleted file mode 100644
index 1b81cee26..000000000
--- a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/flink/ConfigGeneratorTest.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.flink;
-
-public class ConfigGeneratorTest {
-
-// @Test
-// public void testBuild() {
-// String actual = new ConfigGenerator(null, TV.NAME, TV.PACKAGE_NAME).build().toString();
-// String expected = Utils.readResourceFile("expected_Config_java");
-// // TODO fix test
-//// assertEquals(expected, actual);
-// }
-
-}
diff --git a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/flink/InitGeneratorTest.java b/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/flink/InitGeneratorTest.java
deleted file mode 100644
index 091d9ba39..000000000
--- a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/flink/InitGeneratorTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.flink;
-
-import static org.junit.Assert.assertEquals;
-
-public class InitGeneratorTest {
-
-// @Test
-// public void testBuild() {
-// String actual = new InitGenerator(null, TV.NAME, TV.PACKAGE_NAME, true).build().toString();
-// String expected = Utils.readResourceFile("expected_Init_java");
-//
-// assertEquals(expected, actual);
-// }
-
-}
diff --git a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/flink/sec/FlinkSecCodeGeneratorTest.java b/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/flink/sec/FlinkSecCodeGeneratorTest.java
deleted file mode 100644
index f02d67638..000000000
--- a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/flink/sec/FlinkSecCodeGeneratorTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.flink.sec;
-
-public class FlinkSecCodeGeneratorTest {
-
-// @Test
-// public void testCreateProject() {
-// DeploymentConfiguration con = new DeploymentConfiguration("com.example.com", "time", "TimeStamp", 8080);
-// SecDescription sec = TV.getSecDescription();
-//
-// ImplementationCodeGenerator cg = new FlinkSecCodeGenerator(con, sec);
-//
-// cg.createProject();
-// }
-
-}
diff --git a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/flink/sec/FlinkSecControllerGeneratorTest.java b/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/flink/sec/FlinkSecControllerGeneratorTest.java
deleted file mode 100644
index b6e940109..000000000
--- a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/flink/sec/FlinkSecControllerGeneratorTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.flink.sec;
-
-import static org.junit.Assert.assertEquals;
-
-public class FlinkSecControllerGeneratorTest {
-
-// @Test
-// public void testIsVisualizable() {
-// SecDescription sec = TV.getSecDescription();
-// FlinkSecControllerGenerator cd = new FlinkSecControllerGenerator(sec, TV.NAME, TV.PACKAGE_NAME);
-//
-// String actual = cd.isVisualizable().build().toString();
-// String expected = "@java.lang.Override\n" +
-// "public boolean isVisualizable() {\n" +
-// " return false;\n"
-// + "}\n";
-//
-// assertEquals(expected, actual);
-// }
-//
-// @Test
-// public void testGetHtml() {
-// SecDescription sec = TV.getSecDescription();
-// FlinkSecControllerGenerator cd = new FlinkSecControllerGenerator(sec, TV.NAME, TV.PACKAGE_NAME);
-//
-// String actual = cd.getHtml().build().toString();
-// String expected = "@java.lang.Override\n" +
-// "public String getHtml(de.fzi.cep.sepa.model.impl.graph.SecInvocation graph) {\n" +
-// " return null;\n"
-// + "}\n";
-//
-// assertEquals(expected, actual);
-// }
-//
-// @Test
-// public void testBuild() {
-//
-// SecDescription sec = TV.getSecDescription();
-//
-// String actual = new FlinkSecControllerGenerator(sec, TV.NAME, TV.PACKAGE_NAME).build().toString();
-// String expected = Utils.readResourceFile("expected_FlinkSecController_java");
-//
-// //TODO Fix test
-//// assertEquals(expected, actual);
-// }
-
-}
diff --git a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/flink/sec/FlinkSecProgramGeneratorTest.java b/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/flink/sec/FlinkSecProgramGeneratorTest.java
deleted file mode 100644
index d736d9f25..000000000
--- a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/flink/sec/FlinkSecProgramGeneratorTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.flink.sec;
-
-public class FlinkSecProgramGeneratorTest {
-
-// @Test
-// public void testBuild() {
-//
-// SecDescription sec = TV.getSecDescription();
-//
-// String actual = new FlinkSecProgramGenerator(sec, TV.NAME, TV.PACKAGE_NAME).build().toString();
-// String expected = Utils.readResourceFile("expected_FlinkSecProgram_java");
-//
-// assertEquals(expected, actual);
-// }
-
-}
diff --git a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/flink/sepa/FlinkSepaCodeGeneratorTest.java b/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/flink/sepa/FlinkSepaCodeGeneratorTest.java
deleted file mode 100644
index 1ab129e00..000000000
--- a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/flink/sepa/FlinkSepaCodeGeneratorTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.flink.sepa;
-
-public class FlinkSepaCodeGeneratorTest {
-//
-// @Test
-// public void testCreateProject() {
-// DeploymentConfiguration con = new DeploymentConfiguration("com.example.com", "time", "TimeStamp", 8080);
-// SepaDescription sepa = TV.getSepa();
-//
-// ImplementationCodeGenerator cg = new FlinkSepaCodeGenerator(con, sepa, true);
-//
-// cg.createProject();
-// }
-
-}
diff --git a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/flink/sepa/FlinkSepaControllerGeneratorTest.java b/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/flink/sepa/FlinkSepaControllerGeneratorTest.java
deleted file mode 100644
index 12215c395..000000000
--- a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/flink/sepa/FlinkSepaControllerGeneratorTest.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.flink.sepa;
-
-public class FlinkSepaControllerGeneratorTest {
-
-//
-// @Test
-// public void testGetRuntime() {
-// SepaDescription sepa = TV.getSepa();
-// FlinkSepaControllerGenerator cd = new FlinkSepaControllerGenerator(sepa, TV.NAME, TV.PACKAGE_NAME);
-//
-// String actual = cd.getRuntime().build().toString();
-// String expected = "@java.lang.Override\n"
-// + "protected de.fzi.cep.sepa.flink.FlinkSepaRuntime<de.fzi.cep.sepa.flink.test.project.TestProjectParameters> getRuntime(de.fzi.cep.sepa.model.impl.graph.SepaInvocation graph) {\n"
-// + " String mappingFirst = de.fzi.cep.sepa.model.util.SepaUtils.getMappingPropertyName(graph, \"mappingFirst\");\n" +
-// " String freeText = de.fzi.cep.sepa.model.util.SepaUtils.getFreeTextStaticPropertyValue(graph, \"freeText\");\n"
-// + " de.fzi.cep.sepa.flink.test.project.TestProjectParameters staticParam = new de.fzi.cep.sepa.flink.test.project.TestProjectParameters(graph, mappingFirst, freeText);\n"
-// + " return new " + TV.PACKAGE_NAME +"."+ TV.NAME
-// + "Program(staticParam, new de.fzi.cep.sepa.flink.FlinkDeploymentConfig(" + TV.PACKAGE_NAME
-// + ".Config.JAR_FILE, " + TV.PACKAGE_NAME + ".Config.FLINK_HOST, " + TV.PACKAGE_NAME
-// + ".Config.FLINK_PORT));\n"
-// + "}\n";
-//
-//
-// assertEquals(expected, actual);
-// }
-//
-// @Test
-// public void testBuild() {
-// SepaDescription sepa = new SepaDescription(TV.PATH_NAME, TV.NAME, TV.DESCRIPTION);
-// List<EventProperty> eventProperties0 = new ArrayList<EventProperty>();
-// eventProperties0.add(PrimitivePropertyBuilder.createPropertyRestriction("http://test.org#mytest").build());
-// EventStream es = StreamBuilder.createStream(TV.PATH_NAME, TV.NAME, TV.DESCRIPTION)
-// .schema(SchemaBuilder.create().properties(eventProperties0).build()).build();
-// sepa.addEventStream(es);
-//
-// List<OutputStrategy> strategies = new ArrayList<OutputStrategy>();
-// AppendOutputStrategy outputStrategy = new AppendOutputStrategy();
-// strategies.add(outputStrategy);
-// sepa.setOutputStrategies(strategies);
-//
-// // TODO remove after I got the answer from Dominik what the difference between uri and pathName is
-// sepa.setUri(TV.PATH_NAME);
-//
-// String actual = new FlinkSepaControllerGenerator(sepa, TV.NAME, TV.PACKAGE_NAME).build().toString();
-// String expected = Utils.readResourceFile("expected_FlinkSepaController_java");
-//
-// //TODO fix tests again
-//// assertEquals(expected, actual);
-// }
-
-
-}
diff --git a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/flink/sepa/FlinkSepaProgramGeneratorTest.java b/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/flink/sepa/FlinkSepaProgramGeneratorTest.java
deleted file mode 100644
index 7d81f3c94..000000000
--- a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/flink/sepa/FlinkSepaProgramGeneratorTest.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.flink.sepa;
-
-public class FlinkSepaProgramGeneratorTest {
-
-// @Test
-// public void testBuild() {
-// String actual = new FlinkSepaProgramGenerator(null, TV.NAME, TV.PACKAGE_NAME).build().toString();
-// String expected = Utils.readResourceFile("expected_FlinkSepaProgram_java");
-// assertEquals(expected, actual);
-// }
-
-}
diff --git a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/flink/sepa/ImplementationGeneratorTest.java b/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/flink/sepa/ImplementationGeneratorTest.java
deleted file mode 100644
index 242784f8b..000000000
--- a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/flink/sepa/ImplementationGeneratorTest.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.flink.sepa;
-
-public class ImplementationGeneratorTest {
-//
-// @Test
-// public void testBuild() {
-// String actual = new ImplementationGenerator(null, TV.NAME, TV.PACKAGE_NAME).build().toString();
-// String expected = Utils.readResourceFile("expected_TestProject_java");
-// assertEquals(expected, actual);
-// }
-
-}
diff --git a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/flink/sepa/ParametersGeneratorTest.java b/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/flink/sepa/ParametersGeneratorTest.java
deleted file mode 100644
index feac8bcbf..000000000
--- a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/flink/sepa/ParametersGeneratorTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.flink.sepa;
-
-public class ParametersGeneratorTest {
-//
-// @Test
-// public void testBuild() {
-// SepaDescription desc = new SepaDescription(TV.PATH_NAME, TV.NAME, TV.DESCRIPTION);
-// List<EventProperty> eventProperties = new ArrayList<EventProperty>();
-// EventProperty e1 = PrimitivePropertyBuilder.createPropertyRestriction("http://test.org#test1").build();
-// eventProperties.add(e1);
-//
-// EventStream stream1 = StreamBuilder
-// .createStreamRestriction("localhost/" + TV.PATH_NAME)
-// .schema(
-// SchemaBuilder.create()
-// .properties(eventProperties)
-// .build()
-// ).build();
-// desc.addEventStream(stream1);
-//
-//
-// List<StaticProperty> staticProperties = new ArrayList<StaticProperty>();
-// staticProperties.add(new MappingPropertyUnary(URI.create(e1.getElementName()), "mappingFirst",
-// "Mapping First: ", ""));
-// staticProperties.add(new FreeTextStaticProperty("freeText", "Free Text: ", ""));
-//
-// desc.setStaticProperties(staticProperties);
-// String actual = new ParametersGenerator(desc, TV.NAME, TV.PACKAGE_NAME).build().toString();
-// String expected = Utils.readResourceFile("expected_TestProjectParameters_java");
-// assertEquals(expected, actual);
-// }
-
-}
diff --git a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/utils/DirectoryBuilderTest.java b/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/utils/DirectoryBuilderTest.java
deleted file mode 100644
index c31a33454..000000000
--- a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/utils/DirectoryBuilderTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.utils;
-
-public class DirectoryBuilderTest {
- private static String root = System.getProperty("java.io.tmpdir") + "/StreampipesTest/";
-
-// @Test
-// public void testCreateDirectories() {
-// String[] dirs = { root + "test/", root + "test/test", root + "my/new/directory" };
-//
-// assertTrue("Could not create the directory structure", DirectoryBuilder.createDirectories(dirs));
-//
-// for (String dir : dirs) {
-// assertTrue(dir + " was not created", isDir(dir));
-// }
-// }
-//
-// private boolean isDir(String dir) {
-// File f = new File(dir);
-// return f.exists() && f.isDirectory();
-// }
-//
-// @Before
-// public void before() {
-// try {
-// FileUtils.deleteDirectory(new File(root));
-// } catch (IOException e) {
-// e.printStackTrace();
-// }
-// }
-//
-// @After
-// public void after() {
-// try {
-// FileUtils.deleteDirectory(new File(root));
-// } catch (IOException e) {
-// e.printStackTrace();
-// }
-// }
-}
diff --git a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/utils/TV.java b/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/utils/TV.java
deleted file mode 100644
index 646c4a9be..000000000
--- a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/utils/TV.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.utils;
-
-/**
- * Test Variables (TV)
- *
- * @author philipp
- *
- */
-public abstract class TV {
- public static String NAME = "TestProject";
- public static String PATH_NAME = "sepa/testProject";
- public static String DESCRIPTION = "Example description";
- public static String PACKAGE_NAME = "de.fzi.cep.sepa.flink.test.project";
-
-// public static SepaDescription getSepa() {
-// SepaDescription sepa = new SepaDescription(TV.PATH_NAME, TV.NAME, TV.DESCRIPTION);
-//
-// List<EventProperty> eventProperties = new ArrayList<EventProperty>();
-// EventProperty e1 = PrimitivePropertyBuilder.createPropertyRestriction("http://test.org#test1").build();
-// eventProperties.add(e1);
-//
-// EventStream stream1 = StreamBuilder.createStreamRestriction("localhost/sepa/testproject")
-// .schema(SchemaBuilder.create().properties(eventProperties).build()).build();
-// sepa.addEventStream(stream1);
-//
-// List<OutputStrategy> strategies = new ArrayList<OutputStrategy>();
-// AppendOutputStrategy outputStrategy = new AppendOutputStrategy();
-// List<EventProperty> appendProperties = new ArrayList<EventProperty>();
-// appendProperties.add(new EventPropertyPrimitive(XSD._long.toString(), "appendedTime", "",
-// org.apache.streampipes.commons.Utils.createURI("http://schema.org/Number")));
-// outputStrategy.setEventProperties(appendProperties);
-// strategies.add(outputStrategy);
-// sepa.setOutputStrategies(strategies);
-//
-// List<StaticProperty> staticProperties = new ArrayList<StaticProperty>();
-// staticProperties
-// .add(new MappingPropertyUnary(URI.create(e1.getElementName()), "mappingFirst", "Mapping First: ", ""));
-// staticProperties.add(new FreeTextStaticProperty("freeText", "Free Text: ", ""));
-//
-// sepa.setStaticProperties(staticProperties);
-//
-// return sepa;
-// }
-//
-// public static SecDescription getSecDescription() {
-// SecDescription sec = new SecDescription(TV.PATH_NAME, TV.NAME, TV.DESCRIPTION);
-// sec.setUri(TV.PATH_NAME);
-// EventStream stream1 = new EventStream();
-// EventSchema schema1 = new EventSchema();
-//
-// List<EventProperty> eventProperties = new ArrayList<EventProperty>();
-//// EventProperty e1 = EpRequirements.numberReq();
-//// eventProperties.add(e1);
-// schema1.setEventProperties(eventProperties);
-// stream1.setEventSchema(schema1);
-//
-// stream1.setUri("localhost:8080/" + TV.PATH_NAME);
-// sec.addEventStream(stream1);
-//
-// List<StaticProperty> staticProperties = new ArrayList<StaticProperty>();
-// // staticProperties.add(new FreeTextStaticProperty("min", "min value",
-// // ""));
-// // staticProperties.add(new FreeTextStaticProperty("max", "max value",
-// // ""));
-// // staticProperties.add(new FreeTextStaticProperty("color", "Color of
-// // the cirlce", ""));
-//
-// // staticProperties.add(new
-// // MappingPropertyUnary(URI.create(e1.getElementId()), "mapping",
-// // "Select Mapping", ""));
-//
-// sec.setStaticProperties(staticProperties);
-// EventGrounding grounding = new EventGrounding();
-// grounding.setTransportFormats(Arrays.asList(new TransportFormat(MessageFormat.Json)));
-// grounding.setTransportProtocols(Arrays.asList(new JmsTransportProtocol()));
-// sec.setSupportedGrounding(grounding);
-//
-// return sec;
-// }
-}
diff --git a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/utils/UtilsTest.java b/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/utils/UtilsTest.java
deleted file mode 100644
index f2264df67..000000000
--- a/streampipes-code-generation/src/test/java/org/apache/streampipes/codegeneration/utils/UtilsTest.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.codegeneration.utils;
-
-import java.io.File;
-
-public class UtilsTest {
- private static File temp;
-//
-// @BeforeClass
-// public static void beforeClass() {
-// temp = Files.createTempDir();
-// }
-//
-// @AfterClass
-// public static void afterClass() {
-// try {
-// FileUtils.deleteDirectory(temp);
-// } catch (IOException e) {
-// e.printStackTrace();
-// }
-// }
-//
-// @Test
-// public void testWriteToFileJavaFile() {
-// JavaFile jf = JavaFile.builder("test", TypeSpec.classBuilder("Test").build()).build();
-// Utils.writeToFile(jf, temp.toString());
-//
-// File f = new File(temp.getAbsolutePath() + "/test/Test.java");
-// assertTrue("File Test.java wasn't created", f.exists());
-// assertFalse("Test.jave is a directory but should be a file", f.isDirectory());
-//
-// String actual = Utils.readFile(f.getAbsolutePath());
-// assertEquals("package test;\n\nclass Test {\n}\n", actual);
-//
-// }
-//
-// @Test
-// public void testWriteToFileString() {
-// String expected = "Thist is a test file!";
-// File file = new File(temp.getAbsolutePath() + "/testFile1");
-//
-// Utils.writeToFile(expected, file.getAbsolutePath());
-//
-// String actual = Utils.readFile(file.getAbsolutePath());
-//
-// assertEquals(expected, actual.trim());
-// }
-//
-// @Test
-// public void testToCamelCaseNoSpecialCharacter() {
-// String expected = "testCamelCase";
-// String actual = Utils.toCamelCase("testCamelCase");
-//
-// assertEquals(expected, actual);
-// }
-//
-// @Test
-// public void testToCamelCaseWithSpecialCharacter() {
-// String expected = "testCamelCase";
-// String actual = Utils.toCamelCase("test-camel-case");
-//
-// assertEquals(expected, actual);
-// }
-}
diff --git a/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/generation/CodeGenerationManager.java b/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/generation/CodeGenerationManager.java
deleted file mode 100644
index fcfe54010..000000000
--- a/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/generation/CodeGenerationManager.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.manager.generation;
-
-import org.apache.streampipes.model.client.deployment.DeploymentConfiguration;
-import org.apache.streampipes.model.graph.DataProcessorDescription;
-
-import java.io.File;
-
-public class CodeGenerationManager {
-
- private DeploymentConfiguration config;
- private DataProcessorDescription element;
-
- public CodeGenerationManager(DeploymentConfiguration config, DataProcessorDescription element) {
- this.config = config;
- this.element = element;
- }
-
- public File getGeneratedFile() {
- // TODO check for config.getDeploymentType()
-// return new FlinkSepaCodeGenerator(config, element).createProject();
- return null;
- }
-}