You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sm...@apache.org on 2014/02/15 00:58:45 UTC
[1/8] Commiting the generated data-models for modified experiment
model. - AIRAVATA-1017
Repository: airavata
Updated Branches:
refs/heads/master 997d5efe1 -> 719cbf9e7
http://git-wip-us.apache.org/repos/asf/airavata/blob/719cbf9e/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/WorkflowNodeDetails.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/WorkflowNodeDetails.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/WorkflowNodeDetails.java
new file mode 100644
index 0000000..8dda0a3
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/WorkflowNodeDetails.java
@@ -0,0 +1,1329 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * A structure holding the node data.
+ * nodeInstanceId - unique node identifier for each run
+ */
+@SuppressWarnings("all") public class WorkflowNodeDetails implements org.apache.thrift.TBase<WorkflowNodeDetails, WorkflowNodeDetails._Fields>, java.io.Serializable, Cloneable, Comparable<WorkflowNodeDetails> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("WorkflowNodeDetails");
+
+ private static final org.apache.thrift.protocol.TField NODE_INSTANCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("nodeInstanceId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTime", org.apache.thrift.protocol.TType.I64, (short)2);
+ private static final org.apache.thrift.protocol.TField NODE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("nodeName", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField NODE_INPUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("nodeInputs", org.apache.thrift.protocol.TType.LIST, (short)4);
+ private static final org.apache.thrift.protocol.TField NODE_OUTPUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("nodeOutputs", org.apache.thrift.protocol.TType.LIST, (short)5);
+ private static final org.apache.thrift.protocol.TField WORKFLOW_NODE_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowNodeStatus", org.apache.thrift.protocol.TType.STRUCT, (short)6);
+ private static final org.apache.thrift.protocol.TField TASK_DETAILS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("taskDetailsList", org.apache.thrift.protocol.TType.LIST, (short)7);
+ private static final org.apache.thrift.protocol.TField ERRORS_FIELD_DESC = new org.apache.thrift.protocol.TField("errors", org.apache.thrift.protocol.TType.LIST, (short)8);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new WorkflowNodeDetailsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new WorkflowNodeDetailsTupleSchemeFactory());
+ }
+
+ private String nodeInstanceId; // required
+ private long creationTime; // optional
+ private String nodeName; // required
+ private List<DataObjectType> nodeInputs; // optional
+ private List<DataObjectType> nodeOutputs; // optional
+ private WorkflowNodeStatus workflowNodeStatus; // optional
+ private List<TaskDetails> taskDetailsList; // optional
+ private List<ErrorDetails> errors; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ NODE_INSTANCE_ID((short)1, "nodeInstanceId"),
+ CREATION_TIME((short)2, "creationTime"),
+ NODE_NAME((short)3, "nodeName"),
+ NODE_INPUTS((short)4, "nodeInputs"),
+ NODE_OUTPUTS((short)5, "nodeOutputs"),
+ WORKFLOW_NODE_STATUS((short)6, "workflowNodeStatus"),
+ TASK_DETAILS_LIST((short)7, "taskDetailsList"),
+ ERRORS((short)8, "errors");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // NODE_INSTANCE_ID
+ return NODE_INSTANCE_ID;
+ case 2: // CREATION_TIME
+ return CREATION_TIME;
+ case 3: // NODE_NAME
+ return NODE_NAME;
+ case 4: // NODE_INPUTS
+ return NODE_INPUTS;
+ case 5: // NODE_OUTPUTS
+ return NODE_OUTPUTS;
+ case 6: // WORKFLOW_NODE_STATUS
+ return WORKFLOW_NODE_STATUS;
+ case 7: // TASK_DETAILS_LIST
+ return TASK_DETAILS_LIST;
+ case 8: // ERRORS
+ return ERRORS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __CREATIONTIME_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.CREATION_TIME,_Fields.NODE_INPUTS,_Fields.NODE_OUTPUTS,_Fields.WORKFLOW_NODE_STATUS,_Fields.TASK_DETAILS_LIST,_Fields.ERRORS};
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.NODE_INSTANCE_ID, new org.apache.thrift.meta_data.FieldMetaData("nodeInstanceId", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("creationTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.NODE_NAME, new org.apache.thrift.meta_data.FieldMetaData("nodeName", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.NODE_INPUTS, new org.apache.thrift.meta_data.FieldMetaData("nodeInputs", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DataObjectType.class))));
+ tmpMap.put(_Fields.NODE_OUTPUTS, new org.apache.thrift.meta_data.FieldMetaData("nodeOutputs", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DataObjectType.class))));
+ tmpMap.put(_Fields.WORKFLOW_NODE_STATUS, new org.apache.thrift.meta_data.FieldMetaData("workflowNodeStatus", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WorkflowNodeStatus.class)));
+ tmpMap.put(_Fields.TASK_DETAILS_LIST, new org.apache.thrift.meta_data.FieldMetaData("taskDetailsList", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TaskDetails.class))));
+ tmpMap.put(_Fields.ERRORS, new org.apache.thrift.meta_data.FieldMetaData("errors", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ErrorDetails.class))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WorkflowNodeDetails.class, metaDataMap);
+ }
+
+ public WorkflowNodeDetails() {
+ this.nodeInstanceId = "DO_NO_SET_BY_CLIENT";
+
+ this.nodeName = "SIMPLE_APP_NODE";
+
+ }
+
+ public WorkflowNodeDetails(
+ String nodeInstanceId,
+ String nodeName)
+ {
+ this();
+ this.nodeInstanceId = nodeInstanceId;
+ this.nodeName = nodeName;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public WorkflowNodeDetails(WorkflowNodeDetails other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetNodeInstanceId()) {
+ this.nodeInstanceId = other.nodeInstanceId;
+ }
+ this.creationTime = other.creationTime;
+ if (other.isSetNodeName()) {
+ this.nodeName = other.nodeName;
+ }
+ if (other.isSetNodeInputs()) {
+ List<DataObjectType> __this__nodeInputs = new ArrayList<DataObjectType>(other.nodeInputs.size());
+ for (DataObjectType other_element : other.nodeInputs) {
+ __this__nodeInputs.add(new DataObjectType(other_element));
+ }
+ this.nodeInputs = __this__nodeInputs;
+ }
+ if (other.isSetNodeOutputs()) {
+ List<DataObjectType> __this__nodeOutputs = new ArrayList<DataObjectType>(other.nodeOutputs.size());
+ for (DataObjectType other_element : other.nodeOutputs) {
+ __this__nodeOutputs.add(new DataObjectType(other_element));
+ }
+ this.nodeOutputs = __this__nodeOutputs;
+ }
+ if (other.isSetWorkflowNodeStatus()) {
+ this.workflowNodeStatus = new WorkflowNodeStatus(other.workflowNodeStatus);
+ }
+ if (other.isSetTaskDetailsList()) {
+ List<TaskDetails> __this__taskDetailsList = new ArrayList<TaskDetails>(other.taskDetailsList.size());
+ for (TaskDetails other_element : other.taskDetailsList) {
+ __this__taskDetailsList.add(new TaskDetails(other_element));
+ }
+ this.taskDetailsList = __this__taskDetailsList;
+ }
+ if (other.isSetErrors()) {
+ List<ErrorDetails> __this__errors = new ArrayList<ErrorDetails>(other.errors.size());
+ for (ErrorDetails other_element : other.errors) {
+ __this__errors.add(new ErrorDetails(other_element));
+ }
+ this.errors = __this__errors;
+ }
+ }
+
+ public WorkflowNodeDetails deepCopy() {
+ return new WorkflowNodeDetails(this);
+ }
+
+ @Override
+ public void clear() {
+ this.nodeInstanceId = "DO_NO_SET_BY_CLIENT";
+
+ setCreationTimeIsSet(false);
+ this.creationTime = 0;
+ this.nodeName = "SIMPLE_APP_NODE";
+
+ this.nodeInputs = null;
+ this.nodeOutputs = null;
+ this.workflowNodeStatus = null;
+ this.taskDetailsList = null;
+ this.errors = null;
+ }
+
+ public String getNodeInstanceId() {
+ return this.nodeInstanceId;
+ }
+
+ public void setNodeInstanceId(String nodeInstanceId) {
+ this.nodeInstanceId = nodeInstanceId;
+ }
+
+ public void unsetNodeInstanceId() {
+ this.nodeInstanceId = null;
+ }
+
+ /** Returns true if field nodeInstanceId is set (has been assigned a value) and false otherwise */
+ public boolean isSetNodeInstanceId() {
+ return this.nodeInstanceId != null;
+ }
+
+ public void setNodeInstanceIdIsSet(boolean value) {
+ if (!value) {
+ this.nodeInstanceId = null;
+ }
+ }
+
+ public long getCreationTime() {
+ return this.creationTime;
+ }
+
+ public void setCreationTime(long creationTime) {
+ this.creationTime = creationTime;
+ setCreationTimeIsSet(true);
+ }
+
+ public void unsetCreationTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
+ }
+
+ /** Returns true if field creationTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreationTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
+ }
+
+ public void setCreationTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATIONTIME_ISSET_ID, value);
+ }
+
+ public String getNodeName() {
+ return this.nodeName;
+ }
+
+ public void setNodeName(String nodeName) {
+ this.nodeName = nodeName;
+ }
+
+ public void unsetNodeName() {
+ this.nodeName = null;
+ }
+
+ /** Returns true if field nodeName is set (has been assigned a value) and false otherwise */
+ public boolean isSetNodeName() {
+ return this.nodeName != null;
+ }
+
+ public void setNodeNameIsSet(boolean value) {
+ if (!value) {
+ this.nodeName = null;
+ }
+ }
+
+ public int getNodeInputsSize() {
+ return (this.nodeInputs == null) ? 0 : this.nodeInputs.size();
+ }
+
+ public java.util.Iterator<DataObjectType> getNodeInputsIterator() {
+ return (this.nodeInputs == null) ? null : this.nodeInputs.iterator();
+ }
+
+ public void addToNodeInputs(DataObjectType elem) {
+ if (this.nodeInputs == null) {
+ this.nodeInputs = new ArrayList<DataObjectType>();
+ }
+ this.nodeInputs.add(elem);
+ }
+
+ public List<DataObjectType> getNodeInputs() {
+ return this.nodeInputs;
+ }
+
+ public void setNodeInputs(List<DataObjectType> nodeInputs) {
+ this.nodeInputs = nodeInputs;
+ }
+
+ public void unsetNodeInputs() {
+ this.nodeInputs = null;
+ }
+
+ /** Returns true if field nodeInputs is set (has been assigned a value) and false otherwise */
+ public boolean isSetNodeInputs() {
+ return this.nodeInputs != null;
+ }
+
+ public void setNodeInputsIsSet(boolean value) {
+ if (!value) {
+ this.nodeInputs = null;
+ }
+ }
+
+ public int getNodeOutputsSize() {
+ return (this.nodeOutputs == null) ? 0 : this.nodeOutputs.size();
+ }
+
+ public java.util.Iterator<DataObjectType> getNodeOutputsIterator() {
+ return (this.nodeOutputs == null) ? null : this.nodeOutputs.iterator();
+ }
+
+ public void addToNodeOutputs(DataObjectType elem) {
+ if (this.nodeOutputs == null) {
+ this.nodeOutputs = new ArrayList<DataObjectType>();
+ }
+ this.nodeOutputs.add(elem);
+ }
+
+ public List<DataObjectType> getNodeOutputs() {
+ return this.nodeOutputs;
+ }
+
+ public void setNodeOutputs(List<DataObjectType> nodeOutputs) {
+ this.nodeOutputs = nodeOutputs;
+ }
+
+ public void unsetNodeOutputs() {
+ this.nodeOutputs = null;
+ }
+
+ /** Returns true if field nodeOutputs is set (has been assigned a value) and false otherwise */
+ public boolean isSetNodeOutputs() {
+ return this.nodeOutputs != null;
+ }
+
+ public void setNodeOutputsIsSet(boolean value) {
+ if (!value) {
+ this.nodeOutputs = null;
+ }
+ }
+
+ public WorkflowNodeStatus getWorkflowNodeStatus() {
+ return this.workflowNodeStatus;
+ }
+
+ public void setWorkflowNodeStatus(WorkflowNodeStatus workflowNodeStatus) {
+ this.workflowNodeStatus = workflowNodeStatus;
+ }
+
+ public void unsetWorkflowNodeStatus() {
+ this.workflowNodeStatus = null;
+ }
+
+ /** Returns true if field workflowNodeStatus is set (has been assigned a value) and false otherwise */
+ public boolean isSetWorkflowNodeStatus() {
+ return this.workflowNodeStatus != null;
+ }
+
+ public void setWorkflowNodeStatusIsSet(boolean value) {
+ if (!value) {
+ this.workflowNodeStatus = null;
+ }
+ }
+
+ public int getTaskDetailsListSize() {
+ return (this.taskDetailsList == null) ? 0 : this.taskDetailsList.size();
+ }
+
+ public java.util.Iterator<TaskDetails> getTaskDetailsListIterator() {
+ return (this.taskDetailsList == null) ? null : this.taskDetailsList.iterator();
+ }
+
+ public void addToTaskDetailsList(TaskDetails elem) {
+ if (this.taskDetailsList == null) {
+ this.taskDetailsList = new ArrayList<TaskDetails>();
+ }
+ this.taskDetailsList.add(elem);
+ }
+
+ public List<TaskDetails> getTaskDetailsList() {
+ return this.taskDetailsList;
+ }
+
+ public void setTaskDetailsList(List<TaskDetails> taskDetailsList) {
+ this.taskDetailsList = taskDetailsList;
+ }
+
+ public void unsetTaskDetailsList() {
+ this.taskDetailsList = null;
+ }
+
+ /** Returns true if field taskDetailsList is set (has been assigned a value) and false otherwise */
+ public boolean isSetTaskDetailsList() {
+ return this.taskDetailsList != null;
+ }
+
+ public void setTaskDetailsListIsSet(boolean value) {
+ if (!value) {
+ this.taskDetailsList = null;
+ }
+ }
+
+ public int getErrorsSize() {
+ return (this.errors == null) ? 0 : this.errors.size();
+ }
+
+ public java.util.Iterator<ErrorDetails> getErrorsIterator() {
+ return (this.errors == null) ? null : this.errors.iterator();
+ }
+
+ public void addToErrors(ErrorDetails elem) {
+ if (this.errors == null) {
+ this.errors = new ArrayList<ErrorDetails>();
+ }
+ this.errors.add(elem);
+ }
+
+ public List<ErrorDetails> getErrors() {
+ return this.errors;
+ }
+
+ public void setErrors(List<ErrorDetails> errors) {
+ this.errors = errors;
+ }
+
+ public void unsetErrors() {
+ this.errors = null;
+ }
+
+ /** Returns true if field errors is set (has been assigned a value) and false otherwise */
+ public boolean isSetErrors() {
+ return this.errors != null;
+ }
+
+ public void setErrorsIsSet(boolean value) {
+ if (!value) {
+ this.errors = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case NODE_INSTANCE_ID:
+ if (value == null) {
+ unsetNodeInstanceId();
+ } else {
+ setNodeInstanceId((String)value);
+ }
+ break;
+
+ case CREATION_TIME:
+ if (value == null) {
+ unsetCreationTime();
+ } else {
+ setCreationTime((Long)value);
+ }
+ break;
+
+ case NODE_NAME:
+ if (value == null) {
+ unsetNodeName();
+ } else {
+ setNodeName((String)value);
+ }
+ break;
+
+ case NODE_INPUTS:
+ if (value == null) {
+ unsetNodeInputs();
+ } else {
+ setNodeInputs((List<DataObjectType>)value);
+ }
+ break;
+
+ case NODE_OUTPUTS:
+ if (value == null) {
+ unsetNodeOutputs();
+ } else {
+ setNodeOutputs((List<DataObjectType>)value);
+ }
+ break;
+
+ case WORKFLOW_NODE_STATUS:
+ if (value == null) {
+ unsetWorkflowNodeStatus();
+ } else {
+ setWorkflowNodeStatus((WorkflowNodeStatus)value);
+ }
+ break;
+
+ case TASK_DETAILS_LIST:
+ if (value == null) {
+ unsetTaskDetailsList();
+ } else {
+ setTaskDetailsList((List<TaskDetails>)value);
+ }
+ break;
+
+ case ERRORS:
+ if (value == null) {
+ unsetErrors();
+ } else {
+ setErrors((List<ErrorDetails>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case NODE_INSTANCE_ID:
+ return getNodeInstanceId();
+
+ case CREATION_TIME:
+ return Long.valueOf(getCreationTime());
+
+ case NODE_NAME:
+ return getNodeName();
+
+ case NODE_INPUTS:
+ return getNodeInputs();
+
+ case NODE_OUTPUTS:
+ return getNodeOutputs();
+
+ case WORKFLOW_NODE_STATUS:
+ return getWorkflowNodeStatus();
+
+ case TASK_DETAILS_LIST:
+ return getTaskDetailsList();
+
+ case ERRORS:
+ return getErrors();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case NODE_INSTANCE_ID:
+ return isSetNodeInstanceId();
+ case CREATION_TIME:
+ return isSetCreationTime();
+ case NODE_NAME:
+ return isSetNodeName();
+ case NODE_INPUTS:
+ return isSetNodeInputs();
+ case NODE_OUTPUTS:
+ return isSetNodeOutputs();
+ case WORKFLOW_NODE_STATUS:
+ return isSetWorkflowNodeStatus();
+ case TASK_DETAILS_LIST:
+ return isSetTaskDetailsList();
+ case ERRORS:
+ return isSetErrors();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof WorkflowNodeDetails)
+ return this.equals((WorkflowNodeDetails)that);
+ return false;
+ }
+
+ public boolean equals(WorkflowNodeDetails that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_nodeInstanceId = true && this.isSetNodeInstanceId();
+ boolean that_present_nodeInstanceId = true && that.isSetNodeInstanceId();
+ if (this_present_nodeInstanceId || that_present_nodeInstanceId) {
+ if (!(this_present_nodeInstanceId && that_present_nodeInstanceId))
+ return false;
+ if (!this.nodeInstanceId.equals(that.nodeInstanceId))
+ return false;
+ }
+
+ boolean this_present_creationTime = true && this.isSetCreationTime();
+ boolean that_present_creationTime = true && that.isSetCreationTime();
+ if (this_present_creationTime || that_present_creationTime) {
+ if (!(this_present_creationTime && that_present_creationTime))
+ return false;
+ if (this.creationTime != that.creationTime)
+ return false;
+ }
+
+ boolean this_present_nodeName = true && this.isSetNodeName();
+ boolean that_present_nodeName = true && that.isSetNodeName();
+ if (this_present_nodeName || that_present_nodeName) {
+ if (!(this_present_nodeName && that_present_nodeName))
+ return false;
+ if (!this.nodeName.equals(that.nodeName))
+ return false;
+ }
+
+ boolean this_present_nodeInputs = true && this.isSetNodeInputs();
+ boolean that_present_nodeInputs = true && that.isSetNodeInputs();
+ if (this_present_nodeInputs || that_present_nodeInputs) {
+ if (!(this_present_nodeInputs && that_present_nodeInputs))
+ return false;
+ if (!this.nodeInputs.equals(that.nodeInputs))
+ return false;
+ }
+
+ boolean this_present_nodeOutputs = true && this.isSetNodeOutputs();
+ boolean that_present_nodeOutputs = true && that.isSetNodeOutputs();
+ if (this_present_nodeOutputs || that_present_nodeOutputs) {
+ if (!(this_present_nodeOutputs && that_present_nodeOutputs))
+ return false;
+ if (!this.nodeOutputs.equals(that.nodeOutputs))
+ return false;
+ }
+
+ boolean this_present_workflowNodeStatus = true && this.isSetWorkflowNodeStatus();
+ boolean that_present_workflowNodeStatus = true && that.isSetWorkflowNodeStatus();
+ if (this_present_workflowNodeStatus || that_present_workflowNodeStatus) {
+ if (!(this_present_workflowNodeStatus && that_present_workflowNodeStatus))
+ return false;
+ if (!this.workflowNodeStatus.equals(that.workflowNodeStatus))
+ return false;
+ }
+
+ boolean this_present_taskDetailsList = true && this.isSetTaskDetailsList();
+ boolean that_present_taskDetailsList = true && that.isSetTaskDetailsList();
+ if (this_present_taskDetailsList || that_present_taskDetailsList) {
+ if (!(this_present_taskDetailsList && that_present_taskDetailsList))
+ return false;
+ if (!this.taskDetailsList.equals(that.taskDetailsList))
+ return false;
+ }
+
+ boolean this_present_errors = true && this.isSetErrors();
+ boolean that_present_errors = true && that.isSetErrors();
+ if (this_present_errors || that_present_errors) {
+ if (!(this_present_errors && that_present_errors))
+ return false;
+ if (!this.errors.equals(that.errors))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(WorkflowNodeDetails other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetNodeInstanceId()).compareTo(other.isSetNodeInstanceId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNodeInstanceId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodeInstanceId, other.nodeInstanceId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreationTime()).compareTo(other.isSetCreationTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreationTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creationTime, other.creationTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNodeName()).compareTo(other.isSetNodeName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNodeName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodeName, other.nodeName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNodeInputs()).compareTo(other.isSetNodeInputs());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNodeInputs()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodeInputs, other.nodeInputs);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNodeOutputs()).compareTo(other.isSetNodeOutputs());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNodeOutputs()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodeOutputs, other.nodeOutputs);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetWorkflowNodeStatus()).compareTo(other.isSetWorkflowNodeStatus());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetWorkflowNodeStatus()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowNodeStatus, other.workflowNodeStatus);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTaskDetailsList()).compareTo(other.isSetTaskDetailsList());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTaskDetailsList()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskDetailsList, other.taskDetailsList);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetErrors()).compareTo(other.isSetErrors());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetErrors()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errors, other.errors);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("WorkflowNodeDetails(");
+ boolean first = true;
+
+ sb.append("nodeInstanceId:");
+ if (this.nodeInstanceId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.nodeInstanceId);
+ }
+ first = false;
+ if (isSetCreationTime()) {
+ if (!first) sb.append(", ");
+ sb.append("creationTime:");
+ sb.append(this.creationTime);
+ first = false;
+ }
+ if (!first) sb.append(", ");
+ sb.append("nodeName:");
+ if (this.nodeName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.nodeName);
+ }
+ first = false;
+ if (isSetNodeInputs()) {
+ if (!first) sb.append(", ");
+ sb.append("nodeInputs:");
+ if (this.nodeInputs == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.nodeInputs);
+ }
+ first = false;
+ }
+ if (isSetNodeOutputs()) {
+ if (!first) sb.append(", ");
+ sb.append("nodeOutputs:");
+ if (this.nodeOutputs == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.nodeOutputs);
+ }
+ first = false;
+ }
+ if (isSetWorkflowNodeStatus()) {
+ if (!first) sb.append(", ");
+ sb.append("workflowNodeStatus:");
+ if (this.workflowNodeStatus == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.workflowNodeStatus);
+ }
+ first = false;
+ }
+ if (isSetTaskDetailsList()) {
+ if (!first) sb.append(", ");
+ sb.append("taskDetailsList:");
+ if (this.taskDetailsList == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.taskDetailsList);
+ }
+ first = false;
+ }
+ if (isSetErrors()) {
+ if (!first) sb.append(", ");
+ sb.append("errors:");
+ if (this.errors == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.errors);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetNodeInstanceId()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'nodeInstanceId' is unset! Struct:" + toString());
+ }
+
+ if (!isSetNodeName()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'nodeName' is unset! Struct:" + toString());
+ }
+
+ // check for sub-struct validity
+ if (workflowNodeStatus != null) {
+ workflowNodeStatus.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class WorkflowNodeDetailsStandardSchemeFactory implements SchemeFactory {
+ public WorkflowNodeDetailsStandardScheme getScheme() {
+ return new WorkflowNodeDetailsStandardScheme();
+ }
+ }
+
+ private static class WorkflowNodeDetailsStandardScheme extends StandardScheme<WorkflowNodeDetails> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, WorkflowNodeDetails struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // NODE_INSTANCE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.nodeInstanceId = iprot.readString();
+ struct.setNodeInstanceIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // CREATION_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.creationTime = iprot.readI64();
+ struct.setCreationTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // NODE_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.nodeName = iprot.readString();
+ struct.setNodeNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // NODE_INPUTS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list56 = iprot.readListBegin();
+ struct.nodeInputs = new ArrayList<DataObjectType>(_list56.size);
+ for (int _i57 = 0; _i57 < _list56.size; ++_i57)
+ {
+ DataObjectType _elem58;
+ _elem58 = new DataObjectType();
+ _elem58.read(iprot);
+ struct.nodeInputs.add(_elem58);
+ }
+ iprot.readListEnd();
+ }
+ struct.setNodeInputsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // NODE_OUTPUTS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list59 = iprot.readListBegin();
+ struct.nodeOutputs = new ArrayList<DataObjectType>(_list59.size);
+ for (int _i60 = 0; _i60 < _list59.size; ++_i60)
+ {
+ DataObjectType _elem61;
+ _elem61 = new DataObjectType();
+ _elem61.read(iprot);
+ struct.nodeOutputs.add(_elem61);
+ }
+ iprot.readListEnd();
+ }
+ struct.setNodeOutputsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // WORKFLOW_NODE_STATUS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.workflowNodeStatus = new WorkflowNodeStatus();
+ struct.workflowNodeStatus.read(iprot);
+ struct.setWorkflowNodeStatusIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // TASK_DETAILS_LIST
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list62 = iprot.readListBegin();
+ struct.taskDetailsList = new ArrayList<TaskDetails>(_list62.size);
+ for (int _i63 = 0; _i63 < _list62.size; ++_i63)
+ {
+ TaskDetails _elem64;
+ _elem64 = new TaskDetails();
+ _elem64.read(iprot);
+ struct.taskDetailsList.add(_elem64);
+ }
+ iprot.readListEnd();
+ }
+ struct.setTaskDetailsListIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // ERRORS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list65 = iprot.readListBegin();
+ struct.errors = new ArrayList<ErrorDetails>(_list65.size);
+ for (int _i66 = 0; _i66 < _list65.size; ++_i66)
+ {
+ ErrorDetails _elem67;
+ _elem67 = new ErrorDetails();
+ _elem67.read(iprot);
+ struct.errors.add(_elem67);
+ }
+ iprot.readListEnd();
+ }
+ struct.setErrorsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, WorkflowNodeDetails struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.nodeInstanceId != null) {
+ oprot.writeFieldBegin(NODE_INSTANCE_ID_FIELD_DESC);
+ oprot.writeString(struct.nodeInstanceId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetCreationTime()) {
+ oprot.writeFieldBegin(CREATION_TIME_FIELD_DESC);
+ oprot.writeI64(struct.creationTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.nodeName != null) {
+ oprot.writeFieldBegin(NODE_NAME_FIELD_DESC);
+ oprot.writeString(struct.nodeName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.nodeInputs != null) {
+ if (struct.isSetNodeInputs()) {
+ oprot.writeFieldBegin(NODE_INPUTS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.nodeInputs.size()));
+ for (DataObjectType _iter68 : struct.nodeInputs)
+ {
+ _iter68.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.nodeOutputs != null) {
+ if (struct.isSetNodeOutputs()) {
+ oprot.writeFieldBegin(NODE_OUTPUTS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.nodeOutputs.size()));
+ for (DataObjectType _iter69 : struct.nodeOutputs)
+ {
+ _iter69.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.workflowNodeStatus != null) {
+ if (struct.isSetWorkflowNodeStatus()) {
+ oprot.writeFieldBegin(WORKFLOW_NODE_STATUS_FIELD_DESC);
+ struct.workflowNodeStatus.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.taskDetailsList != null) {
+ if (struct.isSetTaskDetailsList()) {
+ oprot.writeFieldBegin(TASK_DETAILS_LIST_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.taskDetailsList.size()));
+ for (TaskDetails _iter70 : struct.taskDetailsList)
+ {
+ _iter70.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.errors != null) {
+ if (struct.isSetErrors()) {
+ oprot.writeFieldBegin(ERRORS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.errors.size()));
+ for (ErrorDetails _iter71 : struct.errors)
+ {
+ _iter71.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class WorkflowNodeDetailsTupleSchemeFactory implements SchemeFactory {
+ public WorkflowNodeDetailsTupleScheme getScheme() {
+ return new WorkflowNodeDetailsTupleScheme();
+ }
+ }
+
+ private static class WorkflowNodeDetailsTupleScheme extends TupleScheme<WorkflowNodeDetails> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, WorkflowNodeDetails struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.nodeInstanceId);
+ oprot.writeString(struct.nodeName);
+ BitSet optionals = new BitSet();
+ if (struct.isSetCreationTime()) {
+ optionals.set(0);
+ }
+ if (struct.isSetNodeInputs()) {
+ optionals.set(1);
+ }
+ if (struct.isSetNodeOutputs()) {
+ optionals.set(2);
+ }
+ if (struct.isSetWorkflowNodeStatus()) {
+ optionals.set(3);
+ }
+ if (struct.isSetTaskDetailsList()) {
+ optionals.set(4);
+ }
+ if (struct.isSetErrors()) {
+ optionals.set(5);
+ }
+ oprot.writeBitSet(optionals, 6);
+ if (struct.isSetCreationTime()) {
+ oprot.writeI64(struct.creationTime);
+ }
+ if (struct.isSetNodeInputs()) {
+ {
+ oprot.writeI32(struct.nodeInputs.size());
+ for (DataObjectType _iter72 : struct.nodeInputs)
+ {
+ _iter72.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetNodeOutputs()) {
+ {
+ oprot.writeI32(struct.nodeOutputs.size());
+ for (DataObjectType _iter73 : struct.nodeOutputs)
+ {
+ _iter73.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetWorkflowNodeStatus()) {
+ struct.workflowNodeStatus.write(oprot);
+ }
+ if (struct.isSetTaskDetailsList()) {
+ {
+ oprot.writeI32(struct.taskDetailsList.size());
+ for (TaskDetails _iter74 : struct.taskDetailsList)
+ {
+ _iter74.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetErrors()) {
+ {
+ oprot.writeI32(struct.errors.size());
+ for (ErrorDetails _iter75 : struct.errors)
+ {
+ _iter75.write(oprot);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, WorkflowNodeDetails struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.nodeInstanceId = iprot.readString();
+ struct.setNodeInstanceIdIsSet(true);
+ struct.nodeName = iprot.readString();
+ struct.setNodeNameIsSet(true);
+ BitSet incoming = iprot.readBitSet(6);
+ if (incoming.get(0)) {
+ struct.creationTime = iprot.readI64();
+ struct.setCreationTimeIsSet(true);
+ }
+ if (incoming.get(1)) {
+ {
+ org.apache.thrift.protocol.TList _list76 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.nodeInputs = new ArrayList<DataObjectType>(_list76.size);
+ for (int _i77 = 0; _i77 < _list76.size; ++_i77)
+ {
+ DataObjectType _elem78;
+ _elem78 = new DataObjectType();
+ _elem78.read(iprot);
+ struct.nodeInputs.add(_elem78);
+ }
+ }
+ struct.setNodeInputsIsSet(true);
+ }
+ if (incoming.get(2)) {
+ {
+ org.apache.thrift.protocol.TList _list79 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.nodeOutputs = new ArrayList<DataObjectType>(_list79.size);
+ for (int _i80 = 0; _i80 < _list79.size; ++_i80)
+ {
+ DataObjectType _elem81;
+ _elem81 = new DataObjectType();
+ _elem81.read(iprot);
+ struct.nodeOutputs.add(_elem81);
+ }
+ }
+ struct.setNodeOutputsIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.workflowNodeStatus = new WorkflowNodeStatus();
+ struct.workflowNodeStatus.read(iprot);
+ struct.setWorkflowNodeStatusIsSet(true);
+ }
+ if (incoming.get(4)) {
+ {
+ org.apache.thrift.protocol.TList _list82 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.taskDetailsList = new ArrayList<TaskDetails>(_list82.size);
+ for (int _i83 = 0; _i83 < _list82.size; ++_i83)
+ {
+ TaskDetails _elem84;
+ _elem84 = new TaskDetails();
+ _elem84.read(iprot);
+ struct.taskDetailsList.add(_elem84);
+ }
+ }
+ struct.setTaskDetailsListIsSet(true);
+ }
+ if (incoming.get(5)) {
+ {
+ org.apache.thrift.protocol.TList _list85 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.errors = new ArrayList<ErrorDetails>(_list85.size);
+ for (int _i86 = 0; _i86 < _list85.size; ++_i86)
+ {
+ ErrorDetails _elem87;
+ _elem87 = new ErrorDetails();
+ _elem87.read(iprot);
+ struct.errors.add(_elem87);
+ }
+ }
+ struct.setErrorsIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/719cbf9e/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/WorkflowNodeState.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/WorkflowNodeState.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/WorkflowNodeState.java
new file mode 100644
index 0000000..eb461cb
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/WorkflowNodeState.java
@@ -0,0 +1,73 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+@SuppressWarnings("all") public enum WorkflowNodeState implements org.apache.thrift.TEnum {
+ INVOKED(0),
+ EXECUTING(1),
+ CANCELED(2),
+ COMPLETED(3),
+ FAILED(4),
+ UNKNOWN(5);
+
+ private final int value;
+
+ private WorkflowNodeState(int value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the integer value of this enum value, as defined in the Thrift IDL.
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Find a the enum type by its integer value, as defined in the Thrift IDL.
+ * @return null if the value is not found.
+ */
+ public static WorkflowNodeState findByValue(int value) {
+ switch (value) {
+ case 0:
+ return INVOKED;
+ case 1:
+ return EXECUTING;
+ case 2:
+ return CANCELED;
+ case 3:
+ return COMPLETED;
+ case 4:
+ return FAILED;
+ case 5:
+ return UNKNOWN;
+ default:
+ return null;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/719cbf9e/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/WorkflowNodeStatus.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/WorkflowNodeStatus.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/WorkflowNodeStatus.java
new file mode 100644
index 0000000..4cb9338
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/WorkflowNodeStatus.java
@@ -0,0 +1,509 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("all") public class WorkflowNodeStatus implements org.apache.thrift.TBase<WorkflowNodeStatus, WorkflowNodeStatus._Fields>, java.io.Serializable, Cloneable, Comparable<WorkflowNodeStatus> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("WorkflowNodeStatus");
+
+ private static final org.apache.thrift.protocol.TField WORKFLOW_NODE_STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowNodeState", org.apache.thrift.protocol.TType.I32, (short)1);
+ private static final org.apache.thrift.protocol.TField TIME_OF_STATE_CHANGE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeOfStateChange", org.apache.thrift.protocol.TType.I64, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new WorkflowNodeStatusStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new WorkflowNodeStatusTupleSchemeFactory());
+ }
+
+ private WorkflowNodeState workflowNodeState; // required
+ private long timeOfStateChange; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ /**
+ *
+ * @see WorkflowNodeState
+ */
+ WORKFLOW_NODE_STATE((short)1, "workflowNodeState"),
+ TIME_OF_STATE_CHANGE((short)2, "timeOfStateChange");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // WORKFLOW_NODE_STATE
+ return WORKFLOW_NODE_STATE;
+ case 2: // TIME_OF_STATE_CHANGE
+ return TIME_OF_STATE_CHANGE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __TIMEOFSTATECHANGE_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.TIME_OF_STATE_CHANGE};
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.WORKFLOW_NODE_STATE, new org.apache.thrift.meta_data.FieldMetaData("workflowNodeState", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, WorkflowNodeState.class)));
+ tmpMap.put(_Fields.TIME_OF_STATE_CHANGE, new org.apache.thrift.meta_data.FieldMetaData("timeOfStateChange", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WorkflowNodeStatus.class, metaDataMap);
+ }
+
+ public WorkflowNodeStatus() {
+ }
+
+ public WorkflowNodeStatus(
+ WorkflowNodeState workflowNodeState)
+ {
+ this();
+ this.workflowNodeState = workflowNodeState;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public WorkflowNodeStatus(WorkflowNodeStatus other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetWorkflowNodeState()) {
+ this.workflowNodeState = other.workflowNodeState;
+ }
+ this.timeOfStateChange = other.timeOfStateChange;
+ }
+
+ public WorkflowNodeStatus deepCopy() {
+ return new WorkflowNodeStatus(this);
+ }
+
+ @Override
+ public void clear() {
+ this.workflowNodeState = null;
+ setTimeOfStateChangeIsSet(false);
+ this.timeOfStateChange = 0;
+ }
+
+ /**
+ *
+ * @see WorkflowNodeState
+ */
+ public WorkflowNodeState getWorkflowNodeState() {
+ return this.workflowNodeState;
+ }
+
+ /**
+ *
+ * @see WorkflowNodeState
+ */
+ public void setWorkflowNodeState(WorkflowNodeState workflowNodeState) {
+ this.workflowNodeState = workflowNodeState;
+ }
+
+ public void unsetWorkflowNodeState() {
+ this.workflowNodeState = null;
+ }
+
+ /** Returns true if field workflowNodeState is set (has been assigned a value) and false otherwise */
+ public boolean isSetWorkflowNodeState() {
+ return this.workflowNodeState != null;
+ }
+
+ public void setWorkflowNodeStateIsSet(boolean value) {
+ if (!value) {
+ this.workflowNodeState = null;
+ }
+ }
+
+ public long getTimeOfStateChange() {
+ return this.timeOfStateChange;
+ }
+
+ public void setTimeOfStateChange(long timeOfStateChange) {
+ this.timeOfStateChange = timeOfStateChange;
+ setTimeOfStateChangeIsSet(true);
+ }
+
+ public void unsetTimeOfStateChange() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID);
+ }
+
+ /** Returns true if field timeOfStateChange is set (has been assigned a value) and false otherwise */
+ public boolean isSetTimeOfStateChange() {
+ return EncodingUtils.testBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID);
+ }
+
+ public void setTimeOfStateChangeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case WORKFLOW_NODE_STATE:
+ if (value == null) {
+ unsetWorkflowNodeState();
+ } else {
+ setWorkflowNodeState((WorkflowNodeState)value);
+ }
+ break;
+
+ case TIME_OF_STATE_CHANGE:
+ if (value == null) {
+ unsetTimeOfStateChange();
+ } else {
+ setTimeOfStateChange((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case WORKFLOW_NODE_STATE:
+ return getWorkflowNodeState();
+
+ case TIME_OF_STATE_CHANGE:
+ return Long.valueOf(getTimeOfStateChange());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case WORKFLOW_NODE_STATE:
+ return isSetWorkflowNodeState();
+ case TIME_OF_STATE_CHANGE:
+ return isSetTimeOfStateChange();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof WorkflowNodeStatus)
+ return this.equals((WorkflowNodeStatus)that);
+ return false;
+ }
+
+ public boolean equals(WorkflowNodeStatus that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_workflowNodeState = true && this.isSetWorkflowNodeState();
+ boolean that_present_workflowNodeState = true && that.isSetWorkflowNodeState();
+ if (this_present_workflowNodeState || that_present_workflowNodeState) {
+ if (!(this_present_workflowNodeState && that_present_workflowNodeState))
+ return false;
+ if (!this.workflowNodeState.equals(that.workflowNodeState))
+ return false;
+ }
+
+ boolean this_present_timeOfStateChange = true && this.isSetTimeOfStateChange();
+ boolean that_present_timeOfStateChange = true && that.isSetTimeOfStateChange();
+ if (this_present_timeOfStateChange || that_present_timeOfStateChange) {
+ if (!(this_present_timeOfStateChange && that_present_timeOfStateChange))
+ return false;
+ if (this.timeOfStateChange != that.timeOfStateChange)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(WorkflowNodeStatus other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetWorkflowNodeState()).compareTo(other.isSetWorkflowNodeState());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetWorkflowNodeState()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowNodeState, other.workflowNodeState);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTimeOfStateChange()).compareTo(other.isSetTimeOfStateChange());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTimeOfStateChange()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeOfStateChange, other.timeOfStateChange);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("WorkflowNodeStatus(");
+ boolean first = true;
+
+ sb.append("workflowNodeState:");
+ if (this.workflowNodeState == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.workflowNodeState);
+ }
+ first = false;
+ if (isSetTimeOfStateChange()) {
+ if (!first) sb.append(", ");
+ sb.append("timeOfStateChange:");
+ sb.append(this.timeOfStateChange);
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetWorkflowNodeState()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'workflowNodeState' is unset! Struct:" + toString());
+ }
+
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class WorkflowNodeStatusStandardSchemeFactory implements SchemeFactory {
+ public WorkflowNodeStatusStandardScheme getScheme() {
+ return new WorkflowNodeStatusStandardScheme();
+ }
+ }
+
+ private static class WorkflowNodeStatusStandardScheme extends StandardScheme<WorkflowNodeStatus> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, WorkflowNodeStatus struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // WORKFLOW_NODE_STATE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.workflowNodeState = WorkflowNodeState.findByValue(iprot.readI32());
+ struct.setWorkflowNodeStateIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // TIME_OF_STATE_CHANGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.timeOfStateChange = iprot.readI64();
+ struct.setTimeOfStateChangeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, WorkflowNodeStatus struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.workflowNodeState != null) {
+ oprot.writeFieldBegin(WORKFLOW_NODE_STATE_FIELD_DESC);
+ oprot.writeI32(struct.workflowNodeState.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetTimeOfStateChange()) {
+ oprot.writeFieldBegin(TIME_OF_STATE_CHANGE_FIELD_DESC);
+ oprot.writeI64(struct.timeOfStateChange);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class WorkflowNodeStatusTupleSchemeFactory implements SchemeFactory {
+ public WorkflowNodeStatusTupleScheme getScheme() {
+ return new WorkflowNodeStatusTupleScheme();
+ }
+ }
+
+ private static class WorkflowNodeStatusTupleScheme extends TupleScheme<WorkflowNodeStatus> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, WorkflowNodeStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeI32(struct.workflowNodeState.getValue());
+ BitSet optionals = new BitSet();
+ if (struct.isSetTimeOfStateChange()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetTimeOfStateChange()) {
+ oprot.writeI64(struct.timeOfStateChange);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, WorkflowNodeStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.workflowNodeState = WorkflowNodeState.findByValue(iprot.readI32());
+ struct.setWorkflowNodeStateIsSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.timeOfStateChange = iprot.readI64();
+ struct.setTimeOfStateChangeIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/719cbf9e/airavata-api/thrift-interface-descriptions/experimentModel.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/experimentModel.thrift b/airavata-api/thrift-interface-descriptions/experimentModel.thrift
index 0fc0908..4d84441 100644
--- a/airavata-api/thrift-interface-descriptions/experimentModel.thrift
+++ b/airavata-api/thrift-interface-descriptions/experimentModel.thrift
@@ -133,7 +133,7 @@ struct TransferStatus {
}
struct ApplicationStatus {
- 1: required ApplicationState applicationState,
+ 1: required string applicationState,
2: optional i64 timeOfStateChange
}
@@ -168,9 +168,9 @@ enum CorrectiveAction {
*/
struct DataObjectType {
1: required string key,
- 2: optional string type,
- 3: optional string metaData,
- 3: optional string value
+ 2: optional string value,
+ 3: optional string type,
+ 4: optional string metaData
}
/**
[6/8] Commiting the generated data-models for modified experiment
model. - AIRAVATA-1017
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/719cbf9e/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ErrorDetails.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ErrorDetails.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ErrorDetails.java
new file mode 100644
index 0000000..c8e0081
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ErrorDetails.java
@@ -0,0 +1,1287 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("all") public class ErrorDetails implements org.apache.thrift.TBase<ErrorDetails, ErrorDetails._Fields>, java.io.Serializable, Cloneable, Comparable<ErrorDetails> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ErrorDetails");
+
+ private static final org.apache.thrift.protocol.TField ERROR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("errorID", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTime", org.apache.thrift.protocol.TType.I64, (short)2);
+ private static final org.apache.thrift.protocol.TField ACTUAL_ERROR_MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("actualErrorMessage", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField USER_FRIENDLY_MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("userFriendlyMessage", org.apache.thrift.protocol.TType.STRING, (short)4);
+ private static final org.apache.thrift.protocol.TField ERROR_CATEGORY_FIELD_DESC = new org.apache.thrift.protocol.TField("errorCategory", org.apache.thrift.protocol.TType.I32, (short)5);
+ private static final org.apache.thrift.protocol.TField TRANSIENT_OR_PERSISTENT_FIELD_DESC = new org.apache.thrift.protocol.TField("transientOrPersistent", org.apache.thrift.protocol.TType.BOOL, (short)6);
+ private static final org.apache.thrift.protocol.TField CORRECTIVE_ACTION_FIELD_DESC = new org.apache.thrift.protocol.TField("correctiveAction", org.apache.thrift.protocol.TType.I32, (short)7);
+ private static final org.apache.thrift.protocol.TField ACTIONABLE_GROUP_FIELD_DESC = new org.apache.thrift.protocol.TField("actionableGroup", org.apache.thrift.protocol.TType.I32, (short)8);
+ private static final org.apache.thrift.protocol.TField ROOT_CAUSE_ERROR_ID_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("rootCauseErrorIdList", org.apache.thrift.protocol.TType.LIST, (short)9);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ErrorDetailsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ErrorDetailsTupleSchemeFactory());
+ }
+
+ private String errorID; // required
+ private long creationTime; // optional
+ private String actualErrorMessage; // optional
+ private String userFriendlyMessage; // optional
+ private ErrorCategory errorCategory; // optional
+ private boolean transientOrPersistent; // optional
+ private CorrectiveAction correctiveAction; // optional
+ private ActionableGroup actionableGroup; // optional
+ private List<String> rootCauseErrorIdList; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ ERROR_ID((short)1, "errorID"),
+ CREATION_TIME((short)2, "creationTime"),
+ ACTUAL_ERROR_MESSAGE((short)3, "actualErrorMessage"),
+ USER_FRIENDLY_MESSAGE((short)4, "userFriendlyMessage"),
+ /**
+ *
+ * @see ErrorCategory
+ */
+ ERROR_CATEGORY((short)5, "errorCategory"),
+ TRANSIENT_OR_PERSISTENT((short)6, "transientOrPersistent"),
+ /**
+ *
+ * @see CorrectiveAction
+ */
+ CORRECTIVE_ACTION((short)7, "correctiveAction"),
+ /**
+ *
+ * @see ActionableGroup
+ */
+ ACTIONABLE_GROUP((short)8, "actionableGroup"),
+ ROOT_CAUSE_ERROR_ID_LIST((short)9, "rootCauseErrorIdList");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // ERROR_ID
+ return ERROR_ID;
+ case 2: // CREATION_TIME
+ return CREATION_TIME;
+ case 3: // ACTUAL_ERROR_MESSAGE
+ return ACTUAL_ERROR_MESSAGE;
+ case 4: // USER_FRIENDLY_MESSAGE
+ return USER_FRIENDLY_MESSAGE;
+ case 5: // ERROR_CATEGORY
+ return ERROR_CATEGORY;
+ case 6: // TRANSIENT_OR_PERSISTENT
+ return TRANSIENT_OR_PERSISTENT;
+ case 7: // CORRECTIVE_ACTION
+ return CORRECTIVE_ACTION;
+ case 8: // ACTIONABLE_GROUP
+ return ACTIONABLE_GROUP;
+ case 9: // ROOT_CAUSE_ERROR_ID_LIST
+ return ROOT_CAUSE_ERROR_ID_LIST;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __CREATIONTIME_ISSET_ID = 0;
+ private static final int __TRANSIENTORPERSISTENT_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.CREATION_TIME,_Fields.ACTUAL_ERROR_MESSAGE,_Fields.USER_FRIENDLY_MESSAGE,_Fields.ERROR_CATEGORY,_Fields.TRANSIENT_OR_PERSISTENT,_Fields.CORRECTIVE_ACTION,_Fields.ACTIONABLE_GROUP,_Fields.ROOT_CAUSE_ERROR_ID_LIST};
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.ERROR_ID, new org.apache.thrift.meta_data.FieldMetaData("errorID", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("creationTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.ACTUAL_ERROR_MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("actualErrorMessage", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.USER_FRIENDLY_MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("userFriendlyMessage", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.ERROR_CATEGORY, new org.apache.thrift.meta_data.FieldMetaData("errorCategory", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ErrorCategory.class)));
+ tmpMap.put(_Fields.TRANSIENT_OR_PERSISTENT, new org.apache.thrift.meta_data.FieldMetaData("transientOrPersistent", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.CORRECTIVE_ACTION, new org.apache.thrift.meta_data.FieldMetaData("correctiveAction", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, CorrectiveAction.class)));
+ tmpMap.put(_Fields.ACTIONABLE_GROUP, new org.apache.thrift.meta_data.FieldMetaData("actionableGroup", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ActionableGroup.class)));
+ tmpMap.put(_Fields.ROOT_CAUSE_ERROR_ID_LIST, new org.apache.thrift.meta_data.FieldMetaData("rootCauseErrorIdList", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ErrorDetails.class, metaDataMap);
+ }
+
+ public ErrorDetails() {
+ this.errorID = "DO_NO_SET_BY_CLIENT";
+
+ this.transientOrPersistent = false;
+
+ }
+
+ public ErrorDetails(
+ String errorID)
+ {
+ this();
+ this.errorID = errorID;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ErrorDetails(ErrorDetails other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetErrorID()) {
+ this.errorID = other.errorID;
+ }
+ this.creationTime = other.creationTime;
+ if (other.isSetActualErrorMessage()) {
+ this.actualErrorMessage = other.actualErrorMessage;
+ }
+ if (other.isSetUserFriendlyMessage()) {
+ this.userFriendlyMessage = other.userFriendlyMessage;
+ }
+ if (other.isSetErrorCategory()) {
+ this.errorCategory = other.errorCategory;
+ }
+ this.transientOrPersistent = other.transientOrPersistent;
+ if (other.isSetCorrectiveAction()) {
+ this.correctiveAction = other.correctiveAction;
+ }
+ if (other.isSetActionableGroup()) {
+ this.actionableGroup = other.actionableGroup;
+ }
+ if (other.isSetRootCauseErrorIdList()) {
+ List<String> __this__rootCauseErrorIdList = new ArrayList<String>(other.rootCauseErrorIdList);
+ this.rootCauseErrorIdList = __this__rootCauseErrorIdList;
+ }
+ }
+
+ public ErrorDetails deepCopy() {
+ return new ErrorDetails(this);
+ }
+
+ @Override
+ public void clear() {
+ this.errorID = "DO_NO_SET_BY_CLIENT";
+
+ setCreationTimeIsSet(false);
+ this.creationTime = 0;
+ this.actualErrorMessage = null;
+ this.userFriendlyMessage = null;
+ this.errorCategory = null;
+ this.transientOrPersistent = false;
+
+ this.correctiveAction = null;
+ this.actionableGroup = null;
+ this.rootCauseErrorIdList = null;
+ }
+
+ public String getErrorID() {
+ return this.errorID;
+ }
+
+ public void setErrorID(String errorID) {
+ this.errorID = errorID;
+ }
+
+ public void unsetErrorID() {
+ this.errorID = null;
+ }
+
+ /** Returns true if field errorID is set (has been assigned a value) and false otherwise */
+ public boolean isSetErrorID() {
+ return this.errorID != null;
+ }
+
+ public void setErrorIDIsSet(boolean value) {
+ if (!value) {
+ this.errorID = null;
+ }
+ }
+
+ public long getCreationTime() {
+ return this.creationTime;
+ }
+
+ public void setCreationTime(long creationTime) {
+ this.creationTime = creationTime;
+ setCreationTimeIsSet(true);
+ }
+
+ public void unsetCreationTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
+ }
+
+ /** Returns true if field creationTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreationTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
+ }
+
+ public void setCreationTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATIONTIME_ISSET_ID, value);
+ }
+
+ public String getActualErrorMessage() {
+ return this.actualErrorMessage;
+ }
+
+ public void setActualErrorMessage(String actualErrorMessage) {
+ this.actualErrorMessage = actualErrorMessage;
+ }
+
+ public void unsetActualErrorMessage() {
+ this.actualErrorMessage = null;
+ }
+
+ /** Returns true if field actualErrorMessage is set (has been assigned a value) and false otherwise */
+ public boolean isSetActualErrorMessage() {
+ return this.actualErrorMessage != null;
+ }
+
+ public void setActualErrorMessageIsSet(boolean value) {
+ if (!value) {
+ this.actualErrorMessage = null;
+ }
+ }
+
+ public String getUserFriendlyMessage() {
+ return this.userFriendlyMessage;
+ }
+
+ public void setUserFriendlyMessage(String userFriendlyMessage) {
+ this.userFriendlyMessage = userFriendlyMessage;
+ }
+
+ public void unsetUserFriendlyMessage() {
+ this.userFriendlyMessage = null;
+ }
+
+ /** Returns true if field userFriendlyMessage is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserFriendlyMessage() {
+ return this.userFriendlyMessage != null;
+ }
+
+ public void setUserFriendlyMessageIsSet(boolean value) {
+ if (!value) {
+ this.userFriendlyMessage = null;
+ }
+ }
+
+ /**
+ *
+ * @see ErrorCategory
+ */
+ public ErrorCategory getErrorCategory() {
+ return this.errorCategory;
+ }
+
+ /**
+ *
+ * @see ErrorCategory
+ */
+ public void setErrorCategory(ErrorCategory errorCategory) {
+ this.errorCategory = errorCategory;
+ }
+
+ public void unsetErrorCategory() {
+ this.errorCategory = null;
+ }
+
+ /** Returns true if field errorCategory is set (has been assigned a value) and false otherwise */
+ public boolean isSetErrorCategory() {
+ return this.errorCategory != null;
+ }
+
+ public void setErrorCategoryIsSet(boolean value) {
+ if (!value) {
+ this.errorCategory = null;
+ }
+ }
+
+ public boolean isTransientOrPersistent() {
+ return this.transientOrPersistent;
+ }
+
+ public void setTransientOrPersistent(boolean transientOrPersistent) {
+ this.transientOrPersistent = transientOrPersistent;
+ setTransientOrPersistentIsSet(true);
+ }
+
+ public void unsetTransientOrPersistent() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TRANSIENTORPERSISTENT_ISSET_ID);
+ }
+
+ /** Returns true if field transientOrPersistent is set (has been assigned a value) and false otherwise */
+ public boolean isSetTransientOrPersistent() {
+ return EncodingUtils.testBit(__isset_bitfield, __TRANSIENTORPERSISTENT_ISSET_ID);
+ }
+
+ public void setTransientOrPersistentIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TRANSIENTORPERSISTENT_ISSET_ID, value);
+ }
+
+ /**
+ *
+ * @see CorrectiveAction
+ */
+ public CorrectiveAction getCorrectiveAction() {
+ return this.correctiveAction;
+ }
+
+ /**
+ *
+ * @see CorrectiveAction
+ */
+ public void setCorrectiveAction(CorrectiveAction correctiveAction) {
+ this.correctiveAction = correctiveAction;
+ }
+
+ public void unsetCorrectiveAction() {
+ this.correctiveAction = null;
+ }
+
+ /** Returns true if field correctiveAction is set (has been assigned a value) and false otherwise */
+ public boolean isSetCorrectiveAction() {
+ return this.correctiveAction != null;
+ }
+
+ public void setCorrectiveActionIsSet(boolean value) {
+ if (!value) {
+ this.correctiveAction = null;
+ }
+ }
+
+ /**
+ *
+ * @see ActionableGroup
+ */
+ public ActionableGroup getActionableGroup() {
+ return this.actionableGroup;
+ }
+
+ /**
+ *
+ * @see ActionableGroup
+ */
+ public void setActionableGroup(ActionableGroup actionableGroup) {
+ this.actionableGroup = actionableGroup;
+ }
+
+ public void unsetActionableGroup() {
+ this.actionableGroup = null;
+ }
+
+ /** Returns true if field actionableGroup is set (has been assigned a value) and false otherwise */
+ public boolean isSetActionableGroup() {
+ return this.actionableGroup != null;
+ }
+
+ public void setActionableGroupIsSet(boolean value) {
+ if (!value) {
+ this.actionableGroup = null;
+ }
+ }
+
+ public int getRootCauseErrorIdListSize() {
+ return (this.rootCauseErrorIdList == null) ? 0 : this.rootCauseErrorIdList.size();
+ }
+
+ public java.util.Iterator<String> getRootCauseErrorIdListIterator() {
+ return (this.rootCauseErrorIdList == null) ? null : this.rootCauseErrorIdList.iterator();
+ }
+
+ public void addToRootCauseErrorIdList(String elem) {
+ if (this.rootCauseErrorIdList == null) {
+ this.rootCauseErrorIdList = new ArrayList<String>();
+ }
+ this.rootCauseErrorIdList.add(elem);
+ }
+
+ public List<String> getRootCauseErrorIdList() {
+ return this.rootCauseErrorIdList;
+ }
+
+ public void setRootCauseErrorIdList(List<String> rootCauseErrorIdList) {
+ this.rootCauseErrorIdList = rootCauseErrorIdList;
+ }
+
+ public void unsetRootCauseErrorIdList() {
+ this.rootCauseErrorIdList = null;
+ }
+
+ /** Returns true if field rootCauseErrorIdList is set (has been assigned a value) and false otherwise */
+ public boolean isSetRootCauseErrorIdList() {
+ return this.rootCauseErrorIdList != null;
+ }
+
+ public void setRootCauseErrorIdListIsSet(boolean value) {
+ if (!value) {
+ this.rootCauseErrorIdList = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case ERROR_ID:
+ if (value == null) {
+ unsetErrorID();
+ } else {
+ setErrorID((String)value);
+ }
+ break;
+
+ case CREATION_TIME:
+ if (value == null) {
+ unsetCreationTime();
+ } else {
+ setCreationTime((Long)value);
+ }
+ break;
+
+ case ACTUAL_ERROR_MESSAGE:
+ if (value == null) {
+ unsetActualErrorMessage();
+ } else {
+ setActualErrorMessage((String)value);
+ }
+ break;
+
+ case USER_FRIENDLY_MESSAGE:
+ if (value == null) {
+ unsetUserFriendlyMessage();
+ } else {
+ setUserFriendlyMessage((String)value);
+ }
+ break;
+
+ case ERROR_CATEGORY:
+ if (value == null) {
+ unsetErrorCategory();
+ } else {
+ setErrorCategory((ErrorCategory)value);
+ }
+ break;
+
+ case TRANSIENT_OR_PERSISTENT:
+ if (value == null) {
+ unsetTransientOrPersistent();
+ } else {
+ setTransientOrPersistent((Boolean)value);
+ }
+ break;
+
+ case CORRECTIVE_ACTION:
+ if (value == null) {
+ unsetCorrectiveAction();
+ } else {
+ setCorrectiveAction((CorrectiveAction)value);
+ }
+ break;
+
+ case ACTIONABLE_GROUP:
+ if (value == null) {
+ unsetActionableGroup();
+ } else {
+ setActionableGroup((ActionableGroup)value);
+ }
+ break;
+
+ case ROOT_CAUSE_ERROR_ID_LIST:
+ if (value == null) {
+ unsetRootCauseErrorIdList();
+ } else {
+ setRootCauseErrorIdList((List<String>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case ERROR_ID:
+ return getErrorID();
+
+ case CREATION_TIME:
+ return Long.valueOf(getCreationTime());
+
+ case ACTUAL_ERROR_MESSAGE:
+ return getActualErrorMessage();
+
+ case USER_FRIENDLY_MESSAGE:
+ return getUserFriendlyMessage();
+
+ case ERROR_CATEGORY:
+ return getErrorCategory();
+
+ case TRANSIENT_OR_PERSISTENT:
+ return Boolean.valueOf(isTransientOrPersistent());
+
+ case CORRECTIVE_ACTION:
+ return getCorrectiveAction();
+
+ case ACTIONABLE_GROUP:
+ return getActionableGroup();
+
+ case ROOT_CAUSE_ERROR_ID_LIST:
+ return getRootCauseErrorIdList();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case ERROR_ID:
+ return isSetErrorID();
+ case CREATION_TIME:
+ return isSetCreationTime();
+ case ACTUAL_ERROR_MESSAGE:
+ return isSetActualErrorMessage();
+ case USER_FRIENDLY_MESSAGE:
+ return isSetUserFriendlyMessage();
+ case ERROR_CATEGORY:
+ return isSetErrorCategory();
+ case TRANSIENT_OR_PERSISTENT:
+ return isSetTransientOrPersistent();
+ case CORRECTIVE_ACTION:
+ return isSetCorrectiveAction();
+ case ACTIONABLE_GROUP:
+ return isSetActionableGroup();
+ case ROOT_CAUSE_ERROR_ID_LIST:
+ return isSetRootCauseErrorIdList();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ErrorDetails)
+ return this.equals((ErrorDetails)that);
+ return false;
+ }
+
+ public boolean equals(ErrorDetails that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_errorID = true && this.isSetErrorID();
+ boolean that_present_errorID = true && that.isSetErrorID();
+ if (this_present_errorID || that_present_errorID) {
+ if (!(this_present_errorID && that_present_errorID))
+ return false;
+ if (!this.errorID.equals(that.errorID))
+ return false;
+ }
+
+ boolean this_present_creationTime = true && this.isSetCreationTime();
+ boolean that_present_creationTime = true && that.isSetCreationTime();
+ if (this_present_creationTime || that_present_creationTime) {
+ if (!(this_present_creationTime && that_present_creationTime))
+ return false;
+ if (this.creationTime != that.creationTime)
+ return false;
+ }
+
+ boolean this_present_actualErrorMessage = true && this.isSetActualErrorMessage();
+ boolean that_present_actualErrorMessage = true && that.isSetActualErrorMessage();
+ if (this_present_actualErrorMessage || that_present_actualErrorMessage) {
+ if (!(this_present_actualErrorMessage && that_present_actualErrorMessage))
+ return false;
+ if (!this.actualErrorMessage.equals(that.actualErrorMessage))
+ return false;
+ }
+
+ boolean this_present_userFriendlyMessage = true && this.isSetUserFriendlyMessage();
+ boolean that_present_userFriendlyMessage = true && that.isSetUserFriendlyMessage();
+ if (this_present_userFriendlyMessage || that_present_userFriendlyMessage) {
+ if (!(this_present_userFriendlyMessage && that_present_userFriendlyMessage))
+ return false;
+ if (!this.userFriendlyMessage.equals(that.userFriendlyMessage))
+ return false;
+ }
+
+ boolean this_present_errorCategory = true && this.isSetErrorCategory();
+ boolean that_present_errorCategory = true && that.isSetErrorCategory();
+ if (this_present_errorCategory || that_present_errorCategory) {
+ if (!(this_present_errorCategory && that_present_errorCategory))
+ return false;
+ if (!this.errorCategory.equals(that.errorCategory))
+ return false;
+ }
+
+ boolean this_present_transientOrPersistent = true && this.isSetTransientOrPersistent();
+ boolean that_present_transientOrPersistent = true && that.isSetTransientOrPersistent();
+ if (this_present_transientOrPersistent || that_present_transientOrPersistent) {
+ if (!(this_present_transientOrPersistent && that_present_transientOrPersistent))
+ return false;
+ if (this.transientOrPersistent != that.transientOrPersistent)
+ return false;
+ }
+
+ boolean this_present_correctiveAction = true && this.isSetCorrectiveAction();
+ boolean that_present_correctiveAction = true && that.isSetCorrectiveAction();
+ if (this_present_correctiveAction || that_present_correctiveAction) {
+ if (!(this_present_correctiveAction && that_present_correctiveAction))
+ return false;
+ if (!this.correctiveAction.equals(that.correctiveAction))
+ return false;
+ }
+
+ boolean this_present_actionableGroup = true && this.isSetActionableGroup();
+ boolean that_present_actionableGroup = true && that.isSetActionableGroup();
+ if (this_present_actionableGroup || that_present_actionableGroup) {
+ if (!(this_present_actionableGroup && that_present_actionableGroup))
+ return false;
+ if (!this.actionableGroup.equals(that.actionableGroup))
+ return false;
+ }
+
+ boolean this_present_rootCauseErrorIdList = true && this.isSetRootCauseErrorIdList();
+ boolean that_present_rootCauseErrorIdList = true && that.isSetRootCauseErrorIdList();
+ if (this_present_rootCauseErrorIdList || that_present_rootCauseErrorIdList) {
+ if (!(this_present_rootCauseErrorIdList && that_present_rootCauseErrorIdList))
+ return false;
+ if (!this.rootCauseErrorIdList.equals(that.rootCauseErrorIdList))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(ErrorDetails other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetErrorID()).compareTo(other.isSetErrorID());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetErrorID()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorID, other.errorID);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreationTime()).compareTo(other.isSetCreationTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreationTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creationTime, other.creationTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetActualErrorMessage()).compareTo(other.isSetActualErrorMessage());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetActualErrorMessage()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.actualErrorMessage, other.actualErrorMessage);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUserFriendlyMessage()).compareTo(other.isSetUserFriendlyMessage());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUserFriendlyMessage()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userFriendlyMessage, other.userFriendlyMessage);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetErrorCategory()).compareTo(other.isSetErrorCategory());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetErrorCategory()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorCategory, other.errorCategory);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTransientOrPersistent()).compareTo(other.isSetTransientOrPersistent());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTransientOrPersistent()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transientOrPersistent, other.transientOrPersistent);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCorrectiveAction()).compareTo(other.isSetCorrectiveAction());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCorrectiveAction()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.correctiveAction, other.correctiveAction);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetActionableGroup()).compareTo(other.isSetActionableGroup());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetActionableGroup()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.actionableGroup, other.actionableGroup);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetRootCauseErrorIdList()).compareTo(other.isSetRootCauseErrorIdList());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetRootCauseErrorIdList()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rootCauseErrorIdList, other.rootCauseErrorIdList);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("ErrorDetails(");
+ boolean first = true;
+
+ sb.append("errorID:");
+ if (this.errorID == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.errorID);
+ }
+ first = false;
+ if (isSetCreationTime()) {
+ if (!first) sb.append(", ");
+ sb.append("creationTime:");
+ sb.append(this.creationTime);
+ first = false;
+ }
+ if (isSetActualErrorMessage()) {
+ if (!first) sb.append(", ");
+ sb.append("actualErrorMessage:");
+ if (this.actualErrorMessage == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.actualErrorMessage);
+ }
+ first = false;
+ }
+ if (isSetUserFriendlyMessage()) {
+ if (!first) sb.append(", ");
+ sb.append("userFriendlyMessage:");
+ if (this.userFriendlyMessage == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userFriendlyMessage);
+ }
+ first = false;
+ }
+ if (isSetErrorCategory()) {
+ if (!first) sb.append(", ");
+ sb.append("errorCategory:");
+ if (this.errorCategory == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.errorCategory);
+ }
+ first = false;
+ }
+ if (isSetTransientOrPersistent()) {
+ if (!first) sb.append(", ");
+ sb.append("transientOrPersistent:");
+ sb.append(this.transientOrPersistent);
+ first = false;
+ }
+ if (isSetCorrectiveAction()) {
+ if (!first) sb.append(", ");
+ sb.append("correctiveAction:");
+ if (this.correctiveAction == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.correctiveAction);
+ }
+ first = false;
+ }
+ if (isSetActionableGroup()) {
+ if (!first) sb.append(", ");
+ sb.append("actionableGroup:");
+ if (this.actionableGroup == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.actionableGroup);
+ }
+ first = false;
+ }
+ if (isSetRootCauseErrorIdList()) {
+ if (!first) sb.append(", ");
+ sb.append("rootCauseErrorIdList:");
+ if (this.rootCauseErrorIdList == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.rootCauseErrorIdList);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetErrorID()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'errorID' is unset! Struct:" + toString());
+ }
+
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class ErrorDetailsStandardSchemeFactory implements SchemeFactory {
+ public ErrorDetailsStandardScheme getScheme() {
+ return new ErrorDetailsStandardScheme();
+ }
+ }
+
+ private static class ErrorDetailsStandardScheme extends StandardScheme<ErrorDetails> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ErrorDetails struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // ERROR_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.errorID = iprot.readString();
+ struct.setErrorIDIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // CREATION_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.creationTime = iprot.readI64();
+ struct.setCreationTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // ACTUAL_ERROR_MESSAGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.actualErrorMessage = iprot.readString();
+ struct.setActualErrorMessageIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // USER_FRIENDLY_MESSAGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.userFriendlyMessage = iprot.readString();
+ struct.setUserFriendlyMessageIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // ERROR_CATEGORY
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.errorCategory = ErrorCategory.findByValue(iprot.readI32());
+ struct.setErrorCategoryIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // TRANSIENT_OR_PERSISTENT
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.transientOrPersistent = iprot.readBool();
+ struct.setTransientOrPersistentIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // CORRECTIVE_ACTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.correctiveAction = CorrectiveAction.findByValue(iprot.readI32());
+ struct.setCorrectiveActionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // ACTIONABLE_GROUP
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.actionableGroup = ActionableGroup.findByValue(iprot.readI32());
+ struct.setActionableGroupIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 9: // ROOT_CAUSE_ERROR_ID_LIST
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
+ struct.rootCauseErrorIdList = new ArrayList<String>(_list0.size);
+ for (int _i1 = 0; _i1 < _list0.size; ++_i1)
+ {
+ String _elem2;
+ _elem2 = iprot.readString();
+ struct.rootCauseErrorIdList.add(_elem2);
+ }
+ iprot.readListEnd();
+ }
+ struct.setRootCauseErrorIdListIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, ErrorDetails struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.errorID != null) {
+ oprot.writeFieldBegin(ERROR_ID_FIELD_DESC);
+ oprot.writeString(struct.errorID);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetCreationTime()) {
+ oprot.writeFieldBegin(CREATION_TIME_FIELD_DESC);
+ oprot.writeI64(struct.creationTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.actualErrorMessage != null) {
+ if (struct.isSetActualErrorMessage()) {
+ oprot.writeFieldBegin(ACTUAL_ERROR_MESSAGE_FIELD_DESC);
+ oprot.writeString(struct.actualErrorMessage);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.userFriendlyMessage != null) {
+ if (struct.isSetUserFriendlyMessage()) {
+ oprot.writeFieldBegin(USER_FRIENDLY_MESSAGE_FIELD_DESC);
+ oprot.writeString(struct.userFriendlyMessage);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.errorCategory != null) {
+ if (struct.isSetErrorCategory()) {
+ oprot.writeFieldBegin(ERROR_CATEGORY_FIELD_DESC);
+ oprot.writeI32(struct.errorCategory.getValue());
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetTransientOrPersistent()) {
+ oprot.writeFieldBegin(TRANSIENT_OR_PERSISTENT_FIELD_DESC);
+ oprot.writeBool(struct.transientOrPersistent);
+ oprot.writeFieldEnd();
+ }
+ if (struct.correctiveAction != null) {
+ if (struct.isSetCorrectiveAction()) {
+ oprot.writeFieldBegin(CORRECTIVE_ACTION_FIELD_DESC);
+ oprot.writeI32(struct.correctiveAction.getValue());
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.actionableGroup != null) {
+ if (struct.isSetActionableGroup()) {
+ oprot.writeFieldBegin(ACTIONABLE_GROUP_FIELD_DESC);
+ oprot.writeI32(struct.actionableGroup.getValue());
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.rootCauseErrorIdList != null) {
+ if (struct.isSetRootCauseErrorIdList()) {
+ oprot.writeFieldBegin(ROOT_CAUSE_ERROR_ID_LIST_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.rootCauseErrorIdList.size()));
+ for (String _iter3 : struct.rootCauseErrorIdList)
+ {
+ oprot.writeString(_iter3);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ErrorDetailsTupleSchemeFactory implements SchemeFactory {
+ public ErrorDetailsTupleScheme getScheme() {
+ return new ErrorDetailsTupleScheme();
+ }
+ }
+
+ private static class ErrorDetailsTupleScheme extends TupleScheme<ErrorDetails> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ErrorDetails struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.errorID);
+ BitSet optionals = new BitSet();
+ if (struct.isSetCreationTime()) {
+ optionals.set(0);
+ }
+ if (struct.isSetActualErrorMessage()) {
+ optionals.set(1);
+ }
+ if (struct.isSetUserFriendlyMessage()) {
+ optionals.set(2);
+ }
+ if (struct.isSetErrorCategory()) {
+ optionals.set(3);
+ }
+ if (struct.isSetTransientOrPersistent()) {
+ optionals.set(4);
+ }
+ if (struct.isSetCorrectiveAction()) {
+ optionals.set(5);
+ }
+ if (struct.isSetActionableGroup()) {
+ optionals.set(6);
+ }
+ if (struct.isSetRootCauseErrorIdList()) {
+ optionals.set(7);
+ }
+ oprot.writeBitSet(optionals, 8);
+ if (struct.isSetCreationTime()) {
+ oprot.writeI64(struct.creationTime);
+ }
+ if (struct.isSetActualErrorMessage()) {
+ oprot.writeString(struct.actualErrorMessage);
+ }
+ if (struct.isSetUserFriendlyMessage()) {
+ oprot.writeString(struct.userFriendlyMessage);
+ }
+ if (struct.isSetErrorCategory()) {
+ oprot.writeI32(struct.errorCategory.getValue());
+ }
+ if (struct.isSetTransientOrPersistent()) {
+ oprot.writeBool(struct.transientOrPersistent);
+ }
+ if (struct.isSetCorrectiveAction()) {
+ oprot.writeI32(struct.correctiveAction.getValue());
+ }
+ if (struct.isSetActionableGroup()) {
+ oprot.writeI32(struct.actionableGroup.getValue());
+ }
+ if (struct.isSetRootCauseErrorIdList()) {
+ {
+ oprot.writeI32(struct.rootCauseErrorIdList.size());
+ for (String _iter4 : struct.rootCauseErrorIdList)
+ {
+ oprot.writeString(_iter4);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ErrorDetails struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.errorID = iprot.readString();
+ struct.setErrorIDIsSet(true);
+ BitSet incoming = iprot.readBitSet(8);
+ if (incoming.get(0)) {
+ struct.creationTime = iprot.readI64();
+ struct.setCreationTimeIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.actualErrorMessage = iprot.readString();
+ struct.setActualErrorMessageIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.userFriendlyMessage = iprot.readString();
+ struct.setUserFriendlyMessageIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.errorCategory = ErrorCategory.findByValue(iprot.readI32());
+ struct.setErrorCategoryIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.transientOrPersistent = iprot.readBool();
+ struct.setTransientOrPersistentIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.correctiveAction = CorrectiveAction.findByValue(iprot.readI32());
+ struct.setCorrectiveActionIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.actionableGroup = ActionableGroup.findByValue(iprot.readI32());
+ struct.setActionableGroupIsSet(true);
+ }
+ if (incoming.get(7)) {
+ {
+ org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.rootCauseErrorIdList = new ArrayList<String>(_list5.size);
+ for (int _i6 = 0; _i6 < _list5.size; ++_i6)
+ {
+ String _elem7;
+ _elem7 = iprot.readString();
+ struct.rootCauseErrorIdList.add(_elem7);
+ }
+ }
+ struct.setRootCauseErrorIdListIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/719cbf9e/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExecutionState.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExecutionState.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExecutionState.java
new file mode 100644
index 0000000..87add97
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExecutionState.java
@@ -0,0 +1,85 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+@SuppressWarnings("all") public enum ExecutionState implements org.apache.thrift.TEnum {
+ AUTHENTICATED(0),
+ PRE_PROCESSING(1),
+ CONFIGURING_WORKSPACE(2),
+ INPUT_DATA_STAGING(3),
+ OUTPUT_DATA_STAGING(4),
+ POST_PROCESSING(5),
+ CANCELED(6),
+ COMPLETED(7),
+ FAILED(8),
+ UNKNOWN(9);
+
+ private final int value;
+
+ private ExecutionState(int value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the integer value of this enum value, as defined in the Thrift IDL.
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Find a the enum type by its integer value, as defined in the Thrift IDL.
+ * @return null if the value is not found.
+ */
+ public static ExecutionState findByValue(int value) {
+ switch (value) {
+ case 0:
+ return AUTHENTICATED;
+ case 1:
+ return PRE_PROCESSING;
+ case 2:
+ return CONFIGURING_WORKSPACE;
+ case 3:
+ return INPUT_DATA_STAGING;
+ case 4:
+ return OUTPUT_DATA_STAGING;
+ case 5:
+ return POST_PROCESSING;
+ case 6:
+ return CANCELED;
+ case 7:
+ return COMPLETED;
+ case 8:
+ return FAILED;
+ case 9:
+ return UNKNOWN;
+ default:
+ return null;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/719cbf9e/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExecutionStatus.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExecutionStatus.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExecutionStatus.java
new file mode 100644
index 0000000..6b83d73
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExecutionStatus.java
@@ -0,0 +1,509 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("all") public class ExecutionStatus implements org.apache.thrift.TBase<ExecutionStatus, ExecutionStatus._Fields>, java.io.Serializable, Cloneable, Comparable<ExecutionStatus> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExecutionStatus");
+
+ private static final org.apache.thrift.protocol.TField EXECUTION_STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("executionState", org.apache.thrift.protocol.TType.I32, (short)1);
+ private static final org.apache.thrift.protocol.TField TIME_OF_STATE_CHANGE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeOfStateChange", org.apache.thrift.protocol.TType.I64, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ExecutionStatusStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ExecutionStatusTupleSchemeFactory());
+ }
+
+ private ExecutionState executionState; // required
+ private long timeOfStateChange; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ /**
+ *
+ * @see ExecutionState
+ */
+ EXECUTION_STATE((short)1, "executionState"),
+ TIME_OF_STATE_CHANGE((short)2, "timeOfStateChange");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // EXECUTION_STATE
+ return EXECUTION_STATE;
+ case 2: // TIME_OF_STATE_CHANGE
+ return TIME_OF_STATE_CHANGE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __TIMEOFSTATECHANGE_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.TIME_OF_STATE_CHANGE};
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.EXECUTION_STATE, new org.apache.thrift.meta_data.FieldMetaData("executionState", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ExecutionState.class)));
+ tmpMap.put(_Fields.TIME_OF_STATE_CHANGE, new org.apache.thrift.meta_data.FieldMetaData("timeOfStateChange", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ExecutionStatus.class, metaDataMap);
+ }
+
+ public ExecutionStatus() {
+ }
+
+ public ExecutionStatus(
+ ExecutionState executionState)
+ {
+ this();
+ this.executionState = executionState;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ExecutionStatus(ExecutionStatus other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetExecutionState()) {
+ this.executionState = other.executionState;
+ }
+ this.timeOfStateChange = other.timeOfStateChange;
+ }
+
+ public ExecutionStatus deepCopy() {
+ return new ExecutionStatus(this);
+ }
+
+ @Override
+ public void clear() {
+ this.executionState = null;
+ setTimeOfStateChangeIsSet(false);
+ this.timeOfStateChange = 0;
+ }
+
+ /**
+ *
+ * @see ExecutionState
+ */
+ public ExecutionState getExecutionState() {
+ return this.executionState;
+ }
+
+ /**
+ *
+ * @see ExecutionState
+ */
+ public void setExecutionState(ExecutionState executionState) {
+ this.executionState = executionState;
+ }
+
+ public void unsetExecutionState() {
+ this.executionState = null;
+ }
+
+ /** Returns true if field executionState is set (has been assigned a value) and false otherwise */
+ public boolean isSetExecutionState() {
+ return this.executionState != null;
+ }
+
+ public void setExecutionStateIsSet(boolean value) {
+ if (!value) {
+ this.executionState = null;
+ }
+ }
+
+ public long getTimeOfStateChange() {
+ return this.timeOfStateChange;
+ }
+
+ public void setTimeOfStateChange(long timeOfStateChange) {
+ this.timeOfStateChange = timeOfStateChange;
+ setTimeOfStateChangeIsSet(true);
+ }
+
+ public void unsetTimeOfStateChange() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID);
+ }
+
+ /** Returns true if field timeOfStateChange is set (has been assigned a value) and false otherwise */
+ public boolean isSetTimeOfStateChange() {
+ return EncodingUtils.testBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID);
+ }
+
+ public void setTimeOfStateChangeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case EXECUTION_STATE:
+ if (value == null) {
+ unsetExecutionState();
+ } else {
+ setExecutionState((ExecutionState)value);
+ }
+ break;
+
+ case TIME_OF_STATE_CHANGE:
+ if (value == null) {
+ unsetTimeOfStateChange();
+ } else {
+ setTimeOfStateChange((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case EXECUTION_STATE:
+ return getExecutionState();
+
+ case TIME_OF_STATE_CHANGE:
+ return Long.valueOf(getTimeOfStateChange());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case EXECUTION_STATE:
+ return isSetExecutionState();
+ case TIME_OF_STATE_CHANGE:
+ return isSetTimeOfStateChange();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ExecutionStatus)
+ return this.equals((ExecutionStatus)that);
+ return false;
+ }
+
+ public boolean equals(ExecutionStatus that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_executionState = true && this.isSetExecutionState();
+ boolean that_present_executionState = true && that.isSetExecutionState();
+ if (this_present_executionState || that_present_executionState) {
+ if (!(this_present_executionState && that_present_executionState))
+ return false;
+ if (!this.executionState.equals(that.executionState))
+ return false;
+ }
+
+ boolean this_present_timeOfStateChange = true && this.isSetTimeOfStateChange();
+ boolean that_present_timeOfStateChange = true && that.isSetTimeOfStateChange();
+ if (this_present_timeOfStateChange || that_present_timeOfStateChange) {
+ if (!(this_present_timeOfStateChange && that_present_timeOfStateChange))
+ return false;
+ if (this.timeOfStateChange != that.timeOfStateChange)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(ExecutionStatus other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetExecutionState()).compareTo(other.isSetExecutionState());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExecutionState()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.executionState, other.executionState);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTimeOfStateChange()).compareTo(other.isSetTimeOfStateChange());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTimeOfStateChange()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeOfStateChange, other.timeOfStateChange);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("ExecutionStatus(");
+ boolean first = true;
+
+ sb.append("executionState:");
+ if (this.executionState == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.executionState);
+ }
+ first = false;
+ if (isSetTimeOfStateChange()) {
+ if (!first) sb.append(", ");
+ sb.append("timeOfStateChange:");
+ sb.append(this.timeOfStateChange);
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetExecutionState()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'executionState' is unset! Struct:" + toString());
+ }
+
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class ExecutionStatusStandardSchemeFactory implements SchemeFactory {
+ public ExecutionStatusStandardScheme getScheme() {
+ return new ExecutionStatusStandardScheme();
+ }
+ }
+
+ private static class ExecutionStatusStandardScheme extends StandardScheme<ExecutionStatus> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ExecutionStatus struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // EXECUTION_STATE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.executionState = ExecutionState.findByValue(iprot.readI32());
+ struct.setExecutionStateIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // TIME_OF_STATE_CHANGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.timeOfStateChange = iprot.readI64();
+ struct.setTimeOfStateChangeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, ExecutionStatus struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.executionState != null) {
+ oprot.writeFieldBegin(EXECUTION_STATE_FIELD_DESC);
+ oprot.writeI32(struct.executionState.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetTimeOfStateChange()) {
+ oprot.writeFieldBegin(TIME_OF_STATE_CHANGE_FIELD_DESC);
+ oprot.writeI64(struct.timeOfStateChange);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ExecutionStatusTupleSchemeFactory implements SchemeFactory {
+ public ExecutionStatusTupleScheme getScheme() {
+ return new ExecutionStatusTupleScheme();
+ }
+ }
+
+ private static class ExecutionStatusTupleScheme extends TupleScheme<ExecutionStatus> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ExecutionStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeI32(struct.executionState.getValue());
+ BitSet optionals = new BitSet();
+ if (struct.isSetTimeOfStateChange()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetTimeOfStateChange()) {
+ oprot.writeI64(struct.timeOfStateChange);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ExecutionStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.executionState = ExecutionState.findByValue(iprot.readI32());
+ struct.setExecutionStateIsSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.timeOfStateChange = iprot.readI64();
+ struct.setTimeOfStateChangeIsSet(true);
+ }
+ }
+ }
+
+}
+
[5/8] Commiting the generated data-models for modified experiment
model. - AIRAVATA-1017
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/719cbf9e/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/Experiment.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/Experiment.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/Experiment.java
new file mode 100644
index 0000000..dd2d857
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/Experiment.java
@@ -0,0 +1,2294 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * A structure holding the experiment metadata and its child models.
+ *
+ * userName:
+ * The user name of the targeted gateway end user on whose behalf the experiment is being created.
+ * the associated gateway identity can only be inferred from the security hand-shake so as to avoid
+ * authorized Airavata Clients mimicking an unauthorized request. If a gateway is not registered with
+ * Airavata, an authorization exception is thrown.
+ *
+ * experimentName:
+ * The name of the experiment as defined by the user. The name need not be unique as uniqueness is enforced
+ * by the generated experiment id.
+ *
+ * experimentDescription:
+ * The verbose description of the experiment. This is an optional parameter.
+ */
+@SuppressWarnings("all") public class Experiment implements org.apache.thrift.TBase<Experiment, Experiment._Fields>, java.io.Serializable, Cloneable, Comparable<Experiment> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Experiment");
+
+ private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentID", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField PROJECT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("projectID", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTime", org.apache.thrift.protocol.TType.I64, (short)3);
+ private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)4);
+ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)5);
+ private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)6);
+ private static final org.apache.thrift.protocol.TField APPLICATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationId", org.apache.thrift.protocol.TType.STRING, (short)7);
+ private static final org.apache.thrift.protocol.TField APPLICATION_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationVersion", org.apache.thrift.protocol.TType.STRING, (short)8);
+ private static final org.apache.thrift.protocol.TField WORKFLOW_TEMPLATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowTemplateId", org.apache.thrift.protocol.TType.STRING, (short)9);
+ private static final org.apache.thrift.protocol.TField WORKFLOW_TEMPLATE_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowTemplateVersion", org.apache.thrift.protocol.TType.STRING, (short)10);
+ private static final org.apache.thrift.protocol.TField WORKFLOW_EXECUTION_INSTANCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowExecutionInstanceId", org.apache.thrift.protocol.TType.STRING, (short)11);
+ private static final org.apache.thrift.protocol.TField EXPERIMENT_INPUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentInputs", org.apache.thrift.protocol.TType.LIST, (short)12);
+ private static final org.apache.thrift.protocol.TField EXPERIMENT_OUTPUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentOutputs", org.apache.thrift.protocol.TType.LIST, (short)13);
+ private static final org.apache.thrift.protocol.TField EXPERIMENT_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentStatus", org.apache.thrift.protocol.TType.STRUCT, (short)14);
+ private static final org.apache.thrift.protocol.TField STATE_CHANGE_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("stateChangeList", org.apache.thrift.protocol.TType.LIST, (short)15);
+ private static final org.apache.thrift.protocol.TField WORKFLOW_NODE_DETAILS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowNodeDetailsList", org.apache.thrift.protocol.TType.LIST, (short)16);
+ private static final org.apache.thrift.protocol.TField ERRORS_FIELD_DESC = new org.apache.thrift.protocol.TField("errors", org.apache.thrift.protocol.TType.LIST, (short)17);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ExperimentStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ExperimentTupleSchemeFactory());
+ }
+
+ private String experimentID; // required
+ private String projectID; // required
+ private long creationTime; // optional
+ private String userName; // required
+ private String name; // required
+ private String description; // optional
+ private String applicationId; // optional
+ private String applicationVersion; // optional
+ private String workflowTemplateId; // optional
+ private String workflowTemplateVersion; // optional
+ private String workflowExecutionInstanceId; // optional
+ private List<DataObjectType> experimentInputs; // optional
+ private List<DataObjectType> experimentOutputs; // optional
+ private ExecutionStatus experimentStatus; // optional
+ private List<ExecutionStatus> stateChangeList; // optional
+ private List<WorkflowNodeDetails> workflowNodeDetailsList; // optional
+ private List<ErrorDetails> errors; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ EXPERIMENT_ID((short)1, "experimentID"),
+ PROJECT_ID((short)2, "projectID"),
+ CREATION_TIME((short)3, "creationTime"),
+ USER_NAME((short)4, "userName"),
+ NAME((short)5, "name"),
+ DESCRIPTION((short)6, "description"),
+ APPLICATION_ID((short)7, "applicationId"),
+ APPLICATION_VERSION((short)8, "applicationVersion"),
+ WORKFLOW_TEMPLATE_ID((short)9, "workflowTemplateId"),
+ WORKFLOW_TEMPLATE_VERSION((short)10, "workflowTemplateVersion"),
+ WORKFLOW_EXECUTION_INSTANCE_ID((short)11, "workflowExecutionInstanceId"),
+ EXPERIMENT_INPUTS((short)12, "experimentInputs"),
+ EXPERIMENT_OUTPUTS((short)13, "experimentOutputs"),
+ EXPERIMENT_STATUS((short)14, "experimentStatus"),
+ STATE_CHANGE_LIST((short)15, "stateChangeList"),
+ WORKFLOW_NODE_DETAILS_LIST((short)16, "workflowNodeDetailsList"),
+ ERRORS((short)17, "errors");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // EXPERIMENT_ID
+ return EXPERIMENT_ID;
+ case 2: // PROJECT_ID
+ return PROJECT_ID;
+ case 3: // CREATION_TIME
+ return CREATION_TIME;
+ case 4: // USER_NAME
+ return USER_NAME;
+ case 5: // NAME
+ return NAME;
+ case 6: // DESCRIPTION
+ return DESCRIPTION;
+ case 7: // APPLICATION_ID
+ return APPLICATION_ID;
+ case 8: // APPLICATION_VERSION
+ return APPLICATION_VERSION;
+ case 9: // WORKFLOW_TEMPLATE_ID
+ return WORKFLOW_TEMPLATE_ID;
+ case 10: // WORKFLOW_TEMPLATE_VERSION
+ return WORKFLOW_TEMPLATE_VERSION;
+ case 11: // WORKFLOW_EXECUTION_INSTANCE_ID
+ return WORKFLOW_EXECUTION_INSTANCE_ID;
+ case 12: // EXPERIMENT_INPUTS
+ return EXPERIMENT_INPUTS;
+ case 13: // EXPERIMENT_OUTPUTS
+ return EXPERIMENT_OUTPUTS;
+ case 14: // EXPERIMENT_STATUS
+ return EXPERIMENT_STATUS;
+ case 15: // STATE_CHANGE_LIST
+ return STATE_CHANGE_LIST;
+ case 16: // WORKFLOW_NODE_DETAILS_LIST
+ return WORKFLOW_NODE_DETAILS_LIST;
+ case 17: // ERRORS
+ return ERRORS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __CREATIONTIME_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.CREATION_TIME,_Fields.DESCRIPTION,_Fields.APPLICATION_ID,_Fields.APPLICATION_VERSION,_Fields.WORKFLOW_TEMPLATE_ID,_Fields.WORKFLOW_TEMPLATE_VERSION,_Fields.WORKFLOW_EXECUTION_INSTANCE_ID,_Fields.EXPERIMENT_INPUTS,_Fields.EXPERIMENT_OUTPUTS,_Fields.EXPERIMENT_STATUS,_Fields.STATE_CHANGE_LIST,_Fields.WORKFLOW_NODE_DETAILS_LIST,_Fields.ERRORS};
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("experimentID", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.PROJECT_ID, new org.apache.thrift.meta_data.FieldMetaData("projectID", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("creationTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("userName", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.APPLICATION_ID, new org.apache.thrift.meta_data.FieldMetaData("applicationId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.APPLICATION_VERSION, new org.apache.thrift.meta_data.FieldMetaData("applicationVersion", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.WORKFLOW_TEMPLATE_ID, new org.apache.thrift.meta_data.FieldMetaData("workflowTemplateId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.WORKFLOW_TEMPLATE_VERSION, new org.apache.thrift.meta_data.FieldMetaData("workflowTemplateVersion", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.WORKFLOW_EXECUTION_INSTANCE_ID, new org.apache.thrift.meta_data.FieldMetaData("workflowExecutionInstanceId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.EXPERIMENT_INPUTS, new org.apache.thrift.meta_data.FieldMetaData("experimentInputs", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DataObjectType.class))));
+ tmpMap.put(_Fields.EXPERIMENT_OUTPUTS, new org.apache.thrift.meta_data.FieldMetaData("experimentOutputs", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DataObjectType.class))));
+ tmpMap.put(_Fields.EXPERIMENT_STATUS, new org.apache.thrift.meta_data.FieldMetaData("experimentStatus", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ExecutionStatus.class)));
+ tmpMap.put(_Fields.STATE_CHANGE_LIST, new org.apache.thrift.meta_data.FieldMetaData("stateChangeList", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ExecutionStatus.class))));
+ tmpMap.put(_Fields.WORKFLOW_NODE_DETAILS_LIST, new org.apache.thrift.meta_data.FieldMetaData("workflowNodeDetailsList", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WorkflowNodeDetails.class))));
+ tmpMap.put(_Fields.ERRORS, new org.apache.thrift.meta_data.FieldMetaData("errors", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ErrorDetails.class))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Experiment.class, metaDataMap);
+ }
+
+ public Experiment() {
+ this.experimentID = "DO_NO_SET_BY_CLIENT";
+
+ this.projectID = "DEFAULT";
+
+ }
+
+ public Experiment(
+ String experimentID,
+ String projectID,
+ String userName,
+ String name)
+ {
+ this();
+ this.experimentID = experimentID;
+ this.projectID = projectID;
+ this.userName = userName;
+ this.name = name;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public Experiment(Experiment other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetExperimentID()) {
+ this.experimentID = other.experimentID;
+ }
+ if (other.isSetProjectID()) {
+ this.projectID = other.projectID;
+ }
+ this.creationTime = other.creationTime;
+ if (other.isSetUserName()) {
+ this.userName = other.userName;
+ }
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ if (other.isSetDescription()) {
+ this.description = other.description;
+ }
+ if (other.isSetApplicationId()) {
+ this.applicationId = other.applicationId;
+ }
+ if (other.isSetApplicationVersion()) {
+ this.applicationVersion = other.applicationVersion;
+ }
+ if (other.isSetWorkflowTemplateId()) {
+ this.workflowTemplateId = other.workflowTemplateId;
+ }
+ if (other.isSetWorkflowTemplateVersion()) {
+ this.workflowTemplateVersion = other.workflowTemplateVersion;
+ }
+ if (other.isSetWorkflowExecutionInstanceId()) {
+ this.workflowExecutionInstanceId = other.workflowExecutionInstanceId;
+ }
+ if (other.isSetExperimentInputs()) {
+ List<DataObjectType> __this__experimentInputs = new ArrayList<DataObjectType>(other.experimentInputs.size());
+ for (DataObjectType other_element : other.experimentInputs) {
+ __this__experimentInputs.add(new DataObjectType(other_element));
+ }
+ this.experimentInputs = __this__experimentInputs;
+ }
+ if (other.isSetExperimentOutputs()) {
+ List<DataObjectType> __this__experimentOutputs = new ArrayList<DataObjectType>(other.experimentOutputs.size());
+ for (DataObjectType other_element : other.experimentOutputs) {
+ __this__experimentOutputs.add(new DataObjectType(other_element));
+ }
+ this.experimentOutputs = __this__experimentOutputs;
+ }
+ if (other.isSetExperimentStatus()) {
+ this.experimentStatus = new ExecutionStatus(other.experimentStatus);
+ }
+ if (other.isSetStateChangeList()) {
+ List<ExecutionStatus> __this__stateChangeList = new ArrayList<ExecutionStatus>(other.stateChangeList.size());
+ for (ExecutionStatus other_element : other.stateChangeList) {
+ __this__stateChangeList.add(new ExecutionStatus(other_element));
+ }
+ this.stateChangeList = __this__stateChangeList;
+ }
+ if (other.isSetWorkflowNodeDetailsList()) {
+ List<WorkflowNodeDetails> __this__workflowNodeDetailsList = new ArrayList<WorkflowNodeDetails>(other.workflowNodeDetailsList.size());
+ for (WorkflowNodeDetails other_element : other.workflowNodeDetailsList) {
+ __this__workflowNodeDetailsList.add(new WorkflowNodeDetails(other_element));
+ }
+ this.workflowNodeDetailsList = __this__workflowNodeDetailsList;
+ }
+ if (other.isSetErrors()) {
+ List<ErrorDetails> __this__errors = new ArrayList<ErrorDetails>(other.errors.size());
+ for (ErrorDetails other_element : other.errors) {
+ __this__errors.add(new ErrorDetails(other_element));
+ }
+ this.errors = __this__errors;
+ }
+ }
+
+ public Experiment deepCopy() {
+ return new Experiment(this);
+ }
+
+ @Override
+ public void clear() {
+ this.experimentID = "DO_NO_SET_BY_CLIENT";
+
+ this.projectID = "DEFAULT";
+
+ setCreationTimeIsSet(false);
+ this.creationTime = 0;
+ this.userName = null;
+ this.name = null;
+ this.description = null;
+ this.applicationId = null;
+ this.applicationVersion = null;
+ this.workflowTemplateId = null;
+ this.workflowTemplateVersion = null;
+ this.workflowExecutionInstanceId = null;
+ this.experimentInputs = null;
+ this.experimentOutputs = null;
+ this.experimentStatus = null;
+ this.stateChangeList = null;
+ this.workflowNodeDetailsList = null;
+ this.errors = null;
+ }
+
+ public String getExperimentID() {
+ return this.experimentID;
+ }
+
+ public void setExperimentID(String experimentID) {
+ this.experimentID = experimentID;
+ }
+
+ public void unsetExperimentID() {
+ this.experimentID = null;
+ }
+
+ /** Returns true if field experimentID is set (has been assigned a value) and false otherwise */
+ public boolean isSetExperimentID() {
+ return this.experimentID != null;
+ }
+
+ public void setExperimentIDIsSet(boolean value) {
+ if (!value) {
+ this.experimentID = null;
+ }
+ }
+
+ public String getProjectID() {
+ return this.projectID;
+ }
+
+ public void setProjectID(String projectID) {
+ this.projectID = projectID;
+ }
+
+ public void unsetProjectID() {
+ this.projectID = null;
+ }
+
+ /** Returns true if field projectID is set (has been assigned a value) and false otherwise */
+ public boolean isSetProjectID() {
+ return this.projectID != null;
+ }
+
+ public void setProjectIDIsSet(boolean value) {
+ if (!value) {
+ this.projectID = null;
+ }
+ }
+
+ public long getCreationTime() {
+ return this.creationTime;
+ }
+
+ public void setCreationTime(long creationTime) {
+ this.creationTime = creationTime;
+ setCreationTimeIsSet(true);
+ }
+
+ public void unsetCreationTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
+ }
+
+ /** Returns true if field creationTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreationTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
+ }
+
+ public void setCreationTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATIONTIME_ISSET_ID, value);
+ }
+
+ public String getUserName() {
+ return this.userName;
+ }
+
+ public void setUserName(String userName) {
+ this.userName = userName;
+ }
+
+ public void unsetUserName() {
+ this.userName = null;
+ }
+
+ /** Returns true if field userName is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserName() {
+ return this.userName != null;
+ }
+
+ public void setUserNameIsSet(boolean value) {
+ if (!value) {
+ this.userName = null;
+ }
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void unsetName() {
+ this.name = null;
+ }
+
+ /** Returns true if field name is set (has been assigned a value) and false otherwise */
+ public boolean isSetName() {
+ return this.name != null;
+ }
+
+ public void setNameIsSet(boolean value) {
+ if (!value) {
+ this.name = null;
+ }
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public void unsetDescription() {
+ this.description = null;
+ }
+
+ /** Returns true if field description is set (has been assigned a value) and false otherwise */
+ public boolean isSetDescription() {
+ return this.description != null;
+ }
+
+ public void setDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.description = null;
+ }
+ }
+
+ public String getApplicationId() {
+ return this.applicationId;
+ }
+
+ public void setApplicationId(String applicationId) {
+ this.applicationId = applicationId;
+ }
+
+ public void unsetApplicationId() {
+ this.applicationId = null;
+ }
+
+ /** Returns true if field applicationId is set (has been assigned a value) and false otherwise */
+ public boolean isSetApplicationId() {
+ return this.applicationId != null;
+ }
+
+ public void setApplicationIdIsSet(boolean value) {
+ if (!value) {
+ this.applicationId = null;
+ }
+ }
+
+ public String getApplicationVersion() {
+ return this.applicationVersion;
+ }
+
+ public void setApplicationVersion(String applicationVersion) {
+ this.applicationVersion = applicationVersion;
+ }
+
+ public void unsetApplicationVersion() {
+ this.applicationVersion = null;
+ }
+
+ /** Returns true if field applicationVersion is set (has been assigned a value) and false otherwise */
+ public boolean isSetApplicationVersion() {
+ return this.applicationVersion != null;
+ }
+
+ public void setApplicationVersionIsSet(boolean value) {
+ if (!value) {
+ this.applicationVersion = null;
+ }
+ }
+
+ public String getWorkflowTemplateId() {
+ return this.workflowTemplateId;
+ }
+
+ public void setWorkflowTemplateId(String workflowTemplateId) {
+ this.workflowTemplateId = workflowTemplateId;
+ }
+
+ public void unsetWorkflowTemplateId() {
+ this.workflowTemplateId = null;
+ }
+
+ /** Returns true if field workflowTemplateId is set (has been assigned a value) and false otherwise */
+ public boolean isSetWorkflowTemplateId() {
+ return this.workflowTemplateId != null;
+ }
+
+ public void setWorkflowTemplateIdIsSet(boolean value) {
+ if (!value) {
+ this.workflowTemplateId = null;
+ }
+ }
+
+ public String getWorkflowTemplateVersion() {
+ return this.workflowTemplateVersion;
+ }
+
+ public void setWorkflowTemplateVersion(String workflowTemplateVersion) {
+ this.workflowTemplateVersion = workflowTemplateVersion;
+ }
+
+ public void unsetWorkflowTemplateVersion() {
+ this.workflowTemplateVersion = null;
+ }
+
+ /** Returns true if field workflowTemplateVersion is set (has been assigned a value) and false otherwise */
+ public boolean isSetWorkflowTemplateVersion() {
+ return this.workflowTemplateVersion != null;
+ }
+
+ public void setWorkflowTemplateVersionIsSet(boolean value) {
+ if (!value) {
+ this.workflowTemplateVersion = null;
+ }
+ }
+
+ public String getWorkflowExecutionInstanceId() {
+ return this.workflowExecutionInstanceId;
+ }
+
+ public void setWorkflowExecutionInstanceId(String workflowExecutionInstanceId) {
+ this.workflowExecutionInstanceId = workflowExecutionInstanceId;
+ }
+
+ public void unsetWorkflowExecutionInstanceId() {
+ this.workflowExecutionInstanceId = null;
+ }
+
+ /** Returns true if field workflowExecutionInstanceId is set (has been assigned a value) and false otherwise */
+ public boolean isSetWorkflowExecutionInstanceId() {
+ return this.workflowExecutionInstanceId != null;
+ }
+
+ public void setWorkflowExecutionInstanceIdIsSet(boolean value) {
+ if (!value) {
+ this.workflowExecutionInstanceId = null;
+ }
+ }
+
+ public int getExperimentInputsSize() {
+ return (this.experimentInputs == null) ? 0 : this.experimentInputs.size();
+ }
+
+ public java.util.Iterator<DataObjectType> getExperimentInputsIterator() {
+ return (this.experimentInputs == null) ? null : this.experimentInputs.iterator();
+ }
+
+ public void addToExperimentInputs(DataObjectType elem) {
+ if (this.experimentInputs == null) {
+ this.experimentInputs = new ArrayList<DataObjectType>();
+ }
+ this.experimentInputs.add(elem);
+ }
+
+ public List<DataObjectType> getExperimentInputs() {
+ return this.experimentInputs;
+ }
+
+ public void setExperimentInputs(List<DataObjectType> experimentInputs) {
+ this.experimentInputs = experimentInputs;
+ }
+
+ public void unsetExperimentInputs() {
+ this.experimentInputs = null;
+ }
+
+ /** Returns true if field experimentInputs is set (has been assigned a value) and false otherwise */
+ public boolean isSetExperimentInputs() {
+ return this.experimentInputs != null;
+ }
+
+ public void setExperimentInputsIsSet(boolean value) {
+ if (!value) {
+ this.experimentInputs = null;
+ }
+ }
+
+ public int getExperimentOutputsSize() {
+ return (this.experimentOutputs == null) ? 0 : this.experimentOutputs.size();
+ }
+
+ public java.util.Iterator<DataObjectType> getExperimentOutputsIterator() {
+ return (this.experimentOutputs == null) ? null : this.experimentOutputs.iterator();
+ }
+
+ public void addToExperimentOutputs(DataObjectType elem) {
+ if (this.experimentOutputs == null) {
+ this.experimentOutputs = new ArrayList<DataObjectType>();
+ }
+ this.experimentOutputs.add(elem);
+ }
+
+ public List<DataObjectType> getExperimentOutputs() {
+ return this.experimentOutputs;
+ }
+
+ public void setExperimentOutputs(List<DataObjectType> experimentOutputs) {
+ this.experimentOutputs = experimentOutputs;
+ }
+
+ public void unsetExperimentOutputs() {
+ this.experimentOutputs = null;
+ }
+
+ /** Returns true if field experimentOutputs is set (has been assigned a value) and false otherwise */
+ public boolean isSetExperimentOutputs() {
+ return this.experimentOutputs != null;
+ }
+
+ public void setExperimentOutputsIsSet(boolean value) {
+ if (!value) {
+ this.experimentOutputs = null;
+ }
+ }
+
+ public ExecutionStatus getExperimentStatus() {
+ return this.experimentStatus;
+ }
+
+ public void setExperimentStatus(ExecutionStatus experimentStatus) {
+ this.experimentStatus = experimentStatus;
+ }
+
+ public void unsetExperimentStatus() {
+ this.experimentStatus = null;
+ }
+
+ /** Returns true if field experimentStatus is set (has been assigned a value) and false otherwise */
+ public boolean isSetExperimentStatus() {
+ return this.experimentStatus != null;
+ }
+
+ public void setExperimentStatusIsSet(boolean value) {
+ if (!value) {
+ this.experimentStatus = null;
+ }
+ }
+
+ public int getStateChangeListSize() {
+ return (this.stateChangeList == null) ? 0 : this.stateChangeList.size();
+ }
+
+ public java.util.Iterator<ExecutionStatus> getStateChangeListIterator() {
+ return (this.stateChangeList == null) ? null : this.stateChangeList.iterator();
+ }
+
+ public void addToStateChangeList(ExecutionStatus elem) {
+ if (this.stateChangeList == null) {
+ this.stateChangeList = new ArrayList<ExecutionStatus>();
+ }
+ this.stateChangeList.add(elem);
+ }
+
+ public List<ExecutionStatus> getStateChangeList() {
+ return this.stateChangeList;
+ }
+
+ public void setStateChangeList(List<ExecutionStatus> stateChangeList) {
+ this.stateChangeList = stateChangeList;
+ }
+
+ public void unsetStateChangeList() {
+ this.stateChangeList = null;
+ }
+
+ /** Returns true if field stateChangeList is set (has been assigned a value) and false otherwise */
+ public boolean isSetStateChangeList() {
+ return this.stateChangeList != null;
+ }
+
+ public void setStateChangeListIsSet(boolean value) {
+ if (!value) {
+ this.stateChangeList = null;
+ }
+ }
+
+ public int getWorkflowNodeDetailsListSize() {
+ return (this.workflowNodeDetailsList == null) ? 0 : this.workflowNodeDetailsList.size();
+ }
+
+ public java.util.Iterator<WorkflowNodeDetails> getWorkflowNodeDetailsListIterator() {
+ return (this.workflowNodeDetailsList == null) ? null : this.workflowNodeDetailsList.iterator();
+ }
+
+ public void addToWorkflowNodeDetailsList(WorkflowNodeDetails elem) {
+ if (this.workflowNodeDetailsList == null) {
+ this.workflowNodeDetailsList = new ArrayList<WorkflowNodeDetails>();
+ }
+ this.workflowNodeDetailsList.add(elem);
+ }
+
+ public List<WorkflowNodeDetails> getWorkflowNodeDetailsList() {
+ return this.workflowNodeDetailsList;
+ }
+
+ public void setWorkflowNodeDetailsList(List<WorkflowNodeDetails> workflowNodeDetailsList) {
+ this.workflowNodeDetailsList = workflowNodeDetailsList;
+ }
+
+ public void unsetWorkflowNodeDetailsList() {
+ this.workflowNodeDetailsList = null;
+ }
+
+ /** Returns true if field workflowNodeDetailsList is set (has been assigned a value) and false otherwise */
+ public boolean isSetWorkflowNodeDetailsList() {
+ return this.workflowNodeDetailsList != null;
+ }
+
+ public void setWorkflowNodeDetailsListIsSet(boolean value) {
+ if (!value) {
+ this.workflowNodeDetailsList = null;
+ }
+ }
+
+ public int getErrorsSize() {
+ return (this.errors == null) ? 0 : this.errors.size();
+ }
+
+ public java.util.Iterator<ErrorDetails> getErrorsIterator() {
+ return (this.errors == null) ? null : this.errors.iterator();
+ }
+
+ public void addToErrors(ErrorDetails elem) {
+ if (this.errors == null) {
+ this.errors = new ArrayList<ErrorDetails>();
+ }
+ this.errors.add(elem);
+ }
+
+ public List<ErrorDetails> getErrors() {
+ return this.errors;
+ }
+
+ public void setErrors(List<ErrorDetails> errors) {
+ this.errors = errors;
+ }
+
+ public void unsetErrors() {
+ this.errors = null;
+ }
+
+ /** Returns true if field errors is set (has been assigned a value) and false otherwise */
+ public boolean isSetErrors() {
+ return this.errors != null;
+ }
+
+ public void setErrorsIsSet(boolean value) {
+ if (!value) {
+ this.errors = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case EXPERIMENT_ID:
+ if (value == null) {
+ unsetExperimentID();
+ } else {
+ setExperimentID((String)value);
+ }
+ break;
+
+ case PROJECT_ID:
+ if (value == null) {
+ unsetProjectID();
+ } else {
+ setProjectID((String)value);
+ }
+ break;
+
+ case CREATION_TIME:
+ if (value == null) {
+ unsetCreationTime();
+ } else {
+ setCreationTime((Long)value);
+ }
+ break;
+
+ case USER_NAME:
+ if (value == null) {
+ unsetUserName();
+ } else {
+ setUserName((String)value);
+ }
+ break;
+
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ case DESCRIPTION:
+ if (value == null) {
+ unsetDescription();
+ } else {
+ setDescription((String)value);
+ }
+ break;
+
+ case APPLICATION_ID:
+ if (value == null) {
+ unsetApplicationId();
+ } else {
+ setApplicationId((String)value);
+ }
+ break;
+
+ case APPLICATION_VERSION:
+ if (value == null) {
+ unsetApplicationVersion();
+ } else {
+ setApplicationVersion((String)value);
+ }
+ break;
+
+ case WORKFLOW_TEMPLATE_ID:
+ if (value == null) {
+ unsetWorkflowTemplateId();
+ } else {
+ setWorkflowTemplateId((String)value);
+ }
+ break;
+
+ case WORKFLOW_TEMPLATE_VERSION:
+ if (value == null) {
+ unsetWorkflowTemplateVersion();
+ } else {
+ setWorkflowTemplateVersion((String)value);
+ }
+ break;
+
+ case WORKFLOW_EXECUTION_INSTANCE_ID:
+ if (value == null) {
+ unsetWorkflowExecutionInstanceId();
+ } else {
+ setWorkflowExecutionInstanceId((String)value);
+ }
+ break;
+
+ case EXPERIMENT_INPUTS:
+ if (value == null) {
+ unsetExperimentInputs();
+ } else {
+ setExperimentInputs((List<DataObjectType>)value);
+ }
+ break;
+
+ case EXPERIMENT_OUTPUTS:
+ if (value == null) {
+ unsetExperimentOutputs();
+ } else {
+ setExperimentOutputs((List<DataObjectType>)value);
+ }
+ break;
+
+ case EXPERIMENT_STATUS:
+ if (value == null) {
+ unsetExperimentStatus();
+ } else {
+ setExperimentStatus((ExecutionStatus)value);
+ }
+ break;
+
+ case STATE_CHANGE_LIST:
+ if (value == null) {
+ unsetStateChangeList();
+ } else {
+ setStateChangeList((List<ExecutionStatus>)value);
+ }
+ break;
+
+ case WORKFLOW_NODE_DETAILS_LIST:
+ if (value == null) {
+ unsetWorkflowNodeDetailsList();
+ } else {
+ setWorkflowNodeDetailsList((List<WorkflowNodeDetails>)value);
+ }
+ break;
+
+ case ERRORS:
+ if (value == null) {
+ unsetErrors();
+ } else {
+ setErrors((List<ErrorDetails>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case EXPERIMENT_ID:
+ return getExperimentID();
+
+ case PROJECT_ID:
+ return getProjectID();
+
+ case CREATION_TIME:
+ return Long.valueOf(getCreationTime());
+
+ case USER_NAME:
+ return getUserName();
+
+ case NAME:
+ return getName();
+
+ case DESCRIPTION:
+ return getDescription();
+
+ case APPLICATION_ID:
+ return getApplicationId();
+
+ case APPLICATION_VERSION:
+ return getApplicationVersion();
+
+ case WORKFLOW_TEMPLATE_ID:
+ return getWorkflowTemplateId();
+
+ case WORKFLOW_TEMPLATE_VERSION:
+ return getWorkflowTemplateVersion();
+
+ case WORKFLOW_EXECUTION_INSTANCE_ID:
+ return getWorkflowExecutionInstanceId();
+
+ case EXPERIMENT_INPUTS:
+ return getExperimentInputs();
+
+ case EXPERIMENT_OUTPUTS:
+ return getExperimentOutputs();
+
+ case EXPERIMENT_STATUS:
+ return getExperimentStatus();
+
+ case STATE_CHANGE_LIST:
+ return getStateChangeList();
+
+ case WORKFLOW_NODE_DETAILS_LIST:
+ return getWorkflowNodeDetailsList();
+
+ case ERRORS:
+ return getErrors();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case EXPERIMENT_ID:
+ return isSetExperimentID();
+ case PROJECT_ID:
+ return isSetProjectID();
+ case CREATION_TIME:
+ return isSetCreationTime();
+ case USER_NAME:
+ return isSetUserName();
+ case NAME:
+ return isSetName();
+ case DESCRIPTION:
+ return isSetDescription();
+ case APPLICATION_ID:
+ return isSetApplicationId();
+ case APPLICATION_VERSION:
+ return isSetApplicationVersion();
+ case WORKFLOW_TEMPLATE_ID:
+ return isSetWorkflowTemplateId();
+ case WORKFLOW_TEMPLATE_VERSION:
+ return isSetWorkflowTemplateVersion();
+ case WORKFLOW_EXECUTION_INSTANCE_ID:
+ return isSetWorkflowExecutionInstanceId();
+ case EXPERIMENT_INPUTS:
+ return isSetExperimentInputs();
+ case EXPERIMENT_OUTPUTS:
+ return isSetExperimentOutputs();
+ case EXPERIMENT_STATUS:
+ return isSetExperimentStatus();
+ case STATE_CHANGE_LIST:
+ return isSetStateChangeList();
+ case WORKFLOW_NODE_DETAILS_LIST:
+ return isSetWorkflowNodeDetailsList();
+ case ERRORS:
+ return isSetErrors();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof Experiment)
+ return this.equals((Experiment)that);
+ return false;
+ }
+
+ public boolean equals(Experiment that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_experimentID = true && this.isSetExperimentID();
+ boolean that_present_experimentID = true && that.isSetExperimentID();
+ if (this_present_experimentID || that_present_experimentID) {
+ if (!(this_present_experimentID && that_present_experimentID))
+ return false;
+ if (!this.experimentID.equals(that.experimentID))
+ return false;
+ }
+
+ boolean this_present_projectID = true && this.isSetProjectID();
+ boolean that_present_projectID = true && that.isSetProjectID();
+ if (this_present_projectID || that_present_projectID) {
+ if (!(this_present_projectID && that_present_projectID))
+ return false;
+ if (!this.projectID.equals(that.projectID))
+ return false;
+ }
+
+ boolean this_present_creationTime = true && this.isSetCreationTime();
+ boolean that_present_creationTime = true && that.isSetCreationTime();
+ if (this_present_creationTime || that_present_creationTime) {
+ if (!(this_present_creationTime && that_present_creationTime))
+ return false;
+ if (this.creationTime != that.creationTime)
+ return false;
+ }
+
+ boolean this_present_userName = true && this.isSetUserName();
+ boolean that_present_userName = true && that.isSetUserName();
+ if (this_present_userName || that_present_userName) {
+ if (!(this_present_userName && that_present_userName))
+ return false;
+ if (!this.userName.equals(that.userName))
+ return false;
+ }
+
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
+ return false;
+ if (!this.name.equals(that.name))
+ return false;
+ }
+
+ boolean this_present_description = true && this.isSetDescription();
+ boolean that_present_description = true && that.isSetDescription();
+ if (this_present_description || that_present_description) {
+ if (!(this_present_description && that_present_description))
+ return false;
+ if (!this.description.equals(that.description))
+ return false;
+ }
+
+ boolean this_present_applicationId = true && this.isSetApplicationId();
+ boolean that_present_applicationId = true && that.isSetApplicationId();
+ if (this_present_applicationId || that_present_applicationId) {
+ if (!(this_present_applicationId && that_present_applicationId))
+ return false;
+ if (!this.applicationId.equals(that.applicationId))
+ return false;
+ }
+
+ boolean this_present_applicationVersion = true && this.isSetApplicationVersion();
+ boolean that_present_applicationVersion = true && that.isSetApplicationVersion();
+ if (this_present_applicationVersion || that_present_applicationVersion) {
+ if (!(this_present_applicationVersion && that_present_applicationVersion))
+ return false;
+ if (!this.applicationVersion.equals(that.applicationVersion))
+ return false;
+ }
+
+ boolean this_present_workflowTemplateId = true && this.isSetWorkflowTemplateId();
+ boolean that_present_workflowTemplateId = true && that.isSetWorkflowTemplateId();
+ if (this_present_workflowTemplateId || that_present_workflowTemplateId) {
+ if (!(this_present_workflowTemplateId && that_present_workflowTemplateId))
+ return false;
+ if (!this.workflowTemplateId.equals(that.workflowTemplateId))
+ return false;
+ }
+
+ boolean this_present_workflowTemplateVersion = true && this.isSetWorkflowTemplateVersion();
+ boolean that_present_workflowTemplateVersion = true && that.isSetWorkflowTemplateVersion();
+ if (this_present_workflowTemplateVersion || that_present_workflowTemplateVersion) {
+ if (!(this_present_workflowTemplateVersion && that_present_workflowTemplateVersion))
+ return false;
+ if (!this.workflowTemplateVersion.equals(that.workflowTemplateVersion))
+ return false;
+ }
+
+ boolean this_present_workflowExecutionInstanceId = true && this.isSetWorkflowExecutionInstanceId();
+ boolean that_present_workflowExecutionInstanceId = true && that.isSetWorkflowExecutionInstanceId();
+ if (this_present_workflowExecutionInstanceId || that_present_workflowExecutionInstanceId) {
+ if (!(this_present_workflowExecutionInstanceId && that_present_workflowExecutionInstanceId))
+ return false;
+ if (!this.workflowExecutionInstanceId.equals(that.workflowExecutionInstanceId))
+ return false;
+ }
+
+ boolean this_present_experimentInputs = true && this.isSetExperimentInputs();
+ boolean that_present_experimentInputs = true && that.isSetExperimentInputs();
+ if (this_present_experimentInputs || that_present_experimentInputs) {
+ if (!(this_present_experimentInputs && that_present_experimentInputs))
+ return false;
+ if (!this.experimentInputs.equals(that.experimentInputs))
+ return false;
+ }
+
+ boolean this_present_experimentOutputs = true && this.isSetExperimentOutputs();
+ boolean that_present_experimentOutputs = true && that.isSetExperimentOutputs();
+ if (this_present_experimentOutputs || that_present_experimentOutputs) {
+ if (!(this_present_experimentOutputs && that_present_experimentOutputs))
+ return false;
+ if (!this.experimentOutputs.equals(that.experimentOutputs))
+ return false;
+ }
+
+ boolean this_present_experimentStatus = true && this.isSetExperimentStatus();
+ boolean that_present_experimentStatus = true && that.isSetExperimentStatus();
+ if (this_present_experimentStatus || that_present_experimentStatus) {
+ if (!(this_present_experimentStatus && that_present_experimentStatus))
+ return false;
+ if (!this.experimentStatus.equals(that.experimentStatus))
+ return false;
+ }
+
+ boolean this_present_stateChangeList = true && this.isSetStateChangeList();
+ boolean that_present_stateChangeList = true && that.isSetStateChangeList();
+ if (this_present_stateChangeList || that_present_stateChangeList) {
+ if (!(this_present_stateChangeList && that_present_stateChangeList))
+ return false;
+ if (!this.stateChangeList.equals(that.stateChangeList))
+ return false;
+ }
+
+ boolean this_present_workflowNodeDetailsList = true && this.isSetWorkflowNodeDetailsList();
+ boolean that_present_workflowNodeDetailsList = true && that.isSetWorkflowNodeDetailsList();
+ if (this_present_workflowNodeDetailsList || that_present_workflowNodeDetailsList) {
+ if (!(this_present_workflowNodeDetailsList && that_present_workflowNodeDetailsList))
+ return false;
+ if (!this.workflowNodeDetailsList.equals(that.workflowNodeDetailsList))
+ return false;
+ }
+
+ boolean this_present_errors = true && this.isSetErrors();
+ boolean that_present_errors = true && that.isSetErrors();
+ if (this_present_errors || that_present_errors) {
+ if (!(this_present_errors && that_present_errors))
+ return false;
+ if (!this.errors.equals(that.errors))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(Experiment other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetExperimentID()).compareTo(other.isSetExperimentID());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExperimentID()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentID, other.experimentID);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetProjectID()).compareTo(other.isSetProjectID());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetProjectID()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projectID, other.projectID);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreationTime()).compareTo(other.isSetCreationTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreationTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creationTime, other.creationTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUserName()).compareTo(other.isSetUserName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUserName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userName, other.userName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetApplicationId()).compareTo(other.isSetApplicationId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetApplicationId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationId, other.applicationId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetApplicationVersion()).compareTo(other.isSetApplicationVersion());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetApplicationVersion()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationVersion, other.applicationVersion);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetWorkflowTemplateId()).compareTo(other.isSetWorkflowTemplateId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetWorkflowTemplateId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowTemplateId, other.workflowTemplateId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetWorkflowTemplateVersion()).compareTo(other.isSetWorkflowTemplateVersion());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetWorkflowTemplateVersion()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowTemplateVersion, other.workflowTemplateVersion);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetWorkflowExecutionInstanceId()).compareTo(other.isSetWorkflowExecutionInstanceId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetWorkflowExecutionInstanceId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowExecutionInstanceId, other.workflowExecutionInstanceId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetExperimentInputs()).compareTo(other.isSetExperimentInputs());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExperimentInputs()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentInputs, other.experimentInputs);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetExperimentOutputs()).compareTo(other.isSetExperimentOutputs());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExperimentOutputs()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentOutputs, other.experimentOutputs);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetExperimentStatus()).compareTo(other.isSetExperimentStatus());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExperimentStatus()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentStatus, other.experimentStatus);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetStateChangeList()).compareTo(other.isSetStateChangeList());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetStateChangeList()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stateChangeList, other.stateChangeList);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetWorkflowNodeDetailsList()).compareTo(other.isSetWorkflowNodeDetailsList());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetWorkflowNodeDetailsList()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowNodeDetailsList, other.workflowNodeDetailsList);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetErrors()).compareTo(other.isSetErrors());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetErrors()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errors, other.errors);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("Experiment(");
+ boolean first = true;
+
+ sb.append("experimentID:");
+ if (this.experimentID == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.experimentID);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("projectID:");
+ if (this.projectID == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.projectID);
+ }
+ first = false;
+ if (isSetCreationTime()) {
+ if (!first) sb.append(", ");
+ sb.append("creationTime:");
+ sb.append(this.creationTime);
+ first = false;
+ }
+ if (!first) sb.append(", ");
+ sb.append("userName:");
+ if (this.userName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ if (isSetDescription()) {
+ if (!first) sb.append(", ");
+ sb.append("description:");
+ if (this.description == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.description);
+ }
+ first = false;
+ }
+ if (isSetApplicationId()) {
+ if (!first) sb.append(", ");
+ sb.append("applicationId:");
+ if (this.applicationId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.applicationId);
+ }
+ first = false;
+ }
+ if (isSetApplicationVersion()) {
+ if (!first) sb.append(", ");
+ sb.append("applicationVersion:");
+ if (this.applicationVersion == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.applicationVersion);
+ }
+ first = false;
+ }
+ if (isSetWorkflowTemplateId()) {
+ if (!first) sb.append(", ");
+ sb.append("workflowTemplateId:");
+ if (this.workflowTemplateId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.workflowTemplateId);
+ }
+ first = false;
+ }
+ if (isSetWorkflowTemplateVersion()) {
+ if (!first) sb.append(", ");
+ sb.append("workflowTemplateVersion:");
+ if (this.workflowTemplateVersion == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.workflowTemplateVersion);
+ }
+ first = false;
+ }
+ if (isSetWorkflowExecutionInstanceId()) {
+ if (!first) sb.append(", ");
+ sb.append("workflowExecutionInstanceId:");
+ if (this.workflowExecutionInstanceId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.workflowExecutionInstanceId);
+ }
+ first = false;
+ }
+ if (isSetExperimentInputs()) {
+ if (!first) sb.append(", ");
+ sb.append("experimentInputs:");
+ if (this.experimentInputs == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.experimentInputs);
+ }
+ first = false;
+ }
+ if (isSetExperimentOutputs()) {
+ if (!first) sb.append(", ");
+ sb.append("experimentOutputs:");
+ if (this.experimentOutputs == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.experimentOutputs);
+ }
+ first = false;
+ }
+ if (isSetExperimentStatus()) {
+ if (!first) sb.append(", ");
+ sb.append("experimentStatus:");
+ if (this.experimentStatus == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.experimentStatus);
+ }
+ first = false;
+ }
+ if (isSetStateChangeList()) {
+ if (!first) sb.append(", ");
+ sb.append("stateChangeList:");
+ if (this.stateChangeList == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.stateChangeList);
+ }
+ first = false;
+ }
+ if (isSetWorkflowNodeDetailsList()) {
+ if (!first) sb.append(", ");
+ sb.append("workflowNodeDetailsList:");
+ if (this.workflowNodeDetailsList == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.workflowNodeDetailsList);
+ }
+ first = false;
+ }
+ if (isSetErrors()) {
+ if (!first) sb.append(", ");
+ sb.append("errors:");
+ if (this.errors == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.errors);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetExperimentID()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'experimentID' is unset! Struct:" + toString());
+ }
+
+ if (!isSetProjectID()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'projectID' is unset! Struct:" + toString());
+ }
+
+ if (!isSetUserName()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'userName' is unset! Struct:" + toString());
+ }
+
+ if (!isSetName()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' is unset! Struct:" + toString());
+ }
+
+ // check for sub-struct validity
+ if (experimentStatus != null) {
+ experimentStatus.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class ExperimentStandardSchemeFactory implements SchemeFactory {
+ public ExperimentStandardScheme getScheme() {
+ return new ExperimentStandardScheme();
+ }
+ }
+
+ private static class ExperimentStandardScheme extends StandardScheme<Experiment> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Experiment struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // EXPERIMENT_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.experimentID = iprot.readString();
+ struct.setExperimentIDIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // PROJECT_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.projectID = iprot.readString();
+ struct.setProjectIDIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // CREATION_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.creationTime = iprot.readI64();
+ struct.setCreationTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // USER_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.userName = iprot.readString();
+ struct.setUserNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // APPLICATION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.applicationId = iprot.readString();
+ struct.setApplicationIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // APPLICATION_VERSION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.applicationVersion = iprot.readString();
+ struct.setApplicationVersionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 9: // WORKFLOW_TEMPLATE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.workflowTemplateId = iprot.readString();
+ struct.setWorkflowTemplateIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 10: // WORKFLOW_TEMPLATE_VERSION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.workflowTemplateVersion = iprot.readString();
+ struct.setWorkflowTemplateVersionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 11: // WORKFLOW_EXECUTION_INSTANCE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.workflowExecutionInstanceId = iprot.readString();
+ struct.setWorkflowExecutionInstanceIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 12: // EXPERIMENT_INPUTS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list88 = iprot.readListBegin();
+ struct.experimentInputs = new ArrayList<DataObjectType>(_list88.size);
+ for (int _i89 = 0; _i89 < _list88.size; ++_i89)
+ {
+ DataObjectType _elem90;
+ _elem90 = new DataObjectType();
+ _elem90.read(iprot);
+ struct.experimentInputs.add(_elem90);
+ }
+ iprot.readListEnd();
+ }
+ struct.setExperimentInputsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 13: // EXPERIMENT_OUTPUTS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list91 = iprot.readListBegin();
+ struct.experimentOutputs = new ArrayList<DataObjectType>(_list91.size);
+ for (int _i92 = 0; _i92 < _list91.size; ++_i92)
+ {
+ DataObjectType _elem93;
+ _elem93 = new DataObjectType();
+ _elem93.read(iprot);
+ struct.experimentOutputs.add(_elem93);
+ }
+ iprot.readListEnd();
+ }
+ struct.setExperimentOutputsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 14: // EXPERIMENT_STATUS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.experimentStatus = new ExecutionStatus();
+ struct.experimentStatus.read(iprot);
+ struct.setExperimentStatusIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 15: // STATE_CHANGE_LIST
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list94 = iprot.readListBegin();
+ struct.stateChangeList = new ArrayList<ExecutionStatus>(_list94.size);
+ for (int _i95 = 0; _i95 < _list94.size; ++_i95)
+ {
+ ExecutionStatus _elem96;
+ _elem96 = new ExecutionStatus();
+ _elem96.read(iprot);
+ struct.stateChangeList.add(_elem96);
+ }
+ iprot.readListEnd();
+ }
+ struct.setStateChangeListIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 16: // WORKFLOW_NODE_DETAILS_LIST
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list97 = iprot.readListBegin();
+ struct.workflowNodeDetailsList = new ArrayList<WorkflowNodeDetails>(_list97.size);
+ for (int _i98 = 0; _i98 < _list97.size; ++_i98)
+ {
+ WorkflowNodeDetails _elem99;
+ _elem99 = new WorkflowNodeDetails();
+ _elem99.read(iprot);
+ struct.workflowNodeDetailsList.add(_elem99);
+ }
+ iprot.readListEnd();
+ }
+ struct.setWorkflowNodeDetailsListIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 17: // ERRORS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list100 = iprot.readListBegin();
+ struct.errors = new ArrayList<ErrorDetails>(_list100.size);
+ for (int _i101 = 0; _i101 < _list100.size; ++_i101)
+ {
+ ErrorDetails _elem102;
+ _elem102 = new ErrorDetails();
+ _elem102.read(iprot);
+ struct.errors.add(_elem102);
+ }
+ iprot.readListEnd();
+ }
+ struct.setErrorsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, Experiment struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.experimentID != null) {
+ oprot.writeFieldBegin(EXPERIMENT_ID_FIELD_DESC);
+ oprot.writeString(struct.experimentID);
+ oprot.writeFieldEnd();
+ }
+ if (struct.projectID != null) {
+ oprot.writeFieldBegin(PROJECT_ID_FIELD_DESC);
+ oprot.writeString(struct.projectID);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetCreationTime()) {
+ oprot.writeFieldBegin(CREATION_TIME_FIELD_DESC);
+ oprot.writeI64(struct.creationTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.userName != null) {
+ oprot.writeFieldBegin(USER_NAME_FIELD_DESC);
+ oprot.writeString(struct.userName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.name != null) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ if (struct.description != null) {
+ if (struct.isSetDescription()) {
+ oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.description);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.applicationId != null) {
+ if (struct.isSetApplicationId()) {
+ oprot.writeFieldBegin(APPLICATION_ID_FIELD_DESC);
+ oprot.writeString(struct.applicationId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.applicationVersion != null) {
+ if (struct.isSetApplicationVersion()) {
+ oprot.writeFieldBegin(APPLICATION_VERSION_FIELD_DESC);
+ oprot.writeString(struct.applicationVersion);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.workflowTemplateId != null) {
+ if (struct.isSetWorkflowTemplateId()) {
+ oprot.writeFieldBegin(WORKFLOW_TEMPLATE_ID_FIELD_DESC);
+ oprot.writeString(struct.workflowTemplateId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.workflowTemplateVersion != null) {
+ if (struct.isSetWorkflowTemplateVersion()) {
+ oprot.writeFieldBegin(WORKFLOW_TEMPLATE_VERSION_FIELD_DESC);
+ oprot.writeString(struct.workflowTemplateVersion);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.workflowExecutionInstanceId != null) {
+ if (struct.isSetWorkflowExecutionInstanceId()) {
+ oprot.writeFieldBegin(WORKFLOW_EXECUTION_INSTANCE_ID_FIELD_DESC);
+ oprot.writeString(struct.workflowExecutionInstanceId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.experimentInputs != null) {
+ if (struct.isSetExperimentInputs()) {
+ oprot.writeFieldBegin(EXPERIMENT_INPUTS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.experimentInputs.size()));
+ for (DataObjectType _iter103 : struct.experimentInputs)
+ {
+ _iter103.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.experimentOutputs != null) {
+ if (struct.isSetExperimentOutputs()) {
+ oprot.writeFieldBegin(EXPERIMENT_OUTPUTS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.experimentOutputs.size()));
+ for (DataObjectType _iter104 : struct.experimentOutputs)
+ {
+ _iter104.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.experimentStatus != null) {
+ if (struct.isSetExperimentStatus()) {
+ oprot.writeFieldBegin(EXPERIMENT_STATUS_FIELD_DESC);
+ struct.experimentStatus.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.stateChangeList != null) {
+ if (struct.isSetStateChangeList()) {
+ oprot.writeFieldBegin(STATE_CHANGE_LIST_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.stateChangeList.size()));
+ for (ExecutionStatus _iter105 : struct.stateChangeList)
+ {
+ _iter105.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.workflowNodeDetailsList != null) {
+ if (struct.isSetWorkflowNodeDetailsList()) {
+ oprot.writeFieldBegin(WORKFLOW_NODE_DETAILS_LIST_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.workflowNodeDetailsList.size()));
+ for (WorkflowNodeDetails _iter106 : struct.workflowNodeDetailsList)
+ {
+ _iter106.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.errors != null) {
+ if (struct.isSetErrors()) {
+ oprot.writeFieldBegin(ERRORS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.errors.size()));
+ for (ErrorDetails _iter107 : struct.errors)
+ {
+ _iter107.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ExperimentTupleSchemeFactory implements SchemeFactory {
+ public ExperimentTupleScheme getScheme() {
+ return new ExperimentTupleScheme();
+ }
+ }
+
+ private static class ExperimentTupleScheme extends TupleScheme<Experiment> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, Experiment struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.experimentID);
+ oprot.writeString(struct.projectID);
+ oprot.writeString(struct.userName);
+ oprot.writeString(struct.name);
+ BitSet optionals = new BitSet();
+ if (struct.isSetCreationTime()) {
+ optionals.set(0);
+ }
+ if (struct.isSetDescription()) {
+ optionals.set(1);
+ }
+ if (struct.isSetApplicationId()) {
+ optionals.set(2);
+ }
+ if (struct.isSetApplicationVersion()) {
+ optionals.set(3);
+ }
+ if (struct.isSetWorkflowTemplateId()) {
+ optionals.set(4);
+ }
+ if (struct.isSetWorkflowTemplateVersion()) {
+ optionals.set(5);
+ }
+ if (struct.isSetWorkflowExecutionInstanceId()) {
+ optionals.set(6);
+ }
+ if (struct.isSetExperimentInputs()) {
+ optionals.set(7);
+ }
+ if (struct.isSetExperimentOutputs()) {
+ optionals.set(8);
+ }
+ if (struct.isSetExperimentStatus()) {
+ optionals.set(9);
+ }
+ if (struct.isSetStateChangeList()) {
+ optionals.set(10);
+ }
+ if (struct.isSetWorkflowNodeDetailsList()) {
+ optionals.set(11);
+ }
+ if (struct.isSetErrors()) {
+ optionals.set(12);
+ }
+ oprot.writeBitSet(optionals, 13);
+ if (struct.isSetCreationTime()) {
+ oprot.writeI64(struct.creationTime);
+ }
+ if (struct.isSetDescription()) {
+ oprot.writeString(struct.description);
+ }
+ if (struct.isSetApplicationId()) {
+ oprot.writeString(struct.applicationId);
+ }
+ if (struct.isSetApplicationVersion()) {
+ oprot.writeString(struct.applicationVersion);
+ }
+ if (struct.isSetWorkflowTemplateId()) {
+ oprot.writeString(struct.workflowTemplateId);
+ }
+ if (struct.isSetWorkflowTemplateVersion()) {
+ oprot.writeString(struct.workflowTemplateVersion);
+ }
+ if (struct.isSetWorkflowExecutionInstanceId()) {
+ oprot.writeString(struct.workflowExecutionInstanceId);
+ }
+ if (struct.isSetExperimentInputs()) {
+ {
+ oprot.writeI32(struct.experimentInputs.size());
+ for (DataObjectType _iter108 : struct.experimentInputs)
+ {
+ _iter108.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetExperimentOutputs()) {
+ {
+ oprot.writeI32(struct.experimentOutputs.size());
+ for (DataObjectType _iter109 : struct.experimentOutputs)
+ {
+ _iter109.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetExperimentStatus()) {
+ struct.experimentStatus.write(oprot);
+ }
+ if (struct.isSetStateChangeList()) {
+ {
+ oprot.writeI32(struct.stateChangeList.size());
+ for (ExecutionStatus _iter110 : struct.stateChangeList)
+ {
+ _iter110.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetWorkflowNodeDetailsList()) {
+ {
+ oprot.writeI32(struct.workflowNodeDetailsList.size());
+ for (WorkflowNodeDetails _iter111 : struct.workflowNodeDetailsList)
+ {
+ _iter111.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetErrors()) {
+ {
+ oprot.writeI32(struct.errors.size());
+ for (ErrorDetails _iter112 : struct.errors)
+ {
+ _iter112.write(oprot);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, Experiment struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.experimentID = iprot.readString();
+ struct.setExperimentIDIsSet(true);
+ struct.projectID = iprot.readString();
+ struct.setProjectIDIsSet(true);
+ struct.userName = iprot.readString();
+ struct.setUserNameIsSet(true);
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ BitSet incoming = iprot.readBitSet(13);
+ if (incoming.get(0)) {
+ struct.creationTime = iprot.readI64();
+ struct.setCreationTimeIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.applicationId = iprot.readString();
+ struct.setApplicationIdIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.applicationVersion = iprot.readString();
+ struct.setApplicationVersionIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.workflowTemplateId = iprot.readString();
+ struct.setWorkflowTemplateIdIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.workflowTemplateVersion = iprot.readString();
+ struct.setWorkflowTemplateVersionIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.workflowExecutionInstanceId = iprot.readString();
+ struct.setWorkflowExecutionInstanceIdIsSet(true);
+ }
+ if (incoming.get(7)) {
+ {
+ org.apache.thrift.protocol.TList _list113 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.experimentInputs = new ArrayList<DataObjectType>(_list113.size);
+ for (int _i114 = 0; _i114 < _list113.size; ++_i114)
+ {
+ DataObjectType _elem115;
+ _elem115 = new DataObjectType();
+ _elem115.read(iprot);
+ struct.experimentInputs.add(_elem115);
+ }
+ }
+ struct.setExperimentInputsIsSet(true);
+ }
+ if (incoming.get(8)) {
+ {
+ org.apache.thrift.protocol.TList _list116 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.experimentOutputs = new ArrayList<DataObjectType>(_list116.size);
+ for (int _i117 = 0; _i117 < _list116.size; ++_i117)
+ {
+ DataObjectType _elem118;
+ _elem118 = new DataObjectType();
+ _elem118.read(iprot);
+ struct.experimentOutputs.add(_elem118);
+ }
+ }
+ struct.setExperimentOutputsIsSet(true);
+ }
+ if (incoming.get(9)) {
+ struct.experimentStatus = new ExecutionStatus();
+ struct.experimentStatus.read(iprot);
+ struct.setExperimentStatusIsSet(true);
+ }
+ if (incoming.get(10)) {
+ {
+ org.apache.thrift.protocol.TList _list119 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.stateChangeList = new ArrayList<ExecutionStatus>(_list119.size);
+ for (int _i120 = 0; _i120 < _list119.size; ++_i120)
+ {
+ ExecutionStatus _elem121;
+ _elem121 = new ExecutionStatus();
+ _elem121.read(iprot);
+ struct.stateChangeList.add(_elem121);
+ }
+ }
+ struct.setStateChangeListIsSet(true);
+ }
+ if (incoming.get(11)) {
+ {
+ org.apache.thrift.protocol.TList _list122 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.workflowNodeDetailsList = new ArrayList<WorkflowNodeDetails>(_list122.size);
+ for (int _i123 = 0; _i123 < _list122.size; ++_i123)
+ {
+ WorkflowNodeDetails _elem124;
+ _elem124 = new WorkflowNodeDetails();
+ _elem124.read(iprot);
+ struct.workflowNodeDetailsList.add(_elem124);
+ }
+ }
+ struct.setWorkflowNodeDetailsListIsSet(true);
+ }
+ if (incoming.get(12)) {
+ {
+ org.apache.thrift.protocol.TList _list125 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.errors = new ArrayList<ErrorDetails>(_list125.size);
+ for (int _i126 = 0; _i126 < _list125.size; ++_i126)
+ {
+ ErrorDetails _elem127;
+ _elem127 = new ErrorDetails();
+ _elem127.read(iprot);
+ struct.errors.add(_elem127);
+ }
+ }
+ struct.setErrorsIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/719cbf9e/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExperimentState.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExperimentState.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExperimentState.java
new file mode 100644
index 0000000..8cbbef2
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExperimentState.java
@@ -0,0 +1,82 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+@SuppressWarnings("all") public enum ExperimentState implements org.apache.thrift.TEnum {
+ CREATED(0),
+ VALIDATED(1),
+ SCHEDULED(2),
+ LAUNCHED(3),
+ EXECUTING(4),
+ CANCELED(5),
+ COMPLETED(6),
+ FAILED(7),
+ UNKNOWN(8);
+
+ private final int value;
+
+ private ExperimentState(int value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the integer value of this enum value, as defined in the Thrift IDL.
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Find a the enum type by its integer value, as defined in the Thrift IDL.
+ * @return null if the value is not found.
+ */
+ public static ExperimentState findByValue(int value) {
+ switch (value) {
+ case 0:
+ return CREATED;
+ case 1:
+ return VALIDATED;
+ case 2:
+ return SCHEDULED;
+ case 3:
+ return LAUNCHED;
+ case 4:
+ return EXECUTING;
+ case 5:
+ return CANCELED;
+ case 6:
+ return COMPLETED;
+ case 7:
+ return FAILED;
+ case 8:
+ return UNKNOWN;
+ default:
+ return null;
+ }
+ }
+}
[8/8] git commit: Commiting the generated data-models for modified
experiment model. - AIRAVATA-1017
Posted by sm...@apache.org.
Commiting the generated data-models for modified experiment model. - AIRAVATA-1017
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/719cbf9e
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/719cbf9e
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/719cbf9e
Branch: refs/heads/master
Commit: 719cbf9e7acab14183be7d6295ba977c05685cde
Parents: 997d5ef
Author: Suresh Marru <sm...@apache.org>
Authored: Fri Feb 14 18:58:36 2014 -0500
Committer: Suresh Marru <sm...@apache.org>
Committed: Fri Feb 14 18:58:36 2014 -0500
----------------------------------------------------------------------
.../model/experiment/ActionableGroup.java | 70 +
.../experiment/AdvancedInputDataHandling.java | 104 +-
.../experiment/AdvancedOutputDataHandling.java | 104 +-
.../model/experiment/ApplicationStatus.java | 497 ++++
.../ComputationalResourceScheduling.java | 273 +--
.../model/experiment/CorrectiveAction.java | 64 +
.../model/experiment/DataObjectType.java | 706 ++++++
.../model/experiment/DataTransferDetails.java | 699 ++++++
.../model/experiment/ErrorCategory.java | 79 +
.../airavata/model/experiment/ErrorDetails.java | 1287 ++++++++++
.../model/experiment/ExecutionState.java | 85 +
.../model/experiment/ExecutionStatus.java | 509 ++++
.../airavata/model/experiment/Experiment.java | 2294 ++++++++++++++++++
.../model/experiment/ExperimentState.java | 82 +
.../model/experiment/ExperimentStatus.java | 509 ++++
.../airavata/model/experiment/JobDetails.java | 960 ++++++++
.../airavata/model/experiment/JobState.java | 82 +
.../airavata/model/experiment/JobStatus.java | 509 ++++
.../airavata/model/experiment/TaskDetails.java | 1904 +++++++++++++++
.../model/experiment/TransferState.java | 82 +
.../model/experiment/TransferStatus.java | 509 ++++
.../model/experiment/UserConfigurationData.java | 1016 ++++++++
.../model/experiment/WorkflowNodeDetails.java | 1329 ++++++++++
.../model/experiment/WorkflowNodeState.java | 73 +
.../model/experiment/WorkflowNodeStatus.java | 509 ++++
.../experimentModel.thrift | 8 +-
26 files changed, 14004 insertions(+), 339 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/719cbf9e/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ActionableGroup.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ActionableGroup.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ActionableGroup.java
new file mode 100644
index 0000000..e994bb3
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ActionableGroup.java
@@ -0,0 +1,70 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+@SuppressWarnings("all") public enum ActionableGroup implements org.apache.thrift.TEnum {
+ RESOURCE_ADMINS(0),
+ AIRAVATA_ADMINS(1),
+ GATEWAYS_ADMINS(2),
+ USER(3),
+ CANNOT_BE_DETERMINED(4);
+
+ private final int value;
+
+ private ActionableGroup(int value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the integer value of this enum value, as defined in the Thrift IDL.
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Find a the enum type by its integer value, as defined in the Thrift IDL.
+ * @return null if the value is not found.
+ */
+ public static ActionableGroup findByValue(int value) {
+ switch (value) {
+ case 0:
+ return RESOURCE_ADMINS;
+ case 1:
+ return AIRAVATA_ADMINS;
+ case 2:
+ return GATEWAYS_ADMINS;
+ case 3:
+ return USER;
+ case 4:
+ return CANNOT_BE_DETERMINED;
+ default:
+ return null;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/719cbf9e/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/AdvancedInputDataHandling.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/AdvancedInputDataHandling.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/AdvancedInputDataHandling.java
index ac1ba59..1ea9015 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/AdvancedInputDataHandling.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/AdvancedInputDataHandling.java
@@ -56,7 +56,7 @@ import org.slf4j.LoggerFactory;
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AdvancedInputDataHandling");
private static final org.apache.thrift.protocol.TField STAGE_INPUT_FILES_TO_WORKING_DIR_FIELD_DESC = new org.apache.thrift.protocol.TField("stageInputFilesToWorkingDir", org.apache.thrift.protocol.TType.BOOL, (short)1);
- private static final org.apache.thrift.protocol.TField WORKING_DIRECTORY_PARENT_FIELD_DESC = new org.apache.thrift.protocol.TField("workingDirectoryParent", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField PARENT_WORKING_DIRECTORY_FIELD_DESC = new org.apache.thrift.protocol.TField("parentWorkingDirectory", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField UNIQUE_WORKING_DIRECTORY_FIELD_DESC = new org.apache.thrift.protocol.TField("uniqueWorkingDirectory", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField CLEAN_UP_WORKING_DIR_AFTER_JOB_FIELD_DESC = new org.apache.thrift.protocol.TField("cleanUpWorkingDirAfterJob", org.apache.thrift.protocol.TType.BOOL, (short)4);
@@ -67,14 +67,14 @@ import org.slf4j.LoggerFactory;
}
private boolean stageInputFilesToWorkingDir; // optional
- private String workingDirectoryParent; // optional
+ private String parentWorkingDirectory; // optional
private String uniqueWorkingDirectory; // optional
private boolean cleanUpWorkingDirAfterJob; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
STAGE_INPUT_FILES_TO_WORKING_DIR((short)1, "stageInputFilesToWorkingDir"),
- WORKING_DIRECTORY_PARENT((short)2, "workingDirectoryParent"),
+ PARENT_WORKING_DIRECTORY((short)2, "parentWorkingDirectory"),
UNIQUE_WORKING_DIRECTORY((short)3, "uniqueWorkingDirectory"),
CLEAN_UP_WORKING_DIR_AFTER_JOB((short)4, "cleanUpWorkingDirAfterJob");
@@ -93,8 +93,8 @@ import org.slf4j.LoggerFactory;
switch(fieldId) {
case 1: // STAGE_INPUT_FILES_TO_WORKING_DIR
return STAGE_INPUT_FILES_TO_WORKING_DIR;
- case 2: // WORKING_DIRECTORY_PARENT
- return WORKING_DIRECTORY_PARENT;
+ case 2: // PARENT_WORKING_DIRECTORY
+ return PARENT_WORKING_DIRECTORY;
case 3: // UNIQUE_WORKING_DIRECTORY
return UNIQUE_WORKING_DIRECTORY;
case 4: // CLEAN_UP_WORKING_DIR_AFTER_JOB
@@ -142,13 +142,13 @@ import org.slf4j.LoggerFactory;
private static final int __STAGEINPUTFILESTOWORKINGDIR_ISSET_ID = 0;
private static final int __CLEANUPWORKINGDIRAFTERJOB_ISSET_ID = 1;
private byte __isset_bitfield = 0;
- private _Fields optionals[] = {_Fields.STAGE_INPUT_FILES_TO_WORKING_DIR,_Fields.WORKING_DIRECTORY_PARENT,_Fields.UNIQUE_WORKING_DIRECTORY,_Fields.CLEAN_UP_WORKING_DIR_AFTER_JOB};
+ private _Fields optionals[] = {_Fields.STAGE_INPUT_FILES_TO_WORKING_DIR,_Fields.PARENT_WORKING_DIRECTORY,_Fields.UNIQUE_WORKING_DIRECTORY,_Fields.CLEAN_UP_WORKING_DIR_AFTER_JOB};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.STAGE_INPUT_FILES_TO_WORKING_DIR, new org.apache.thrift.meta_data.FieldMetaData("stageInputFilesToWorkingDir", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.WORKING_DIRECTORY_PARENT, new org.apache.thrift.meta_data.FieldMetaData("workingDirectoryParent", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ tmpMap.put(_Fields.PARENT_WORKING_DIRECTORY, new org.apache.thrift.meta_data.FieldMetaData("parentWorkingDirectory", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.UNIQUE_WORKING_DIRECTORY, new org.apache.thrift.meta_data.FieldMetaData("uniqueWorkingDirectory", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
@@ -171,8 +171,8 @@ import org.slf4j.LoggerFactory;
public AdvancedInputDataHandling(AdvancedInputDataHandling other) {
__isset_bitfield = other.__isset_bitfield;
this.stageInputFilesToWorkingDir = other.stageInputFilesToWorkingDir;
- if (other.isSetWorkingDirectoryParent()) {
- this.workingDirectoryParent = other.workingDirectoryParent;
+ if (other.isSetParentWorkingDirectory()) {
+ this.parentWorkingDirectory = other.parentWorkingDirectory;
}
if (other.isSetUniqueWorkingDirectory()) {
this.uniqueWorkingDirectory = other.uniqueWorkingDirectory;
@@ -188,7 +188,7 @@ import org.slf4j.LoggerFactory;
public void clear() {
this.stageInputFilesToWorkingDir = false;
- this.workingDirectoryParent = null;
+ this.parentWorkingDirectory = null;
this.uniqueWorkingDirectory = null;
this.cleanUpWorkingDirAfterJob = false;
@@ -216,26 +216,26 @@ import org.slf4j.LoggerFactory;
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STAGEINPUTFILESTOWORKINGDIR_ISSET_ID, value);
}
- public String getWorkingDirectoryParent() {
- return this.workingDirectoryParent;
+ public String getParentWorkingDirectory() {
+ return this.parentWorkingDirectory;
}
- public void setWorkingDirectoryParent(String workingDirectoryParent) {
- this.workingDirectoryParent = workingDirectoryParent;
+ public void setParentWorkingDirectory(String parentWorkingDirectory) {
+ this.parentWorkingDirectory = parentWorkingDirectory;
}
- public void unsetWorkingDirectoryParent() {
- this.workingDirectoryParent = null;
+ public void unsetParentWorkingDirectory() {
+ this.parentWorkingDirectory = null;
}
- /** Returns true if field workingDirectoryParent is set (has been assigned a value) and false otherwise */
- public boolean isSetWorkingDirectoryParent() {
- return this.workingDirectoryParent != null;
+ /** Returns true if field parentWorkingDirectory is set (has been assigned a value) and false otherwise */
+ public boolean isSetParentWorkingDirectory() {
+ return this.parentWorkingDirectory != null;
}
- public void setWorkingDirectoryParentIsSet(boolean value) {
+ public void setParentWorkingDirectoryIsSet(boolean value) {
if (!value) {
- this.workingDirectoryParent = null;
+ this.parentWorkingDirectory = null;
}
}
@@ -294,11 +294,11 @@ import org.slf4j.LoggerFactory;
}
break;
- case WORKING_DIRECTORY_PARENT:
+ case PARENT_WORKING_DIRECTORY:
if (value == null) {
- unsetWorkingDirectoryParent();
+ unsetParentWorkingDirectory();
} else {
- setWorkingDirectoryParent((String)value);
+ setParentWorkingDirectory((String)value);
}
break;
@@ -326,8 +326,8 @@ import org.slf4j.LoggerFactory;
case STAGE_INPUT_FILES_TO_WORKING_DIR:
return Boolean.valueOf(isStageInputFilesToWorkingDir());
- case WORKING_DIRECTORY_PARENT:
- return getWorkingDirectoryParent();
+ case PARENT_WORKING_DIRECTORY:
+ return getParentWorkingDirectory();
case UNIQUE_WORKING_DIRECTORY:
return getUniqueWorkingDirectory();
@@ -348,8 +348,8 @@ import org.slf4j.LoggerFactory;
switch (field) {
case STAGE_INPUT_FILES_TO_WORKING_DIR:
return isSetStageInputFilesToWorkingDir();
- case WORKING_DIRECTORY_PARENT:
- return isSetWorkingDirectoryParent();
+ case PARENT_WORKING_DIRECTORY:
+ return isSetParentWorkingDirectory();
case UNIQUE_WORKING_DIRECTORY:
return isSetUniqueWorkingDirectory();
case CLEAN_UP_WORKING_DIR_AFTER_JOB:
@@ -380,12 +380,12 @@ import org.slf4j.LoggerFactory;
return false;
}
- boolean this_present_workingDirectoryParent = true && this.isSetWorkingDirectoryParent();
- boolean that_present_workingDirectoryParent = true && that.isSetWorkingDirectoryParent();
- if (this_present_workingDirectoryParent || that_present_workingDirectoryParent) {
- if (!(this_present_workingDirectoryParent && that_present_workingDirectoryParent))
+ boolean this_present_parentWorkingDirectory = true && this.isSetParentWorkingDirectory();
+ boolean that_present_parentWorkingDirectory = true && that.isSetParentWorkingDirectory();
+ if (this_present_parentWorkingDirectory || that_present_parentWorkingDirectory) {
+ if (!(this_present_parentWorkingDirectory && that_present_parentWorkingDirectory))
return false;
- if (!this.workingDirectoryParent.equals(that.workingDirectoryParent))
+ if (!this.parentWorkingDirectory.equals(that.parentWorkingDirectory))
return false;
}
@@ -433,12 +433,12 @@ import org.slf4j.LoggerFactory;
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetWorkingDirectoryParent()).compareTo(other.isSetWorkingDirectoryParent());
+ lastComparison = Boolean.valueOf(isSetParentWorkingDirectory()).compareTo(other.isSetParentWorkingDirectory());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetWorkingDirectoryParent()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workingDirectoryParent, other.workingDirectoryParent);
+ if (isSetParentWorkingDirectory()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentWorkingDirectory, other.parentWorkingDirectory);
if (lastComparison != 0) {
return lastComparison;
}
@@ -488,13 +488,13 @@ import org.slf4j.LoggerFactory;
sb.append(this.stageInputFilesToWorkingDir);
first = false;
}
- if (isSetWorkingDirectoryParent()) {
+ if (isSetParentWorkingDirectory()) {
if (!first) sb.append(", ");
- sb.append("workingDirectoryParent:");
- if (this.workingDirectoryParent == null) {
+ sb.append("parentWorkingDirectory:");
+ if (this.parentWorkingDirectory == null) {
sb.append("null");
} else {
- sb.append(this.workingDirectoryParent);
+ sb.append(this.parentWorkingDirectory);
}
first = false;
}
@@ -567,10 +567,10 @@ import org.slf4j.LoggerFactory;
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 2: // WORKING_DIRECTORY_PARENT
+ case 2: // PARENT_WORKING_DIRECTORY
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.workingDirectoryParent = iprot.readString();
- struct.setWorkingDirectoryParentIsSet(true);
+ struct.parentWorkingDirectory = iprot.readString();
+ struct.setParentWorkingDirectoryIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -609,10 +609,10 @@ import org.slf4j.LoggerFactory;
oprot.writeBool(struct.stageInputFilesToWorkingDir);
oprot.writeFieldEnd();
}
- if (struct.workingDirectoryParent != null) {
- if (struct.isSetWorkingDirectoryParent()) {
- oprot.writeFieldBegin(WORKING_DIRECTORY_PARENT_FIELD_DESC);
- oprot.writeString(struct.workingDirectoryParent);
+ if (struct.parentWorkingDirectory != null) {
+ if (struct.isSetParentWorkingDirectory()) {
+ oprot.writeFieldBegin(PARENT_WORKING_DIRECTORY_FIELD_DESC);
+ oprot.writeString(struct.parentWorkingDirectory);
oprot.writeFieldEnd();
}
}
@@ -649,7 +649,7 @@ import org.slf4j.LoggerFactory;
if (struct.isSetStageInputFilesToWorkingDir()) {
optionals.set(0);
}
- if (struct.isSetWorkingDirectoryParent()) {
+ if (struct.isSetParentWorkingDirectory()) {
optionals.set(1);
}
if (struct.isSetUniqueWorkingDirectory()) {
@@ -662,8 +662,8 @@ import org.slf4j.LoggerFactory;
if (struct.isSetStageInputFilesToWorkingDir()) {
oprot.writeBool(struct.stageInputFilesToWorkingDir);
}
- if (struct.isSetWorkingDirectoryParent()) {
- oprot.writeString(struct.workingDirectoryParent);
+ if (struct.isSetParentWorkingDirectory()) {
+ oprot.writeString(struct.parentWorkingDirectory);
}
if (struct.isSetUniqueWorkingDirectory()) {
oprot.writeString(struct.uniqueWorkingDirectory);
@@ -682,8 +682,8 @@ import org.slf4j.LoggerFactory;
struct.setStageInputFilesToWorkingDirIsSet(true);
}
if (incoming.get(1)) {
- struct.workingDirectoryParent = iprot.readString();
- struct.setWorkingDirectoryParentIsSet(true);
+ struct.parentWorkingDirectory = iprot.readString();
+ struct.setParentWorkingDirectoryIsSet(true);
}
if (incoming.get(2)) {
struct.uniqueWorkingDirectory = iprot.readString();
http://git-wip-us.apache.org/repos/asf/airavata/blob/719cbf9e/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/AdvancedOutputDataHandling.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/AdvancedOutputDataHandling.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/AdvancedOutputDataHandling.java
index b4c389e..c2145f4 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/AdvancedOutputDataHandling.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/AdvancedOutputDataHandling.java
@@ -55,7 +55,7 @@ import org.slf4j.LoggerFactory;
@SuppressWarnings("all") public class AdvancedOutputDataHandling implements org.apache.thrift.TBase<AdvancedOutputDataHandling, AdvancedOutputDataHandling._Fields>, java.io.Serializable, Cloneable, Comparable<AdvancedOutputDataHandling> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AdvancedOutputDataHandling");
- private static final org.apache.thrift.protocol.TField OUTPUTDATA_DIR_FIELD_DESC = new org.apache.thrift.protocol.TField("outputdataDir", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField OUTPUT_DATA_DIR_FIELD_DESC = new org.apache.thrift.protocol.TField("outputDataDir", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField DATA_REGISTRY_URL_FIELD_DESC = new org.apache.thrift.protocol.TField("dataRegistryURL", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField PERSIST_OUTPUT_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("persistOutputData", org.apache.thrift.protocol.TType.BOOL, (short)4);
@@ -65,13 +65,13 @@ import org.slf4j.LoggerFactory;
schemes.put(TupleScheme.class, new AdvancedOutputDataHandlingTupleSchemeFactory());
}
- private String outputdataDir; // optional
+ private String outputDataDir; // optional
private String dataRegistryURL; // optional
private boolean persistOutputData; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- OUTPUTDATA_DIR((short)2, "outputdataDir"),
+ OUTPUT_DATA_DIR((short)2, "outputDataDir"),
DATA_REGISTRY_URL((short)3, "dataRegistryURL"),
PERSIST_OUTPUT_DATA((short)4, "persistOutputData");
@@ -88,8 +88,8 @@ import org.slf4j.LoggerFactory;
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 2: // OUTPUTDATA_DIR
- return OUTPUTDATA_DIR;
+ case 2: // OUTPUT_DATA_DIR
+ return OUTPUT_DATA_DIR;
case 3: // DATA_REGISTRY_URL
return DATA_REGISTRY_URL;
case 4: // PERSIST_OUTPUT_DATA
@@ -136,11 +136,11 @@ import org.slf4j.LoggerFactory;
// isset id assignments
private static final int __PERSISTOUTPUTDATA_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- private _Fields optionals[] = {_Fields.OUTPUTDATA_DIR,_Fields.DATA_REGISTRY_URL,_Fields.PERSIST_OUTPUT_DATA};
+ private _Fields optionals[] = {_Fields.OUTPUT_DATA_DIR,_Fields.DATA_REGISTRY_URL,_Fields.PERSIST_OUTPUT_DATA};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.OUTPUTDATA_DIR, new org.apache.thrift.meta_data.FieldMetaData("outputdataDir", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ tmpMap.put(_Fields.OUTPUT_DATA_DIR, new org.apache.thrift.meta_data.FieldMetaData("outputDataDir", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.DATA_REGISTRY_URL, new org.apache.thrift.meta_data.FieldMetaData("dataRegistryURL", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
@@ -160,8 +160,8 @@ import org.slf4j.LoggerFactory;
*/
public AdvancedOutputDataHandling(AdvancedOutputDataHandling other) {
__isset_bitfield = other.__isset_bitfield;
- if (other.isSetOutputdataDir()) {
- this.outputdataDir = other.outputdataDir;
+ if (other.isSetOutputDataDir()) {
+ this.outputDataDir = other.outputDataDir;
}
if (other.isSetDataRegistryURL()) {
this.dataRegistryURL = other.dataRegistryURL;
@@ -175,32 +175,32 @@ import org.slf4j.LoggerFactory;
@Override
public void clear() {
- this.outputdataDir = null;
+ this.outputDataDir = null;
this.dataRegistryURL = null;
this.persistOutputData = true;
}
- public String getOutputdataDir() {
- return this.outputdataDir;
+ public String getOutputDataDir() {
+ return this.outputDataDir;
}
- public void setOutputdataDir(String outputdataDir) {
- this.outputdataDir = outputdataDir;
+ public void setOutputDataDir(String outputDataDir) {
+ this.outputDataDir = outputDataDir;
}
- public void unsetOutputdataDir() {
- this.outputdataDir = null;
+ public void unsetOutputDataDir() {
+ this.outputDataDir = null;
}
- /** Returns true if field outputdataDir is set (has been assigned a value) and false otherwise */
- public boolean isSetOutputdataDir() {
- return this.outputdataDir != null;
+ /** Returns true if field outputDataDir is set (has been assigned a value) and false otherwise */
+ public boolean isSetOutputDataDir() {
+ return this.outputDataDir != null;
}
- public void setOutputdataDirIsSet(boolean value) {
+ public void setOutputDataDirIsSet(boolean value) {
if (!value) {
- this.outputdataDir = null;
+ this.outputDataDir = null;
}
}
@@ -251,11 +251,11 @@ import org.slf4j.LoggerFactory;
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case OUTPUTDATA_DIR:
+ case OUTPUT_DATA_DIR:
if (value == null) {
- unsetOutputdataDir();
+ unsetOutputDataDir();
} else {
- setOutputdataDir((String)value);
+ setOutputDataDir((String)value);
}
break;
@@ -280,8 +280,8 @@ import org.slf4j.LoggerFactory;
public Object getFieldValue(_Fields field) {
switch (field) {
- case OUTPUTDATA_DIR:
- return getOutputdataDir();
+ case OUTPUT_DATA_DIR:
+ return getOutputDataDir();
case DATA_REGISTRY_URL:
return getDataRegistryURL();
@@ -300,8 +300,8 @@ import org.slf4j.LoggerFactory;
}
switch (field) {
- case OUTPUTDATA_DIR:
- return isSetOutputdataDir();
+ case OUTPUT_DATA_DIR:
+ return isSetOutputDataDir();
case DATA_REGISTRY_URL:
return isSetDataRegistryURL();
case PERSIST_OUTPUT_DATA:
@@ -323,12 +323,12 @@ import org.slf4j.LoggerFactory;
if (that == null)
return false;
- boolean this_present_outputdataDir = true && this.isSetOutputdataDir();
- boolean that_present_outputdataDir = true && that.isSetOutputdataDir();
- if (this_present_outputdataDir || that_present_outputdataDir) {
- if (!(this_present_outputdataDir && that_present_outputdataDir))
+ boolean this_present_outputDataDir = true && this.isSetOutputDataDir();
+ boolean that_present_outputDataDir = true && that.isSetOutputDataDir();
+ if (this_present_outputDataDir || that_present_outputDataDir) {
+ if (!(this_present_outputDataDir && that_present_outputDataDir))
return false;
- if (!this.outputdataDir.equals(that.outputdataDir))
+ if (!this.outputDataDir.equals(that.outputDataDir))
return false;
}
@@ -366,12 +366,12 @@ import org.slf4j.LoggerFactory;
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetOutputdataDir()).compareTo(other.isSetOutputdataDir());
+ lastComparison = Boolean.valueOf(isSetOutputDataDir()).compareTo(other.isSetOutputDataDir());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetOutputdataDir()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.outputdataDir, other.outputdataDir);
+ if (isSetOutputDataDir()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.outputDataDir, other.outputDataDir);
if (lastComparison != 0) {
return lastComparison;
}
@@ -416,12 +416,12 @@ import org.slf4j.LoggerFactory;
StringBuilder sb = new StringBuilder("AdvancedOutputDataHandling(");
boolean first = true;
- if (isSetOutputdataDir()) {
- sb.append("outputdataDir:");
- if (this.outputdataDir == null) {
+ if (isSetOutputDataDir()) {
+ sb.append("outputDataDir:");
+ if (this.outputDataDir == null) {
sb.append("null");
} else {
- sb.append(this.outputdataDir);
+ sb.append(this.outputDataDir);
}
first = false;
}
@@ -486,10 +486,10 @@ import org.slf4j.LoggerFactory;
break;
}
switch (schemeField.id) {
- case 2: // OUTPUTDATA_DIR
+ case 2: // OUTPUT_DATA_DIR
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.outputdataDir = iprot.readString();
- struct.setOutputdataDirIsSet(true);
+ struct.outputDataDir = iprot.readString();
+ struct.setOutputDataDirIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -523,10 +523,10 @@ import org.slf4j.LoggerFactory;
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (struct.outputdataDir != null) {
- if (struct.isSetOutputdataDir()) {
- oprot.writeFieldBegin(OUTPUTDATA_DIR_FIELD_DESC);
- oprot.writeString(struct.outputdataDir);
+ if (struct.outputDataDir != null) {
+ if (struct.isSetOutputDataDir()) {
+ oprot.writeFieldBegin(OUTPUT_DATA_DIR_FIELD_DESC);
+ oprot.writeString(struct.outputDataDir);
oprot.writeFieldEnd();
}
}
@@ -560,7 +560,7 @@ import org.slf4j.LoggerFactory;
public void write(org.apache.thrift.protocol.TProtocol prot, AdvancedOutputDataHandling struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
- if (struct.isSetOutputdataDir()) {
+ if (struct.isSetOutputDataDir()) {
optionals.set(0);
}
if (struct.isSetDataRegistryURL()) {
@@ -570,8 +570,8 @@ import org.slf4j.LoggerFactory;
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
- if (struct.isSetOutputdataDir()) {
- oprot.writeString(struct.outputdataDir);
+ if (struct.isSetOutputDataDir()) {
+ oprot.writeString(struct.outputDataDir);
}
if (struct.isSetDataRegistryURL()) {
oprot.writeString(struct.dataRegistryURL);
@@ -586,8 +586,8 @@ import org.slf4j.LoggerFactory;
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
- struct.outputdataDir = iprot.readString();
- struct.setOutputdataDirIsSet(true);
+ struct.outputDataDir = iprot.readString();
+ struct.setOutputDataDirIsSet(true);
}
if (incoming.get(1)) {
struct.dataRegistryURL = iprot.readString();
http://git-wip-us.apache.org/repos/asf/airavata/blob/719cbf9e/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ApplicationStatus.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ApplicationStatus.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ApplicationStatus.java
new file mode 100644
index 0000000..1ea0c61
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ApplicationStatus.java
@@ -0,0 +1,497 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("all") public class ApplicationStatus implements org.apache.thrift.TBase<ApplicationStatus, ApplicationStatus._Fields>, java.io.Serializable, Cloneable, Comparable<ApplicationStatus> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ApplicationStatus");
+
+ private static final org.apache.thrift.protocol.TField APPLICATION_STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationState", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField TIME_OF_STATE_CHANGE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeOfStateChange", org.apache.thrift.protocol.TType.I64, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ApplicationStatusStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ApplicationStatusTupleSchemeFactory());
+ }
+
+ private String applicationState; // required
+ private long timeOfStateChange; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ APPLICATION_STATE((short)1, "applicationState"),
+ TIME_OF_STATE_CHANGE((short)2, "timeOfStateChange");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // APPLICATION_STATE
+ return APPLICATION_STATE;
+ case 2: // TIME_OF_STATE_CHANGE
+ return TIME_OF_STATE_CHANGE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __TIMEOFSTATECHANGE_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.TIME_OF_STATE_CHANGE};
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.APPLICATION_STATE, new org.apache.thrift.meta_data.FieldMetaData("applicationState", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.TIME_OF_STATE_CHANGE, new org.apache.thrift.meta_data.FieldMetaData("timeOfStateChange", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ApplicationStatus.class, metaDataMap);
+ }
+
+ public ApplicationStatus() {
+ }
+
+ public ApplicationStatus(
+ String applicationState)
+ {
+ this();
+ this.applicationState = applicationState;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ApplicationStatus(ApplicationStatus other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetApplicationState()) {
+ this.applicationState = other.applicationState;
+ }
+ this.timeOfStateChange = other.timeOfStateChange;
+ }
+
+ public ApplicationStatus deepCopy() {
+ return new ApplicationStatus(this);
+ }
+
+ @Override
+ public void clear() {
+ this.applicationState = null;
+ setTimeOfStateChangeIsSet(false);
+ this.timeOfStateChange = 0;
+ }
+
+ public String getApplicationState() {
+ return this.applicationState;
+ }
+
+ public void setApplicationState(String applicationState) {
+ this.applicationState = applicationState;
+ }
+
+ public void unsetApplicationState() {
+ this.applicationState = null;
+ }
+
+ /** Returns true if field applicationState is set (has been assigned a value) and false otherwise */
+ public boolean isSetApplicationState() {
+ return this.applicationState != null;
+ }
+
+ public void setApplicationStateIsSet(boolean value) {
+ if (!value) {
+ this.applicationState = null;
+ }
+ }
+
+ public long getTimeOfStateChange() {
+ return this.timeOfStateChange;
+ }
+
+ public void setTimeOfStateChange(long timeOfStateChange) {
+ this.timeOfStateChange = timeOfStateChange;
+ setTimeOfStateChangeIsSet(true);
+ }
+
+ public void unsetTimeOfStateChange() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID);
+ }
+
+ /** Returns true if field timeOfStateChange is set (has been assigned a value) and false otherwise */
+ public boolean isSetTimeOfStateChange() {
+ return EncodingUtils.testBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID);
+ }
+
+ public void setTimeOfStateChangeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case APPLICATION_STATE:
+ if (value == null) {
+ unsetApplicationState();
+ } else {
+ setApplicationState((String)value);
+ }
+ break;
+
+ case TIME_OF_STATE_CHANGE:
+ if (value == null) {
+ unsetTimeOfStateChange();
+ } else {
+ setTimeOfStateChange((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case APPLICATION_STATE:
+ return getApplicationState();
+
+ case TIME_OF_STATE_CHANGE:
+ return Long.valueOf(getTimeOfStateChange());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case APPLICATION_STATE:
+ return isSetApplicationState();
+ case TIME_OF_STATE_CHANGE:
+ return isSetTimeOfStateChange();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ApplicationStatus)
+ return this.equals((ApplicationStatus)that);
+ return false;
+ }
+
+ public boolean equals(ApplicationStatus that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_applicationState = true && this.isSetApplicationState();
+ boolean that_present_applicationState = true && that.isSetApplicationState();
+ if (this_present_applicationState || that_present_applicationState) {
+ if (!(this_present_applicationState && that_present_applicationState))
+ return false;
+ if (!this.applicationState.equals(that.applicationState))
+ return false;
+ }
+
+ boolean this_present_timeOfStateChange = true && this.isSetTimeOfStateChange();
+ boolean that_present_timeOfStateChange = true && that.isSetTimeOfStateChange();
+ if (this_present_timeOfStateChange || that_present_timeOfStateChange) {
+ if (!(this_present_timeOfStateChange && that_present_timeOfStateChange))
+ return false;
+ if (this.timeOfStateChange != that.timeOfStateChange)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(ApplicationStatus other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetApplicationState()).compareTo(other.isSetApplicationState());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetApplicationState()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationState, other.applicationState);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTimeOfStateChange()).compareTo(other.isSetTimeOfStateChange());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTimeOfStateChange()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeOfStateChange, other.timeOfStateChange);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("ApplicationStatus(");
+ boolean first = true;
+
+ sb.append("applicationState:");
+ if (this.applicationState == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.applicationState);
+ }
+ first = false;
+ if (isSetTimeOfStateChange()) {
+ if (!first) sb.append(", ");
+ sb.append("timeOfStateChange:");
+ sb.append(this.timeOfStateChange);
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetApplicationState()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'applicationState' is unset! Struct:" + toString());
+ }
+
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class ApplicationStatusStandardSchemeFactory implements SchemeFactory {
+ public ApplicationStatusStandardScheme getScheme() {
+ return new ApplicationStatusStandardScheme();
+ }
+ }
+
+ private static class ApplicationStatusStandardScheme extends StandardScheme<ApplicationStatus> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ApplicationStatus struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // APPLICATION_STATE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.applicationState = iprot.readString();
+ struct.setApplicationStateIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // TIME_OF_STATE_CHANGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.timeOfStateChange = iprot.readI64();
+ struct.setTimeOfStateChangeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, ApplicationStatus struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.applicationState != null) {
+ oprot.writeFieldBegin(APPLICATION_STATE_FIELD_DESC);
+ oprot.writeString(struct.applicationState);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetTimeOfStateChange()) {
+ oprot.writeFieldBegin(TIME_OF_STATE_CHANGE_FIELD_DESC);
+ oprot.writeI64(struct.timeOfStateChange);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ApplicationStatusTupleSchemeFactory implements SchemeFactory {
+ public ApplicationStatusTupleScheme getScheme() {
+ return new ApplicationStatusTupleScheme();
+ }
+ }
+
+ private static class ApplicationStatusTupleScheme extends TupleScheme<ApplicationStatus> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ApplicationStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.applicationState);
+ BitSet optionals = new BitSet();
+ if (struct.isSetTimeOfStateChange()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetTimeOfStateChange()) {
+ oprot.writeI64(struct.timeOfStateChange);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ApplicationStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.applicationState = iprot.readString();
+ struct.setApplicationStateIsSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.timeOfStateChange = iprot.readI64();
+ struct.setTimeOfStateChangeIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/719cbf9e/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ComputationalResourceScheduling.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ComputationalResourceScheduling.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ComputationalResourceScheduling.java
index 634ce07..ba9bb65 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ComputationalResourceScheduling.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ComputationalResourceScheduling.java
@@ -55,17 +55,15 @@ import org.slf4j.LoggerFactory;
@SuppressWarnings("all") public class ComputationalResourceScheduling implements org.apache.thrift.TBase<ComputationalResourceScheduling, ComputationalResourceScheduling._Fields>, java.io.Serializable, Cloneable, Comparable<ComputationalResourceScheduling> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ComputationalResourceScheduling");
- private static final org.apache.thrift.protocol.TField AIRAVATA_AUTO_SCHEDULE_FIELD_DESC = new org.apache.thrift.protocol.TField("airavataAutoSchedule", org.apache.thrift.protocol.TType.BOOL, (short)1);
- private static final org.apache.thrift.protocol.TField OVERRIDE_MANUAL_SCHEDULED_PARAMS_FIELD_DESC = new org.apache.thrift.protocol.TField("overrideManualScheduledParams", org.apache.thrift.protocol.TType.BOOL, (short)2);
- private static final org.apache.thrift.protocol.TField RESOURCE_HOST_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceHostId", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField TOTAL_CPUCOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("totalCPUCount", org.apache.thrift.protocol.TType.I32, (short)4);
- private static final org.apache.thrift.protocol.TField NODE_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("nodeCount", org.apache.thrift.protocol.TType.I32, (short)5);
- private static final org.apache.thrift.protocol.TField NUMBER_OF_THREADS_FIELD_DESC = new org.apache.thrift.protocol.TField("numberOfThreads", org.apache.thrift.protocol.TType.I32, (short)6);
- private static final org.apache.thrift.protocol.TField QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("queueName", org.apache.thrift.protocol.TType.STRING, (short)7);
- private static final org.apache.thrift.protocol.TField WALL_TIME_LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("wallTimeLimit", org.apache.thrift.protocol.TType.I32, (short)8);
- private static final org.apache.thrift.protocol.TField JOB_START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("jobStartTime", org.apache.thrift.protocol.TType.I32, (short)9);
- private static final org.apache.thrift.protocol.TField TOTAL_PHYSICAL_MEMORY_FIELD_DESC = new org.apache.thrift.protocol.TField("totalPhysicalMemory", org.apache.thrift.protocol.TType.I32, (short)10);
- private static final org.apache.thrift.protocol.TField COMPUTATIONAL_PROJECT_ACCOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("ComputationalProjectAccount", org.apache.thrift.protocol.TType.STRING, (short)11);
+ private static final org.apache.thrift.protocol.TField RESOURCE_HOST_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceHostId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField TOTAL_CPUCOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("totalCPUCount", org.apache.thrift.protocol.TType.I32, (short)2);
+ private static final org.apache.thrift.protocol.TField NODE_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("nodeCount", org.apache.thrift.protocol.TType.I32, (short)3);
+ private static final org.apache.thrift.protocol.TField NUMBER_OF_THREADS_FIELD_DESC = new org.apache.thrift.protocol.TField("numberOfThreads", org.apache.thrift.protocol.TType.I32, (short)4);
+ private static final org.apache.thrift.protocol.TField QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("queueName", org.apache.thrift.protocol.TType.STRING, (short)5);
+ private static final org.apache.thrift.protocol.TField WALL_TIME_LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("wallTimeLimit", org.apache.thrift.protocol.TType.I32, (short)6);
+ private static final org.apache.thrift.protocol.TField JOB_START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("jobStartTime", org.apache.thrift.protocol.TType.I32, (short)7);
+ private static final org.apache.thrift.protocol.TField TOTAL_PHYSICAL_MEMORY_FIELD_DESC = new org.apache.thrift.protocol.TField("totalPhysicalMemory", org.apache.thrift.protocol.TType.I32, (short)8);
+ private static final org.apache.thrift.protocol.TField COMPUTATIONAL_PROJECT_ACCOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("ComputationalProjectAccount", org.apache.thrift.protocol.TType.STRING, (short)9);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -73,8 +71,6 @@ import org.slf4j.LoggerFactory;
schemes.put(TupleScheme.class, new ComputationalResourceSchedulingTupleSchemeFactory());
}
- private boolean airavataAutoSchedule; // required
- private boolean overrideManualScheduledParams; // required
private String resourceHostId; // optional
private int totalCPUCount; // optional
private int nodeCount; // optional
@@ -87,17 +83,15 @@ import org.slf4j.LoggerFactory;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- AIRAVATA_AUTO_SCHEDULE((short)1, "airavataAutoSchedule"),
- OVERRIDE_MANUAL_SCHEDULED_PARAMS((short)2, "overrideManualScheduledParams"),
- RESOURCE_HOST_ID((short)3, "resourceHostId"),
- TOTAL_CPUCOUNT((short)4, "totalCPUCount"),
- NODE_COUNT((short)5, "nodeCount"),
- NUMBER_OF_THREADS((short)6, "numberOfThreads"),
- QUEUE_NAME((short)7, "queueName"),
- WALL_TIME_LIMIT((short)8, "wallTimeLimit"),
- JOB_START_TIME((short)9, "jobStartTime"),
- TOTAL_PHYSICAL_MEMORY((short)10, "totalPhysicalMemory"),
- COMPUTATIONAL_PROJECT_ACCOUNT((short)11, "ComputationalProjectAccount");
+ RESOURCE_HOST_ID((short)1, "resourceHostId"),
+ TOTAL_CPUCOUNT((short)2, "totalCPUCount"),
+ NODE_COUNT((short)3, "nodeCount"),
+ NUMBER_OF_THREADS((short)4, "numberOfThreads"),
+ QUEUE_NAME((short)5, "queueName"),
+ WALL_TIME_LIMIT((short)6, "wallTimeLimit"),
+ JOB_START_TIME((short)7, "jobStartTime"),
+ TOTAL_PHYSICAL_MEMORY((short)8, "totalPhysicalMemory"),
+ COMPUTATIONAL_PROJECT_ACCOUNT((short)9, "ComputationalProjectAccount");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -112,27 +106,23 @@ import org.slf4j.LoggerFactory;
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 1: // AIRAVATA_AUTO_SCHEDULE
- return AIRAVATA_AUTO_SCHEDULE;
- case 2: // OVERRIDE_MANUAL_SCHEDULED_PARAMS
- return OVERRIDE_MANUAL_SCHEDULED_PARAMS;
- case 3: // RESOURCE_HOST_ID
+ case 1: // RESOURCE_HOST_ID
return RESOURCE_HOST_ID;
- case 4: // TOTAL_CPUCOUNT
+ case 2: // TOTAL_CPUCOUNT
return TOTAL_CPUCOUNT;
- case 5: // NODE_COUNT
+ case 3: // NODE_COUNT
return NODE_COUNT;
- case 6: // NUMBER_OF_THREADS
+ case 4: // NUMBER_OF_THREADS
return NUMBER_OF_THREADS;
- case 7: // QUEUE_NAME
+ case 5: // QUEUE_NAME
return QUEUE_NAME;
- case 8: // WALL_TIME_LIMIT
+ case 6: // WALL_TIME_LIMIT
return WALL_TIME_LIMIT;
- case 9: // JOB_START_TIME
+ case 7: // JOB_START_TIME
return JOB_START_TIME;
- case 10: // TOTAL_PHYSICAL_MEMORY
+ case 8: // TOTAL_PHYSICAL_MEMORY
return TOTAL_PHYSICAL_MEMORY;
- case 11: // COMPUTATIONAL_PROJECT_ACCOUNT
+ case 9: // COMPUTATIONAL_PROJECT_ACCOUNT
return COMPUTATIONAL_PROJECT_ACCOUNT;
default:
return null;
@@ -174,23 +164,17 @@ import org.slf4j.LoggerFactory;
}
// isset id assignments
- private static final int __AIRAVATAAUTOSCHEDULE_ISSET_ID = 0;
- private static final int __OVERRIDEMANUALSCHEDULEDPARAMS_ISSET_ID = 1;
- private static final int __TOTALCPUCOUNT_ISSET_ID = 2;
- private static final int __NODECOUNT_ISSET_ID = 3;
- private static final int __NUMBEROFTHREADS_ISSET_ID = 4;
- private static final int __WALLTIMELIMIT_ISSET_ID = 5;
- private static final int __JOBSTARTTIME_ISSET_ID = 6;
- private static final int __TOTALPHYSICALMEMORY_ISSET_ID = 7;
+ private static final int __TOTALCPUCOUNT_ISSET_ID = 0;
+ private static final int __NODECOUNT_ISSET_ID = 1;
+ private static final int __NUMBEROFTHREADS_ISSET_ID = 2;
+ private static final int __WALLTIMELIMIT_ISSET_ID = 3;
+ private static final int __JOBSTARTTIME_ISSET_ID = 4;
+ private static final int __TOTALPHYSICALMEMORY_ISSET_ID = 5;
private byte __isset_bitfield = 0;
private _Fields optionals[] = {_Fields.RESOURCE_HOST_ID,_Fields.TOTAL_CPUCOUNT,_Fields.NODE_COUNT,_Fields.NUMBER_OF_THREADS,_Fields.QUEUE_NAME,_Fields.WALL_TIME_LIMIT,_Fields.JOB_START_TIME,_Fields.TOTAL_PHYSICAL_MEMORY,_Fields.COMPUTATIONAL_PROJECT_ACCOUNT};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.AIRAVATA_AUTO_SCHEDULE, new org.apache.thrift.meta_data.FieldMetaData("airavataAutoSchedule", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.OVERRIDE_MANUAL_SCHEDULED_PARAMS, new org.apache.thrift.meta_data.FieldMetaData("overrideManualScheduledParams", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.RESOURCE_HOST_ID, new org.apache.thrift.meta_data.FieldMetaData("resourceHostId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TOTAL_CPUCOUNT, new org.apache.thrift.meta_data.FieldMetaData("totalCPUCount", org.apache.thrift.TFieldRequirementType.OPTIONAL,
@@ -214,21 +198,6 @@ import org.slf4j.LoggerFactory;
}
public ComputationalResourceScheduling() {
- this.airavataAutoSchedule = true;
-
- this.overrideManualScheduledParams = false;
-
- }
-
- public ComputationalResourceScheduling(
- boolean airavataAutoSchedule,
- boolean overrideManualScheduledParams)
- {
- this();
- this.airavataAutoSchedule = airavataAutoSchedule;
- setAiravataAutoScheduleIsSet(true);
- this.overrideManualScheduledParams = overrideManualScheduledParams;
- setOverrideManualScheduledParamsIsSet(true);
}
/**
@@ -236,8 +205,6 @@ import org.slf4j.LoggerFactory;
*/
public ComputationalResourceScheduling(ComputationalResourceScheduling other) {
__isset_bitfield = other.__isset_bitfield;
- this.airavataAutoSchedule = other.airavataAutoSchedule;
- this.overrideManualScheduledParams = other.overrideManualScheduledParams;
if (other.isSetResourceHostId()) {
this.resourceHostId = other.resourceHostId;
}
@@ -261,10 +228,6 @@ import org.slf4j.LoggerFactory;
@Override
public void clear() {
- this.airavataAutoSchedule = true;
-
- this.overrideManualScheduledParams = false;
-
this.resourceHostId = null;
setTotalCPUCountIsSet(false);
this.totalCPUCount = 0;
@@ -282,50 +245,6 @@ import org.slf4j.LoggerFactory;
this.ComputationalProjectAccount = null;
}
- public boolean isAiravataAutoSchedule() {
- return this.airavataAutoSchedule;
- }
-
- public void setAiravataAutoSchedule(boolean airavataAutoSchedule) {
- this.airavataAutoSchedule = airavataAutoSchedule;
- setAiravataAutoScheduleIsSet(true);
- }
-
- public void unsetAiravataAutoSchedule() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AIRAVATAAUTOSCHEDULE_ISSET_ID);
- }
-
- /** Returns true if field airavataAutoSchedule is set (has been assigned a value) and false otherwise */
- public boolean isSetAiravataAutoSchedule() {
- return EncodingUtils.testBit(__isset_bitfield, __AIRAVATAAUTOSCHEDULE_ISSET_ID);
- }
-
- public void setAiravataAutoScheduleIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AIRAVATAAUTOSCHEDULE_ISSET_ID, value);
- }
-
- public boolean isOverrideManualScheduledParams() {
- return this.overrideManualScheduledParams;
- }
-
- public void setOverrideManualScheduledParams(boolean overrideManualScheduledParams) {
- this.overrideManualScheduledParams = overrideManualScheduledParams;
- setOverrideManualScheduledParamsIsSet(true);
- }
-
- public void unsetOverrideManualScheduledParams() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OVERRIDEMANUALSCHEDULEDPARAMS_ISSET_ID);
- }
-
- /** Returns true if field overrideManualScheduledParams is set (has been assigned a value) and false otherwise */
- public boolean isSetOverrideManualScheduledParams() {
- return EncodingUtils.testBit(__isset_bitfield, __OVERRIDEMANUALSCHEDULEDPARAMS_ISSET_ID);
- }
-
- public void setOverrideManualScheduledParamsIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OVERRIDEMANUALSCHEDULEDPARAMS_ISSET_ID, value);
- }
-
public String getResourceHostId() {
return this.resourceHostId;
}
@@ -529,22 +448,6 @@ import org.slf4j.LoggerFactory;
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case AIRAVATA_AUTO_SCHEDULE:
- if (value == null) {
- unsetAiravataAutoSchedule();
- } else {
- setAiravataAutoSchedule((Boolean)value);
- }
- break;
-
- case OVERRIDE_MANUAL_SCHEDULED_PARAMS:
- if (value == null) {
- unsetOverrideManualScheduledParams();
- } else {
- setOverrideManualScheduledParams((Boolean)value);
- }
- break;
-
case RESOURCE_HOST_ID:
if (value == null) {
unsetResourceHostId();
@@ -622,12 +525,6 @@ import org.slf4j.LoggerFactory;
public Object getFieldValue(_Fields field) {
switch (field) {
- case AIRAVATA_AUTO_SCHEDULE:
- return Boolean.valueOf(isAiravataAutoSchedule());
-
- case OVERRIDE_MANUAL_SCHEDULED_PARAMS:
- return Boolean.valueOf(isOverrideManualScheduledParams());
-
case RESOURCE_HOST_ID:
return getResourceHostId();
@@ -666,10 +563,6 @@ import org.slf4j.LoggerFactory;
}
switch (field) {
- case AIRAVATA_AUTO_SCHEDULE:
- return isSetAiravataAutoSchedule();
- case OVERRIDE_MANUAL_SCHEDULED_PARAMS:
- return isSetOverrideManualScheduledParams();
case RESOURCE_HOST_ID:
return isSetResourceHostId();
case TOTAL_CPUCOUNT:
@@ -705,24 +598,6 @@ import org.slf4j.LoggerFactory;
if (that == null)
return false;
- boolean this_present_airavataAutoSchedule = true;
- boolean that_present_airavataAutoSchedule = true;
- if (this_present_airavataAutoSchedule || that_present_airavataAutoSchedule) {
- if (!(this_present_airavataAutoSchedule && that_present_airavataAutoSchedule))
- return false;
- if (this.airavataAutoSchedule != that.airavataAutoSchedule)
- return false;
- }
-
- boolean this_present_overrideManualScheduledParams = true;
- boolean that_present_overrideManualScheduledParams = true;
- if (this_present_overrideManualScheduledParams || that_present_overrideManualScheduledParams) {
- if (!(this_present_overrideManualScheduledParams && that_present_overrideManualScheduledParams))
- return false;
- if (this.overrideManualScheduledParams != that.overrideManualScheduledParams)
- return false;
- }
-
boolean this_present_resourceHostId = true && this.isSetResourceHostId();
boolean that_present_resourceHostId = true && that.isSetResourceHostId();
if (this_present_resourceHostId || that_present_resourceHostId) {
@@ -820,26 +695,6 @@ import org.slf4j.LoggerFactory;
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetAiravataAutoSchedule()).compareTo(other.isSetAiravataAutoSchedule());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetAiravataAutoSchedule()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.airavataAutoSchedule, other.airavataAutoSchedule);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetOverrideManualScheduledParams()).compareTo(other.isSetOverrideManualScheduledParams());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetOverrideManualScheduledParams()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.overrideManualScheduledParams, other.overrideManualScheduledParams);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
lastComparison = Boolean.valueOf(isSetResourceHostId()).compareTo(other.isSetResourceHostId());
if (lastComparison != 0) {
return lastComparison;
@@ -950,15 +805,7 @@ import org.slf4j.LoggerFactory;
StringBuilder sb = new StringBuilder("ComputationalResourceScheduling(");
boolean first = true;
- sb.append("airavataAutoSchedule:");
- sb.append(this.airavataAutoSchedule);
- first = false;
- if (!first) sb.append(", ");
- sb.append("overrideManualScheduledParams:");
- sb.append(this.overrideManualScheduledParams);
- first = false;
if (isSetResourceHostId()) {
- if (!first) sb.append(", ");
sb.append("resourceHostId:");
if (this.resourceHostId == null) {
sb.append("null");
@@ -1029,14 +876,6 @@ import org.slf4j.LoggerFactory;
public void validate() throws org.apache.thrift.TException {
// check for required fields
- if (!isSetAiravataAutoSchedule()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'airavataAutoSchedule' is unset! Struct:" + toString());
- }
-
- if (!isSetOverrideManualScheduledParams()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'overrideManualScheduledParams' is unset! Struct:" + toString());
- }
-
// check for sub-struct validity
}
@@ -1076,23 +915,7 @@ import org.slf4j.LoggerFactory;
break;
}
switch (schemeField.id) {
- case 1: // AIRAVATA_AUTO_SCHEDULE
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.airavataAutoSchedule = iprot.readBool();
- struct.setAiravataAutoScheduleIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // OVERRIDE_MANUAL_SCHEDULED_PARAMS
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.overrideManualScheduledParams = iprot.readBool();
- struct.setOverrideManualScheduledParamsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // RESOURCE_HOST_ID
+ case 1: // RESOURCE_HOST_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.resourceHostId = iprot.readString();
struct.setResourceHostIdIsSet(true);
@@ -1100,7 +923,7 @@ import org.slf4j.LoggerFactory;
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 4: // TOTAL_CPUCOUNT
+ case 2: // TOTAL_CPUCOUNT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.totalCPUCount = iprot.readI32();
struct.setTotalCPUCountIsSet(true);
@@ -1108,7 +931,7 @@ import org.slf4j.LoggerFactory;
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 5: // NODE_COUNT
+ case 3: // NODE_COUNT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.nodeCount = iprot.readI32();
struct.setNodeCountIsSet(true);
@@ -1116,7 +939,7 @@ import org.slf4j.LoggerFactory;
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 6: // NUMBER_OF_THREADS
+ case 4: // NUMBER_OF_THREADS
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.numberOfThreads = iprot.readI32();
struct.setNumberOfThreadsIsSet(true);
@@ -1124,7 +947,7 @@ import org.slf4j.LoggerFactory;
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 7: // QUEUE_NAME
+ case 5: // QUEUE_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.queueName = iprot.readString();
struct.setQueueNameIsSet(true);
@@ -1132,7 +955,7 @@ import org.slf4j.LoggerFactory;
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 8: // WALL_TIME_LIMIT
+ case 6: // WALL_TIME_LIMIT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.wallTimeLimit = iprot.readI32();
struct.setWallTimeLimitIsSet(true);
@@ -1140,7 +963,7 @@ import org.slf4j.LoggerFactory;
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 9: // JOB_START_TIME
+ case 7: // JOB_START_TIME
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.jobStartTime = iprot.readI32();
struct.setJobStartTimeIsSet(true);
@@ -1148,7 +971,7 @@ import org.slf4j.LoggerFactory;
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 10: // TOTAL_PHYSICAL_MEMORY
+ case 8: // TOTAL_PHYSICAL_MEMORY
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.totalPhysicalMemory = iprot.readI32();
struct.setTotalPhysicalMemoryIsSet(true);
@@ -1156,7 +979,7 @@ import org.slf4j.LoggerFactory;
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 11: // COMPUTATIONAL_PROJECT_ACCOUNT
+ case 9: // COMPUTATIONAL_PROJECT_ACCOUNT
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.ComputationalProjectAccount = iprot.readString();
struct.setComputationalProjectAccountIsSet(true);
@@ -1177,12 +1000,6 @@ import org.slf4j.LoggerFactory;
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
- oprot.writeFieldBegin(AIRAVATA_AUTO_SCHEDULE_FIELD_DESC);
- oprot.writeBool(struct.airavataAutoSchedule);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(OVERRIDE_MANUAL_SCHEDULED_PARAMS_FIELD_DESC);
- oprot.writeBool(struct.overrideManualScheduledParams);
- oprot.writeFieldEnd();
if (struct.resourceHostId != null) {
if (struct.isSetResourceHostId()) {
oprot.writeFieldBegin(RESOURCE_HOST_ID_FIELD_DESC);
@@ -1251,8 +1068,6 @@ import org.slf4j.LoggerFactory;
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ComputationalResourceScheduling struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
- oprot.writeBool(struct.airavataAutoSchedule);
- oprot.writeBool(struct.overrideManualScheduledParams);
BitSet optionals = new BitSet();
if (struct.isSetResourceHostId()) {
optionals.set(0);
@@ -1314,10 +1129,6 @@ import org.slf4j.LoggerFactory;
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ComputationalResourceScheduling struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.airavataAutoSchedule = iprot.readBool();
- struct.setAiravataAutoScheduleIsSet(true);
- struct.overrideManualScheduledParams = iprot.readBool();
- struct.setOverrideManualScheduledParamsIsSet(true);
BitSet incoming = iprot.readBitSet(9);
if (incoming.get(0)) {
struct.resourceHostId = iprot.readString();
http://git-wip-us.apache.org/repos/asf/airavata/blob/719cbf9e/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/CorrectiveAction.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/CorrectiveAction.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/CorrectiveAction.java
new file mode 100644
index 0000000..fa62d9d
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/CorrectiveAction.java
@@ -0,0 +1,64 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+@SuppressWarnings("all") public enum CorrectiveAction implements org.apache.thrift.TEnum {
+ RETRY_SUBMISSION(0),
+ CONTACT_SUPPORT(1),
+ CANNOT_BE_DETERMINED(2);
+
+ private final int value;
+
+ private CorrectiveAction(int value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the integer value of this enum value, as defined in the Thrift IDL.
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Find a the enum type by its integer value, as defined in the Thrift IDL.
+ * @return null if the value is not found.
+ */
+ public static CorrectiveAction findByValue(int value) {
+ switch (value) {
+ case 0:
+ return RETRY_SUBMISSION;
+ case 1:
+ return CONTACT_SUPPORT;
+ case 2:
+ return CANNOT_BE_DETERMINED;
+ default:
+ return null;
+ }
+ }
+}
[3/8] Commiting the generated data-models for modified experiment
model. - AIRAVATA-1017
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/719cbf9e/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/TaskDetails.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/TaskDetails.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/TaskDetails.java
new file mode 100644
index 0000000..352692f
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/TaskDetails.java
@@ -0,0 +1,1904 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * A structure holding the actual execution context decided based on user provided configuration data or system inferred
+ * information from scheduling and QoS parameters. One experiment can have multiple tasks. Each tasks results in
+ * data transfers and jobs
+ *
+ */
+@SuppressWarnings("all") public class TaskDetails implements org.apache.thrift.TBase<TaskDetails, TaskDetails._Fields>, java.io.Serializable, Cloneable, Comparable<TaskDetails> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TaskDetails");
+
+ private static final org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("taskID", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTime", org.apache.thrift.protocol.TType.I64, (short)2);
+ private static final org.apache.thrift.protocol.TField APPLICATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationId", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField APPLICATION_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationVersion", org.apache.thrift.protocol.TType.STRING, (short)4);
+ private static final org.apache.thrift.protocol.TField APPLICATION_INPUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationInputs", org.apache.thrift.protocol.TType.LIST, (short)5);
+ private static final org.apache.thrift.protocol.TField APPLICATION_OUTPUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationOutputs", org.apache.thrift.protocol.TType.LIST, (short)6);
+ private static final org.apache.thrift.protocol.TField EXECUTION_SCHEDULING_FIELD_DESC = new org.apache.thrift.protocol.TField("executionScheduling", org.apache.thrift.protocol.TType.STRUCT, (short)7);
+ private static final org.apache.thrift.protocol.TField ADVANCED_INPUT_DATA_HANDLING_FIELD_DESC = new org.apache.thrift.protocol.TField("advancedInputDataHandling", org.apache.thrift.protocol.TType.STRUCT, (short)8);
+ private static final org.apache.thrift.protocol.TField ADVANCED_OUTPUT_DATA_HANDLING_FIELD_DESC = new org.apache.thrift.protocol.TField("advancedOutputDataHandling", org.apache.thrift.protocol.TType.STRUCT, (short)9);
+ private static final org.apache.thrift.protocol.TField EXECUTION_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("executionStatus", org.apache.thrift.protocol.TType.STRUCT, (short)10);
+ private static final org.apache.thrift.protocol.TField JOB_DETAILS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("jobDetailsList", org.apache.thrift.protocol.TType.LIST, (short)11);
+ private static final org.apache.thrift.protocol.TField DATA_TRANSFER_DETAILS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("dataTransferDetailsList", org.apache.thrift.protocol.TType.LIST, (short)12);
+ private static final org.apache.thrift.protocol.TField ERRORS_FIELD_DESC = new org.apache.thrift.protocol.TField("errors", org.apache.thrift.protocol.TType.LIST, (short)13);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TaskDetailsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TaskDetailsTupleSchemeFactory());
+ }
+
+ private String taskID; // required
+ private long creationTime; // optional
+ private String applicationId; // optional
+ private String applicationVersion; // optional
+ private List<DataObjectType> applicationInputs; // optional
+ private List<DataObjectType> applicationOutputs; // optional
+ private ComputationalResourceScheduling executionScheduling; // optional
+ private AdvancedInputDataHandling advancedInputDataHandling; // optional
+ private AdvancedOutputDataHandling advancedOutputDataHandling; // optional
+ private ExecutionStatus executionStatus; // optional
+ private List<JobDetails> jobDetailsList; // optional
+ private List<DataTransferDetails> dataTransferDetailsList; // optional
+ private List<ErrorDetails> errors; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ TASK_ID((short)1, "taskID"),
+ CREATION_TIME((short)2, "creationTime"),
+ APPLICATION_ID((short)3, "applicationId"),
+ APPLICATION_VERSION((short)4, "applicationVersion"),
+ APPLICATION_INPUTS((short)5, "applicationInputs"),
+ APPLICATION_OUTPUTS((short)6, "applicationOutputs"),
+ EXECUTION_SCHEDULING((short)7, "executionScheduling"),
+ ADVANCED_INPUT_DATA_HANDLING((short)8, "advancedInputDataHandling"),
+ ADVANCED_OUTPUT_DATA_HANDLING((short)9, "advancedOutputDataHandling"),
+ EXECUTION_STATUS((short)10, "executionStatus"),
+ JOB_DETAILS_LIST((short)11, "jobDetailsList"),
+ DATA_TRANSFER_DETAILS_LIST((short)12, "dataTransferDetailsList"),
+ ERRORS((short)13, "errors");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // TASK_ID
+ return TASK_ID;
+ case 2: // CREATION_TIME
+ return CREATION_TIME;
+ case 3: // APPLICATION_ID
+ return APPLICATION_ID;
+ case 4: // APPLICATION_VERSION
+ return APPLICATION_VERSION;
+ case 5: // APPLICATION_INPUTS
+ return APPLICATION_INPUTS;
+ case 6: // APPLICATION_OUTPUTS
+ return APPLICATION_OUTPUTS;
+ case 7: // EXECUTION_SCHEDULING
+ return EXECUTION_SCHEDULING;
+ case 8: // ADVANCED_INPUT_DATA_HANDLING
+ return ADVANCED_INPUT_DATA_HANDLING;
+ case 9: // ADVANCED_OUTPUT_DATA_HANDLING
+ return ADVANCED_OUTPUT_DATA_HANDLING;
+ case 10: // EXECUTION_STATUS
+ return EXECUTION_STATUS;
+ case 11: // JOB_DETAILS_LIST
+ return JOB_DETAILS_LIST;
+ case 12: // DATA_TRANSFER_DETAILS_LIST
+ return DATA_TRANSFER_DETAILS_LIST;
+ case 13: // ERRORS
+ return ERRORS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __CREATIONTIME_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.CREATION_TIME,_Fields.APPLICATION_ID,_Fields.APPLICATION_VERSION,_Fields.APPLICATION_INPUTS,_Fields.APPLICATION_OUTPUTS,_Fields.EXECUTION_SCHEDULING,_Fields.ADVANCED_INPUT_DATA_HANDLING,_Fields.ADVANCED_OUTPUT_DATA_HANDLING,_Fields.EXECUTION_STATUS,_Fields.JOB_DETAILS_LIST,_Fields.DATA_TRANSFER_DETAILS_LIST,_Fields.ERRORS};
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("taskID", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("creationTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.APPLICATION_ID, new org.apache.thrift.meta_data.FieldMetaData("applicationId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.APPLICATION_VERSION, new org.apache.thrift.meta_data.FieldMetaData("applicationVersion", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.APPLICATION_INPUTS, new org.apache.thrift.meta_data.FieldMetaData("applicationInputs", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DataObjectType.class))));
+ tmpMap.put(_Fields.APPLICATION_OUTPUTS, new org.apache.thrift.meta_data.FieldMetaData("applicationOutputs", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DataObjectType.class))));
+ tmpMap.put(_Fields.EXECUTION_SCHEDULING, new org.apache.thrift.meta_data.FieldMetaData("executionScheduling", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ComputationalResourceScheduling.class)));
+ tmpMap.put(_Fields.ADVANCED_INPUT_DATA_HANDLING, new org.apache.thrift.meta_data.FieldMetaData("advancedInputDataHandling", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AdvancedInputDataHandling.class)));
+ tmpMap.put(_Fields.ADVANCED_OUTPUT_DATA_HANDLING, new org.apache.thrift.meta_data.FieldMetaData("advancedOutputDataHandling", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AdvancedOutputDataHandling.class)));
+ tmpMap.put(_Fields.EXECUTION_STATUS, new org.apache.thrift.meta_data.FieldMetaData("executionStatus", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ExecutionStatus.class)));
+ tmpMap.put(_Fields.JOB_DETAILS_LIST, new org.apache.thrift.meta_data.FieldMetaData("jobDetailsList", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, JobDetails.class))));
+ tmpMap.put(_Fields.DATA_TRANSFER_DETAILS_LIST, new org.apache.thrift.meta_data.FieldMetaData("dataTransferDetailsList", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DataTransferDetails.class))));
+ tmpMap.put(_Fields.ERRORS, new org.apache.thrift.meta_data.FieldMetaData("errors", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ErrorDetails.class))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TaskDetails.class, metaDataMap);
+ }
+
+ public TaskDetails() {
+ }
+
+ public TaskDetails(
+ String taskID)
+ {
+ this();
+ this.taskID = taskID;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TaskDetails(TaskDetails other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetTaskID()) {
+ this.taskID = other.taskID;
+ }
+ this.creationTime = other.creationTime;
+ if (other.isSetApplicationId()) {
+ this.applicationId = other.applicationId;
+ }
+ if (other.isSetApplicationVersion()) {
+ this.applicationVersion = other.applicationVersion;
+ }
+ if (other.isSetApplicationInputs()) {
+ List<DataObjectType> __this__applicationInputs = new ArrayList<DataObjectType>(other.applicationInputs.size());
+ for (DataObjectType other_element : other.applicationInputs) {
+ __this__applicationInputs.add(new DataObjectType(other_element));
+ }
+ this.applicationInputs = __this__applicationInputs;
+ }
+ if (other.isSetApplicationOutputs()) {
+ List<DataObjectType> __this__applicationOutputs = new ArrayList<DataObjectType>(other.applicationOutputs.size());
+ for (DataObjectType other_element : other.applicationOutputs) {
+ __this__applicationOutputs.add(new DataObjectType(other_element));
+ }
+ this.applicationOutputs = __this__applicationOutputs;
+ }
+ if (other.isSetExecutionScheduling()) {
+ this.executionScheduling = new ComputationalResourceScheduling(other.executionScheduling);
+ }
+ if (other.isSetAdvancedInputDataHandling()) {
+ this.advancedInputDataHandling = new AdvancedInputDataHandling(other.advancedInputDataHandling);
+ }
+ if (other.isSetAdvancedOutputDataHandling()) {
+ this.advancedOutputDataHandling = new AdvancedOutputDataHandling(other.advancedOutputDataHandling);
+ }
+ if (other.isSetExecutionStatus()) {
+ this.executionStatus = new ExecutionStatus(other.executionStatus);
+ }
+ if (other.isSetJobDetailsList()) {
+ List<JobDetails> __this__jobDetailsList = new ArrayList<JobDetails>(other.jobDetailsList.size());
+ for (JobDetails other_element : other.jobDetailsList) {
+ __this__jobDetailsList.add(new JobDetails(other_element));
+ }
+ this.jobDetailsList = __this__jobDetailsList;
+ }
+ if (other.isSetDataTransferDetailsList()) {
+ List<DataTransferDetails> __this__dataTransferDetailsList = new ArrayList<DataTransferDetails>(other.dataTransferDetailsList.size());
+ for (DataTransferDetails other_element : other.dataTransferDetailsList) {
+ __this__dataTransferDetailsList.add(new DataTransferDetails(other_element));
+ }
+ this.dataTransferDetailsList = __this__dataTransferDetailsList;
+ }
+ if (other.isSetErrors()) {
+ List<ErrorDetails> __this__errors = new ArrayList<ErrorDetails>(other.errors.size());
+ for (ErrorDetails other_element : other.errors) {
+ __this__errors.add(new ErrorDetails(other_element));
+ }
+ this.errors = __this__errors;
+ }
+ }
+
+ public TaskDetails deepCopy() {
+ return new TaskDetails(this);
+ }
+
+ @Override
+ public void clear() {
+ this.taskID = null;
+ setCreationTimeIsSet(false);
+ this.creationTime = 0;
+ this.applicationId = null;
+ this.applicationVersion = null;
+ this.applicationInputs = null;
+ this.applicationOutputs = null;
+ this.executionScheduling = null;
+ this.advancedInputDataHandling = null;
+ this.advancedOutputDataHandling = null;
+ this.executionStatus = null;
+ this.jobDetailsList = null;
+ this.dataTransferDetailsList = null;
+ this.errors = null;
+ }
+
+ public String getTaskID() {
+ return this.taskID;
+ }
+
+ public void setTaskID(String taskID) {
+ this.taskID = taskID;
+ }
+
+ public void unsetTaskID() {
+ this.taskID = null;
+ }
+
+ /** Returns true if field taskID is set (has been assigned a value) and false otherwise */
+ public boolean isSetTaskID() {
+ return this.taskID != null;
+ }
+
+ public void setTaskIDIsSet(boolean value) {
+ if (!value) {
+ this.taskID = null;
+ }
+ }
+
+ public long getCreationTime() {
+ return this.creationTime;
+ }
+
+ public void setCreationTime(long creationTime) {
+ this.creationTime = creationTime;
+ setCreationTimeIsSet(true);
+ }
+
+ public void unsetCreationTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
+ }
+
+ /** Returns true if field creationTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreationTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
+ }
+
+ public void setCreationTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATIONTIME_ISSET_ID, value);
+ }
+
+ public String getApplicationId() {
+ return this.applicationId;
+ }
+
+ public void setApplicationId(String applicationId) {
+ this.applicationId = applicationId;
+ }
+
+ public void unsetApplicationId() {
+ this.applicationId = null;
+ }
+
+ /** Returns true if field applicationId is set (has been assigned a value) and false otherwise */
+ public boolean isSetApplicationId() {
+ return this.applicationId != null;
+ }
+
+ public void setApplicationIdIsSet(boolean value) {
+ if (!value) {
+ this.applicationId = null;
+ }
+ }
+
+ public String getApplicationVersion() {
+ return this.applicationVersion;
+ }
+
+ public void setApplicationVersion(String applicationVersion) {
+ this.applicationVersion = applicationVersion;
+ }
+
+ public void unsetApplicationVersion() {
+ this.applicationVersion = null;
+ }
+
+ /** Returns true if field applicationVersion is set (has been assigned a value) and false otherwise */
+ public boolean isSetApplicationVersion() {
+ return this.applicationVersion != null;
+ }
+
+ public void setApplicationVersionIsSet(boolean value) {
+ if (!value) {
+ this.applicationVersion = null;
+ }
+ }
+
+ public int getApplicationInputsSize() {
+ return (this.applicationInputs == null) ? 0 : this.applicationInputs.size();
+ }
+
+ public java.util.Iterator<DataObjectType> getApplicationInputsIterator() {
+ return (this.applicationInputs == null) ? null : this.applicationInputs.iterator();
+ }
+
+ public void addToApplicationInputs(DataObjectType elem) {
+ if (this.applicationInputs == null) {
+ this.applicationInputs = new ArrayList<DataObjectType>();
+ }
+ this.applicationInputs.add(elem);
+ }
+
+ public List<DataObjectType> getApplicationInputs() {
+ return this.applicationInputs;
+ }
+
+ public void setApplicationInputs(List<DataObjectType> applicationInputs) {
+ this.applicationInputs = applicationInputs;
+ }
+
+ public void unsetApplicationInputs() {
+ this.applicationInputs = null;
+ }
+
+ /** Returns true if field applicationInputs is set (has been assigned a value) and false otherwise */
+ public boolean isSetApplicationInputs() {
+ return this.applicationInputs != null;
+ }
+
+ public void setApplicationInputsIsSet(boolean value) {
+ if (!value) {
+ this.applicationInputs = null;
+ }
+ }
+
+ public int getApplicationOutputsSize() {
+ return (this.applicationOutputs == null) ? 0 : this.applicationOutputs.size();
+ }
+
+ public java.util.Iterator<DataObjectType> getApplicationOutputsIterator() {
+ return (this.applicationOutputs == null) ? null : this.applicationOutputs.iterator();
+ }
+
+ public void addToApplicationOutputs(DataObjectType elem) {
+ if (this.applicationOutputs == null) {
+ this.applicationOutputs = new ArrayList<DataObjectType>();
+ }
+ this.applicationOutputs.add(elem);
+ }
+
+ public List<DataObjectType> getApplicationOutputs() {
+ return this.applicationOutputs;
+ }
+
+ public void setApplicationOutputs(List<DataObjectType> applicationOutputs) {
+ this.applicationOutputs = applicationOutputs;
+ }
+
+ public void unsetApplicationOutputs() {
+ this.applicationOutputs = null;
+ }
+
+ /** Returns true if field applicationOutputs is set (has been assigned a value) and false otherwise */
+ public boolean isSetApplicationOutputs() {
+ return this.applicationOutputs != null;
+ }
+
+ public void setApplicationOutputsIsSet(boolean value) {
+ if (!value) {
+ this.applicationOutputs = null;
+ }
+ }
+
+ public ComputationalResourceScheduling getExecutionScheduling() {
+ return this.executionScheduling;
+ }
+
+ public void setExecutionScheduling(ComputationalResourceScheduling executionScheduling) {
+ this.executionScheduling = executionScheduling;
+ }
+
+ public void unsetExecutionScheduling() {
+ this.executionScheduling = null;
+ }
+
+ /** Returns true if field executionScheduling is set (has been assigned a value) and false otherwise */
+ public boolean isSetExecutionScheduling() {
+ return this.executionScheduling != null;
+ }
+
+ public void setExecutionSchedulingIsSet(boolean value) {
+ if (!value) {
+ this.executionScheduling = null;
+ }
+ }
+
+ public AdvancedInputDataHandling getAdvancedInputDataHandling() {
+ return this.advancedInputDataHandling;
+ }
+
+ public void setAdvancedInputDataHandling(AdvancedInputDataHandling advancedInputDataHandling) {
+ this.advancedInputDataHandling = advancedInputDataHandling;
+ }
+
+ public void unsetAdvancedInputDataHandling() {
+ this.advancedInputDataHandling = null;
+ }
+
+ /** Returns true if field advancedInputDataHandling is set (has been assigned a value) and false otherwise */
+ public boolean isSetAdvancedInputDataHandling() {
+ return this.advancedInputDataHandling != null;
+ }
+
+ public void setAdvancedInputDataHandlingIsSet(boolean value) {
+ if (!value) {
+ this.advancedInputDataHandling = null;
+ }
+ }
+
+ public AdvancedOutputDataHandling getAdvancedOutputDataHandling() {
+ return this.advancedOutputDataHandling;
+ }
+
+ public void setAdvancedOutputDataHandling(AdvancedOutputDataHandling advancedOutputDataHandling) {
+ this.advancedOutputDataHandling = advancedOutputDataHandling;
+ }
+
+ public void unsetAdvancedOutputDataHandling() {
+ this.advancedOutputDataHandling = null;
+ }
+
+ /** Returns true if field advancedOutputDataHandling is set (has been assigned a value) and false otherwise */
+ public boolean isSetAdvancedOutputDataHandling() {
+ return this.advancedOutputDataHandling != null;
+ }
+
+ public void setAdvancedOutputDataHandlingIsSet(boolean value) {
+ if (!value) {
+ this.advancedOutputDataHandling = null;
+ }
+ }
+
+ public ExecutionStatus getExecutionStatus() {
+ return this.executionStatus;
+ }
+
+ public void setExecutionStatus(ExecutionStatus executionStatus) {
+ this.executionStatus = executionStatus;
+ }
+
+ public void unsetExecutionStatus() {
+ this.executionStatus = null;
+ }
+
+ /** Returns true if field executionStatus is set (has been assigned a value) and false otherwise */
+ public boolean isSetExecutionStatus() {
+ return this.executionStatus != null;
+ }
+
+ public void setExecutionStatusIsSet(boolean value) {
+ if (!value) {
+ this.executionStatus = null;
+ }
+ }
+
+ public int getJobDetailsListSize() {
+ return (this.jobDetailsList == null) ? 0 : this.jobDetailsList.size();
+ }
+
+ public java.util.Iterator<JobDetails> getJobDetailsListIterator() {
+ return (this.jobDetailsList == null) ? null : this.jobDetailsList.iterator();
+ }
+
+ public void addToJobDetailsList(JobDetails elem) {
+ if (this.jobDetailsList == null) {
+ this.jobDetailsList = new ArrayList<JobDetails>();
+ }
+ this.jobDetailsList.add(elem);
+ }
+
+ public List<JobDetails> getJobDetailsList() {
+ return this.jobDetailsList;
+ }
+
+ public void setJobDetailsList(List<JobDetails> jobDetailsList) {
+ this.jobDetailsList = jobDetailsList;
+ }
+
+ public void unsetJobDetailsList() {
+ this.jobDetailsList = null;
+ }
+
+ /** Returns true if field jobDetailsList is set (has been assigned a value) and false otherwise */
+ public boolean isSetJobDetailsList() {
+ return this.jobDetailsList != null;
+ }
+
+ public void setJobDetailsListIsSet(boolean value) {
+ if (!value) {
+ this.jobDetailsList = null;
+ }
+ }
+
+ public int getDataTransferDetailsListSize() {
+ return (this.dataTransferDetailsList == null) ? 0 : this.dataTransferDetailsList.size();
+ }
+
+ public java.util.Iterator<DataTransferDetails> getDataTransferDetailsListIterator() {
+ return (this.dataTransferDetailsList == null) ? null : this.dataTransferDetailsList.iterator();
+ }
+
+ public void addToDataTransferDetailsList(DataTransferDetails elem) {
+ if (this.dataTransferDetailsList == null) {
+ this.dataTransferDetailsList = new ArrayList<DataTransferDetails>();
+ }
+ this.dataTransferDetailsList.add(elem);
+ }
+
+ public List<DataTransferDetails> getDataTransferDetailsList() {
+ return this.dataTransferDetailsList;
+ }
+
+ public void setDataTransferDetailsList(List<DataTransferDetails> dataTransferDetailsList) {
+ this.dataTransferDetailsList = dataTransferDetailsList;
+ }
+
+ public void unsetDataTransferDetailsList() {
+ this.dataTransferDetailsList = null;
+ }
+
+ /** Returns true if field dataTransferDetailsList is set (has been assigned a value) and false otherwise */
+ public boolean isSetDataTransferDetailsList() {
+ return this.dataTransferDetailsList != null;
+ }
+
+ public void setDataTransferDetailsListIsSet(boolean value) {
+ if (!value) {
+ this.dataTransferDetailsList = null;
+ }
+ }
+
+ public int getErrorsSize() {
+ return (this.errors == null) ? 0 : this.errors.size();
+ }
+
+ public java.util.Iterator<ErrorDetails> getErrorsIterator() {
+ return (this.errors == null) ? null : this.errors.iterator();
+ }
+
+ public void addToErrors(ErrorDetails elem) {
+ if (this.errors == null) {
+ this.errors = new ArrayList<ErrorDetails>();
+ }
+ this.errors.add(elem);
+ }
+
+ public List<ErrorDetails> getErrors() {
+ return this.errors;
+ }
+
+ public void setErrors(List<ErrorDetails> errors) {
+ this.errors = errors;
+ }
+
+ public void unsetErrors() {
+ this.errors = null;
+ }
+
+ /** Returns true if field errors is set (has been assigned a value) and false otherwise */
+ public boolean isSetErrors() {
+ return this.errors != null;
+ }
+
+ public void setErrorsIsSet(boolean value) {
+ if (!value) {
+ this.errors = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case TASK_ID:
+ if (value == null) {
+ unsetTaskID();
+ } else {
+ setTaskID((String)value);
+ }
+ break;
+
+ case CREATION_TIME:
+ if (value == null) {
+ unsetCreationTime();
+ } else {
+ setCreationTime((Long)value);
+ }
+ break;
+
+ case APPLICATION_ID:
+ if (value == null) {
+ unsetApplicationId();
+ } else {
+ setApplicationId((String)value);
+ }
+ break;
+
+ case APPLICATION_VERSION:
+ if (value == null) {
+ unsetApplicationVersion();
+ } else {
+ setApplicationVersion((String)value);
+ }
+ break;
+
+ case APPLICATION_INPUTS:
+ if (value == null) {
+ unsetApplicationInputs();
+ } else {
+ setApplicationInputs((List<DataObjectType>)value);
+ }
+ break;
+
+ case APPLICATION_OUTPUTS:
+ if (value == null) {
+ unsetApplicationOutputs();
+ } else {
+ setApplicationOutputs((List<DataObjectType>)value);
+ }
+ break;
+
+ case EXECUTION_SCHEDULING:
+ if (value == null) {
+ unsetExecutionScheduling();
+ } else {
+ setExecutionScheduling((ComputationalResourceScheduling)value);
+ }
+ break;
+
+ case ADVANCED_INPUT_DATA_HANDLING:
+ if (value == null) {
+ unsetAdvancedInputDataHandling();
+ } else {
+ setAdvancedInputDataHandling((AdvancedInputDataHandling)value);
+ }
+ break;
+
+ case ADVANCED_OUTPUT_DATA_HANDLING:
+ if (value == null) {
+ unsetAdvancedOutputDataHandling();
+ } else {
+ setAdvancedOutputDataHandling((AdvancedOutputDataHandling)value);
+ }
+ break;
+
+ case EXECUTION_STATUS:
+ if (value == null) {
+ unsetExecutionStatus();
+ } else {
+ setExecutionStatus((ExecutionStatus)value);
+ }
+ break;
+
+ case JOB_DETAILS_LIST:
+ if (value == null) {
+ unsetJobDetailsList();
+ } else {
+ setJobDetailsList((List<JobDetails>)value);
+ }
+ break;
+
+ case DATA_TRANSFER_DETAILS_LIST:
+ if (value == null) {
+ unsetDataTransferDetailsList();
+ } else {
+ setDataTransferDetailsList((List<DataTransferDetails>)value);
+ }
+ break;
+
+ case ERRORS:
+ if (value == null) {
+ unsetErrors();
+ } else {
+ setErrors((List<ErrorDetails>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TASK_ID:
+ return getTaskID();
+
+ case CREATION_TIME:
+ return Long.valueOf(getCreationTime());
+
+ case APPLICATION_ID:
+ return getApplicationId();
+
+ case APPLICATION_VERSION:
+ return getApplicationVersion();
+
+ case APPLICATION_INPUTS:
+ return getApplicationInputs();
+
+ case APPLICATION_OUTPUTS:
+ return getApplicationOutputs();
+
+ case EXECUTION_SCHEDULING:
+ return getExecutionScheduling();
+
+ case ADVANCED_INPUT_DATA_HANDLING:
+ return getAdvancedInputDataHandling();
+
+ case ADVANCED_OUTPUT_DATA_HANDLING:
+ return getAdvancedOutputDataHandling();
+
+ case EXECUTION_STATUS:
+ return getExecutionStatus();
+
+ case JOB_DETAILS_LIST:
+ return getJobDetailsList();
+
+ case DATA_TRANSFER_DETAILS_LIST:
+ return getDataTransferDetailsList();
+
+ case ERRORS:
+ return getErrors();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case TASK_ID:
+ return isSetTaskID();
+ case CREATION_TIME:
+ return isSetCreationTime();
+ case APPLICATION_ID:
+ return isSetApplicationId();
+ case APPLICATION_VERSION:
+ return isSetApplicationVersion();
+ case APPLICATION_INPUTS:
+ return isSetApplicationInputs();
+ case APPLICATION_OUTPUTS:
+ return isSetApplicationOutputs();
+ case EXECUTION_SCHEDULING:
+ return isSetExecutionScheduling();
+ case ADVANCED_INPUT_DATA_HANDLING:
+ return isSetAdvancedInputDataHandling();
+ case ADVANCED_OUTPUT_DATA_HANDLING:
+ return isSetAdvancedOutputDataHandling();
+ case EXECUTION_STATUS:
+ return isSetExecutionStatus();
+ case JOB_DETAILS_LIST:
+ return isSetJobDetailsList();
+ case DATA_TRANSFER_DETAILS_LIST:
+ return isSetDataTransferDetailsList();
+ case ERRORS:
+ return isSetErrors();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TaskDetails)
+ return this.equals((TaskDetails)that);
+ return false;
+ }
+
+ public boolean equals(TaskDetails that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_taskID = true && this.isSetTaskID();
+ boolean that_present_taskID = true && that.isSetTaskID();
+ if (this_present_taskID || that_present_taskID) {
+ if (!(this_present_taskID && that_present_taskID))
+ return false;
+ if (!this.taskID.equals(that.taskID))
+ return false;
+ }
+
+ boolean this_present_creationTime = true && this.isSetCreationTime();
+ boolean that_present_creationTime = true && that.isSetCreationTime();
+ if (this_present_creationTime || that_present_creationTime) {
+ if (!(this_present_creationTime && that_present_creationTime))
+ return false;
+ if (this.creationTime != that.creationTime)
+ return false;
+ }
+
+ boolean this_present_applicationId = true && this.isSetApplicationId();
+ boolean that_present_applicationId = true && that.isSetApplicationId();
+ if (this_present_applicationId || that_present_applicationId) {
+ if (!(this_present_applicationId && that_present_applicationId))
+ return false;
+ if (!this.applicationId.equals(that.applicationId))
+ return false;
+ }
+
+ boolean this_present_applicationVersion = true && this.isSetApplicationVersion();
+ boolean that_present_applicationVersion = true && that.isSetApplicationVersion();
+ if (this_present_applicationVersion || that_present_applicationVersion) {
+ if (!(this_present_applicationVersion && that_present_applicationVersion))
+ return false;
+ if (!this.applicationVersion.equals(that.applicationVersion))
+ return false;
+ }
+
+ boolean this_present_applicationInputs = true && this.isSetApplicationInputs();
+ boolean that_present_applicationInputs = true && that.isSetApplicationInputs();
+ if (this_present_applicationInputs || that_present_applicationInputs) {
+ if (!(this_present_applicationInputs && that_present_applicationInputs))
+ return false;
+ if (!this.applicationInputs.equals(that.applicationInputs))
+ return false;
+ }
+
+ boolean this_present_applicationOutputs = true && this.isSetApplicationOutputs();
+ boolean that_present_applicationOutputs = true && that.isSetApplicationOutputs();
+ if (this_present_applicationOutputs || that_present_applicationOutputs) {
+ if (!(this_present_applicationOutputs && that_present_applicationOutputs))
+ return false;
+ if (!this.applicationOutputs.equals(that.applicationOutputs))
+ return false;
+ }
+
+ boolean this_present_executionScheduling = true && this.isSetExecutionScheduling();
+ boolean that_present_executionScheduling = true && that.isSetExecutionScheduling();
+ if (this_present_executionScheduling || that_present_executionScheduling) {
+ if (!(this_present_executionScheduling && that_present_executionScheduling))
+ return false;
+ if (!this.executionScheduling.equals(that.executionScheduling))
+ return false;
+ }
+
+ boolean this_present_advancedInputDataHandling = true && this.isSetAdvancedInputDataHandling();
+ boolean that_present_advancedInputDataHandling = true && that.isSetAdvancedInputDataHandling();
+ if (this_present_advancedInputDataHandling || that_present_advancedInputDataHandling) {
+ if (!(this_present_advancedInputDataHandling && that_present_advancedInputDataHandling))
+ return false;
+ if (!this.advancedInputDataHandling.equals(that.advancedInputDataHandling))
+ return false;
+ }
+
+ boolean this_present_advancedOutputDataHandling = true && this.isSetAdvancedOutputDataHandling();
+ boolean that_present_advancedOutputDataHandling = true && that.isSetAdvancedOutputDataHandling();
+ if (this_present_advancedOutputDataHandling || that_present_advancedOutputDataHandling) {
+ if (!(this_present_advancedOutputDataHandling && that_present_advancedOutputDataHandling))
+ return false;
+ if (!this.advancedOutputDataHandling.equals(that.advancedOutputDataHandling))
+ return false;
+ }
+
+ boolean this_present_executionStatus = true && this.isSetExecutionStatus();
+ boolean that_present_executionStatus = true && that.isSetExecutionStatus();
+ if (this_present_executionStatus || that_present_executionStatus) {
+ if (!(this_present_executionStatus && that_present_executionStatus))
+ return false;
+ if (!this.executionStatus.equals(that.executionStatus))
+ return false;
+ }
+
+ boolean this_present_jobDetailsList = true && this.isSetJobDetailsList();
+ boolean that_present_jobDetailsList = true && that.isSetJobDetailsList();
+ if (this_present_jobDetailsList || that_present_jobDetailsList) {
+ if (!(this_present_jobDetailsList && that_present_jobDetailsList))
+ return false;
+ if (!this.jobDetailsList.equals(that.jobDetailsList))
+ return false;
+ }
+
+ boolean this_present_dataTransferDetailsList = true && this.isSetDataTransferDetailsList();
+ boolean that_present_dataTransferDetailsList = true && that.isSetDataTransferDetailsList();
+ if (this_present_dataTransferDetailsList || that_present_dataTransferDetailsList) {
+ if (!(this_present_dataTransferDetailsList && that_present_dataTransferDetailsList))
+ return false;
+ if (!this.dataTransferDetailsList.equals(that.dataTransferDetailsList))
+ return false;
+ }
+
+ boolean this_present_errors = true && this.isSetErrors();
+ boolean that_present_errors = true && that.isSetErrors();
+ if (this_present_errors || that_present_errors) {
+ if (!(this_present_errors && that_present_errors))
+ return false;
+ if (!this.errors.equals(that.errors))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(TaskDetails other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetTaskID()).compareTo(other.isSetTaskID());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTaskID()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskID, other.taskID);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreationTime()).compareTo(other.isSetCreationTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreationTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creationTime, other.creationTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetApplicationId()).compareTo(other.isSetApplicationId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetApplicationId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationId, other.applicationId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetApplicationVersion()).compareTo(other.isSetApplicationVersion());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetApplicationVersion()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationVersion, other.applicationVersion);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetApplicationInputs()).compareTo(other.isSetApplicationInputs());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetApplicationInputs()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationInputs, other.applicationInputs);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetApplicationOutputs()).compareTo(other.isSetApplicationOutputs());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetApplicationOutputs()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationOutputs, other.applicationOutputs);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetExecutionScheduling()).compareTo(other.isSetExecutionScheduling());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExecutionScheduling()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.executionScheduling, other.executionScheduling);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAdvancedInputDataHandling()).compareTo(other.isSetAdvancedInputDataHandling());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAdvancedInputDataHandling()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.advancedInputDataHandling, other.advancedInputDataHandling);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAdvancedOutputDataHandling()).compareTo(other.isSetAdvancedOutputDataHandling());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAdvancedOutputDataHandling()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.advancedOutputDataHandling, other.advancedOutputDataHandling);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetExecutionStatus()).compareTo(other.isSetExecutionStatus());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExecutionStatus()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.executionStatus, other.executionStatus);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetJobDetailsList()).compareTo(other.isSetJobDetailsList());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetJobDetailsList()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobDetailsList, other.jobDetailsList);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDataTransferDetailsList()).compareTo(other.isSetDataTransferDetailsList());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDataTransferDetailsList()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataTransferDetailsList, other.dataTransferDetailsList);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetErrors()).compareTo(other.isSetErrors());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetErrors()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errors, other.errors);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("TaskDetails(");
+ boolean first = true;
+
+ sb.append("taskID:");
+ if (this.taskID == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.taskID);
+ }
+ first = false;
+ if (isSetCreationTime()) {
+ if (!first) sb.append(", ");
+ sb.append("creationTime:");
+ sb.append(this.creationTime);
+ first = false;
+ }
+ if (isSetApplicationId()) {
+ if (!first) sb.append(", ");
+ sb.append("applicationId:");
+ if (this.applicationId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.applicationId);
+ }
+ first = false;
+ }
+ if (isSetApplicationVersion()) {
+ if (!first) sb.append(", ");
+ sb.append("applicationVersion:");
+ if (this.applicationVersion == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.applicationVersion);
+ }
+ first = false;
+ }
+ if (isSetApplicationInputs()) {
+ if (!first) sb.append(", ");
+ sb.append("applicationInputs:");
+ if (this.applicationInputs == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.applicationInputs);
+ }
+ first = false;
+ }
+ if (isSetApplicationOutputs()) {
+ if (!first) sb.append(", ");
+ sb.append("applicationOutputs:");
+ if (this.applicationOutputs == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.applicationOutputs);
+ }
+ first = false;
+ }
+ if (isSetExecutionScheduling()) {
+ if (!first) sb.append(", ");
+ sb.append("executionScheduling:");
+ if (this.executionScheduling == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.executionScheduling);
+ }
+ first = false;
+ }
+ if (isSetAdvancedInputDataHandling()) {
+ if (!first) sb.append(", ");
+ sb.append("advancedInputDataHandling:");
+ if (this.advancedInputDataHandling == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.advancedInputDataHandling);
+ }
+ first = false;
+ }
+ if (isSetAdvancedOutputDataHandling()) {
+ if (!first) sb.append(", ");
+ sb.append("advancedOutputDataHandling:");
+ if (this.advancedOutputDataHandling == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.advancedOutputDataHandling);
+ }
+ first = false;
+ }
+ if (isSetExecutionStatus()) {
+ if (!first) sb.append(", ");
+ sb.append("executionStatus:");
+ if (this.executionStatus == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.executionStatus);
+ }
+ first = false;
+ }
+ if (isSetJobDetailsList()) {
+ if (!first) sb.append(", ");
+ sb.append("jobDetailsList:");
+ if (this.jobDetailsList == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.jobDetailsList);
+ }
+ first = false;
+ }
+ if (isSetDataTransferDetailsList()) {
+ if (!first) sb.append(", ");
+ sb.append("dataTransferDetailsList:");
+ if (this.dataTransferDetailsList == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.dataTransferDetailsList);
+ }
+ first = false;
+ }
+ if (isSetErrors()) {
+ if (!first) sb.append(", ");
+ sb.append("errors:");
+ if (this.errors == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.errors);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetTaskID()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'taskID' is unset! Struct:" + toString());
+ }
+
+ // check for sub-struct validity
+ if (executionScheduling != null) {
+ executionScheduling.validate();
+ }
+ if (advancedInputDataHandling != null) {
+ advancedInputDataHandling.validate();
+ }
+ if (advancedOutputDataHandling != null) {
+ advancedOutputDataHandling.validate();
+ }
+ if (executionStatus != null) {
+ executionStatus.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class TaskDetailsStandardSchemeFactory implements SchemeFactory {
+ public TaskDetailsStandardScheme getScheme() {
+ return new TaskDetailsStandardScheme();
+ }
+ }
+
+ private static class TaskDetailsStandardScheme extends StandardScheme<TaskDetails> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TaskDetails struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // TASK_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.taskID = iprot.readString();
+ struct.setTaskIDIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // CREATION_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.creationTime = iprot.readI64();
+ struct.setCreationTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // APPLICATION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.applicationId = iprot.readString();
+ struct.setApplicationIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // APPLICATION_VERSION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.applicationVersion = iprot.readString();
+ struct.setApplicationVersionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // APPLICATION_INPUTS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
+ struct.applicationInputs = new ArrayList<DataObjectType>(_list16.size);
+ for (int _i17 = 0; _i17 < _list16.size; ++_i17)
+ {
+ DataObjectType _elem18;
+ _elem18 = new DataObjectType();
+ _elem18.read(iprot);
+ struct.applicationInputs.add(_elem18);
+ }
+ iprot.readListEnd();
+ }
+ struct.setApplicationInputsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // APPLICATION_OUTPUTS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list19 = iprot.readListBegin();
+ struct.applicationOutputs = new ArrayList<DataObjectType>(_list19.size);
+ for (int _i20 = 0; _i20 < _list19.size; ++_i20)
+ {
+ DataObjectType _elem21;
+ _elem21 = new DataObjectType();
+ _elem21.read(iprot);
+ struct.applicationOutputs.add(_elem21);
+ }
+ iprot.readListEnd();
+ }
+ struct.setApplicationOutputsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // EXECUTION_SCHEDULING
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.executionScheduling = new ComputationalResourceScheduling();
+ struct.executionScheduling.read(iprot);
+ struct.setExecutionSchedulingIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // ADVANCED_INPUT_DATA_HANDLING
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.advancedInputDataHandling = new AdvancedInputDataHandling();
+ struct.advancedInputDataHandling.read(iprot);
+ struct.setAdvancedInputDataHandlingIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 9: // ADVANCED_OUTPUT_DATA_HANDLING
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.advancedOutputDataHandling = new AdvancedOutputDataHandling();
+ struct.advancedOutputDataHandling.read(iprot);
+ struct.setAdvancedOutputDataHandlingIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 10: // EXECUTION_STATUS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.executionStatus = new ExecutionStatus();
+ struct.executionStatus.read(iprot);
+ struct.setExecutionStatusIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 11: // JOB_DETAILS_LIST
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list22 = iprot.readListBegin();
+ struct.jobDetailsList = new ArrayList<JobDetails>(_list22.size);
+ for (int _i23 = 0; _i23 < _list22.size; ++_i23)
+ {
+ JobDetails _elem24;
+ _elem24 = new JobDetails();
+ _elem24.read(iprot);
+ struct.jobDetailsList.add(_elem24);
+ }
+ iprot.readListEnd();
+ }
+ struct.setJobDetailsListIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 12: // DATA_TRANSFER_DETAILS_LIST
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list25 = iprot.readListBegin();
+ struct.dataTransferDetailsList = new ArrayList<DataTransferDetails>(_list25.size);
+ for (int _i26 = 0; _i26 < _list25.size; ++_i26)
+ {
+ DataTransferDetails _elem27;
+ _elem27 = new DataTransferDetails();
+ _elem27.read(iprot);
+ struct.dataTransferDetailsList.add(_elem27);
+ }
+ iprot.readListEnd();
+ }
+ struct.setDataTransferDetailsListIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 13: // ERRORS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list28 = iprot.readListBegin();
+ struct.errors = new ArrayList<ErrorDetails>(_list28.size);
+ for (int _i29 = 0; _i29 < _list28.size; ++_i29)
+ {
+ ErrorDetails _elem30;
+ _elem30 = new ErrorDetails();
+ _elem30.read(iprot);
+ struct.errors.add(_elem30);
+ }
+ iprot.readListEnd();
+ }
+ struct.setErrorsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, TaskDetails struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.taskID != null) {
+ oprot.writeFieldBegin(TASK_ID_FIELD_DESC);
+ oprot.writeString(struct.taskID);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetCreationTime()) {
+ oprot.writeFieldBegin(CREATION_TIME_FIELD_DESC);
+ oprot.writeI64(struct.creationTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.applicationId != null) {
+ if (struct.isSetApplicationId()) {
+ oprot.writeFieldBegin(APPLICATION_ID_FIELD_DESC);
+ oprot.writeString(struct.applicationId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.applicationVersion != null) {
+ if (struct.isSetApplicationVersion()) {
+ oprot.writeFieldBegin(APPLICATION_VERSION_FIELD_DESC);
+ oprot.writeString(struct.applicationVersion);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.applicationInputs != null) {
+ if (struct.isSetApplicationInputs()) {
+ oprot.writeFieldBegin(APPLICATION_INPUTS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.applicationInputs.size()));
+ for (DataObjectType _iter31 : struct.applicationInputs)
+ {
+ _iter31.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.applicationOutputs != null) {
+ if (struct.isSetApplicationOutputs()) {
+ oprot.writeFieldBegin(APPLICATION_OUTPUTS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.applicationOutputs.size()));
+ for (DataObjectType _iter32 : struct.applicationOutputs)
+ {
+ _iter32.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.executionScheduling != null) {
+ if (struct.isSetExecutionScheduling()) {
+ oprot.writeFieldBegin(EXECUTION_SCHEDULING_FIELD_DESC);
+ struct.executionScheduling.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.advancedInputDataHandling != null) {
+ if (struct.isSetAdvancedInputDataHandling()) {
+ oprot.writeFieldBegin(ADVANCED_INPUT_DATA_HANDLING_FIELD_DESC);
+ struct.advancedInputDataHandling.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.advancedOutputDataHandling != null) {
+ if (struct.isSetAdvancedOutputDataHandling()) {
+ oprot.writeFieldBegin(ADVANCED_OUTPUT_DATA_HANDLING_FIELD_DESC);
+ struct.advancedOutputDataHandling.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.executionStatus != null) {
+ if (struct.isSetExecutionStatus()) {
+ oprot.writeFieldBegin(EXECUTION_STATUS_FIELD_DESC);
+ struct.executionStatus.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.jobDetailsList != null) {
+ if (struct.isSetJobDetailsList()) {
+ oprot.writeFieldBegin(JOB_DETAILS_LIST_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.jobDetailsList.size()));
+ for (JobDetails _iter33 : struct.jobDetailsList)
+ {
+ _iter33.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.dataTransferDetailsList != null) {
+ if (struct.isSetDataTransferDetailsList()) {
+ oprot.writeFieldBegin(DATA_TRANSFER_DETAILS_LIST_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.dataTransferDetailsList.size()));
+ for (DataTransferDetails _iter34 : struct.dataTransferDetailsList)
+ {
+ _iter34.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.errors != null) {
+ if (struct.isSetErrors()) {
+ oprot.writeFieldBegin(ERRORS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.errors.size()));
+ for (ErrorDetails _iter35 : struct.errors)
+ {
+ _iter35.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TaskDetailsTupleSchemeFactory implements SchemeFactory {
+ public TaskDetailsTupleScheme getScheme() {
+ return new TaskDetailsTupleScheme();
+ }
+ }
+
+ private static class TaskDetailsTupleScheme extends TupleScheme<TaskDetails> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TaskDetails struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.taskID);
+ BitSet optionals = new BitSet();
+ if (struct.isSetCreationTime()) {
+ optionals.set(0);
+ }
+ if (struct.isSetApplicationId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetApplicationVersion()) {
+ optionals.set(2);
+ }
+ if (struct.isSetApplicationInputs()) {
+ optionals.set(3);
+ }
+ if (struct.isSetApplicationOutputs()) {
+ optionals.set(4);
+ }
+ if (struct.isSetExecutionScheduling()) {
+ optionals.set(5);
+ }
+ if (struct.isSetAdvancedInputDataHandling()) {
+ optionals.set(6);
+ }
+ if (struct.isSetAdvancedOutputDataHandling()) {
+ optionals.set(7);
+ }
+ if (struct.isSetExecutionStatus()) {
+ optionals.set(8);
+ }
+ if (struct.isSetJobDetailsList()) {
+ optionals.set(9);
+ }
+ if (struct.isSetDataTransferDetailsList()) {
+ optionals.set(10);
+ }
+ if (struct.isSetErrors()) {
+ optionals.set(11);
+ }
+ oprot.writeBitSet(optionals, 12);
+ if (struct.isSetCreationTime()) {
+ oprot.writeI64(struct.creationTime);
+ }
+ if (struct.isSetApplicationId()) {
+ oprot.writeString(struct.applicationId);
+ }
+ if (struct.isSetApplicationVersion()) {
+ oprot.writeString(struct.applicationVersion);
+ }
+ if (struct.isSetApplicationInputs()) {
+ {
+ oprot.writeI32(struct.applicationInputs.size());
+ for (DataObjectType _iter36 : struct.applicationInputs)
+ {
+ _iter36.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetApplicationOutputs()) {
+ {
+ oprot.writeI32(struct.applicationOutputs.size());
+ for (DataObjectType _iter37 : struct.applicationOutputs)
+ {
+ _iter37.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetExecutionScheduling()) {
+ struct.executionScheduling.write(oprot);
+ }
+ if (struct.isSetAdvancedInputDataHandling()) {
+ struct.advancedInputDataHandling.write(oprot);
+ }
+ if (struct.isSetAdvancedOutputDataHandling()) {
+ struct.advancedOutputDataHandling.write(oprot);
+ }
+ if (struct.isSetExecutionStatus()) {
+ struct.executionStatus.write(oprot);
+ }
+ if (struct.isSetJobDetailsList()) {
+ {
+ oprot.writeI32(struct.jobDetailsList.size());
+ for (JobDetails _iter38 : struct.jobDetailsList)
+ {
+ _iter38.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetDataTransferDetailsList()) {
+ {
+ oprot.writeI32(struct.dataTransferDetailsList.size());
+ for (DataTransferDetails _iter39 : struct.dataTransferDetailsList)
+ {
+ _iter39.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetErrors()) {
+ {
+ oprot.writeI32(struct.errors.size());
+ for (ErrorDetails _iter40 : struct.errors)
+ {
+ _iter40.write(oprot);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TaskDetails struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.taskID = iprot.readString();
+ struct.setTaskIDIsSet(true);
+ BitSet incoming = iprot.readBitSet(12);
+ if (incoming.get(0)) {
+ struct.creationTime = iprot.readI64();
+ struct.setCreationTimeIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.applicationId = iprot.readString();
+ struct.setApplicationIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.applicationVersion = iprot.readString();
+ struct.setApplicationVersionIsSet(true);
+ }
+ if (incoming.get(3)) {
+ {
+ org.apache.thrift.protocol.TList _list41 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.applicationInputs = new ArrayList<DataObjectType>(_list41.size);
+ for (int _i42 = 0; _i42 < _list41.size; ++_i42)
+ {
+ DataObjectType _elem43;
+ _elem43 = new DataObjectType();
+ _elem43.read(iprot);
+ struct.applicationInputs.add(_elem43);
+ }
+ }
+ struct.setApplicationInputsIsSet(true);
+ }
+ if (incoming.get(4)) {
+ {
+ org.apache.thrift.protocol.TList _list44 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.applicationOutputs = new ArrayList<DataObjectType>(_list44.size);
+ for (int _i45 = 0; _i45 < _list44.size; ++_i45)
+ {
+ DataObjectType _elem46;
+ _elem46 = new DataObjectType();
+ _elem46.read(iprot);
+ struct.applicationOutputs.add(_elem46);
+ }
+ }
+ struct.setApplicationOutputsIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.executionScheduling = new ComputationalResourceScheduling();
+ struct.executionScheduling.read(iprot);
+ struct.setExecutionSchedulingIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.advancedInputDataHandling = new AdvancedInputDataHandling();
+ struct.advancedInputDataHandling.read(iprot);
+ struct.setAdvancedInputDataHandlingIsSet(true);
+ }
+ if (incoming.get(7)) {
+ struct.advancedOutputDataHandling = new AdvancedOutputDataHandling();
+ struct.advancedOutputDataHandling.read(iprot);
+ struct.setAdvancedOutputDataHandlingIsSet(true);
+ }
+ if (incoming.get(8)) {
+ struct.executionStatus = new ExecutionStatus();
+ struct.executionStatus.read(iprot);
+ struct.setExecutionStatusIsSet(true);
+ }
+ if (incoming.get(9)) {
+ {
+ org.apache.thrift.protocol.TList _list47 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.jobDetailsList = new ArrayList<JobDetails>(_list47.size);
+ for (int _i48 = 0; _i48 < _list47.size; ++_i48)
+ {
+ JobDetails _elem49;
+ _elem49 = new JobDetails();
+ _elem49.read(iprot);
+ struct.jobDetailsList.add(_elem49);
+ }
+ }
+ struct.setJobDetailsListIsSet(true);
+ }
+ if (incoming.get(10)) {
+ {
+ org.apache.thrift.protocol.TList _list50 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.dataTransferDetailsList = new ArrayList<DataTransferDetails>(_list50.size);
+ for (int _i51 = 0; _i51 < _list50.size; ++_i51)
+ {
+ DataTransferDetails _elem52;
+ _elem52 = new DataTransferDetails();
+ _elem52.read(iprot);
+ struct.dataTransferDetailsList.add(_elem52);
+ }
+ }
+ struct.setDataTransferDetailsListIsSet(true);
+ }
+ if (incoming.get(11)) {
+ {
+ org.apache.thrift.protocol.TList _list53 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.errors = new ArrayList<ErrorDetails>(_list53.size);
+ for (int _i54 = 0; _i54 < _list53.size; ++_i54)
+ {
+ ErrorDetails _elem55;
+ _elem55 = new ErrorDetails();
+ _elem55.read(iprot);
+ struct.errors.add(_elem55);
+ }
+ }
+ struct.setErrorsIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/719cbf9e/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/TransferState.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/TransferState.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/TransferState.java
new file mode 100644
index 0000000..e7f5397
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/TransferState.java
@@ -0,0 +1,82 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+@SuppressWarnings("all") public enum TransferState implements org.apache.thrift.TEnum {
+ SUBMITTED(0),
+ QUEUED(1),
+ ACTIVE(2),
+ COMPLETE(3),
+ CANCELED(4),
+ FAILED(5),
+ HELD(6),
+ SUSPENDED(7),
+ UNKNOWN(8);
+
+ private final int value;
+
+ private TransferState(int value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the integer value of this enum value, as defined in the Thrift IDL.
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Find a the enum type by its integer value, as defined in the Thrift IDL.
+ * @return null if the value is not found.
+ */
+ public static TransferState findByValue(int value) {
+ switch (value) {
+ case 0:
+ return SUBMITTED;
+ case 1:
+ return QUEUED;
+ case 2:
+ return ACTIVE;
+ case 3:
+ return COMPLETE;
+ case 4:
+ return CANCELED;
+ case 5:
+ return FAILED;
+ case 6:
+ return HELD;
+ case 7:
+ return SUSPENDED;
+ case 8:
+ return UNKNOWN;
+ default:
+ return null;
+ }
+ }
+}
[7/8] Commiting the generated data-models for modified experiment
model. - AIRAVATA-1017
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/719cbf9e/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/DataObjectType.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/DataObjectType.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/DataObjectType.java
new file mode 100644
index 0000000..f35b231
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/DataObjectType.java
@@ -0,0 +1,706 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * A structure hold experiment input output
+ *
+ */
+@SuppressWarnings("all") public class DataObjectType implements org.apache.thrift.TBase<DataObjectType, DataObjectType._Fields>, java.io.Serializable, Cloneable, Comparable<DataObjectType> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DataObjectType");
+
+ private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField META_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("metaData", org.apache.thrift.protocol.TType.STRING, (short)4);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new DataObjectTypeStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new DataObjectTypeTupleSchemeFactory());
+ }
+
+ private String key; // required
+ private String value; // optional
+ private String type; // optional
+ private String metaData; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ KEY((short)1, "key"),
+ VALUE((short)2, "value"),
+ TYPE((short)3, "type"),
+ META_DATA((short)4, "metaData");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // KEY
+ return KEY;
+ case 2: // VALUE
+ return VALUE;
+ case 3: // TYPE
+ return TYPE;
+ case 4: // META_DATA
+ return META_DATA;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private _Fields optionals[] = {_Fields.VALUE,_Fields.TYPE,_Fields.META_DATA};
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.META_DATA, new org.apache.thrift.meta_data.FieldMetaData("metaData", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DataObjectType.class, metaDataMap);
+ }
+
+ public DataObjectType() {
+ }
+
+ public DataObjectType(
+ String key)
+ {
+ this();
+ this.key = key;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public DataObjectType(DataObjectType other) {
+ if (other.isSetKey()) {
+ this.key = other.key;
+ }
+ if (other.isSetValue()) {
+ this.value = other.value;
+ }
+ if (other.isSetType()) {
+ this.type = other.type;
+ }
+ if (other.isSetMetaData()) {
+ this.metaData = other.metaData;
+ }
+ }
+
+ public DataObjectType deepCopy() {
+ return new DataObjectType(this);
+ }
+
+ @Override
+ public void clear() {
+ this.key = null;
+ this.value = null;
+ this.type = null;
+ this.metaData = null;
+ }
+
+ public String getKey() {
+ return this.key;
+ }
+
+ public void setKey(String key) {
+ this.key = key;
+ }
+
+ public void unsetKey() {
+ this.key = null;
+ }
+
+ /** Returns true if field key is set (has been assigned a value) and false otherwise */
+ public boolean isSetKey() {
+ return this.key != null;
+ }
+
+ public void setKeyIsSet(boolean value) {
+ if (!value) {
+ this.key = null;
+ }
+ }
+
+ public String getValue() {
+ return this.value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public void unsetValue() {
+ this.value = null;
+ }
+
+ /** Returns true if field value is set (has been assigned a value) and false otherwise */
+ public boolean isSetValue() {
+ return this.value != null;
+ }
+
+ public void setValueIsSet(boolean value) {
+ if (!value) {
+ this.value = null;
+ }
+ }
+
+ public String getType() {
+ return this.type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public void unsetType() {
+ this.type = null;
+ }
+
+ /** Returns true if field type is set (has been assigned a value) and false otherwise */
+ public boolean isSetType() {
+ return this.type != null;
+ }
+
+ public void setTypeIsSet(boolean value) {
+ if (!value) {
+ this.type = null;
+ }
+ }
+
+ public String getMetaData() {
+ return this.metaData;
+ }
+
+ public void setMetaData(String metaData) {
+ this.metaData = metaData;
+ }
+
+ public void unsetMetaData() {
+ this.metaData = null;
+ }
+
+ /** Returns true if field metaData is set (has been assigned a value) and false otherwise */
+ public boolean isSetMetaData() {
+ return this.metaData != null;
+ }
+
+ public void setMetaDataIsSet(boolean value) {
+ if (!value) {
+ this.metaData = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case KEY:
+ if (value == null) {
+ unsetKey();
+ } else {
+ setKey((String)value);
+ }
+ break;
+
+ case VALUE:
+ if (value == null) {
+ unsetValue();
+ } else {
+ setValue((String)value);
+ }
+ break;
+
+ case TYPE:
+ if (value == null) {
+ unsetType();
+ } else {
+ setType((String)value);
+ }
+ break;
+
+ case META_DATA:
+ if (value == null) {
+ unsetMetaData();
+ } else {
+ setMetaData((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case KEY:
+ return getKey();
+
+ case VALUE:
+ return getValue();
+
+ case TYPE:
+ return getType();
+
+ case META_DATA:
+ return getMetaData();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case KEY:
+ return isSetKey();
+ case VALUE:
+ return isSetValue();
+ case TYPE:
+ return isSetType();
+ case META_DATA:
+ return isSetMetaData();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof DataObjectType)
+ return this.equals((DataObjectType)that);
+ return false;
+ }
+
+ public boolean equals(DataObjectType that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_key = true && this.isSetKey();
+ boolean that_present_key = true && that.isSetKey();
+ if (this_present_key || that_present_key) {
+ if (!(this_present_key && that_present_key))
+ return false;
+ if (!this.key.equals(that.key))
+ return false;
+ }
+
+ boolean this_present_value = true && this.isSetValue();
+ boolean that_present_value = true && that.isSetValue();
+ if (this_present_value || that_present_value) {
+ if (!(this_present_value && that_present_value))
+ return false;
+ if (!this.value.equals(that.value))
+ return false;
+ }
+
+ boolean this_present_type = true && this.isSetType();
+ boolean that_present_type = true && that.isSetType();
+ if (this_present_type || that_present_type) {
+ if (!(this_present_type && that_present_type))
+ return false;
+ if (!this.type.equals(that.type))
+ return false;
+ }
+
+ boolean this_present_metaData = true && this.isSetMetaData();
+ boolean that_present_metaData = true && that.isSetMetaData();
+ if (this_present_metaData || that_present_metaData) {
+ if (!(this_present_metaData && that_present_metaData))
+ return false;
+ if (!this.metaData.equals(that.metaData))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(DataObjectType other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetKey()).compareTo(other.isSetKey());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetKey()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, other.key);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetValue()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetType()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMetaData()).compareTo(other.isSetMetaData());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMetaData()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metaData, other.metaData);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("DataObjectType(");
+ boolean first = true;
+
+ sb.append("key:");
+ if (this.key == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.key);
+ }
+ first = false;
+ if (isSetValue()) {
+ if (!first) sb.append(", ");
+ sb.append("value:");
+ if (this.value == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.value);
+ }
+ first = false;
+ }
+ if (isSetType()) {
+ if (!first) sb.append(", ");
+ sb.append("type:");
+ if (this.type == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.type);
+ }
+ first = false;
+ }
+ if (isSetMetaData()) {
+ if (!first) sb.append(", ");
+ sb.append("metaData:");
+ if (this.metaData == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.metaData);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetKey()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'key' is unset! Struct:" + toString());
+ }
+
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class DataObjectTypeStandardSchemeFactory implements SchemeFactory {
+ public DataObjectTypeStandardScheme getScheme() {
+ return new DataObjectTypeStandardScheme();
+ }
+ }
+
+ private static class DataObjectTypeStandardScheme extends StandardScheme<DataObjectType> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, DataObjectType struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // KEY
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.key = iprot.readString();
+ struct.setKeyIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // VALUE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.value = iprot.readString();
+ struct.setValueIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // TYPE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.type = iprot.readString();
+ struct.setTypeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // META_DATA
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.metaData = iprot.readString();
+ struct.setMetaDataIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, DataObjectType struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.key != null) {
+ oprot.writeFieldBegin(KEY_FIELD_DESC);
+ oprot.writeString(struct.key);
+ oprot.writeFieldEnd();
+ }
+ if (struct.value != null) {
+ if (struct.isSetValue()) {
+ oprot.writeFieldBegin(VALUE_FIELD_DESC);
+ oprot.writeString(struct.value);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.type != null) {
+ if (struct.isSetType()) {
+ oprot.writeFieldBegin(TYPE_FIELD_DESC);
+ oprot.writeString(struct.type);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.metaData != null) {
+ if (struct.isSetMetaData()) {
+ oprot.writeFieldBegin(META_DATA_FIELD_DESC);
+ oprot.writeString(struct.metaData);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class DataObjectTypeTupleSchemeFactory implements SchemeFactory {
+ public DataObjectTypeTupleScheme getScheme() {
+ return new DataObjectTypeTupleScheme();
+ }
+ }
+
+ private static class DataObjectTypeTupleScheme extends TupleScheme<DataObjectType> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, DataObjectType struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.key);
+ BitSet optionals = new BitSet();
+ if (struct.isSetValue()) {
+ optionals.set(0);
+ }
+ if (struct.isSetType()) {
+ optionals.set(1);
+ }
+ if (struct.isSetMetaData()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetValue()) {
+ oprot.writeString(struct.value);
+ }
+ if (struct.isSetType()) {
+ oprot.writeString(struct.type);
+ }
+ if (struct.isSetMetaData()) {
+ oprot.writeString(struct.metaData);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, DataObjectType struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.key = iprot.readString();
+ struct.setKeyIsSet(true);
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.value = iprot.readString();
+ struct.setValueIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.type = iprot.readString();
+ struct.setTypeIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.metaData = iprot.readString();
+ struct.setMetaDataIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/719cbf9e/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/DataTransferDetails.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/DataTransferDetails.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/DataTransferDetails.java
new file mode 100644
index 0000000..178ab19
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/DataTransferDetails.java
@@ -0,0 +1,699 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("all") public class DataTransferDetails implements org.apache.thrift.TBase<DataTransferDetails, DataTransferDetails._Fields>, java.io.Serializable, Cloneable, Comparable<DataTransferDetails> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DataTransferDetails");
+
+ private static final org.apache.thrift.protocol.TField TRANSFER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transferID", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTime", org.apache.thrift.protocol.TType.I64, (short)2);
+ private static final org.apache.thrift.protocol.TField TRANSFER_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("transferDescription", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField TRANSFER_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("transferStatus", org.apache.thrift.protocol.TType.STRUCT, (short)4);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new DataTransferDetailsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new DataTransferDetailsTupleSchemeFactory());
+ }
+
+ private String transferID; // required
+ private long creationTime; // optional
+ private String transferDescription; // required
+ private TransferStatus transferStatus; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ TRANSFER_ID((short)1, "transferID"),
+ CREATION_TIME((short)2, "creationTime"),
+ TRANSFER_DESCRIPTION((short)3, "transferDescription"),
+ TRANSFER_STATUS((short)4, "transferStatus");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // TRANSFER_ID
+ return TRANSFER_ID;
+ case 2: // CREATION_TIME
+ return CREATION_TIME;
+ case 3: // TRANSFER_DESCRIPTION
+ return TRANSFER_DESCRIPTION;
+ case 4: // TRANSFER_STATUS
+ return TRANSFER_STATUS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __CREATIONTIME_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.CREATION_TIME,_Fields.TRANSFER_STATUS};
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.TRANSFER_ID, new org.apache.thrift.meta_data.FieldMetaData("transferID", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("creationTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.TRANSFER_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("transferDescription", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.TRANSFER_STATUS, new org.apache.thrift.meta_data.FieldMetaData("transferStatus", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TransferStatus.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DataTransferDetails.class, metaDataMap);
+ }
+
+ public DataTransferDetails() {
+ }
+
+ public DataTransferDetails(
+ String transferID,
+ String transferDescription)
+ {
+ this();
+ this.transferID = transferID;
+ this.transferDescription = transferDescription;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public DataTransferDetails(DataTransferDetails other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetTransferID()) {
+ this.transferID = other.transferID;
+ }
+ this.creationTime = other.creationTime;
+ if (other.isSetTransferDescription()) {
+ this.transferDescription = other.transferDescription;
+ }
+ if (other.isSetTransferStatus()) {
+ this.transferStatus = new TransferStatus(other.transferStatus);
+ }
+ }
+
+ public DataTransferDetails deepCopy() {
+ return new DataTransferDetails(this);
+ }
+
+ @Override
+ public void clear() {
+ this.transferID = null;
+ setCreationTimeIsSet(false);
+ this.creationTime = 0;
+ this.transferDescription = null;
+ this.transferStatus = null;
+ }
+
+ public String getTransferID() {
+ return this.transferID;
+ }
+
+ public void setTransferID(String transferID) {
+ this.transferID = transferID;
+ }
+
+ public void unsetTransferID() {
+ this.transferID = null;
+ }
+
+ /** Returns true if field transferID is set (has been assigned a value) and false otherwise */
+ public boolean isSetTransferID() {
+ return this.transferID != null;
+ }
+
+ public void setTransferIDIsSet(boolean value) {
+ if (!value) {
+ this.transferID = null;
+ }
+ }
+
+ public long getCreationTime() {
+ return this.creationTime;
+ }
+
+ public void setCreationTime(long creationTime) {
+ this.creationTime = creationTime;
+ setCreationTimeIsSet(true);
+ }
+
+ public void unsetCreationTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
+ }
+
+ /** Returns true if field creationTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreationTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
+ }
+
+ public void setCreationTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATIONTIME_ISSET_ID, value);
+ }
+
+ public String getTransferDescription() {
+ return this.transferDescription;
+ }
+
+ public void setTransferDescription(String transferDescription) {
+ this.transferDescription = transferDescription;
+ }
+
+ public void unsetTransferDescription() {
+ this.transferDescription = null;
+ }
+
+ /** Returns true if field transferDescription is set (has been assigned a value) and false otherwise */
+ public boolean isSetTransferDescription() {
+ return this.transferDescription != null;
+ }
+
+ public void setTransferDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.transferDescription = null;
+ }
+ }
+
+ public TransferStatus getTransferStatus() {
+ return this.transferStatus;
+ }
+
+ public void setTransferStatus(TransferStatus transferStatus) {
+ this.transferStatus = transferStatus;
+ }
+
+ public void unsetTransferStatus() {
+ this.transferStatus = null;
+ }
+
+ /** Returns true if field transferStatus is set (has been assigned a value) and false otherwise */
+ public boolean isSetTransferStatus() {
+ return this.transferStatus != null;
+ }
+
+ public void setTransferStatusIsSet(boolean value) {
+ if (!value) {
+ this.transferStatus = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case TRANSFER_ID:
+ if (value == null) {
+ unsetTransferID();
+ } else {
+ setTransferID((String)value);
+ }
+ break;
+
+ case CREATION_TIME:
+ if (value == null) {
+ unsetCreationTime();
+ } else {
+ setCreationTime((Long)value);
+ }
+ break;
+
+ case TRANSFER_DESCRIPTION:
+ if (value == null) {
+ unsetTransferDescription();
+ } else {
+ setTransferDescription((String)value);
+ }
+ break;
+
+ case TRANSFER_STATUS:
+ if (value == null) {
+ unsetTransferStatus();
+ } else {
+ setTransferStatus((TransferStatus)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TRANSFER_ID:
+ return getTransferID();
+
+ case CREATION_TIME:
+ return Long.valueOf(getCreationTime());
+
+ case TRANSFER_DESCRIPTION:
+ return getTransferDescription();
+
+ case TRANSFER_STATUS:
+ return getTransferStatus();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case TRANSFER_ID:
+ return isSetTransferID();
+ case CREATION_TIME:
+ return isSetCreationTime();
+ case TRANSFER_DESCRIPTION:
+ return isSetTransferDescription();
+ case TRANSFER_STATUS:
+ return isSetTransferStatus();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof DataTransferDetails)
+ return this.equals((DataTransferDetails)that);
+ return false;
+ }
+
+ public boolean equals(DataTransferDetails that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_transferID = true && this.isSetTransferID();
+ boolean that_present_transferID = true && that.isSetTransferID();
+ if (this_present_transferID || that_present_transferID) {
+ if (!(this_present_transferID && that_present_transferID))
+ return false;
+ if (!this.transferID.equals(that.transferID))
+ return false;
+ }
+
+ boolean this_present_creationTime = true && this.isSetCreationTime();
+ boolean that_present_creationTime = true && that.isSetCreationTime();
+ if (this_present_creationTime || that_present_creationTime) {
+ if (!(this_present_creationTime && that_present_creationTime))
+ return false;
+ if (this.creationTime != that.creationTime)
+ return false;
+ }
+
+ boolean this_present_transferDescription = true && this.isSetTransferDescription();
+ boolean that_present_transferDescription = true && that.isSetTransferDescription();
+ if (this_present_transferDescription || that_present_transferDescription) {
+ if (!(this_present_transferDescription && that_present_transferDescription))
+ return false;
+ if (!this.transferDescription.equals(that.transferDescription))
+ return false;
+ }
+
+ boolean this_present_transferStatus = true && this.isSetTransferStatus();
+ boolean that_present_transferStatus = true && that.isSetTransferStatus();
+ if (this_present_transferStatus || that_present_transferStatus) {
+ if (!(this_present_transferStatus && that_present_transferStatus))
+ return false;
+ if (!this.transferStatus.equals(that.transferStatus))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(DataTransferDetails other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetTransferID()).compareTo(other.isSetTransferID());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTransferID()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transferID, other.transferID);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreationTime()).compareTo(other.isSetCreationTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreationTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creationTime, other.creationTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTransferDescription()).compareTo(other.isSetTransferDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTransferDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transferDescription, other.transferDescription);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTransferStatus()).compareTo(other.isSetTransferStatus());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTransferStatus()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transferStatus, other.transferStatus);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("DataTransferDetails(");
+ boolean first = true;
+
+ sb.append("transferID:");
+ if (this.transferID == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.transferID);
+ }
+ first = false;
+ if (isSetCreationTime()) {
+ if (!first) sb.append(", ");
+ sb.append("creationTime:");
+ sb.append(this.creationTime);
+ first = false;
+ }
+ if (!first) sb.append(", ");
+ sb.append("transferDescription:");
+ if (this.transferDescription == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.transferDescription);
+ }
+ first = false;
+ if (isSetTransferStatus()) {
+ if (!first) sb.append(", ");
+ sb.append("transferStatus:");
+ if (this.transferStatus == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.transferStatus);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetTransferID()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'transferID' is unset! Struct:" + toString());
+ }
+
+ if (!isSetTransferDescription()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'transferDescription' is unset! Struct:" + toString());
+ }
+
+ // check for sub-struct validity
+ if (transferStatus != null) {
+ transferStatus.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class DataTransferDetailsStandardSchemeFactory implements SchemeFactory {
+ public DataTransferDetailsStandardScheme getScheme() {
+ return new DataTransferDetailsStandardScheme();
+ }
+ }
+
+ private static class DataTransferDetailsStandardScheme extends StandardScheme<DataTransferDetails> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, DataTransferDetails struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // TRANSFER_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.transferID = iprot.readString();
+ struct.setTransferIDIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // CREATION_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.creationTime = iprot.readI64();
+ struct.setCreationTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // TRANSFER_DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.transferDescription = iprot.readString();
+ struct.setTransferDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // TRANSFER_STATUS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.transferStatus = new TransferStatus();
+ struct.transferStatus.read(iprot);
+ struct.setTransferStatusIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, DataTransferDetails struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.transferID != null) {
+ oprot.writeFieldBegin(TRANSFER_ID_FIELD_DESC);
+ oprot.writeString(struct.transferID);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetCreationTime()) {
+ oprot.writeFieldBegin(CREATION_TIME_FIELD_DESC);
+ oprot.writeI64(struct.creationTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.transferDescription != null) {
+ oprot.writeFieldBegin(TRANSFER_DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.transferDescription);
+ oprot.writeFieldEnd();
+ }
+ if (struct.transferStatus != null) {
+ if (struct.isSetTransferStatus()) {
+ oprot.writeFieldBegin(TRANSFER_STATUS_FIELD_DESC);
+ struct.transferStatus.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class DataTransferDetailsTupleSchemeFactory implements SchemeFactory {
+ public DataTransferDetailsTupleScheme getScheme() {
+ return new DataTransferDetailsTupleScheme();
+ }
+ }
+
+ private static class DataTransferDetailsTupleScheme extends TupleScheme<DataTransferDetails> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, DataTransferDetails struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.transferID);
+ oprot.writeString(struct.transferDescription);
+ BitSet optionals = new BitSet();
+ if (struct.isSetCreationTime()) {
+ optionals.set(0);
+ }
+ if (struct.isSetTransferStatus()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetCreationTime()) {
+ oprot.writeI64(struct.creationTime);
+ }
+ if (struct.isSetTransferStatus()) {
+ struct.transferStatus.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, DataTransferDetails struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.transferID = iprot.readString();
+ struct.setTransferIDIsSet(true);
+ struct.transferDescription = iprot.readString();
+ struct.setTransferDescriptionIsSet(true);
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.creationTime = iprot.readI64();
+ struct.setCreationTimeIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.transferStatus = new TransferStatus();
+ struct.transferStatus.read(iprot);
+ struct.setTransferStatusIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/719cbf9e/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ErrorCategory.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ErrorCategory.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ErrorCategory.java
new file mode 100644
index 0000000..800926e
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ErrorCategory.java
@@ -0,0 +1,79 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+@SuppressWarnings("all") public enum ErrorCategory implements org.apache.thrift.TEnum {
+ FILE_SYSTEM_FAILURE(0),
+ APPLICATION_FAILURE(1),
+ RESOURCE_NODE_FAILURE(2),
+ DISK_FULL(3),
+ INSUFFICIENT_ALLOCATION(4),
+ SYSTEM_MAINTENANCE(5),
+ AIRAVATA_INTERNAL_ERROR(6),
+ CANNOT_BE_DETERMINED(7);
+
+ private final int value;
+
+ private ErrorCategory(int value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the integer value of this enum value, as defined in the Thrift IDL.
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Find a the enum type by its integer value, as defined in the Thrift IDL.
+ * @return null if the value is not found.
+ */
+ public static ErrorCategory findByValue(int value) {
+ switch (value) {
+ case 0:
+ return FILE_SYSTEM_FAILURE;
+ case 1:
+ return APPLICATION_FAILURE;
+ case 2:
+ return RESOURCE_NODE_FAILURE;
+ case 3:
+ return DISK_FULL;
+ case 4:
+ return INSUFFICIENT_ALLOCATION;
+ case 5:
+ return SYSTEM_MAINTENANCE;
+ case 6:
+ return AIRAVATA_INTERNAL_ERROR;
+ case 7:
+ return CANNOT_BE_DETERMINED;
+ default:
+ return null;
+ }
+ }
+}
[2/8] Commiting the generated data-models for modified experiment
model. - AIRAVATA-1017
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/719cbf9e/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/TransferStatus.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/TransferStatus.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/TransferStatus.java
new file mode 100644
index 0000000..c21803f
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/TransferStatus.java
@@ -0,0 +1,509 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("all") public class TransferStatus implements org.apache.thrift.TBase<TransferStatus, TransferStatus._Fields>, java.io.Serializable, Cloneable, Comparable<TransferStatus> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TransferStatus");
+
+ private static final org.apache.thrift.protocol.TField TRANSFER_STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("transferState", org.apache.thrift.protocol.TType.I32, (short)1);
+ private static final org.apache.thrift.protocol.TField TIME_OF_STATE_CHANGE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeOfStateChange", org.apache.thrift.protocol.TType.I64, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TransferStatusStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TransferStatusTupleSchemeFactory());
+ }
+
+ private TransferState transferState; // required
+ private long timeOfStateChange; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ /**
+ *
+ * @see TransferState
+ */
+ TRANSFER_STATE((short)1, "transferState"),
+ TIME_OF_STATE_CHANGE((short)2, "timeOfStateChange");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // TRANSFER_STATE
+ return TRANSFER_STATE;
+ case 2: // TIME_OF_STATE_CHANGE
+ return TIME_OF_STATE_CHANGE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __TIMEOFSTATECHANGE_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.TIME_OF_STATE_CHANGE};
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.TRANSFER_STATE, new org.apache.thrift.meta_data.FieldMetaData("transferState", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TransferState.class)));
+ tmpMap.put(_Fields.TIME_OF_STATE_CHANGE, new org.apache.thrift.meta_data.FieldMetaData("timeOfStateChange", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TransferStatus.class, metaDataMap);
+ }
+
+ public TransferStatus() {
+ }
+
+ public TransferStatus(
+ TransferState transferState)
+ {
+ this();
+ this.transferState = transferState;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TransferStatus(TransferStatus other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetTransferState()) {
+ this.transferState = other.transferState;
+ }
+ this.timeOfStateChange = other.timeOfStateChange;
+ }
+
+ public TransferStatus deepCopy() {
+ return new TransferStatus(this);
+ }
+
+ @Override
+ public void clear() {
+ this.transferState = null;
+ setTimeOfStateChangeIsSet(false);
+ this.timeOfStateChange = 0;
+ }
+
+ /**
+ *
+ * @see TransferState
+ */
+ public TransferState getTransferState() {
+ return this.transferState;
+ }
+
+ /**
+ *
+ * @see TransferState
+ */
+ public void setTransferState(TransferState transferState) {
+ this.transferState = transferState;
+ }
+
+ public void unsetTransferState() {
+ this.transferState = null;
+ }
+
+ /** Returns true if field transferState is set (has been assigned a value) and false otherwise */
+ public boolean isSetTransferState() {
+ return this.transferState != null;
+ }
+
+ public void setTransferStateIsSet(boolean value) {
+ if (!value) {
+ this.transferState = null;
+ }
+ }
+
+ public long getTimeOfStateChange() {
+ return this.timeOfStateChange;
+ }
+
+ public void setTimeOfStateChange(long timeOfStateChange) {
+ this.timeOfStateChange = timeOfStateChange;
+ setTimeOfStateChangeIsSet(true);
+ }
+
+ public void unsetTimeOfStateChange() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID);
+ }
+
+ /** Returns true if field timeOfStateChange is set (has been assigned a value) and false otherwise */
+ public boolean isSetTimeOfStateChange() {
+ return EncodingUtils.testBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID);
+ }
+
+ public void setTimeOfStateChangeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case TRANSFER_STATE:
+ if (value == null) {
+ unsetTransferState();
+ } else {
+ setTransferState((TransferState)value);
+ }
+ break;
+
+ case TIME_OF_STATE_CHANGE:
+ if (value == null) {
+ unsetTimeOfStateChange();
+ } else {
+ setTimeOfStateChange((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TRANSFER_STATE:
+ return getTransferState();
+
+ case TIME_OF_STATE_CHANGE:
+ return Long.valueOf(getTimeOfStateChange());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case TRANSFER_STATE:
+ return isSetTransferState();
+ case TIME_OF_STATE_CHANGE:
+ return isSetTimeOfStateChange();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TransferStatus)
+ return this.equals((TransferStatus)that);
+ return false;
+ }
+
+ public boolean equals(TransferStatus that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_transferState = true && this.isSetTransferState();
+ boolean that_present_transferState = true && that.isSetTransferState();
+ if (this_present_transferState || that_present_transferState) {
+ if (!(this_present_transferState && that_present_transferState))
+ return false;
+ if (!this.transferState.equals(that.transferState))
+ return false;
+ }
+
+ boolean this_present_timeOfStateChange = true && this.isSetTimeOfStateChange();
+ boolean that_present_timeOfStateChange = true && that.isSetTimeOfStateChange();
+ if (this_present_timeOfStateChange || that_present_timeOfStateChange) {
+ if (!(this_present_timeOfStateChange && that_present_timeOfStateChange))
+ return false;
+ if (this.timeOfStateChange != that.timeOfStateChange)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(TransferStatus other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetTransferState()).compareTo(other.isSetTransferState());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTransferState()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transferState, other.transferState);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTimeOfStateChange()).compareTo(other.isSetTimeOfStateChange());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTimeOfStateChange()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeOfStateChange, other.timeOfStateChange);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("TransferStatus(");
+ boolean first = true;
+
+ sb.append("transferState:");
+ if (this.transferState == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.transferState);
+ }
+ first = false;
+ if (isSetTimeOfStateChange()) {
+ if (!first) sb.append(", ");
+ sb.append("timeOfStateChange:");
+ sb.append(this.timeOfStateChange);
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetTransferState()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'transferState' is unset! Struct:" + toString());
+ }
+
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class TransferStatusStandardSchemeFactory implements SchemeFactory {
+ public TransferStatusStandardScheme getScheme() {
+ return new TransferStatusStandardScheme();
+ }
+ }
+
+ private static class TransferStatusStandardScheme extends StandardScheme<TransferStatus> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TransferStatus struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // TRANSFER_STATE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.transferState = TransferState.findByValue(iprot.readI32());
+ struct.setTransferStateIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // TIME_OF_STATE_CHANGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.timeOfStateChange = iprot.readI64();
+ struct.setTimeOfStateChangeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, TransferStatus struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.transferState != null) {
+ oprot.writeFieldBegin(TRANSFER_STATE_FIELD_DESC);
+ oprot.writeI32(struct.transferState.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetTimeOfStateChange()) {
+ oprot.writeFieldBegin(TIME_OF_STATE_CHANGE_FIELD_DESC);
+ oprot.writeI64(struct.timeOfStateChange);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TransferStatusTupleSchemeFactory implements SchemeFactory {
+ public TransferStatusTupleScheme getScheme() {
+ return new TransferStatusTupleScheme();
+ }
+ }
+
+ private static class TransferStatusTupleScheme extends TupleScheme<TransferStatus> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TransferStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeI32(struct.transferState.getValue());
+ BitSet optionals = new BitSet();
+ if (struct.isSetTimeOfStateChange()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetTimeOfStateChange()) {
+ oprot.writeI64(struct.timeOfStateChange);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TransferStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.transferState = TransferState.findByValue(iprot.readI32());
+ struct.setTransferStateIsSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.timeOfStateChange = iprot.readI64();
+ struct.setTimeOfStateChangeIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/719cbf9e/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/UserConfigurationData.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/UserConfigurationData.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/UserConfigurationData.java
new file mode 100644
index 0000000..5bfff9b
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/UserConfigurationData.java
@@ -0,0 +1,1016 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * A structure holding the experiment configuration.
+ *
+ *
+ */
+@SuppressWarnings("all") public class UserConfigurationData implements org.apache.thrift.TBase<UserConfigurationData, UserConfigurationData._Fields>, java.io.Serializable, Cloneable, Comparable<UserConfigurationData> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UserConfigurationData");
+
+ private static final org.apache.thrift.protocol.TField AIRAVATA_AUTO_SCHEDULE_FIELD_DESC = new org.apache.thrift.protocol.TField("airavataAutoSchedule", org.apache.thrift.protocol.TType.BOOL, (short)1);
+ private static final org.apache.thrift.protocol.TField OVERRIDE_MANUAL_SCHEDULED_PARAMS_FIELD_DESC = new org.apache.thrift.protocol.TField("overrideManualScheduledParams", org.apache.thrift.protocol.TType.BOOL, (short)2);
+ private static final org.apache.thrift.protocol.TField SHARE_EXPERIMENT_PUBLICLY_FIELD_DESC = new org.apache.thrift.protocol.TField("shareExperimentPublicly", org.apache.thrift.protocol.TType.BOOL, (short)3);
+ private static final org.apache.thrift.protocol.TField COMPUTATIONAL_RESOURCE_SCHEDULING_FIELD_DESC = new org.apache.thrift.protocol.TField("computationalResourceScheduling", org.apache.thrift.protocol.TType.STRUCT, (short)4);
+ private static final org.apache.thrift.protocol.TField ADVANCE_INPUT_DATA_HANDLING_FIELD_DESC = new org.apache.thrift.protocol.TField("advanceInputDataHandling", org.apache.thrift.protocol.TType.STRUCT, (short)5);
+ private static final org.apache.thrift.protocol.TField ADVANCE_OUTPUT_DATA_HANDLING_FIELD_DESC = new org.apache.thrift.protocol.TField("advanceOutputDataHandling", org.apache.thrift.protocol.TType.STRUCT, (short)6);
+ private static final org.apache.thrift.protocol.TField QOS_PARAMS_FIELD_DESC = new org.apache.thrift.protocol.TField("qosParams", org.apache.thrift.protocol.TType.STRUCT, (short)7);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new UserConfigurationDataStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new UserConfigurationDataTupleSchemeFactory());
+ }
+
+ private boolean airavataAutoSchedule; // required
+ private boolean overrideManualScheduledParams; // required
+ private boolean shareExperimentPublicly; // optional
+ private ComputationalResourceScheduling computationalResourceScheduling; // optional
+ private AdvancedInputDataHandling advanceInputDataHandling; // optional
+ private AdvancedOutputDataHandling advanceOutputDataHandling; // optional
+ private QualityOfServiceParams qosParams; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ AIRAVATA_AUTO_SCHEDULE((short)1, "airavataAutoSchedule"),
+ OVERRIDE_MANUAL_SCHEDULED_PARAMS((short)2, "overrideManualScheduledParams"),
+ SHARE_EXPERIMENT_PUBLICLY((short)3, "shareExperimentPublicly"),
+ COMPUTATIONAL_RESOURCE_SCHEDULING((short)4, "computationalResourceScheduling"),
+ ADVANCE_INPUT_DATA_HANDLING((short)5, "advanceInputDataHandling"),
+ ADVANCE_OUTPUT_DATA_HANDLING((short)6, "advanceOutputDataHandling"),
+ QOS_PARAMS((short)7, "qosParams");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // AIRAVATA_AUTO_SCHEDULE
+ return AIRAVATA_AUTO_SCHEDULE;
+ case 2: // OVERRIDE_MANUAL_SCHEDULED_PARAMS
+ return OVERRIDE_MANUAL_SCHEDULED_PARAMS;
+ case 3: // SHARE_EXPERIMENT_PUBLICLY
+ return SHARE_EXPERIMENT_PUBLICLY;
+ case 4: // COMPUTATIONAL_RESOURCE_SCHEDULING
+ return COMPUTATIONAL_RESOURCE_SCHEDULING;
+ case 5: // ADVANCE_INPUT_DATA_HANDLING
+ return ADVANCE_INPUT_DATA_HANDLING;
+ case 6: // ADVANCE_OUTPUT_DATA_HANDLING
+ return ADVANCE_OUTPUT_DATA_HANDLING;
+ case 7: // QOS_PARAMS
+ return QOS_PARAMS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __AIRAVATAAUTOSCHEDULE_ISSET_ID = 0;
+ private static final int __OVERRIDEMANUALSCHEDULEDPARAMS_ISSET_ID = 1;
+ private static final int __SHAREEXPERIMENTPUBLICLY_ISSET_ID = 2;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.SHARE_EXPERIMENT_PUBLICLY,_Fields.COMPUTATIONAL_RESOURCE_SCHEDULING,_Fields.ADVANCE_INPUT_DATA_HANDLING,_Fields.ADVANCE_OUTPUT_DATA_HANDLING,_Fields.QOS_PARAMS};
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.AIRAVATA_AUTO_SCHEDULE, new org.apache.thrift.meta_data.FieldMetaData("airavataAutoSchedule", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.OVERRIDE_MANUAL_SCHEDULED_PARAMS, new org.apache.thrift.meta_data.FieldMetaData("overrideManualScheduledParams", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.SHARE_EXPERIMENT_PUBLICLY, new org.apache.thrift.meta_data.FieldMetaData("shareExperimentPublicly", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.COMPUTATIONAL_RESOURCE_SCHEDULING, new org.apache.thrift.meta_data.FieldMetaData("computationalResourceScheduling", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ComputationalResourceScheduling.class)));
+ tmpMap.put(_Fields.ADVANCE_INPUT_DATA_HANDLING, new org.apache.thrift.meta_data.FieldMetaData("advanceInputDataHandling", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AdvancedInputDataHandling.class)));
+ tmpMap.put(_Fields.ADVANCE_OUTPUT_DATA_HANDLING, new org.apache.thrift.meta_data.FieldMetaData("advanceOutputDataHandling", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AdvancedOutputDataHandling.class)));
+ tmpMap.put(_Fields.QOS_PARAMS, new org.apache.thrift.meta_data.FieldMetaData("qosParams", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, QualityOfServiceParams.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UserConfigurationData.class, metaDataMap);
+ }
+
+ public UserConfigurationData() {
+ this.airavataAutoSchedule = false;
+
+ this.overrideManualScheduledParams = false;
+
+ this.shareExperimentPublicly = false;
+
+ }
+
+ public UserConfigurationData(
+ boolean airavataAutoSchedule,
+ boolean overrideManualScheduledParams)
+ {
+ this();
+ this.airavataAutoSchedule = airavataAutoSchedule;
+ setAiravataAutoScheduleIsSet(true);
+ this.overrideManualScheduledParams = overrideManualScheduledParams;
+ setOverrideManualScheduledParamsIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public UserConfigurationData(UserConfigurationData other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.airavataAutoSchedule = other.airavataAutoSchedule;
+ this.overrideManualScheduledParams = other.overrideManualScheduledParams;
+ this.shareExperimentPublicly = other.shareExperimentPublicly;
+ if (other.isSetComputationalResourceScheduling()) {
+ this.computationalResourceScheduling = new ComputationalResourceScheduling(other.computationalResourceScheduling);
+ }
+ if (other.isSetAdvanceInputDataHandling()) {
+ this.advanceInputDataHandling = new AdvancedInputDataHandling(other.advanceInputDataHandling);
+ }
+ if (other.isSetAdvanceOutputDataHandling()) {
+ this.advanceOutputDataHandling = new AdvancedOutputDataHandling(other.advanceOutputDataHandling);
+ }
+ if (other.isSetQosParams()) {
+ this.qosParams = new QualityOfServiceParams(other.qosParams);
+ }
+ }
+
+ public UserConfigurationData deepCopy() {
+ return new UserConfigurationData(this);
+ }
+
+ @Override
+ public void clear() {
+ this.airavataAutoSchedule = false;
+
+ this.overrideManualScheduledParams = false;
+
+ this.shareExperimentPublicly = false;
+
+ this.computationalResourceScheduling = null;
+ this.advanceInputDataHandling = null;
+ this.advanceOutputDataHandling = null;
+ this.qosParams = null;
+ }
+
+ public boolean isAiravataAutoSchedule() {
+ return this.airavataAutoSchedule;
+ }
+
+ public void setAiravataAutoSchedule(boolean airavataAutoSchedule) {
+ this.airavataAutoSchedule = airavataAutoSchedule;
+ setAiravataAutoScheduleIsSet(true);
+ }
+
+ public void unsetAiravataAutoSchedule() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AIRAVATAAUTOSCHEDULE_ISSET_ID);
+ }
+
+ /** Returns true if field airavataAutoSchedule is set (has been assigned a value) and false otherwise */
+ public boolean isSetAiravataAutoSchedule() {
+ return EncodingUtils.testBit(__isset_bitfield, __AIRAVATAAUTOSCHEDULE_ISSET_ID);
+ }
+
+ public void setAiravataAutoScheduleIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AIRAVATAAUTOSCHEDULE_ISSET_ID, value);
+ }
+
+ public boolean isOverrideManualScheduledParams() {
+ return this.overrideManualScheduledParams;
+ }
+
+ public void setOverrideManualScheduledParams(boolean overrideManualScheduledParams) {
+ this.overrideManualScheduledParams = overrideManualScheduledParams;
+ setOverrideManualScheduledParamsIsSet(true);
+ }
+
+ public void unsetOverrideManualScheduledParams() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OVERRIDEMANUALSCHEDULEDPARAMS_ISSET_ID);
+ }
+
+ /** Returns true if field overrideManualScheduledParams is set (has been assigned a value) and false otherwise */
+ public boolean isSetOverrideManualScheduledParams() {
+ return EncodingUtils.testBit(__isset_bitfield, __OVERRIDEMANUALSCHEDULEDPARAMS_ISSET_ID);
+ }
+
+ public void setOverrideManualScheduledParamsIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OVERRIDEMANUALSCHEDULEDPARAMS_ISSET_ID, value);
+ }
+
+ public boolean isShareExperimentPublicly() {
+ return this.shareExperimentPublicly;
+ }
+
+ public void setShareExperimentPublicly(boolean shareExperimentPublicly) {
+ this.shareExperimentPublicly = shareExperimentPublicly;
+ setShareExperimentPubliclyIsSet(true);
+ }
+
+ public void unsetShareExperimentPublicly() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SHAREEXPERIMENTPUBLICLY_ISSET_ID);
+ }
+
+ /** Returns true if field shareExperimentPublicly is set (has been assigned a value) and false otherwise */
+ public boolean isSetShareExperimentPublicly() {
+ return EncodingUtils.testBit(__isset_bitfield, __SHAREEXPERIMENTPUBLICLY_ISSET_ID);
+ }
+
+ public void setShareExperimentPubliclyIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SHAREEXPERIMENTPUBLICLY_ISSET_ID, value);
+ }
+
+ public ComputationalResourceScheduling getComputationalResourceScheduling() {
+ return this.computationalResourceScheduling;
+ }
+
+ public void setComputationalResourceScheduling(ComputationalResourceScheduling computationalResourceScheduling) {
+ this.computationalResourceScheduling = computationalResourceScheduling;
+ }
+
+ public void unsetComputationalResourceScheduling() {
+ this.computationalResourceScheduling = null;
+ }
+
+ /** Returns true if field computationalResourceScheduling is set (has been assigned a value) and false otherwise */
+ public boolean isSetComputationalResourceScheduling() {
+ return this.computationalResourceScheduling != null;
+ }
+
+ public void setComputationalResourceSchedulingIsSet(boolean value) {
+ if (!value) {
+ this.computationalResourceScheduling = null;
+ }
+ }
+
+ public AdvancedInputDataHandling getAdvanceInputDataHandling() {
+ return this.advanceInputDataHandling;
+ }
+
+ public void setAdvanceInputDataHandling(AdvancedInputDataHandling advanceInputDataHandling) {
+ this.advanceInputDataHandling = advanceInputDataHandling;
+ }
+
+ public void unsetAdvanceInputDataHandling() {
+ this.advanceInputDataHandling = null;
+ }
+
+ /** Returns true if field advanceInputDataHandling is set (has been assigned a value) and false otherwise */
+ public boolean isSetAdvanceInputDataHandling() {
+ return this.advanceInputDataHandling != null;
+ }
+
+ public void setAdvanceInputDataHandlingIsSet(boolean value) {
+ if (!value) {
+ this.advanceInputDataHandling = null;
+ }
+ }
+
+ public AdvancedOutputDataHandling getAdvanceOutputDataHandling() {
+ return this.advanceOutputDataHandling;
+ }
+
+ public void setAdvanceOutputDataHandling(AdvancedOutputDataHandling advanceOutputDataHandling) {
+ this.advanceOutputDataHandling = advanceOutputDataHandling;
+ }
+
+ public void unsetAdvanceOutputDataHandling() {
+ this.advanceOutputDataHandling = null;
+ }
+
+ /** Returns true if field advanceOutputDataHandling is set (has been assigned a value) and false otherwise */
+ public boolean isSetAdvanceOutputDataHandling() {
+ return this.advanceOutputDataHandling != null;
+ }
+
+ public void setAdvanceOutputDataHandlingIsSet(boolean value) {
+ if (!value) {
+ this.advanceOutputDataHandling = null;
+ }
+ }
+
+ public QualityOfServiceParams getQosParams() {
+ return this.qosParams;
+ }
+
+ public void setQosParams(QualityOfServiceParams qosParams) {
+ this.qosParams = qosParams;
+ }
+
+ public void unsetQosParams() {
+ this.qosParams = null;
+ }
+
+ /** Returns true if field qosParams is set (has been assigned a value) and false otherwise */
+ public boolean isSetQosParams() {
+ return this.qosParams != null;
+ }
+
+ public void setQosParamsIsSet(boolean value) {
+ if (!value) {
+ this.qosParams = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case AIRAVATA_AUTO_SCHEDULE:
+ if (value == null) {
+ unsetAiravataAutoSchedule();
+ } else {
+ setAiravataAutoSchedule((Boolean)value);
+ }
+ break;
+
+ case OVERRIDE_MANUAL_SCHEDULED_PARAMS:
+ if (value == null) {
+ unsetOverrideManualScheduledParams();
+ } else {
+ setOverrideManualScheduledParams((Boolean)value);
+ }
+ break;
+
+ case SHARE_EXPERIMENT_PUBLICLY:
+ if (value == null) {
+ unsetShareExperimentPublicly();
+ } else {
+ setShareExperimentPublicly((Boolean)value);
+ }
+ break;
+
+ case COMPUTATIONAL_RESOURCE_SCHEDULING:
+ if (value == null) {
+ unsetComputationalResourceScheduling();
+ } else {
+ setComputationalResourceScheduling((ComputationalResourceScheduling)value);
+ }
+ break;
+
+ case ADVANCE_INPUT_DATA_HANDLING:
+ if (value == null) {
+ unsetAdvanceInputDataHandling();
+ } else {
+ setAdvanceInputDataHandling((AdvancedInputDataHandling)value);
+ }
+ break;
+
+ case ADVANCE_OUTPUT_DATA_HANDLING:
+ if (value == null) {
+ unsetAdvanceOutputDataHandling();
+ } else {
+ setAdvanceOutputDataHandling((AdvancedOutputDataHandling)value);
+ }
+ break;
+
+ case QOS_PARAMS:
+ if (value == null) {
+ unsetQosParams();
+ } else {
+ setQosParams((QualityOfServiceParams)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case AIRAVATA_AUTO_SCHEDULE:
+ return Boolean.valueOf(isAiravataAutoSchedule());
+
+ case OVERRIDE_MANUAL_SCHEDULED_PARAMS:
+ return Boolean.valueOf(isOverrideManualScheduledParams());
+
+ case SHARE_EXPERIMENT_PUBLICLY:
+ return Boolean.valueOf(isShareExperimentPublicly());
+
+ case COMPUTATIONAL_RESOURCE_SCHEDULING:
+ return getComputationalResourceScheduling();
+
+ case ADVANCE_INPUT_DATA_HANDLING:
+ return getAdvanceInputDataHandling();
+
+ case ADVANCE_OUTPUT_DATA_HANDLING:
+ return getAdvanceOutputDataHandling();
+
+ case QOS_PARAMS:
+ return getQosParams();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case AIRAVATA_AUTO_SCHEDULE:
+ return isSetAiravataAutoSchedule();
+ case OVERRIDE_MANUAL_SCHEDULED_PARAMS:
+ return isSetOverrideManualScheduledParams();
+ case SHARE_EXPERIMENT_PUBLICLY:
+ return isSetShareExperimentPublicly();
+ case COMPUTATIONAL_RESOURCE_SCHEDULING:
+ return isSetComputationalResourceScheduling();
+ case ADVANCE_INPUT_DATA_HANDLING:
+ return isSetAdvanceInputDataHandling();
+ case ADVANCE_OUTPUT_DATA_HANDLING:
+ return isSetAdvanceOutputDataHandling();
+ case QOS_PARAMS:
+ return isSetQosParams();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof UserConfigurationData)
+ return this.equals((UserConfigurationData)that);
+ return false;
+ }
+
+ public boolean equals(UserConfigurationData that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_airavataAutoSchedule = true;
+ boolean that_present_airavataAutoSchedule = true;
+ if (this_present_airavataAutoSchedule || that_present_airavataAutoSchedule) {
+ if (!(this_present_airavataAutoSchedule && that_present_airavataAutoSchedule))
+ return false;
+ if (this.airavataAutoSchedule != that.airavataAutoSchedule)
+ return false;
+ }
+
+ boolean this_present_overrideManualScheduledParams = true;
+ boolean that_present_overrideManualScheduledParams = true;
+ if (this_present_overrideManualScheduledParams || that_present_overrideManualScheduledParams) {
+ if (!(this_present_overrideManualScheduledParams && that_present_overrideManualScheduledParams))
+ return false;
+ if (this.overrideManualScheduledParams != that.overrideManualScheduledParams)
+ return false;
+ }
+
+ boolean this_present_shareExperimentPublicly = true && this.isSetShareExperimentPublicly();
+ boolean that_present_shareExperimentPublicly = true && that.isSetShareExperimentPublicly();
+ if (this_present_shareExperimentPublicly || that_present_shareExperimentPublicly) {
+ if (!(this_present_shareExperimentPublicly && that_present_shareExperimentPublicly))
+ return false;
+ if (this.shareExperimentPublicly != that.shareExperimentPublicly)
+ return false;
+ }
+
+ boolean this_present_computationalResourceScheduling = true && this.isSetComputationalResourceScheduling();
+ boolean that_present_computationalResourceScheduling = true && that.isSetComputationalResourceScheduling();
+ if (this_present_computationalResourceScheduling || that_present_computationalResourceScheduling) {
+ if (!(this_present_computationalResourceScheduling && that_present_computationalResourceScheduling))
+ return false;
+ if (!this.computationalResourceScheduling.equals(that.computationalResourceScheduling))
+ return false;
+ }
+
+ boolean this_present_advanceInputDataHandling = true && this.isSetAdvanceInputDataHandling();
+ boolean that_present_advanceInputDataHandling = true && that.isSetAdvanceInputDataHandling();
+ if (this_present_advanceInputDataHandling || that_present_advanceInputDataHandling) {
+ if (!(this_present_advanceInputDataHandling && that_present_advanceInputDataHandling))
+ return false;
+ if (!this.advanceInputDataHandling.equals(that.advanceInputDataHandling))
+ return false;
+ }
+
+ boolean this_present_advanceOutputDataHandling = true && this.isSetAdvanceOutputDataHandling();
+ boolean that_present_advanceOutputDataHandling = true && that.isSetAdvanceOutputDataHandling();
+ if (this_present_advanceOutputDataHandling || that_present_advanceOutputDataHandling) {
+ if (!(this_present_advanceOutputDataHandling && that_present_advanceOutputDataHandling))
+ return false;
+ if (!this.advanceOutputDataHandling.equals(that.advanceOutputDataHandling))
+ return false;
+ }
+
+ boolean this_present_qosParams = true && this.isSetQosParams();
+ boolean that_present_qosParams = true && that.isSetQosParams();
+ if (this_present_qosParams || that_present_qosParams) {
+ if (!(this_present_qosParams && that_present_qosParams))
+ return false;
+ if (!this.qosParams.equals(that.qosParams))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(UserConfigurationData other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetAiravataAutoSchedule()).compareTo(other.isSetAiravataAutoSchedule());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAiravataAutoSchedule()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.airavataAutoSchedule, other.airavataAutoSchedule);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOverrideManualScheduledParams()).compareTo(other.isSetOverrideManualScheduledParams());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOverrideManualScheduledParams()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.overrideManualScheduledParams, other.overrideManualScheduledParams);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetShareExperimentPublicly()).compareTo(other.isSetShareExperimentPublicly());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetShareExperimentPublicly()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shareExperimentPublicly, other.shareExperimentPublicly);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetComputationalResourceScheduling()).compareTo(other.isSetComputationalResourceScheduling());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetComputationalResourceScheduling()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.computationalResourceScheduling, other.computationalResourceScheduling);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAdvanceInputDataHandling()).compareTo(other.isSetAdvanceInputDataHandling());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAdvanceInputDataHandling()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.advanceInputDataHandling, other.advanceInputDataHandling);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAdvanceOutputDataHandling()).compareTo(other.isSetAdvanceOutputDataHandling());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAdvanceOutputDataHandling()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.advanceOutputDataHandling, other.advanceOutputDataHandling);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetQosParams()).compareTo(other.isSetQosParams());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetQosParams()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.qosParams, other.qosParams);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("UserConfigurationData(");
+ boolean first = true;
+
+ sb.append("airavataAutoSchedule:");
+ sb.append(this.airavataAutoSchedule);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("overrideManualScheduledParams:");
+ sb.append(this.overrideManualScheduledParams);
+ first = false;
+ if (isSetShareExperimentPublicly()) {
+ if (!first) sb.append(", ");
+ sb.append("shareExperimentPublicly:");
+ sb.append(this.shareExperimentPublicly);
+ first = false;
+ }
+ if (isSetComputationalResourceScheduling()) {
+ if (!first) sb.append(", ");
+ sb.append("computationalResourceScheduling:");
+ if (this.computationalResourceScheduling == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.computationalResourceScheduling);
+ }
+ first = false;
+ }
+ if (isSetAdvanceInputDataHandling()) {
+ if (!first) sb.append(", ");
+ sb.append("advanceInputDataHandling:");
+ if (this.advanceInputDataHandling == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.advanceInputDataHandling);
+ }
+ first = false;
+ }
+ if (isSetAdvanceOutputDataHandling()) {
+ if (!first) sb.append(", ");
+ sb.append("advanceOutputDataHandling:");
+ if (this.advanceOutputDataHandling == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.advanceOutputDataHandling);
+ }
+ first = false;
+ }
+ if (isSetQosParams()) {
+ if (!first) sb.append(", ");
+ sb.append("qosParams:");
+ if (this.qosParams == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.qosParams);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetAiravataAutoSchedule()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'airavataAutoSchedule' is unset! Struct:" + toString());
+ }
+
+ if (!isSetOverrideManualScheduledParams()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'overrideManualScheduledParams' is unset! Struct:" + toString());
+ }
+
+ // check for sub-struct validity
+ if (computationalResourceScheduling != null) {
+ computationalResourceScheduling.validate();
+ }
+ if (advanceInputDataHandling != null) {
+ advanceInputDataHandling.validate();
+ }
+ if (advanceOutputDataHandling != null) {
+ advanceOutputDataHandling.validate();
+ }
+ if (qosParams != null) {
+ qosParams.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class UserConfigurationDataStandardSchemeFactory implements SchemeFactory {
+ public UserConfigurationDataStandardScheme getScheme() {
+ return new UserConfigurationDataStandardScheme();
+ }
+ }
+
+ private static class UserConfigurationDataStandardScheme extends StandardScheme<UserConfigurationData> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, UserConfigurationData struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // AIRAVATA_AUTO_SCHEDULE
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.airavataAutoSchedule = iprot.readBool();
+ struct.setAiravataAutoScheduleIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // OVERRIDE_MANUAL_SCHEDULED_PARAMS
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.overrideManualScheduledParams = iprot.readBool();
+ struct.setOverrideManualScheduledParamsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // SHARE_EXPERIMENT_PUBLICLY
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.shareExperimentPublicly = iprot.readBool();
+ struct.setShareExperimentPubliclyIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // COMPUTATIONAL_RESOURCE_SCHEDULING
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.computationalResourceScheduling = new ComputationalResourceScheduling();
+ struct.computationalResourceScheduling.read(iprot);
+ struct.setComputationalResourceSchedulingIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // ADVANCE_INPUT_DATA_HANDLING
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.advanceInputDataHandling = new AdvancedInputDataHandling();
+ struct.advanceInputDataHandling.read(iprot);
+ struct.setAdvanceInputDataHandlingIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // ADVANCE_OUTPUT_DATA_HANDLING
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.advanceOutputDataHandling = new AdvancedOutputDataHandling();
+ struct.advanceOutputDataHandling.read(iprot);
+ struct.setAdvanceOutputDataHandlingIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // QOS_PARAMS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.qosParams = new QualityOfServiceParams();
+ struct.qosParams.read(iprot);
+ struct.setQosParamsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, UserConfigurationData struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(AIRAVATA_AUTO_SCHEDULE_FIELD_DESC);
+ oprot.writeBool(struct.airavataAutoSchedule);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(OVERRIDE_MANUAL_SCHEDULED_PARAMS_FIELD_DESC);
+ oprot.writeBool(struct.overrideManualScheduledParams);
+ oprot.writeFieldEnd();
+ if (struct.isSetShareExperimentPublicly()) {
+ oprot.writeFieldBegin(SHARE_EXPERIMENT_PUBLICLY_FIELD_DESC);
+ oprot.writeBool(struct.shareExperimentPublicly);
+ oprot.writeFieldEnd();
+ }
+ if (struct.computationalResourceScheduling != null) {
+ if (struct.isSetComputationalResourceScheduling()) {
+ oprot.writeFieldBegin(COMPUTATIONAL_RESOURCE_SCHEDULING_FIELD_DESC);
+ struct.computationalResourceScheduling.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.advanceInputDataHandling != null) {
+ if (struct.isSetAdvanceInputDataHandling()) {
+ oprot.writeFieldBegin(ADVANCE_INPUT_DATA_HANDLING_FIELD_DESC);
+ struct.advanceInputDataHandling.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.advanceOutputDataHandling != null) {
+ if (struct.isSetAdvanceOutputDataHandling()) {
+ oprot.writeFieldBegin(ADVANCE_OUTPUT_DATA_HANDLING_FIELD_DESC);
+ struct.advanceOutputDataHandling.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.qosParams != null) {
+ if (struct.isSetQosParams()) {
+ oprot.writeFieldBegin(QOS_PARAMS_FIELD_DESC);
+ struct.qosParams.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class UserConfigurationDataTupleSchemeFactory implements SchemeFactory {
+ public UserConfigurationDataTupleScheme getScheme() {
+ return new UserConfigurationDataTupleScheme();
+ }
+ }
+
+ private static class UserConfigurationDataTupleScheme extends TupleScheme<UserConfigurationData> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, UserConfigurationData struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeBool(struct.airavataAutoSchedule);
+ oprot.writeBool(struct.overrideManualScheduledParams);
+ BitSet optionals = new BitSet();
+ if (struct.isSetShareExperimentPublicly()) {
+ optionals.set(0);
+ }
+ if (struct.isSetComputationalResourceScheduling()) {
+ optionals.set(1);
+ }
+ if (struct.isSetAdvanceInputDataHandling()) {
+ optionals.set(2);
+ }
+ if (struct.isSetAdvanceOutputDataHandling()) {
+ optionals.set(3);
+ }
+ if (struct.isSetQosParams()) {
+ optionals.set(4);
+ }
+ oprot.writeBitSet(optionals, 5);
+ if (struct.isSetShareExperimentPublicly()) {
+ oprot.writeBool(struct.shareExperimentPublicly);
+ }
+ if (struct.isSetComputationalResourceScheduling()) {
+ struct.computationalResourceScheduling.write(oprot);
+ }
+ if (struct.isSetAdvanceInputDataHandling()) {
+ struct.advanceInputDataHandling.write(oprot);
+ }
+ if (struct.isSetAdvanceOutputDataHandling()) {
+ struct.advanceOutputDataHandling.write(oprot);
+ }
+ if (struct.isSetQosParams()) {
+ struct.qosParams.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, UserConfigurationData struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.airavataAutoSchedule = iprot.readBool();
+ struct.setAiravataAutoScheduleIsSet(true);
+ struct.overrideManualScheduledParams = iprot.readBool();
+ struct.setOverrideManualScheduledParamsIsSet(true);
+ BitSet incoming = iprot.readBitSet(5);
+ if (incoming.get(0)) {
+ struct.shareExperimentPublicly = iprot.readBool();
+ struct.setShareExperimentPubliclyIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.computationalResourceScheduling = new ComputationalResourceScheduling();
+ struct.computationalResourceScheduling.read(iprot);
+ struct.setComputationalResourceSchedulingIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.advanceInputDataHandling = new AdvancedInputDataHandling();
+ struct.advanceInputDataHandling.read(iprot);
+ struct.setAdvanceInputDataHandlingIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.advanceOutputDataHandling = new AdvancedOutputDataHandling();
+ struct.advanceOutputDataHandling.read(iprot);
+ struct.setAdvanceOutputDataHandlingIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.qosParams = new QualityOfServiceParams();
+ struct.qosParams.read(iprot);
+ struct.setQosParamsIsSet(true);
+ }
+ }
+ }
+
+}
+
[4/8] Commiting the generated data-models for modified experiment
model. - AIRAVATA-1017
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/719cbf9e/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExperimentStatus.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExperimentStatus.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExperimentStatus.java
new file mode 100644
index 0000000..6bb39d0
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExperimentStatus.java
@@ -0,0 +1,509 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("all") public class ExperimentStatus implements org.apache.thrift.TBase<ExperimentStatus, ExperimentStatus._Fields>, java.io.Serializable, Cloneable, Comparable<ExperimentStatus> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExperimentStatus");
+
+ private static final org.apache.thrift.protocol.TField EXPERIMENT_STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentState", org.apache.thrift.protocol.TType.I32, (short)1);
+ private static final org.apache.thrift.protocol.TField TIME_OF_STATE_CHANGE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeOfStateChange", org.apache.thrift.protocol.TType.I64, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ExperimentStatusStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ExperimentStatusTupleSchemeFactory());
+ }
+
+ private ExperimentState experimentState; // required
+ private long timeOfStateChange; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ /**
+ *
+ * @see ExperimentState
+ */
+ EXPERIMENT_STATE((short)1, "experimentState"),
+ TIME_OF_STATE_CHANGE((short)2, "timeOfStateChange");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // EXPERIMENT_STATE
+ return EXPERIMENT_STATE;
+ case 2: // TIME_OF_STATE_CHANGE
+ return TIME_OF_STATE_CHANGE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __TIMEOFSTATECHANGE_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.TIME_OF_STATE_CHANGE};
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.EXPERIMENT_STATE, new org.apache.thrift.meta_data.FieldMetaData("experimentState", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ExperimentState.class)));
+ tmpMap.put(_Fields.TIME_OF_STATE_CHANGE, new org.apache.thrift.meta_data.FieldMetaData("timeOfStateChange", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ExperimentStatus.class, metaDataMap);
+ }
+
+ public ExperimentStatus() {
+ }
+
+ public ExperimentStatus(
+ ExperimentState experimentState)
+ {
+ this();
+ this.experimentState = experimentState;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ExperimentStatus(ExperimentStatus other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetExperimentState()) {
+ this.experimentState = other.experimentState;
+ }
+ this.timeOfStateChange = other.timeOfStateChange;
+ }
+
+ public ExperimentStatus deepCopy() {
+ return new ExperimentStatus(this);
+ }
+
+ @Override
+ public void clear() {
+ this.experimentState = null;
+ setTimeOfStateChangeIsSet(false);
+ this.timeOfStateChange = 0;
+ }
+
+ /**
+ *
+ * @see ExperimentState
+ */
+ public ExperimentState getExperimentState() {
+ return this.experimentState;
+ }
+
+ /**
+ *
+ * @see ExperimentState
+ */
+ public void setExperimentState(ExperimentState experimentState) {
+ this.experimentState = experimentState;
+ }
+
+ public void unsetExperimentState() {
+ this.experimentState = null;
+ }
+
+ /** Returns true if field experimentState is set (has been assigned a value) and false otherwise */
+ public boolean isSetExperimentState() {
+ return this.experimentState != null;
+ }
+
+ public void setExperimentStateIsSet(boolean value) {
+ if (!value) {
+ this.experimentState = null;
+ }
+ }
+
+ public long getTimeOfStateChange() {
+ return this.timeOfStateChange;
+ }
+
+ public void setTimeOfStateChange(long timeOfStateChange) {
+ this.timeOfStateChange = timeOfStateChange;
+ setTimeOfStateChangeIsSet(true);
+ }
+
+ public void unsetTimeOfStateChange() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID);
+ }
+
+ /** Returns true if field timeOfStateChange is set (has been assigned a value) and false otherwise */
+ public boolean isSetTimeOfStateChange() {
+ return EncodingUtils.testBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID);
+ }
+
+ public void setTimeOfStateChangeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case EXPERIMENT_STATE:
+ if (value == null) {
+ unsetExperimentState();
+ } else {
+ setExperimentState((ExperimentState)value);
+ }
+ break;
+
+ case TIME_OF_STATE_CHANGE:
+ if (value == null) {
+ unsetTimeOfStateChange();
+ } else {
+ setTimeOfStateChange((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case EXPERIMENT_STATE:
+ return getExperimentState();
+
+ case TIME_OF_STATE_CHANGE:
+ return Long.valueOf(getTimeOfStateChange());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case EXPERIMENT_STATE:
+ return isSetExperimentState();
+ case TIME_OF_STATE_CHANGE:
+ return isSetTimeOfStateChange();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ExperimentStatus)
+ return this.equals((ExperimentStatus)that);
+ return false;
+ }
+
+ public boolean equals(ExperimentStatus that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_experimentState = true && this.isSetExperimentState();
+ boolean that_present_experimentState = true && that.isSetExperimentState();
+ if (this_present_experimentState || that_present_experimentState) {
+ if (!(this_present_experimentState && that_present_experimentState))
+ return false;
+ if (!this.experimentState.equals(that.experimentState))
+ return false;
+ }
+
+ boolean this_present_timeOfStateChange = true && this.isSetTimeOfStateChange();
+ boolean that_present_timeOfStateChange = true && that.isSetTimeOfStateChange();
+ if (this_present_timeOfStateChange || that_present_timeOfStateChange) {
+ if (!(this_present_timeOfStateChange && that_present_timeOfStateChange))
+ return false;
+ if (this.timeOfStateChange != that.timeOfStateChange)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(ExperimentStatus other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetExperimentState()).compareTo(other.isSetExperimentState());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExperimentState()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentState, other.experimentState);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTimeOfStateChange()).compareTo(other.isSetTimeOfStateChange());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTimeOfStateChange()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeOfStateChange, other.timeOfStateChange);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("ExperimentStatus(");
+ boolean first = true;
+
+ sb.append("experimentState:");
+ if (this.experimentState == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.experimentState);
+ }
+ first = false;
+ if (isSetTimeOfStateChange()) {
+ if (!first) sb.append(", ");
+ sb.append("timeOfStateChange:");
+ sb.append(this.timeOfStateChange);
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetExperimentState()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'experimentState' is unset! Struct:" + toString());
+ }
+
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class ExperimentStatusStandardSchemeFactory implements SchemeFactory {
+ public ExperimentStatusStandardScheme getScheme() {
+ return new ExperimentStatusStandardScheme();
+ }
+ }
+
+ private static class ExperimentStatusStandardScheme extends StandardScheme<ExperimentStatus> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ExperimentStatus struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // EXPERIMENT_STATE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.experimentState = ExperimentState.findByValue(iprot.readI32());
+ struct.setExperimentStateIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // TIME_OF_STATE_CHANGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.timeOfStateChange = iprot.readI64();
+ struct.setTimeOfStateChangeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, ExperimentStatus struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.experimentState != null) {
+ oprot.writeFieldBegin(EXPERIMENT_STATE_FIELD_DESC);
+ oprot.writeI32(struct.experimentState.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetTimeOfStateChange()) {
+ oprot.writeFieldBegin(TIME_OF_STATE_CHANGE_FIELD_DESC);
+ oprot.writeI64(struct.timeOfStateChange);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ExperimentStatusTupleSchemeFactory implements SchemeFactory {
+ public ExperimentStatusTupleScheme getScheme() {
+ return new ExperimentStatusTupleScheme();
+ }
+ }
+
+ private static class ExperimentStatusTupleScheme extends TupleScheme<ExperimentStatus> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ExperimentStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeI32(struct.experimentState.getValue());
+ BitSet optionals = new BitSet();
+ if (struct.isSetTimeOfStateChange()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetTimeOfStateChange()) {
+ oprot.writeI64(struct.timeOfStateChange);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ExperimentStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.experimentState = ExperimentState.findByValue(iprot.readI32());
+ struct.setExperimentStateIsSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.timeOfStateChange = iprot.readI64();
+ struct.setTimeOfStateChangeIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/719cbf9e/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/JobDetails.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/JobDetails.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/JobDetails.java
new file mode 100644
index 0000000..2c8bc25
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/JobDetails.java
@@ -0,0 +1,960 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("all") public class JobDetails implements org.apache.thrift.TBase<JobDetails, JobDetails._Fields>, java.io.Serializable, Cloneable, Comparable<JobDetails> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JobDetails");
+
+ private static final org.apache.thrift.protocol.TField JOB_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("jobID", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField JOB_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("jobDescription", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTime", org.apache.thrift.protocol.TType.I64, (short)3);
+ private static final org.apache.thrift.protocol.TField JOB_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("jobStatus", org.apache.thrift.protocol.TType.STRUCT, (short)4);
+ private static final org.apache.thrift.protocol.TField APPLICATION_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationStatus", org.apache.thrift.protocol.TType.STRUCT, (short)5);
+ private static final org.apache.thrift.protocol.TField ERRORS_FIELD_DESC = new org.apache.thrift.protocol.TField("errors", org.apache.thrift.protocol.TType.LIST, (short)6);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new JobDetailsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new JobDetailsTupleSchemeFactory());
+ }
+
+ private String jobID; // required
+ private String jobDescription; // required
+ private long creationTime; // optional
+ private JobStatus jobStatus; // optional
+ private ApplicationStatus applicationStatus; // optional
+ private List<ErrorDetails> errors; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ JOB_ID((short)1, "jobID"),
+ JOB_DESCRIPTION((short)2, "jobDescription"),
+ CREATION_TIME((short)3, "creationTime"),
+ JOB_STATUS((short)4, "jobStatus"),
+ APPLICATION_STATUS((short)5, "applicationStatus"),
+ ERRORS((short)6, "errors");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // JOB_ID
+ return JOB_ID;
+ case 2: // JOB_DESCRIPTION
+ return JOB_DESCRIPTION;
+ case 3: // CREATION_TIME
+ return CREATION_TIME;
+ case 4: // JOB_STATUS
+ return JOB_STATUS;
+ case 5: // APPLICATION_STATUS
+ return APPLICATION_STATUS;
+ case 6: // ERRORS
+ return ERRORS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __CREATIONTIME_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.CREATION_TIME,_Fields.JOB_STATUS,_Fields.APPLICATION_STATUS,_Fields.ERRORS};
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.JOB_ID, new org.apache.thrift.meta_data.FieldMetaData("jobID", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.JOB_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("jobDescription", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("creationTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.JOB_STATUS, new org.apache.thrift.meta_data.FieldMetaData("jobStatus", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, JobStatus.class)));
+ tmpMap.put(_Fields.APPLICATION_STATUS, new org.apache.thrift.meta_data.FieldMetaData("applicationStatus", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ApplicationStatus.class)));
+ tmpMap.put(_Fields.ERRORS, new org.apache.thrift.meta_data.FieldMetaData("errors", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ErrorDetails.class))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(JobDetails.class, metaDataMap);
+ }
+
+ public JobDetails() {
+ }
+
+ public JobDetails(
+ String jobID,
+ String jobDescription)
+ {
+ this();
+ this.jobID = jobID;
+ this.jobDescription = jobDescription;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public JobDetails(JobDetails other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetJobID()) {
+ this.jobID = other.jobID;
+ }
+ if (other.isSetJobDescription()) {
+ this.jobDescription = other.jobDescription;
+ }
+ this.creationTime = other.creationTime;
+ if (other.isSetJobStatus()) {
+ this.jobStatus = new JobStatus(other.jobStatus);
+ }
+ if (other.isSetApplicationStatus()) {
+ this.applicationStatus = new ApplicationStatus(other.applicationStatus);
+ }
+ if (other.isSetErrors()) {
+ List<ErrorDetails> __this__errors = new ArrayList<ErrorDetails>(other.errors.size());
+ for (ErrorDetails other_element : other.errors) {
+ __this__errors.add(new ErrorDetails(other_element));
+ }
+ this.errors = __this__errors;
+ }
+ }
+
+ public JobDetails deepCopy() {
+ return new JobDetails(this);
+ }
+
+ @Override
+ public void clear() {
+ this.jobID = null;
+ this.jobDescription = null;
+ setCreationTimeIsSet(false);
+ this.creationTime = 0;
+ this.jobStatus = null;
+ this.applicationStatus = null;
+ this.errors = null;
+ }
+
+ public String getJobID() {
+ return this.jobID;
+ }
+
+ public void setJobID(String jobID) {
+ this.jobID = jobID;
+ }
+
+ public void unsetJobID() {
+ this.jobID = null;
+ }
+
+ /** Returns true if field jobID is set (has been assigned a value) and false otherwise */
+ public boolean isSetJobID() {
+ return this.jobID != null;
+ }
+
+ public void setJobIDIsSet(boolean value) {
+ if (!value) {
+ this.jobID = null;
+ }
+ }
+
+ public String getJobDescription() {
+ return this.jobDescription;
+ }
+
+ public void setJobDescription(String jobDescription) {
+ this.jobDescription = jobDescription;
+ }
+
+ public void unsetJobDescription() {
+ this.jobDescription = null;
+ }
+
+ /** Returns true if field jobDescription is set (has been assigned a value) and false otherwise */
+ public boolean isSetJobDescription() {
+ return this.jobDescription != null;
+ }
+
+ public void setJobDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.jobDescription = null;
+ }
+ }
+
+ public long getCreationTime() {
+ return this.creationTime;
+ }
+
+ public void setCreationTime(long creationTime) {
+ this.creationTime = creationTime;
+ setCreationTimeIsSet(true);
+ }
+
+ public void unsetCreationTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
+ }
+
+ /** Returns true if field creationTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreationTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
+ }
+
+ public void setCreationTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATIONTIME_ISSET_ID, value);
+ }
+
+ public JobStatus getJobStatus() {
+ return this.jobStatus;
+ }
+
+ public void setJobStatus(JobStatus jobStatus) {
+ this.jobStatus = jobStatus;
+ }
+
+ public void unsetJobStatus() {
+ this.jobStatus = null;
+ }
+
+ /** Returns true if field jobStatus is set (has been assigned a value) and false otherwise */
+ public boolean isSetJobStatus() {
+ return this.jobStatus != null;
+ }
+
+ public void setJobStatusIsSet(boolean value) {
+ if (!value) {
+ this.jobStatus = null;
+ }
+ }
+
+ public ApplicationStatus getApplicationStatus() {
+ return this.applicationStatus;
+ }
+
+ public void setApplicationStatus(ApplicationStatus applicationStatus) {
+ this.applicationStatus = applicationStatus;
+ }
+
+ public void unsetApplicationStatus() {
+ this.applicationStatus = null;
+ }
+
+ /** Returns true if field applicationStatus is set (has been assigned a value) and false otherwise */
+ public boolean isSetApplicationStatus() {
+ return this.applicationStatus != null;
+ }
+
+ public void setApplicationStatusIsSet(boolean value) {
+ if (!value) {
+ this.applicationStatus = null;
+ }
+ }
+
+ public int getErrorsSize() {
+ return (this.errors == null) ? 0 : this.errors.size();
+ }
+
+ public java.util.Iterator<ErrorDetails> getErrorsIterator() {
+ return (this.errors == null) ? null : this.errors.iterator();
+ }
+
+ public void addToErrors(ErrorDetails elem) {
+ if (this.errors == null) {
+ this.errors = new ArrayList<ErrorDetails>();
+ }
+ this.errors.add(elem);
+ }
+
+ public List<ErrorDetails> getErrors() {
+ return this.errors;
+ }
+
+ public void setErrors(List<ErrorDetails> errors) {
+ this.errors = errors;
+ }
+
+ public void unsetErrors() {
+ this.errors = null;
+ }
+
+ /** Returns true if field errors is set (has been assigned a value) and false otherwise */
+ public boolean isSetErrors() {
+ return this.errors != null;
+ }
+
+ public void setErrorsIsSet(boolean value) {
+ if (!value) {
+ this.errors = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case JOB_ID:
+ if (value == null) {
+ unsetJobID();
+ } else {
+ setJobID((String)value);
+ }
+ break;
+
+ case JOB_DESCRIPTION:
+ if (value == null) {
+ unsetJobDescription();
+ } else {
+ setJobDescription((String)value);
+ }
+ break;
+
+ case CREATION_TIME:
+ if (value == null) {
+ unsetCreationTime();
+ } else {
+ setCreationTime((Long)value);
+ }
+ break;
+
+ case JOB_STATUS:
+ if (value == null) {
+ unsetJobStatus();
+ } else {
+ setJobStatus((JobStatus)value);
+ }
+ break;
+
+ case APPLICATION_STATUS:
+ if (value == null) {
+ unsetApplicationStatus();
+ } else {
+ setApplicationStatus((ApplicationStatus)value);
+ }
+ break;
+
+ case ERRORS:
+ if (value == null) {
+ unsetErrors();
+ } else {
+ setErrors((List<ErrorDetails>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case JOB_ID:
+ return getJobID();
+
+ case JOB_DESCRIPTION:
+ return getJobDescription();
+
+ case CREATION_TIME:
+ return Long.valueOf(getCreationTime());
+
+ case JOB_STATUS:
+ return getJobStatus();
+
+ case APPLICATION_STATUS:
+ return getApplicationStatus();
+
+ case ERRORS:
+ return getErrors();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case JOB_ID:
+ return isSetJobID();
+ case JOB_DESCRIPTION:
+ return isSetJobDescription();
+ case CREATION_TIME:
+ return isSetCreationTime();
+ case JOB_STATUS:
+ return isSetJobStatus();
+ case APPLICATION_STATUS:
+ return isSetApplicationStatus();
+ case ERRORS:
+ return isSetErrors();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof JobDetails)
+ return this.equals((JobDetails)that);
+ return false;
+ }
+
+ public boolean equals(JobDetails that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_jobID = true && this.isSetJobID();
+ boolean that_present_jobID = true && that.isSetJobID();
+ if (this_present_jobID || that_present_jobID) {
+ if (!(this_present_jobID && that_present_jobID))
+ return false;
+ if (!this.jobID.equals(that.jobID))
+ return false;
+ }
+
+ boolean this_present_jobDescription = true && this.isSetJobDescription();
+ boolean that_present_jobDescription = true && that.isSetJobDescription();
+ if (this_present_jobDescription || that_present_jobDescription) {
+ if (!(this_present_jobDescription && that_present_jobDescription))
+ return false;
+ if (!this.jobDescription.equals(that.jobDescription))
+ return false;
+ }
+
+ boolean this_present_creationTime = true && this.isSetCreationTime();
+ boolean that_present_creationTime = true && that.isSetCreationTime();
+ if (this_present_creationTime || that_present_creationTime) {
+ if (!(this_present_creationTime && that_present_creationTime))
+ return false;
+ if (this.creationTime != that.creationTime)
+ return false;
+ }
+
+ boolean this_present_jobStatus = true && this.isSetJobStatus();
+ boolean that_present_jobStatus = true && that.isSetJobStatus();
+ if (this_present_jobStatus || that_present_jobStatus) {
+ if (!(this_present_jobStatus && that_present_jobStatus))
+ return false;
+ if (!this.jobStatus.equals(that.jobStatus))
+ return false;
+ }
+
+ boolean this_present_applicationStatus = true && this.isSetApplicationStatus();
+ boolean that_present_applicationStatus = true && that.isSetApplicationStatus();
+ if (this_present_applicationStatus || that_present_applicationStatus) {
+ if (!(this_present_applicationStatus && that_present_applicationStatus))
+ return false;
+ if (!this.applicationStatus.equals(that.applicationStatus))
+ return false;
+ }
+
+ boolean this_present_errors = true && this.isSetErrors();
+ boolean that_present_errors = true && that.isSetErrors();
+ if (this_present_errors || that_present_errors) {
+ if (!(this_present_errors && that_present_errors))
+ return false;
+ if (!this.errors.equals(that.errors))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(JobDetails other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetJobID()).compareTo(other.isSetJobID());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetJobID()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobID, other.jobID);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetJobDescription()).compareTo(other.isSetJobDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetJobDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobDescription, other.jobDescription);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreationTime()).compareTo(other.isSetCreationTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreationTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creationTime, other.creationTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetJobStatus()).compareTo(other.isSetJobStatus());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetJobStatus()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobStatus, other.jobStatus);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetApplicationStatus()).compareTo(other.isSetApplicationStatus());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetApplicationStatus()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationStatus, other.applicationStatus);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetErrors()).compareTo(other.isSetErrors());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetErrors()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errors, other.errors);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("JobDetails(");
+ boolean first = true;
+
+ sb.append("jobID:");
+ if (this.jobID == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.jobID);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("jobDescription:");
+ if (this.jobDescription == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.jobDescription);
+ }
+ first = false;
+ if (isSetCreationTime()) {
+ if (!first) sb.append(", ");
+ sb.append("creationTime:");
+ sb.append(this.creationTime);
+ first = false;
+ }
+ if (isSetJobStatus()) {
+ if (!first) sb.append(", ");
+ sb.append("jobStatus:");
+ if (this.jobStatus == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.jobStatus);
+ }
+ first = false;
+ }
+ if (isSetApplicationStatus()) {
+ if (!first) sb.append(", ");
+ sb.append("applicationStatus:");
+ if (this.applicationStatus == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.applicationStatus);
+ }
+ first = false;
+ }
+ if (isSetErrors()) {
+ if (!first) sb.append(", ");
+ sb.append("errors:");
+ if (this.errors == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.errors);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetJobID()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'jobID' is unset! Struct:" + toString());
+ }
+
+ if (!isSetJobDescription()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'jobDescription' is unset! Struct:" + toString());
+ }
+
+ // check for sub-struct validity
+ if (jobStatus != null) {
+ jobStatus.validate();
+ }
+ if (applicationStatus != null) {
+ applicationStatus.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class JobDetailsStandardSchemeFactory implements SchemeFactory {
+ public JobDetailsStandardScheme getScheme() {
+ return new JobDetailsStandardScheme();
+ }
+ }
+
+ private static class JobDetailsStandardScheme extends StandardScheme<JobDetails> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, JobDetails struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // JOB_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.jobID = iprot.readString();
+ struct.setJobIDIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // JOB_DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.jobDescription = iprot.readString();
+ struct.setJobDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // CREATION_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.creationTime = iprot.readI64();
+ struct.setCreationTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // JOB_STATUS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.jobStatus = new JobStatus();
+ struct.jobStatus.read(iprot);
+ struct.setJobStatusIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // APPLICATION_STATUS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.applicationStatus = new ApplicationStatus();
+ struct.applicationStatus.read(iprot);
+ struct.setApplicationStatusIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // ERRORS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
+ struct.errors = new ArrayList<ErrorDetails>(_list8.size);
+ for (int _i9 = 0; _i9 < _list8.size; ++_i9)
+ {
+ ErrorDetails _elem10;
+ _elem10 = new ErrorDetails();
+ _elem10.read(iprot);
+ struct.errors.add(_elem10);
+ }
+ iprot.readListEnd();
+ }
+ struct.setErrorsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, JobDetails struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.jobID != null) {
+ oprot.writeFieldBegin(JOB_ID_FIELD_DESC);
+ oprot.writeString(struct.jobID);
+ oprot.writeFieldEnd();
+ }
+ if (struct.jobDescription != null) {
+ oprot.writeFieldBegin(JOB_DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.jobDescription);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetCreationTime()) {
+ oprot.writeFieldBegin(CREATION_TIME_FIELD_DESC);
+ oprot.writeI64(struct.creationTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.jobStatus != null) {
+ if (struct.isSetJobStatus()) {
+ oprot.writeFieldBegin(JOB_STATUS_FIELD_DESC);
+ struct.jobStatus.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.applicationStatus != null) {
+ if (struct.isSetApplicationStatus()) {
+ oprot.writeFieldBegin(APPLICATION_STATUS_FIELD_DESC);
+ struct.applicationStatus.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.errors != null) {
+ if (struct.isSetErrors()) {
+ oprot.writeFieldBegin(ERRORS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.errors.size()));
+ for (ErrorDetails _iter11 : struct.errors)
+ {
+ _iter11.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class JobDetailsTupleSchemeFactory implements SchemeFactory {
+ public JobDetailsTupleScheme getScheme() {
+ return new JobDetailsTupleScheme();
+ }
+ }
+
+ private static class JobDetailsTupleScheme extends TupleScheme<JobDetails> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, JobDetails struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.jobID);
+ oprot.writeString(struct.jobDescription);
+ BitSet optionals = new BitSet();
+ if (struct.isSetCreationTime()) {
+ optionals.set(0);
+ }
+ if (struct.isSetJobStatus()) {
+ optionals.set(1);
+ }
+ if (struct.isSetApplicationStatus()) {
+ optionals.set(2);
+ }
+ if (struct.isSetErrors()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
+ if (struct.isSetCreationTime()) {
+ oprot.writeI64(struct.creationTime);
+ }
+ if (struct.isSetJobStatus()) {
+ struct.jobStatus.write(oprot);
+ }
+ if (struct.isSetApplicationStatus()) {
+ struct.applicationStatus.write(oprot);
+ }
+ if (struct.isSetErrors()) {
+ {
+ oprot.writeI32(struct.errors.size());
+ for (ErrorDetails _iter12 : struct.errors)
+ {
+ _iter12.write(oprot);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, JobDetails struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.jobID = iprot.readString();
+ struct.setJobIDIsSet(true);
+ struct.jobDescription = iprot.readString();
+ struct.setJobDescriptionIsSet(true);
+ BitSet incoming = iprot.readBitSet(4);
+ if (incoming.get(0)) {
+ struct.creationTime = iprot.readI64();
+ struct.setCreationTimeIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.jobStatus = new JobStatus();
+ struct.jobStatus.read(iprot);
+ struct.setJobStatusIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.applicationStatus = new ApplicationStatus();
+ struct.applicationStatus.read(iprot);
+ struct.setApplicationStatusIsSet(true);
+ }
+ if (incoming.get(3)) {
+ {
+ org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.errors = new ArrayList<ErrorDetails>(_list13.size);
+ for (int _i14 = 0; _i14 < _list13.size; ++_i14)
+ {
+ ErrorDetails _elem15;
+ _elem15 = new ErrorDetails();
+ _elem15.read(iprot);
+ struct.errors.add(_elem15);
+ }
+ }
+ struct.setErrorsIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/719cbf9e/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/JobState.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/JobState.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/JobState.java
new file mode 100644
index 0000000..22ca542
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/JobState.java
@@ -0,0 +1,82 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+@SuppressWarnings("all") public enum JobState implements org.apache.thrift.TEnum {
+ SUBMITTED(0),
+ QUEUED(1),
+ ACTIVE(2),
+ COMPLETE(3),
+ CANCELED(4),
+ FAILED(5),
+ HELD(6),
+ SUSPENDED(7),
+ UNKNOWN(8);
+
+ private final int value;
+
+ private JobState(int value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the integer value of this enum value, as defined in the Thrift IDL.
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Find a the enum type by its integer value, as defined in the Thrift IDL.
+ * @return null if the value is not found.
+ */
+ public static JobState findByValue(int value) {
+ switch (value) {
+ case 0:
+ return SUBMITTED;
+ case 1:
+ return QUEUED;
+ case 2:
+ return ACTIVE;
+ case 3:
+ return COMPLETE;
+ case 4:
+ return CANCELED;
+ case 5:
+ return FAILED;
+ case 6:
+ return HELD;
+ case 7:
+ return SUSPENDED;
+ case 8:
+ return UNKNOWN;
+ default:
+ return null;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/719cbf9e/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/JobStatus.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/JobStatus.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/JobStatus.java
new file mode 100644
index 0000000..715401e
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/JobStatus.java
@@ -0,0 +1,509 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("all") public class JobStatus implements org.apache.thrift.TBase<JobStatus, JobStatus._Fields>, java.io.Serializable, Cloneable, Comparable<JobStatus> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JobStatus");
+
+ private static final org.apache.thrift.protocol.TField JOB_STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("jobState", org.apache.thrift.protocol.TType.I32, (short)1);
+ private static final org.apache.thrift.protocol.TField TIME_OF_STATE_CHANGE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeOfStateChange", org.apache.thrift.protocol.TType.I64, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new JobStatusStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new JobStatusTupleSchemeFactory());
+ }
+
+ private JobState jobState; // required
+ private long timeOfStateChange; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ /**
+ *
+ * @see JobState
+ */
+ JOB_STATE((short)1, "jobState"),
+ TIME_OF_STATE_CHANGE((short)2, "timeOfStateChange");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // JOB_STATE
+ return JOB_STATE;
+ case 2: // TIME_OF_STATE_CHANGE
+ return TIME_OF_STATE_CHANGE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __TIMEOFSTATECHANGE_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.TIME_OF_STATE_CHANGE};
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.JOB_STATE, new org.apache.thrift.meta_data.FieldMetaData("jobState", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, JobState.class)));
+ tmpMap.put(_Fields.TIME_OF_STATE_CHANGE, new org.apache.thrift.meta_data.FieldMetaData("timeOfStateChange", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(JobStatus.class, metaDataMap);
+ }
+
+ public JobStatus() {
+ }
+
+ public JobStatus(
+ JobState jobState)
+ {
+ this();
+ this.jobState = jobState;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public JobStatus(JobStatus other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetJobState()) {
+ this.jobState = other.jobState;
+ }
+ this.timeOfStateChange = other.timeOfStateChange;
+ }
+
+ public JobStatus deepCopy() {
+ return new JobStatus(this);
+ }
+
+ @Override
+ public void clear() {
+ this.jobState = null;
+ setTimeOfStateChangeIsSet(false);
+ this.timeOfStateChange = 0;
+ }
+
+ /**
+ *
+ * @see JobState
+ */
+ public JobState getJobState() {
+ return this.jobState;
+ }
+
+ /**
+ *
+ * @see JobState
+ */
+ public void setJobState(JobState jobState) {
+ this.jobState = jobState;
+ }
+
+ public void unsetJobState() {
+ this.jobState = null;
+ }
+
+ /** Returns true if field jobState is set (has been assigned a value) and false otherwise */
+ public boolean isSetJobState() {
+ return this.jobState != null;
+ }
+
+ public void setJobStateIsSet(boolean value) {
+ if (!value) {
+ this.jobState = null;
+ }
+ }
+
+ public long getTimeOfStateChange() {
+ return this.timeOfStateChange;
+ }
+
+ public void setTimeOfStateChange(long timeOfStateChange) {
+ this.timeOfStateChange = timeOfStateChange;
+ setTimeOfStateChangeIsSet(true);
+ }
+
+ public void unsetTimeOfStateChange() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID);
+ }
+
+ /** Returns true if field timeOfStateChange is set (has been assigned a value) and false otherwise */
+ public boolean isSetTimeOfStateChange() {
+ return EncodingUtils.testBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID);
+ }
+
+ public void setTimeOfStateChangeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case JOB_STATE:
+ if (value == null) {
+ unsetJobState();
+ } else {
+ setJobState((JobState)value);
+ }
+ break;
+
+ case TIME_OF_STATE_CHANGE:
+ if (value == null) {
+ unsetTimeOfStateChange();
+ } else {
+ setTimeOfStateChange((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case JOB_STATE:
+ return getJobState();
+
+ case TIME_OF_STATE_CHANGE:
+ return Long.valueOf(getTimeOfStateChange());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case JOB_STATE:
+ return isSetJobState();
+ case TIME_OF_STATE_CHANGE:
+ return isSetTimeOfStateChange();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof JobStatus)
+ return this.equals((JobStatus)that);
+ return false;
+ }
+
+ public boolean equals(JobStatus that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_jobState = true && this.isSetJobState();
+ boolean that_present_jobState = true && that.isSetJobState();
+ if (this_present_jobState || that_present_jobState) {
+ if (!(this_present_jobState && that_present_jobState))
+ return false;
+ if (!this.jobState.equals(that.jobState))
+ return false;
+ }
+
+ boolean this_present_timeOfStateChange = true && this.isSetTimeOfStateChange();
+ boolean that_present_timeOfStateChange = true && that.isSetTimeOfStateChange();
+ if (this_present_timeOfStateChange || that_present_timeOfStateChange) {
+ if (!(this_present_timeOfStateChange && that_present_timeOfStateChange))
+ return false;
+ if (this.timeOfStateChange != that.timeOfStateChange)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(JobStatus other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetJobState()).compareTo(other.isSetJobState());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetJobState()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobState, other.jobState);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTimeOfStateChange()).compareTo(other.isSetTimeOfStateChange());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTimeOfStateChange()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeOfStateChange, other.timeOfStateChange);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("JobStatus(");
+ boolean first = true;
+
+ sb.append("jobState:");
+ if (this.jobState == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.jobState);
+ }
+ first = false;
+ if (isSetTimeOfStateChange()) {
+ if (!first) sb.append(", ");
+ sb.append("timeOfStateChange:");
+ sb.append(this.timeOfStateChange);
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetJobState()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'jobState' is unset! Struct:" + toString());
+ }
+
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class JobStatusStandardSchemeFactory implements SchemeFactory {
+ public JobStatusStandardScheme getScheme() {
+ return new JobStatusStandardScheme();
+ }
+ }
+
+ private static class JobStatusStandardScheme extends StandardScheme<JobStatus> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, JobStatus struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // JOB_STATE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.jobState = JobState.findByValue(iprot.readI32());
+ struct.setJobStateIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // TIME_OF_STATE_CHANGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.timeOfStateChange = iprot.readI64();
+ struct.setTimeOfStateChangeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, JobStatus struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.jobState != null) {
+ oprot.writeFieldBegin(JOB_STATE_FIELD_DESC);
+ oprot.writeI32(struct.jobState.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetTimeOfStateChange()) {
+ oprot.writeFieldBegin(TIME_OF_STATE_CHANGE_FIELD_DESC);
+ oprot.writeI64(struct.timeOfStateChange);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class JobStatusTupleSchemeFactory implements SchemeFactory {
+ public JobStatusTupleScheme getScheme() {
+ return new JobStatusTupleScheme();
+ }
+ }
+
+ private static class JobStatusTupleScheme extends TupleScheme<JobStatus> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, JobStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeI32(struct.jobState.getValue());
+ BitSet optionals = new BitSet();
+ if (struct.isSetTimeOfStateChange()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetTimeOfStateChange()) {
+ oprot.writeI64(struct.timeOfStateChange);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, JobStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.jobState = JobState.findByValue(iprot.readI32());
+ struct.setJobStateIsSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.timeOfStateChange = iprot.readI64();
+ struct.setTimeOfStateChangeIsSet(true);
+ }
+ }
+ }
+
+}
+