From bad6ea0fc23d25d8940bbdc0941f15578632cdc2 Mon Sep 17 00:00:00 2001
From: Dmytro Pukhkaiev <dmytro.pukhkaiev@tu-dresden.de>
Date: Tue, 5 Feb 2019 17:48:22 +0100
Subject: [PATCH] Add allow index field

---
 .../tudresden/inf/st/mquat/eris/coupling/ERISAttribute.java | 6 ++++++
 .../tudresden/inf/st/mquat/eris/coupling/ERISConnector.java | 4 ++++
 2 files changed, 10 insertions(+)

diff --git a/jastadd-mquat-eris/src/main/java/de/tudresden/inf/st/mquat/eris/coupling/ERISAttribute.java b/jastadd-mquat-eris/src/main/java/de/tudresden/inf/st/mquat/eris/coupling/ERISAttribute.java
index 25eefa5..70a5c93 100644
--- a/jastadd-mquat-eris/src/main/java/de/tudresden/inf/st/mquat/eris/coupling/ERISAttribute.java
+++ b/jastadd-mquat-eris/src/main/java/de/tudresden/inf/st/mquat/eris/coupling/ERISAttribute.java
@@ -12,6 +12,7 @@ public class ERISAttribute {
     private String type;
     private int typeLength;
     private boolean unique;
+    private boolean allowIndex;
     private ERISAttributeStatistics statistics;
 
     public ERISAttribute(JSONObject jsonObject){
@@ -24,6 +25,7 @@ public class ERISAttribute {
         type = jsonObject.get("type").toString();
         typeLength = jsonObject.getInt("typeLength");
         unique = jsonObject.getBoolean("unique");
+        allowIndex = jsonObject.getBoolean("allowIndex");
     }
 
     public int getId() {
@@ -98,6 +100,10 @@ public class ERISAttribute {
         this.unique = unique;
     }
 
+    public boolean isAllowIndex() { return allowIndex; }
+
+    public void setAllowIndex(boolean allowIndex) { this.allowIndex = allowIndex; }
+
     public ERISAttributeStatistics getStatistics() {
         return statistics;
     }
diff --git a/jastadd-mquat-eris/src/main/java/de/tudresden/inf/st/mquat/eris/coupling/ERISConnector.java b/jastadd-mquat-eris/src/main/java/de/tudresden/inf/st/mquat/eris/coupling/ERISConnector.java
index 1686eb5..abdc706 100644
--- a/jastadd-mquat-eris/src/main/java/de/tudresden/inf/st/mquat/eris/coupling/ERISConnector.java
+++ b/jastadd-mquat-eris/src/main/java/de/tudresden/inf/st/mquat/eris/coupling/ERISConnector.java
@@ -219,6 +219,10 @@ public class ERISConnector {
     Map<String, Map<List<String>, List<String>>> partitionStorageConfigAttributes = new HashMap<>();
 
     for (Assignment assignment : solution.getAssignmentList()) {
+
+//      logger.debug(assignment.getRequest().getTarget().getRef().name());
+//      logger.debug(assignment.getResourceMapping().getResource().name());
+
       String[] attributeGlobal = assignment.getRequest().getTarget().getRef().name().split("_");
       StringBuilder sb = new StringBuilder();
       String containerNodePartitionPath;
-- 
GitLab