From 0cb7ded87955286f950d2802fc6a0d1c9c26726a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magdalena=20Grodzi=C5=84ska?= Date: Wed, 15 Jan 2020 04:44:54 +0100 Subject: Add setting contacts in a fetcher flag --- src/main/java/pl/edu/mimuw/cloudatlas/fetcher/Fetcher.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/fetcher/Fetcher.java') diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/fetcher/Fetcher.java b/src/main/java/pl/edu/mimuw/cloudatlas/fetcher/Fetcher.java index 12d795a..2b8d033 100644 --- a/src/main/java/pl/edu/mimuw/cloudatlas/fetcher/Fetcher.java +++ b/src/main/java/pl/edu/mimuw/cloudatlas/fetcher/Fetcher.java @@ -7,11 +7,10 @@ import java.rmi.RemoteException; import java.rmi.registry.LocateRegistry; import java.rmi.registry.Registry; import java.io.*; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; +import java.util.*; import com.google.gson.Gson; +import pl.edu.mimuw.cloudatlas.client.ClientController; import pl.edu.mimuw.cloudatlas.model.*; public class Fetcher { @@ -98,13 +97,17 @@ public class Fetcher { String jsonAttribs; System.out.println(System.getProperty("user.dir")); - + String fallbackContactsString = System.getProperty("fallback_contacts"); + System.out.println(fallbackContactsString); try { initializeApiStub(); initializePythonProcess(); bufferRead = new BufferedReader( new InputStreamReader(pythonProcess.getInputStream())); + Set fallbackContacts = new HashSet(); + api.setFallbackContacts(ClientController.parseContactsString(fallbackContactsString)); + while((jsonAttribs = bufferRead.readLine()) != null) { System.out.println(jsonAttribs); System.out.flush(); -- cgit v1.2.3