diff options
author | Magdalena Grodzińska <mag.grodzinska@gmail.com> | 2019-11-24 21:16:39 +0100 |
---|---|---|
committer | Magdalena Grodzińska <mag.grodzinska@gmail.com> | 2019-11-24 21:16:39 +0100 |
commit | 60aa743347f1d7c099cc6fc34e4bc8a9eeaef983 (patch) | |
tree | 2643c34de9b3ed3ef0ee72b44a55f966105ba4ab /src/main/java/pl/edu/mimuw/cloudatlas/client | |
parent | bc208bbea11c4e0babdad30bd13a70ec7c3b70f1 (diff) |
Remove query from attribute submission
Diffstat (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/client')
-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( |