diff options
Diffstat (limited to 'src/main/java/pl/edu')
-rw-r--r-- | src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java b/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java index 80a331e..a122813 100644 --- a/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java +++ b/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java @@ -94,6 +94,7 @@ public class ClientController { private Set<ValueContact> parseContactsString(DataStringInput contactsInput) throws Exception { Gson gson = new Gson(); + System.out.println(contactsInput); Map<String, ArrayList> contactStrings = gson.fromJson(contactsInput.getString(), Map.class); Set<ValueContact> contactObjects = new HashSet<ValueContact>(); ArrayList<Double> cAddr; @@ -147,6 +148,7 @@ public class ClientController { String currentTypeString = types.get(1); AttributeInput attributeInput = new AttributeInput(); ArrayList<String> newTypes = new ArrayList<>(types.subList(1, types.size())); + Gson gson = new Gson(); for (int i = 0; i < values.size(); i++) { if (currentTypeString.equals("List")) { @@ -155,7 +157,7 @@ public class ClientController { resultValue.add(parseSetAttributeValue((List) values.get(i), newTypes)); } else { attributeInput.setAttributeType(currentTypeString); - attributeInput.setValueString(values.get(i).toString()); + attributeInput.setValueString(gson.toJson(values.get(i))); resultValue.add(parseAttributeValue(attributeInput)); } } @@ -208,10 +210,6 @@ public class ClientController { contactsString.setString(attributeObject.getValueString()); attributeValue = parseContactsString(contactsString).iterator().next(); break; - case "Query": - Map parsedQuery = gson.fromJson(attributeObject.getValueString(), Map.class); - attributeValue = new ValueQuery(attributeObject.getValueString()); - break; case "List": List parsedListValue = gson.fromJson(attributeObject.getValueString(), List.class); ArrayList<String> parsedListTypes = new ArrayList<>(Arrays.asList( |