commit f1f46aab51ddd7ea2af3c7d19f24dca42e5cb568
Author: stepanekp <1stepanekpetr@gmail.com>
Date:   Sat Apr 9 14:10:35 2022 +0200

    Change of resource files location

diff --git a/pom.xml b/pom.xml
index 61be817..25565d7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -81,26 +81,6 @@
 				<artifactId>spring-boot-maven-plugin</artifactId>
 			</plugin>
 		</plugins>
-		<resources>
-			<resource>
-				<directory>src/main/java/resources</directory>
-				<includes>
-					<include>queries/*.sql</include>
-				</includes>
-			</resource>
-			<resource>
-				<directory>src/main/java/resources</directory>
-				<includes>
-					<include>antipatterns/*.json</include>
-				</includes>
-			</resource>
-			<resource>
-				<directory>src/main/java/resources</directory>
-				<includes>
-					<include>configurations/*.json</include>
-				</includes>
-			</resource>
-		</resources>
 	</build>
 
 </project>
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/AntiPatternRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/AntiPatternRepository.java
index a5ff74e..eda93db 100644
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/AntiPatternRepository.java
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/AntiPatternRepository.java
@@ -11,12 +11,8 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.core.io.FileSystemResource;
 import org.springframework.stereotype.Component;
-import org.springframework.web.context.ServletContextAware;
 
-import javax.servlet.ServletContext;
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
+import java.io.*;
 import java.lang.reflect.InvocationTargetException;
 import java.net.URL;
 import java.util.*;
@@ -25,38 +21,26 @@ import java.util.*;
  * A class that takes care of working with AP.
  */
 @Component
