diff --git a/README.md b/README.md index 9511c33..999b345 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ The service of decision support system is inferring knowledge from the available data of the greenhouse, the user input, and historical data what a user/the gardener should do & which action a gardener should execute to be successful with the growing process of the plants. These actions are called goals. The list of inferred active goals is offered to other services of the system. - The approach of the DSS is based on three main concepts: + The approach of the DSS is based on three MainExe concepts: **Fact knowledge (Knowledgebase)** diff --git a/pom.xml b/pom.xml index 12d6e77..eec0fbf 100644 --- a/pom.xml +++ b/pom.xml @@ -60,6 +60,35 @@ + + + org.drools + drools-core + 7.48.0.Final + + + + org.drools + drools-compiler + 7.48.0.Final + + + + org.drools + drools-decisiontables + 7.48.0.Final + + + + org.kie + kie-api + 7.48.0.Final + provided + + + + + diff --git a/src/main/java/ApiCall.java b/src/main/java/ApiCall.java index 0b7c520..196dd8e 100644 --- a/src/main/java/ApiCall.java +++ b/src/main/java/ApiCall.java @@ -1,14 +1,18 @@ - - - -import org.eclipse.jetty.http.HttpHeader; +import Credentials.UserCredentials; +import Files.ReadFile; +import Files.WriteFile; +import HttpCall.HttpCall; +import HttpCall.HttpPost; +import org.apache.jena.base.Sys; +import org.json.JSONArray; import org.json.JSONObject; +import org.json.simple.parser.JSONParser; +import org.json.simple.parser.ParseException; -import java.net.PasswordAuthentication; +import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import java.net.http.HttpClient; -import java.net.http.HttpHeaders; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.util.concurrent.CompletableFuture; @@ -16,66 +20,66 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; - public class ApiCall { - private static String token ="0"; - private static String oldId="1"; + private static String token = "0"; + private static String oldId = "1"; public static String FetchDataFromApi(String extension) throws InterruptedException, ExecutionException, TimeoutException { + UserCredentials userCredentials = new UserCredentials(); + final String username = userCredentials.getUsername(); + final String password = userCredentials.getPassword(); + String baseURL = userCredentials.getBaseURL(); + String outputToken; + WriteFile writingIntoFile = new WriteFile(); + HttpCall httpCall = new HttpCall(); + String devicesResult = ""; - final String username = "kevin.shehu@hochschule-rhein-waal.de"; - final String password = "DK7SxFkGJgnLhnU3"; - String baseURL = "https://api.dev.whysor.com/"; - String outputToken = null; - - if (token.equals(oldId)){ + if (token.equals(oldId)) { //do nothing - } - else { - SecurityToken securityToken = new SecurityToken(); + } else { try { - outputToken = securityToken.OnCallMethod(username,password); + outputToken = SecurityToken.OnCallMethod(username, password); JSONObject obj = new JSONObject(outputToken); token = obj.getString("id"); + + writingIntoFile.WriteFile("/Users/ksh/Documents/Work/GGD/src/main/java/Data/securityToken.txt", token); oldId = token; - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (ExecutionException e) { - e.printStackTrace(); - } catch (TimeoutException e) { + } catch (Exception e) { e.printStackTrace(); } } + try { + devicesResult = httpCall.HttpGet(baseURL + extension + "?access_token=" + token,token); + JSONArray jsonarray = new JSONArray(devicesResult); + for (int i = 0; i < jsonarray.length(); i++) { + JSONObject jsonobject = jsonarray.getJSONObject(i); + String id = jsonobject.getString("id"); + System.out.println(id); + writingIntoFile.WriteFile("/Users/ksh/Documents/Work/GGD/src/main/java/Data/devicesID.txt", id); + } - System.out.println(token); - var client = HttpClient.newBuilder() - .version(HttpClient.Version.HTTP_1_1) - .followRedirects(HttpClient.Redirect.ALWAYS) - .build(); - HttpRequest request = null; + } catch (Exception e) { + e.printStackTrace(); + } - try { - request = HttpRequest.newBuilder(new URI(baseURL+extension)) - .POST(HttpRequest.BodyPublishers.ofString(extension)) - .setHeader("Authorization" , token) - .setHeader("Content-Type", "application/json") - .setHeader("Accept", "application/json") - .build(); + try { + writingIntoFile.WriteFile("/Users/ksh/Documents/Work/GGD/src/main/java/Data/" + extension + "Output.json", devicesResult); + } catch (IOException e) { + e.printStackTrace(); + } catch (Exception e) { + e.printStackTrace(); + } + return devicesResult; + - } catch (URISyntaxException e) { - e.printStackTrace(); - } - CompletableFuture> response = client.sendAsync(request, HttpResponse.BodyHandlers.ofString()); - String result = response.thenApply(HttpResponse::body).get(5, TimeUnit.SECONDS); - return result; } - + } diff --git a/src/main/java/Credentials/UserCredentials.java b/src/main/java/Credentials/UserCredentials.java new file mode 100644 index 0000000..2c2861f --- /dev/null +++ b/src/main/java/Credentials/UserCredentials.java @@ -0,0 +1,42 @@ +package Credentials; + +public class UserCredentials { + private String username = "kevin.shehu@hochschule-rhein-waal.de"; + private String password = "DK7SxFkGJgnLhnU3"; + private String baseURL = "https://api.dev.whysor.com/"; + + + + public String getUsername() { + return username; + } + + public String getPassword() { + return password; + } + + public String getBaseURL() { + return baseURL; + } + + public void setUsername(String username) { + this.username = username; + } + + public void setPassword(String password) { + this.password = password; + } + + public void setBaseURL(String baseURL) { + this.baseURL = baseURL; + } + + @Override + public String toString() { + return "UserCredentials{" + + "username='" + username + '\'' + + ", password='" + password + '\'' + + ", baseURL='" + baseURL + '\'' + + '}'; + } +} diff --git a/src/main/java/Data/devicesID.txt b/src/main/java/Data/devicesID.txt new file mode 100644 index 0000000..41a1c45 --- /dev/null +++ b/src/main/java/Data/devicesID.txt @@ -0,0 +1 @@ +e5728985-f4f5-4b9a-ae32-9d6ae40f9f53 \ No newline at end of file diff --git a/src/main/java/Data/devicesOutput.json b/src/main/java/Data/devicesOutput.json new file mode 100644 index 0000000..bab946c --- /dev/null +++ b/src/main/java/Data/devicesOutput.json @@ -0,0 +1 @@ +[{"id":"087c830b-1173-4b5b-bdbc-c139856cf6aa","externalDomain":["kpn-lora","modelapi"],"externalId":"70B3D57050004C5A","name":"70B3D57050004C5A","description":"6kg sensor","additionalInfo":{"location":{"latitude":51.289406,"longitude":6.042}},"deviceTemplateId":"7be8a213-65e9-4084-b73b-9d5cfcc46cc0","organizationId":"46224b7f-bf6e-4a14-8844-c8d9258a58bf"},{"id":"09d69136-7bdb-420e-83eb-8185d39b06c3","externalDomain":["kpn-lora","modelapi"],"externalId":"70B3D570500046AA","name":"70B3D570500046AA","description":"6kg sensor","additionalInfo":{},"deviceTemplateId":"7be8a213-65e9-4084-b73b-9d5cfcc46cc0","organizationId":"46224b7f-bf6e-4a14-8844-c8d9258a58bf"},{"id":"142ad259-c570-49cc-bf58-99105231c051","externalDomain":["kpn-lora","modelapi"],"externalId":"70B3D57050004657","name":"70B3D57050004657","description":"6kg sensor","additionalInfo":{},"deviceTemplateId":"7be8a213-65e9-4084-b73b-9d5cfcc46cc0","organizationId":"46224b7f-bf6e-4a14-8844-c8d9258a58bf"},{"id":"1f6184e2-3cfb-43e7-83a4-ea175c8590f4","externalDomain":["kpn-lora","modelapi"],"externalId":"70B3D5705000473D","name":"70B3D5705000473D","description":"","additionalInfo":{},"deviceTemplateId":"7be8a213-65e9-4084-b73b-9d5cfcc46cc0","organizationId":"46224b7f-bf6e-4a14-8844-c8d9258a58bf"},{"id":"21c94566-202d-4c12-af0d-035b8db19d32","externalDomain":["kpn-lora","modelapi"],"externalId":"70B3D57050004A7B","name":"70B3D57050004A7B","description":"","additionalInfo":{},"deviceTemplateId":"7be8a213-65e9-4084-b73b-9d5cfcc46cc0","organizationId":"46224b7f-bf6e-4a14-8844-c8d9258a58bf"},{"id":"98e242b8-e49d-4eb5-a56e-a5665c05b3a3","externalDomain":["kpn-lora","modelapi"],"externalId":"70B3D57050004619","name":"70B3D57050004619","description":"","additionalInfo":{},"deviceTemplateId":"7be8a213-65e9-4084-b73b-9d5cfcc46cc0","organizationId":"46224b7f-bf6e-4a14-8844-c8d9258a58bf"},{"id":"b4f3ca19-1648-4df1-a83d-089c8064a6ff","externalDomain":["kpn-lora","modelapi"],"externalId":"70B3D57050004636","name":"70B3D57050004636","description":"6kg sensor","additionalInfo":{},"deviceTemplateId":"7be8a213-65e9-4084-b73b-9d5cfcc46cc0","organizationId":"46224b7f-bf6e-4a14-8844-c8d9258a58bf"},{"id":"b61c30d1-9281-4fc7-ab70-a43861fe0264","externalDomain":["kpn-lora","modelapi"],"externalId":"70B3D5705000471F","name":"70B3D5705000471F","description":"","additionalInfo":{},"deviceTemplateId":"7be8a213-65e9-4084-b73b-9d5cfcc46cc0","organizationId":"46224b7f-bf6e-4a14-8844-c8d9258a58bf"},{"id":"c97e36da-8274-43aa-a226-7e1bf8b943b0","externalDomain":["kpn-lora","modelapi"],"externalId":"70B3D5705000473C","name":"70B3D5705000473C","description":"","additionalInfo":{},"deviceTemplateId":"7be8a213-65e9-4084-b73b-9d5cfcc46cc0","organizationId":"46224b7f-bf6e-4a14-8844-c8d9258a58bf"},{"id":"e5728985-f4f5-4b9a-ae32-9d6ae40f9f53","externalDomain":["kpn-lora","modelapi"],"externalId":"70B3D5705000461C","name":"70B3D5705000461C","description":"6kg sensor","additionalInfo":{"location":{"latitude":51.28905,"longitude":6.042781}},"deviceTemplateId":"7be8a213-65e9-4084-b73b-9d5cfcc46cc0","organizationId":"46224b7f-bf6e-4a14-8844-c8d9258a58bf"}] \ No newline at end of file diff --git a/src/main/java/Data/securityToken.json b/src/main/java/Data/readAll.json similarity index 100% rename from src/main/java/Data/securityToken.json rename to src/main/java/Data/readAll.json diff --git a/src/main/java/Data/securityToken.txt b/src/main/java/Data/securityToken.txt new file mode 100644 index 0000000..e979737 --- /dev/null +++ b/src/main/java/Data/securityToken.txt @@ -0,0 +1 @@ +ZcUXmzWkBB5eJSzcllxFlUpgWh7ujC2T6TdB9YdXr5ddERrjiHsp5rmPYrpG5sCU \ No newline at end of file diff --git a/src/main/java/Data/sensorOutput.json b/src/main/java/Data/sensorOutput.json new file mode 100644 index 0000000..e69de29 diff --git a/src/main/java/Files/ReadFile.java b/src/main/java/Files/ReadFile.java new file mode 100644 index 0000000..cd4b7bd --- /dev/null +++ b/src/main/java/Files/ReadFile.java @@ -0,0 +1,28 @@ +package Files; + +import java.io.File; // Import the File class + import java.io.FileNotFoundException; // Import this class to handle errors + import java.util.Scanner; // Import the Scanner class to read text files + +public class ReadFile { + public String data; + + public String ReadFromFile(String path){ + + try { + File myObj = new File(path); + Scanner myReader = new Scanner(myObj); + while (myReader.hasNextLine()) { + data = myReader.nextLine(); + System.out.println(data); + } + myReader.close(); + } catch (FileNotFoundException e) { + System.out.println("An error occurred."); + e.printStackTrace(); + } + return data; + } + + +} \ No newline at end of file diff --git a/src/main/java/Files/WriteFile.java b/src/main/java/Files/WriteFile.java new file mode 100644 index 0000000..76304c7 --- /dev/null +++ b/src/main/java/Files/WriteFile.java @@ -0,0 +1,38 @@ +package Files; + +import java.io.*; + + +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeoutException; + +public class WriteFile { + BufferedWriter buffer = null; + + public void WriteFile(String path, String input) throws Exception{ + try { + File file = new File(path); + if (!file.exists()) { + file.createNewFile(); + } + + FileWriter fileWriter = new FileWriter(path); + buffer = new BufferedWriter(fileWriter); + buffer.write(input); + + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } finally { + try { + if (buffer != null) + buffer.flush(); +// buffer.close(); + } catch (Exception ex) { + System.out.println("Error in closing the BufferedWriter" + ex); + } + } + + } +} diff --git a/src/main/java/HttpCall/HttpCall.java b/src/main/java/HttpCall/HttpCall.java new file mode 100644 index 0000000..7ba3605 --- /dev/null +++ b/src/main/java/HttpCall/HttpCall.java @@ -0,0 +1,40 @@ +package HttpCall; + +import java.net.URI; +import java.net.URISyntaxException; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; + +public class HttpCall { + public String HttpGet (String baseURL, String token) throws InterruptedException, ExecutionException, TimeoutException { + var client = HttpClient.newBuilder() + .version(HttpClient.Version.HTTP_1_1) + .followRedirects(HttpClient.Redirect.ALWAYS) + .build(); + HttpRequest request = null; + try { + request = HttpRequest.newBuilder(new URI(baseURL)) + .setHeader("Authorization", token) +// .setHeader("access_token", token) + .setHeader("Content-Type", "application/json") + .setHeader("Accept", "application/json") + .header("Authority", "https://api.dev.whysor.com/") + .build(); + + } catch (URISyntaxException e) { + e.printStackTrace(); + } + CompletableFuture> response = client.sendAsync(request, HttpResponse.BodyHandlers.ofString()); + String result = response.thenApply(HttpResponse::body).get(5, TimeUnit.SECONDS); + + + + return result; + + } +} diff --git a/src/main/java/HttpCall/HttpPost.java b/src/main/java/HttpCall/HttpPost.java new file mode 100644 index 0000000..6cdce9b --- /dev/null +++ b/src/main/java/HttpCall/HttpPost.java @@ -0,0 +1,42 @@ +package HttpCall; + +import java.net.URI; +import java.net.URISyntaxException; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.TimeUnit; + +public class HttpPost { + public String HttpCallPost (String baseUrl, String body) throws Exception { + + var client = HttpClient.newBuilder() + .version(HttpClient.Version.HTTP_1_1) + .followRedirects(HttpClient.Redirect.ALWAYS) + .build(); + HttpRequest request = null; + try { + request = HttpRequest.newBuilder(new URI(baseUrl)) + .POST(HttpRequest.BodyPublishers.ofString(body)) + .setHeader("Content-Type", "application/json") + .setHeader("Accept", "application/json") + .header("Authority", "https://api.dev.whysor.com/") + .build(); + + } catch (URISyntaxException e) { + e.printStackTrace(); + } +// client.sendAsync(request, HttpResponse.BodyHandlers.ofString()) +// .thenApply(HttpResponse::body) +// .thenAccept(System.out::println) +// .join(); + + CompletableFuture> response = client.sendAsync(request, HttpResponse.BodyHandlers.ofString()); + String result = response.thenApply(HttpResponse::body).get(5, TimeUnit.SECONDS); + + + + return result; + } +} diff --git a/src/main/java/JSON2RDF/JSON2RDF.java b/src/main/java/JSON2RDF/JSON2RDF.java index c525046..3981edd 100644 --- a/src/main/java/JSON2RDF/JSON2RDF.java +++ b/src/main/java/JSON2RDF/JSON2RDF.java @@ -32,7 +32,7 @@ public class JSON2RDF { } } -// @CommandLine.Parameters(paramLabel = "D:\\WORK\\GGD\\src\\main\\java\\Data", description = "json file") +// @CommandLine.Parameters(paramLabel = "D:\\WORK\\GGD\\src\\MainExe\\java\\Data", description = "json file") @CommandLine.Option(names = { "--input-charset" }, description = "Input charset (default: ${DEFAULT-VALUE})") private final Charset inputCharset = StandardCharsets.UTF_8; diff --git a/src/main/java/main.java b/src/main/java/MainExe.java similarity index 72% rename from src/main/java/main.java rename to src/main/java/MainExe.java index b00559b..d30440f 100644 --- a/src/main/java/main.java +++ b/src/main/java/MainExe.java @@ -2,17 +2,12 @@ import java.util.Timer; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; -public class main { +public class MainExe { public static void main(String[] args){ Timer time = new Timer(); // Instantiate Timer Object ScheduledTask scheduledTask = new ScheduledTask(); // Instantiate SheduledTask class - time.schedule(scheduledTask, 0, 1000 ); // Create Repetitively task for every 1 secs - - - - - + time.schedule(scheduledTask, 0, 1000 * 60 * 1 ); // Create Repetitively task for every 1 secs } } diff --git a/src/main/java/RDFConnectionExample.java b/src/main/java/RDFConnectionExample.java deleted file mode 100644 index 9399411..0000000 --- a/src/main/java/RDFConnectionExample.java +++ /dev/null @@ -1,16 +0,0 @@ -import org.apache.jena.query.Query; -import org.apache.jena.query.QueryFactory; -import org.apache.jena.query.ResultSetFormatter; -import org.apache.jena.rdfconnection.RDFConnectionFuseki; -import org.apache.jena.rdfconnection.RDFConnectionRemoteBuilder; - - -public class RDFConnectionExample { - public static void main(String ...args) { - - RDFConnectionRemoteBuilder builder = RDFConnectionFuseki.create() - .destination("http://localhost:3030/fuseki"); - - } -} - diff --git a/src/main/java/RuleEngine/KalunaRules.java b/src/main/java/RuleEngine/KalunaRules.java new file mode 100644 index 0000000..aaa7a7d --- /dev/null +++ b/src/main/java/RuleEngine/KalunaRules.java @@ -0,0 +1,5 @@ +package RuleEngine; + +public class KalunaRules { + +} diff --git a/src/main/java/ScheduledTask.java b/src/main/java/ScheduledTask.java index 4d37aef..df80a9c 100644 --- a/src/main/java/ScheduledTask.java +++ b/src/main/java/ScheduledTask.java @@ -1,3 +1,11 @@ +import org.json.simple.JSONObject; +import org.json.simple.parser.JSONParser; +import org.json.simple.parser.ParseException; + +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; import java.util.TimerTask; import java.util.Date; import java.util.concurrent.ExecutionException; @@ -7,16 +15,20 @@ import java.util.concurrent.TimeoutException; public class ScheduledTask extends TimerTask { Date now; // to display current time + BufferedWriter bw = null; // Add your task here public void run() { // Display current time now = new Date(); // initialize date System.out.println("Time is :" + now); - ApiCall apiCall = new ApiCall(); - String output = null; + String outputDevices = ""; + String devicesExtension = "devices"; + String sensorExtension = "sensors"; //read and readMultiple try { - output = apiCall.FetchDataFromApi("devices"); + outputDevices = ApiCall.FetchDataFromApi(devicesExtension); +// outputDevices = ApiCall.FetchDataFromApi(sensorExtension); + } catch (InterruptedException e) { e.printStackTrace(); } catch (ExecutionException e) { @@ -24,6 +36,9 @@ public class ScheduledTask extends TimerTask { } catch (TimeoutException e) { e.printStackTrace(); } - System.out.println("Output :" + output); // Display current output + System.out.println("Output :" + outputDevices); // Display current output + + + } } \ No newline at end of file diff --git a/src/main/java/SecurityToken.java b/src/main/java/SecurityToken.java index d9c4eb0..18b2210 100644 --- a/src/main/java/SecurityToken.java +++ b/src/main/java/SecurityToken.java @@ -1,50 +1,24 @@ -import java.net.URI; -import java.net.URISyntaxException; -import java.net.http.HttpClient; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.util.concurrent.CompletableFuture; +import HttpCall.HttpPost; + import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; public class SecurityToken { - public static String OnCallMethod(String username, String password) throws InterruptedException, ExecutionException, TimeoutException { + public static String OnCallMethod(String username, String password) throws Exception { //CONFIG PARAMETERS: //BEGIN------------CONFIG PARAMETERS BELOW TO YOUR ENVIRONMENT--------------------------------------- String baseURL = "https://api.dev.whysor.com/users/login"; - final String body= String.format("{\"email\": \"%s\", \"password\": \"%s\", \"domain\": \"my.dev.yookr.org\"}", username, password); + final String body = String.format("{\"email\": \"%s\", \"password\": \"%s\", \"domain\": \"my.dev.yookr.org\"}", username, password); + HttpPost httpMethodPost = new HttpPost(); - var client = HttpClient.newBuilder() - .version(HttpClient.Version.HTTP_1_1) - .followRedirects(HttpClient.Redirect.ALWAYS) - .build(); - HttpRequest request = null; + return httpMethodPost.HttpCallPost(baseURL, body); - try { - request = HttpRequest.newBuilder(new URI(baseURL)) - .POST(HttpRequest.BodyPublishers.ofString(body)) - .setHeader("Content-Type", "application/json") - .setHeader("Accept", "application/json") - .header("Authority","https://api.dev.whysor.com/") - .build(); - } catch (URISyntaxException e) { - e.printStackTrace(); - } -// client.sendAsync(request, HttpResponse.BodyHandlers.ofString()) -// .thenApply(HttpResponse::body) -// .thenAccept(System.out::println) -// .join(); - - CompletableFuture> response = client.sendAsync(request, HttpResponse.BodyHandlers.ofString()); - String result = response.thenApply(HttpResponse::body).get(5, TimeUnit.SECONDS); - return result; -// return HttpResponse.BodyHandlers.ofFile(Paths.get("D:\\WORK\\GGD\\src\\main\\java\\Data\\securityToken.json")); } + } diff --git a/src/main/java/Sensors/Sensors.java b/src/main/java/Sensors/Sensors.java new file mode 100644 index 0000000..541c764 --- /dev/null +++ b/src/main/java/Sensors/Sensors.java @@ -0,0 +1,24 @@ +package Sensors; + +public class Sensors { + public enum SensorType { + temperature, humidity + } + public enum Type { + KALUNA, TULIPS, TOMATOs + } + private int sensorId; + private String sensorDescription; + private int sensorBattery; + private int sensorOutput; + private int latitude; + private int longitude; + + + + + + + + +} diff --git a/src/main/java/SpecificApiCall.java b/src/main/java/SpecificApiCall.java new file mode 100644 index 0000000..8111170 --- /dev/null +++ b/src/main/java/SpecificApiCall.java @@ -0,0 +1,25 @@ +import Credentials.UserCredentials; +import Files.ReadFile; +import org.json.simple.JSONArray; +import org.json.simple.parser.JSONParser; +import org.json.simple.parser.ParseException; + +import java.io.FileNotFoundException; +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; + +public class SpecificApiCall { + public static String FetchSpecificDataWithID(String extension) { + + JSONParser parser = new JSONParser(); + UserCredentials userCredentials = new UserCredentials(); + ReadFile fileReader = new ReadFile(); + String token = fileReader.ReadFromFile("/Users/ksh/Documents/Work/GGD/src/MainExe/java/Data/securityToken.txt"); + + + return token; + } +} \ No newline at end of file diff --git a/src/main/resources/RuleEngine/TestRule.drl b/src/main/resources/RuleEngine/TestRule.drl new file mode 100644 index 0000000..e69de29 diff --git a/target/classes/RuleEngine/TestRule.drl b/target/classes/RuleEngine/TestRule.drl new file mode 100644 index 0000000..e69de29