m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java8
-rw-r--r--src/main/resources/pl/edu/mimuw/cloudatlas/client/templates/attribForm.html1
2 files changed, 3 insertions, 6 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(
diff --git a/src/main/resources/pl/edu/mimuw/cloudatlas/client/templates/attribForm.html b/src/main/resources/pl/edu/mimuw/cloudatlas/client/templates/attribForm.html
index ed6dcd2..3740491 100644
--- a/src/main/resources/pl/edu/mimuw/cloudatlas/client/templates/attribForm.html
+++ b/src/main/resources/pl/edu/mimuw/cloudatlas/client/templates/attribForm.html
@@ -30,7 +30,6 @@
<option th:value="Time" th:text="Time"></option>
<option th:value="Duration" th:text="Duration"></option>
<option th:value="Contact" th:text="Contact"></option>
- <option th:value="Query" th:text="Query"></option>
<option th:value="List" th:text="List"></option>
<option th:value="Set" th:text="Set"></option>
</select>