Added Partition Constraints to JSON

git-svn-id: https://hyracks.googlecode.com/svn/trunk@127 123451ca-8445-de46-9d55-352943316053
diff --git a/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/constraints/ChoiceLocationConstraint.java b/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/constraints/ChoiceLocationConstraint.java
index edfb1c5..e07341b 100644
--- a/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/constraints/ChoiceLocationConstraint.java
+++ b/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/constraints/ChoiceLocationConstraint.java
@@ -14,6 +14,8 @@
  */
 package edu.uci.ics.hyracks.api.constraints;
 
+import java.util.Arrays;
+
 public class ChoiceLocationConstraint extends LocationConstraint {
     private static final long serialVersionUID = 1L;
 
@@ -28,6 +30,11 @@
     }
 
     @Override
+    public String toString() {
+        return "choice(" + Arrays.deepToString(choices) + ")";
+    }
+
+    @Override
     public LocationConstraintType getConstraintType() {
         return LocationConstraintType.CHOICE;
     }
diff --git a/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/constraints/PartitionCountConstraint.java b/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/constraints/PartitionCountConstraint.java
index b49d880..f4fdf67 100644
--- a/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/constraints/PartitionCountConstraint.java
+++ b/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/constraints/PartitionCountConstraint.java
@@ -31,4 +31,9 @@
     public PartitionConstraintType getPartitionConstraintType() {
         return PartitionConstraintType.COUNT;
     }
+
+    @Override
+    public String toString() {
+        return "count(" + count + ")";
+    }
 }
\ No newline at end of file
diff --git a/hyracks/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/base/AbstractOperatorDescriptor.java b/hyracks/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/base/AbstractOperatorDescriptor.java
index 7d979f9..b8af305 100644
--- a/hyracks/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/base/AbstractOperatorDescriptor.java
+++ b/hyracks/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/base/AbstractOperatorDescriptor.java
@@ -86,6 +86,7 @@
         jop.put("java-class", getClass().getName());
         jop.put("in-arity", getInputArity());
         jop.put("out-arity", getOutputArity());
+        jop.put("partition-constraint", String.valueOf(partitionConstraint));
         return jop;
     }
 }
\ No newline at end of file