-public class AntiPatternRepository implements ServletContextAware {
+public class AntiPatternRepository {
 
-    private static final String QUERY_DIR = "/queries/";
-    private static final String AP_DIR = "/antipatterns/";
+    private final String QUERY_DIR;
+    private final String AP_DIR;
     private final String OPERATIONALIZATION_DIR;
     private final String OPERATIONALIZATION_IMG_DIR;
     private final Logger LOGGER = LoggerFactory.getLogger(AntiPatternRepository.class);
-    private ServletContext servletContext;
     private Map<Long, AntiPatternDetector> antiPatternDetectors;
 
 
     public AntiPatternRepository(@Value("${DATA_PATH}")String dir){
         this.OPERATIONALIZATION_DIR = dir + "operationalizations/";
         this.OPERATIONALIZATION_IMG_DIR = dir + "operationalizations/images/";
-    }
-    /**
-     * This method load all queries from files for each AP.
-     *
-     * @param servletContext servlet context
-     */
-    @Override
-    public void setServletContext(ServletContext servletContext) {
-        this.servletContext = servletContext;
+        this.AP_DIR = "antipatterns/";
+        this.QUERY_DIR = "queries/";
 
-        // initialize all detectors
         this.antiPatternDetectors = initDetectors();
-
-        // initialize sql queries
         initSqlQueries();
     }
 
-
     /**
      * The method that loads all available detectors that implement
      * the AntiPatternDetector interface creates objects that the
@@ -128,9 +112,9 @@ public class AntiPatternRepository implements ServletContextAware {
             LOGGER.info("Reading sql query from file " + fileName);
 
             try {
-                URL test = servletContext.getResource(QUERY_DIR + fileName);
+                URL url = getClass().getClassLoader().getResource(QUERY_DIR + fileName);
                 BufferedReader read = new BufferedReader(
-                        new InputStreamReader(test.openStream()));
+                        new InputStreamReader(url.openStream()));
                 String line;
                 while ((line = read.readLine()) != null) {
                     if (line.startsWith("select") || line.startsWith("set") && line.charAt(line.length() - 1) == ';') {
@@ -159,7 +143,7 @@ public class AntiPatternRepository implements ServletContextAware {
         LOGGER.info("Reading anti-pattern from json file " + jsonFileName);
 
         try {
-            URL url = servletContext.getResource(AP_DIR + jsonFileName);
+            URL url = getClass().getClassLoader().getResource(AP_DIR + jsonFileName);
 
             BufferedReader read = new BufferedReader(
                     new InputStreamReader(url.openStream()));
diff --git a/src/main/webapp/antipatterns/BusinessAsUsual.json b/src/main/webapp/antipatterns/BusinessAsUsual.json
deleted file mode 100644
index b351de3..0000000
--- a/src/main/webapp/antipatterns/BusinessAsUsual.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
-    "id": "3",
-    "printName": "Business As Usual",
-    "name": "BusinessAsUsual",
-    "description": "Absence of a retrospective after individual iterations or after the completion project.",
-    "thresholds": [
-        {
-            "thresholdName": "divisionOfIterationsWithRetrospective",
-            "thresholdType": "Percentage",
-            "thresholdPrintName": "Division of iterations with retrospective",
-            "thresholdDescription": "Minimum percentage of the total number of iterations with a retrospective (0,100)",
-            "thresholdErrorMess": "Percentage must be float number between 0 and 100"
-        },
-        {
-            "thresholdName": "searchSubstringsWithRetrospective",
-            "thresholdType": "String",
-            "thresholdPrintName": "Search substrings with retrospective",
-            "thresholdDescription": "Substring that will be search in wikipages and activities",
-            "thresholdErrorMess": "Maximum number of substrings is ten and must not starts and ends with characters || "
-        }
-    ],
-    "catalogueFileName": "Business_As_Usual.md"
-}
\ No newline at end of file
diff --git a/src/main/webapp/antipatterns/LongOrNonExistentFeedbackLoops.json b/src/main/webapp/antipatterns/LongOrNonExistentFeedbackLoops.json
deleted file mode 100644
index fce36f8..0000000
--- a/src/main/webapp/antipatterns/LongOrNonExistentFeedbackLoops.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
-    "id": "6",
-    "printName": "Long Or Non Existent Feedback Loops",
-    "name": "LongOrNonExistentFeedbackLoops",
-    "description": "Long spacings between customer feedback or no feedback. The customer enters the project and sees the final result. In the end, the customer may not get what he really wanted. With long intervals of feedback, some misunderstood functionality can be created and we have to spend a lot of effort and time to redo it. ",
-    "thresholds": [
-        {
-            "thresholdName": "divisionOfIterationsWithFeedbackLoop",
-            "thresholdType": "Percentage",
-            "thresholdPrintName": "Division of iterations with feedback loop",
-            "thresholdDescription": "Minimum percentage of the total number of iterations with feedback loop (0,100)",
-            "thresholdErrorMess": "Percentage must be float number between 0 and 100"
-        },
-        {
-            "thresholdName": "maxGapBetweenFeedbackLoopRate",
-            "thresholdType": "PositiveFloat",
-            "thresholdPrintName": "Maximum gap between feedback loop rate",
-            "thresholdDescription": "Value that multiplies average iteration length for given project. Result is maximum threshold value for gap between feedback loops in days.",
-            "thresholdErrorMess": "Maximum gap between feedback loop rate must be positive float number"
-        },
-        {
-            "thresholdName": "searchSubstringsWithFeedbackLoop",
-            "thresholdType": "String",
-            "thresholdPrintName": "Search substrings with feedback loop",
-            "thresholdDescription": "Substring that will be search in wikipages and activities",
-            "thresholdErrorMess": "Maximum number of substrings is ten and must not starts and ends with characters ||"
-        }
-    ]
-}
\ No newline at end of file
diff --git a/src/main/webapp/antipatterns/NinetyNinetyRule.json b/src/main/webapp/antipatterns/NinetyNinetyRule.json
deleted file mode 100644
index 5dcf2f3..0000000
--- a/src/main/webapp/antipatterns/NinetyNinetyRule.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
-    "id": "7",
-    "printName": "Ninety Ninety Rule",
-    "name": "NinetyNinetyRule",
-    "description": "The first 90 percent of the code represents the first 90 percent of development time. The remaining 10 percent of the code represents another 90 percent of development time. Then decide on a long delay of the project compared to the original estimate. The functionality is almost done, some number is already closed and is only waiting for one activity to close, but it has been open for a long time.",
-    "thresholds": [
-        {
-            "thresholdName": "maxDivisionRange",
-            "thresholdType": "PositiveFloat",
-            "thresholdPrintName": "Maximum ration value",
-            "thresholdDescription": "Maximum ratio value of spent and estimated time",
-            "thresholdErrorMess": "Ration values must be positive float number"
-        },
-        {
-            "thresholdName": "maxBadDivisionLimit",
-            "thresholdType": "PositiveInteger",
-            "thresholdPrintName": "Maximum iterations thresholds",
-            "thresholdDescription": "Maximum number of consecutive iterations where the thresholds were exceeded",
-            "thresholdErrorMess": "Maximum number of consecutive iterations must be positive integer number"
-        }
-    ]
-}
\ No newline at end of file
diff --git a/src/main/webapp/antipatterns/RoadToNowhere.json b/src/main/webapp/antipatterns/RoadToNowhere.json
deleted file mode 100644
index 2b88ccf..0000000
--- a/src/main/webapp/antipatterns/RoadToNowhere.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
-    "id": "5",
-    "printName": "Road To Nowhere",
-    "name": "RoadToNowhere",
-    "description": "The project is not sufficiently planned and therefore takes place on an ad hoc basis with an uncertain outcome and deadline. There is no project plan in the project.",
-    "thresholds": [
-        {
-            "thresholdName": "minNumberOfWikiPagesWithProjectPlan",
-            "thresholdType": "PositiveInteger",
-            "thresholdPrintName": "Minimum number of wiki pages with project plan",
-            "thresholdDescription": "Number of wiki pages",
-            "thresholdErrorMess": "Minimum number of wikipages must be positive integer number"
-        },
-        {
-            "thresholdName": "minNumberOfActivitiesWithProjectPlan",
-            "thresholdType": "PositiveInteger",
-            "thresholdPrintName": "Minimum number of activities with project plan",
-            "thresholdDescription": "Number of activities",
-            "thresholdErrorMess": "Minimum number of activities must be positive integer number"
-        },
-        {
-            "thresholdName": "searchSubstringsWithProjectPlan",
-            "thresholdType": "String",
-            "thresholdPrintName": "Search substrings with project plan",
-            "thresholdDescription": "Substring that will be search in wikipages and activities",
-            "thresholdErrorMess": "Maximum number of substrings is ten and must not starts and ends with characters ||"
-        }
-    ],
-    "catalogueFileName": "Road_To_Nowhere.md"
-}
\ No newline at end of file
diff --git a/src/main/webapp/antipatterns/SpecifyNothing.json b/src/main/webapp/antipatterns/SpecifyNothing.json
deleted file mode 100644
index b99a4e5..0000000
--- a/src/main/webapp/antipatterns/SpecifyNothing.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
-    "id": "4",
-    "printName": "Specify Nothing",
-    "name": "SpecifyNothing",
-    "description": "The specification is not done intentionally. Programmers are expected to work better without written specifications.",
-    "thresholds": [
-        {
-            "thresholdName": "minNumberOfWikiPagesWithSpecification",
-            "thresholdType": "PositiveInteger",
-            "thresholdPrintName": "Minimum number of wiki pages with project specification",
-            "thresholdDescription": "Number of wiki pages",
-            "thresholdErrorMess": "Minimum number of wikipages must be positive integer number"
-        },
-        {
-            "thresholdName": "minNumberOfActivitiesWithSpecification",
-            "thresholdType": "PositiveInteger",
-            "thresholdPrintName": "Minimum number of activities with project specification",
-            "thresholdDescription": "Number of activities",
-            "thresholdErrorMess": "Minimum number of activities with project specification must be positive integer number"
-        },
-        {
-            "thresholdName": "minAvgLengthOfActivityDescription",
-            "thresholdType": "PositiveInteger",
-            "thresholdPrintName": "Minimum average length of activity description",
-            "thresholdDescription": "Minimum average number of character of activity description",
-            "thresholdErrorMess": "Minimum average length of activity description must be positive integer number"
-        },
-        {
-            "thresholdName": "searchSubstringsWithProjectSpecification",
-            "thresholdType": "String",
-            "thresholdPrintName": "Search substrings with project specification",
-            "thresholdDescription": "Substring that will be search in wikipages and activities",
-            "thresholdErrorMess": "Maximum number of substrings is ten and must not starts and ends with characters ||"
-        }
-    ],
-    "catalogueFileName": "Specify_Nothing.md"
-}
\ No newline at end of file
diff --git a/src/main/webapp/antipatterns/TooLongSprint.json b/src/main/webapp/antipatterns/TooLongSprint.json
deleted file mode 100644
index 94daeed..0000000
--- a/src/main/webapp/antipatterns/TooLongSprint.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
-    "id": "1",
-    "printName": "Too Long Sprint",
-    "name": "TooLongSprint",
-    "description": "Iterations too long. (ideal iteration length is about 1-2 weeks, maximum 3 weeks). It could also be detected here if the length of the iteration does not change often (It can change at the beginning and at the end of the project, but it should not change in the already started project).",
-    "thresholds": [
-        {
-            "thresholdName": "maxIterationLength",
-            "thresholdType": "PositiveInteger",
-            "thresholdPrintName": "Max Iteration Length",
-            "thresholdDescription": "Maximum iteration length in days",
-            "thresholdErrorMess": "Max iteration length must be positive integer"
-        },
-        {
-            "thresholdName": "maxNumberOfTooLongIterations",
-            "thresholdType": "PositiveInteger",
-            "thresholdPrintName": "Max number of foo long iterations",
-            "thresholdDescription": "Maximum number of too long iterations in project",
-            "thresholdErrorMess": "Max number of too long iterations must be positive integer"
-
-        }
-    ]
-}
\ No newline at end of file
diff --git a/src/main/webapp/antipatterns/VaryingSprintLength.json b/src/main/webapp/antipatterns/VaryingSprintLength.json
deleted file mode 100644
index 03f441c..0000000
--- a/src/main/webapp/antipatterns/VaryingSprintLength.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
-    "id": "2",
-    "printName": "Varying Sprint Length",
-    "name": "VaryingSprintLength",
-    "description": "The length of the sprint changes very often. It is clear that iterations will be different lengths at the beginning and end of the project, but the length of the sprint should not change during the project.",
-    "thresholds": [
-        {
-            "thresholdName": "maxDaysDifference",
-            "thresholdType": "PositiveInteger",
-            "thresholdPrintName": "Max days difference",
-            "thresholdDescription": "Maximum distance of two consecutive iterations in days",
-            "thresholdErrorMess": "Maximum distance must be positive integer number"
-        },
-        {
-            "thresholdName": "maxIterationChanged",
-            "thresholdType": "PositiveInteger",
-            "thresholdPrintName": "Max number of iteration changed",
-            "thresholdDescription": "Maximum allowed number of significant changes in iteration lengths",
-            "thresholdErrorMess": "Maximum number of iterations changed must be positive integer number"
-        }
-    ]
-}
\ No newline at end of file
diff --git a/src/main/webapp/queries/select_all_activities_with_substrings_and_last_modified_date_as_end_date.sql b/src/main/webapp/queries/select_all_activities_with_substrings_and_last_modified_date_as_end_date.sql
deleted file mode 100644
index 2f39d78..0000000
--- a/src/main/webapp/queries/select_all_activities_with_substrings_and_last_modified_date_as_end_date.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Select all activities with substrings and with last modified date as end date */
-select wuv.id, wuv.iterationName, wuv.name, cast(max(fieldChangeView.created) as date) as 'endDate' from workUnitView as wuv inner join fieldChangeView on wuv.id = fieldChangeView.itemId where wuv.projectId = @projectId and (wuv.name like '§0§' or wuv.name like '§1§' or wuv.name like '§2§' or wuv.name like '§3§' or wuv.name like '§4§' or wuv.name like '§5§' or wuv.name like '§6§' or wuv.name like '§7§' or wuv.name like '§8§' or wuv.name like '§9§') GROUP by id order by fieldChangeView.created;
diff --git a/src/main/webapp/queries/select_all_iterations_that_contains_wikipages_with_substrings.sql b/src/main/webapp/queries/select_all_iterations_that_contains_wikipages_with_substrings.sql
deleted file mode 100644
index b3c218a..0000000
--- a/src/main/webapp/queries/select_all_iterations_that_contains_wikipages_with_substrings.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Select all iterations that contains wiki pages which were created or updated in iteration and have name or description that mentions some key words for customer demo*/
-select iteration.name as 'iterationWithCustomerFeedback', cast(max(fieldChangeView.created) as date) as 'appointmentDate' from artifactView inner join fieldChangeView on artifactView.id = fieldChangeView.itemId inner join iteration on (fieldChangeView.created between iteration.startDate and iteration.endDate) and iteration.superProjectId = @projectId where artifactView.artifactClass like 'WIKIPAGE' and artifactView.projectId = @projectId and length(fieldChangeView.newValue) > length(fieldChangeView.oldValue) and (artifactView.name like '§0§' or artifactView.name like '§1§' or artifactView.name like '§2§' or artifactView.name like '§3§' or artifactView.name like '§4§' or artifactView.name like '§5§' or artifactView.name like '§6§' or artifactView.name like '§7§' or artifactView.name like '§8§' or artifactView.name like '§9§') group by iteration.name order by iteration.name;
diff --git a/src/main/webapp/queries/select_all_iterations_with_lengths_without_first_and_last.sql b/src/main/webapp/queries/select_all_iterations_with_lengths_without_first_and_last.sql
deleted file mode 100644
index 00b77b3..0000000
--- a/src/main/webapp/queries/select_all_iterations_with_lengths_without_first_and_last.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-/* !Global variables must be set for proper behavior! Select all iterations with their length without first and last iterations */
-select datediff(endDate, startDate) as `iterationLength` from iteration where iteration.superProjectId = @projectId and iteration.id != @idOfFirstIteration and iteration.id != @idOfLastIteration order by iteration.name;
diff --git a/src/main/webapp/queries/select_all_iterations_with_sum_estimated_and_spent_time.sql b/src/main/webapp/queries/select_all_iterations_with_sum_estimated_and_spent_time.sql
deleted file mode 100644
index f2cbee9..0000000
--- a/src/main/webapp/queries/select_all_iterations_with_sum_estimated_and_spent_time.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Select all activities for each iteration and sum estimated time and spent time */
-select iterationName, sum(estimatedTime) as 'estimatedTime', sum(spentTime) as 'spentTime', sum(spentTime)/sum(estimatedTime) as 'timeDivision',  abs(1-(sum(spentTime)/sum(estimatedTime))) as 'deviation' from workUnitView where projectid = @projectId and iterationName is not null group by iterationName order by iterationName;
diff --git a/src/main/webapp/queries/select_all_wikipages_that_is_updated_in_iteration.sql b/src/main/webapp/queries/select_all_wikipages_that_is_updated_in_iteration.sql
deleted file mode 100644
index 1a98374..0000000
--- a/src/main/webapp/queries/select_all_wikipages_that_is_updated_in_iteration.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Select all wikipages that were created or updated in iteration and have name with retr or revi*/
-select iteration.name as 'iterationName', count(distinct(artifactView.name)) as 'numberOfWikiPages' from artifactView inner join fieldChangeView on artifactView.id = fieldChangeView.itemId inner join iteration on (fieldChangeView.created between iteration.startDate and iteration.endDate) and iteration.superProjectId = @projectId where artifactView.projectId = @projectId and artifactView.artifactClass like 'WIKIPAGE' and (lower(artifactView.name) like lower('§0§') or lower(artifactView.name) like lower('§1§') or lower(artifactView.name) like lower('§2§') or lower(artifactView.name) like lower('§3§') or lower(artifactView.name) like lower('§4§') or lower(artifactView.name) like lower('§5§') or lower(artifactView.name) like lower('§6§') or lower(artifactView.name) like lower('§7§') or lower(artifactView.name) like lower('§8§') or lower(artifactView.name) like lower('§9§')) group by iteration.id order by iteration.name;
diff --git a/src/main/webapp/queries/select_average_iterations_length.sql b/src/main/webapp/queries/select_average_iterations_length.sql
deleted file mode 100644
index db4fad6..0000000
--- a/src/main/webapp/queries/select_average_iterations_length.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Average iteration length */
-select avg(abs(dateDiff(iteration.endDate, iteration.startDate))) as 'averageIterationLength' from iteration where superProjectId = @projectId;
diff --git a/src/main/webapp/queries/select_iterations_with_substrings.sql b/src/main/webapp/queries/select_iterations_with_substrings.sql
deleted file mode 100644
index 957c941..0000000
--- a/src/main/webapp/queries/select_iterations_with_substrings.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Select all iteration with detected retrospective activities */
-select iterationName as 'iterationName', count(name) as 'numberOfIssues' from workUnitView where projectId = @projectId and (lower(name) like lower('§0§') or lower(name) like lower('§1§') or lower(name) like lower('§2§') or lower(name) like lower('§3§') or lower(name) like lower('§4§') or lower(name) like lower('§5§') or lower(name) like lower('§6§') or lower(name) like lower('§7§') or lower(name) like lower('§8§') or lower(name) like lower('§9§')) group by iterationName;
diff --git a/src/main/webapp/queries/select_number_of_activities_and_wiki_pages_with_substrings.sql b/src/main/webapp/queries/select_number_of_activities_and_wiki_pages_with_substrings.sql
deleted file mode 100644
index 2d0ad48..0000000
--- a/src/main/webapp/queries/select_number_of_activities_and_wiki_pages_with_substrings.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-/* !Global variables must be set for proper behavior.! Select number of activities and wiki pages with given substrings and for given projects. */
-select @projectId as `projectId`, @numberOfActivitiesWithSubstrings as `numberOfActivitiesWithSubstrings`, @numberOfWikiPagesWithSubstrings as `numberOfWikiPagesWithSubstrings`;
diff --git a/src/main/webapp/queries/select_number_of_iterations.sql b/src/main/webapp/queries/select_number_of_iterations.sql
deleted file mode 100644
index fbb36a4..0000000
--- a/src/main/webapp/queries/select_number_of_iterations.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Number of iterations for given project */
-select COUNT(id) as 'numberOfIterations' from iteration where superProjectId = @projectId and name like '%itera%';
diff --git a/src/main/webapp/queries/select_number_of_iterations_with_substrings_in_activity.sql b/src/main/webapp/queries/select_number_of_iterations_with_substrings_in_activity.sql
deleted file mode 100644
index 4333035..0000000
--- a/src/main/webapp/queries/select_number_of_iterations_with_substrings_in_activity.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Select number of iterations which with substring in activity */
-select count(*) over () as 'totalCountOfIterationsWithSubstringsInActivity' from workUnitView as wuv where wuv.projectId = @projectId and (wuv.name like '§0§' or wuv.name like '§1§' or wuv.name like '§2§' or wuv.name like '§3§' or wuv.name like '§4§' or wuv.name like '§5§' or wuv.name like '§6§' or wuv.name like '§7§' or wuv.name like '§8§' or wuv.name like '§9§') group by wuv.iterationName order by wuv.activityEndDate;
diff --git a/src/main/webapp/queries/select_project_end_date.sql b/src/main/webapp/queries/select_project_end_date.sql
deleted file mode 100644
index f307cc7..0000000
--- a/src/main/webapp/queries/select_project_end_date.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Get project end date */
-select endDate as 'projectEndDate' from iteration where superProjectId = @projectId order by endDate desc limit 1;
diff --git a/src/main/webapp/queries/select_project_start_date.sql b/src/main/webapp/queries/select_project_start_date.sql
deleted file mode 100644
index cf9ade2..0000000
--- a/src/main/webapp/queries/select_project_start_date.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Get project start date */
-select startDate as 'projectStartDate' from iteration where superProjectId = @projectId order by startDate limit 1;
diff --git a/src/main/webapp/queries/select_statistics_for_given_project.sql b/src/main/webapp/queries/select_statistics_for_given_project.sql
deleted file mode 100644
index 6186188..0000000
--- a/src/main/webapp/queries/select_statistics_for_given_project.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-/* !Global variables must be set for proper behavior! Show number of wiki pages, number */
-select @projectId as `projectId`, @numberOfWikiPagesWithSubstrings as `numberOfWikiPagesWithSubstrings`, @numberOfActivitiesWithSubstrings as `numberOfActivitiesWithSubstrings`, @averageLengthOfIssueDescription as `averageLengthOfIssueDescription`;
diff --git a/src/main/webapp/queries/set_average_length_of_activities_description.sql b/src/main/webapp/queries/set_average_length_of_activities_description.sql
deleted file mode 100644
index 32a01d8..0000000
--- a/src/main/webapp/queries/set_average_length_of_activities_description.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Count average length of issues description */
-set @averageLengthOfIssueDescription = (select AVG(CHAR_LENGTH(workUnitView.description)) from workUnitView where workUnitView.projectId = @projectId);
diff --git a/src/main/webapp/queries/set_first_iteration_id.sql b/src/main/webapp/queries/set_first_iteration_id.sql
deleted file mode 100644
index b290ba6..0000000
--- a/src/main/webapp/queries/set_first_iteration_id.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Id of first iteration */
-set @idOfFirstIteration = (select id from iteration where iteration.superProjectId = @projectId order by name limit 1);
diff --git a/src/main/webapp/queries/set_first_iteration_start_date.sql b/src/main/webapp/queries/set_first_iteration_start_date.sql
deleted file mode 100644
index fcb1cba..0000000
--- a/src/main/webapp/queries/set_first_iteration_start_date.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-/* set first iteration start date to the global values named @firstIterationStartDate */
-set @firstIterationStartDate = (select startDate from iteration where superProjectId = @projectId ORDER BY startDate LIMIT 1 offset 0);
diff --git a/src/main/webapp/queries/set_last_iteration_id.sql b/src/main/webapp/queries/set_last_iteration_id.sql
deleted file mode 100644
index 71bfb81..0000000
--- a/src/main/webapp/queries/set_last_iteration_id.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Id of last iteration */
-set @idOfLastIteration = (select id from iteration where iteration.superProjectId = @projectId order by name desc limit 1);
diff --git a/src/main/webapp/queries/set_number_of_activities_with_substrings.sql b/src/main/webapp/queries/set_number_of_activities_with_substrings.sql
deleted file mode 100644
index 31d88df..0000000
--- a/src/main/webapp/queries/set_number_of_activities_with_substrings.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Select number of activities with given substrings and set it to the global value named @numberOfActivitiesWithSubstrings */
-set @numberOfActivitiesWithSubstrings = (SELECT count(*) from workUnitView where projectId = @projectId  and (lower(workUnitView.name) like lower('§0§') or lower(workUnitView.description) like lower('§0§') or lower(workUnitView.name) like lower('§1§') or lower(workUnitView.description) like lower('§1§') or lower(workUnitView.name) like lower('§2§') or lower(workUnitView.description) like lower('§2§') or lower(workUnitView.name) like lower('§3§') or lower(workUnitView.description) like lower('§3§') or lower(workUnitView.name) like lower('§4§') or lower(workUnitView.description) like lower('§4§') or lower(workUnitView.name) like lower('§5§') or lower(workUnitView.description) like lower('§5§') or lower(workUnitView.name) like lower('§6§') or lower(workUnitView.description) like lower('§6§') or lower(workUnitView.name) like lower('§7§') or lower(workUnitView.description) like lower('§7§') or lower(workUnitView.name) like lower('§8§') or lower(workUnitView.description) like lower('§8§') or lower(workUnitView.name) like lower('§9§') or lower(workUnitView.description) like lower('§9§')) AND (iterationStartDate = @firstIterationStartDate OR iterationStartDate = @secondIterationStartDate));
diff --git a/src/main/webapp/queries/set_number_of_wiki_pages_with_substrings.sql b/src/main/webapp/queries/set_number_of_wiki_pages_with_substrings.sql
deleted file mode 100644
index 766ec19..0000000
--- a/src/main/webapp/queries/set_number_of_wiki_pages_with_substrings.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Select number of wiki pages with given substrings and set it to the global value named @numberOfWikiPagesWithSubstrings */
-set @numberOfWikiPagesWithSubstrings = (SELECT count(*) from artifactView where projectId = @projectId AND artifactClass like 'WIKIPAGE' AND (lower(artifactView.name) like lower('§0§') or lower(artifactView.description) like lower('§0§') or lower(artifactView.name) like lower('§1§') or lower(artifactView.description) like lower('§1§') or lower(artifactView.name) like lower('§2§') or lower(artifactView.description) like lower('§2§') or lower(artifactView.name) like lower('§3§') or lower(artifactView.description) like lower('§3§') or lower(artifactView.name) like lower('§4§') or lower(artifactView.description) like lower('§4§') or lower(artifactView.name) like lower('§5§') or lower(artifactView.description) like lower('§5§') or lower(artifactView.name) like lower('§6§') or lower(artifactView.description) like lower('§6§') or lower(artifactView.name) like lower('§7§') or lower(artifactView.description) like lower('§7§') or lower(artifactView.name) like lower('§8§') or lower(artifactView.description) like lower('§8§') or lower(artifactView.name) like lower('§9§') or lower(artifactView.description) like lower('§9§')));
diff --git a/src/main/webapp/queries/set_project_id.sql b/src/main/webapp/queries/set_project_id.sql
deleted file mode 100644
index 31226cf..0000000
--- a/src/main/webapp/queries/set_project_id.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Init project id */
-set @projectId = ?;
diff --git a/src/main/webapp/queries/set_second_iteration_start_date.sql b/src/main/webapp/queries/set_second_iteration_start_date.sql
deleted file mode 100644
index 8abc038..0000000
--- a/src/main/webapp/queries/set_second_iteration_start_date.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-/* set second iteration start date to the global values named @firstIterationStartDate */
-set @secondIterationStartDate = (select startDate from iteration where superProjectId = @projectId ORDER BY startDate LIMIT 1 offset 1);
