You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sh...@apache.org on 2016/02/01 18:30:23 UTC
[5/6] airavata git commit: Added generated thrift files
http://git-wip-us.apache.org/repos/asf/airavata/blob/97f4ba92/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/PortModel.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/PortModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/PortModel.java
new file mode 100644
index 0000000..5b5c9fd
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/PortModel.java
@@ -0,0 +1,736 @@
+/**
+ * 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.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model;
+
+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 javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-02-01")
+public class PortModel implements org.apache.thrift.TBase<PortModel, PortModel._Fields>, java.io.Serializable, Cloneable, Comparable<PortModel> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PortModel");
+
+ private static final org.apache.thrift.protocol.TField PORT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("portId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ 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)2);
+ private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)3);
+ 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)4);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new PortModelStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new PortModelTupleSchemeFactory());
+ }
+
+ private String portId; // required
+ private String name; // optional
+ private ComponentStatus status; // optional
+ private String description; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ PORT_ID((short)1, "portId"),
+ NAME((short)2, "name"),
+ STATUS((short)3, "status"),
+ DESCRIPTION((short)4, "description");
+
+ 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: // PORT_ID
+ return PORT_ID;
+ case 2: // NAME
+ return NAME;
+ case 3: // STATUS
+ return STATUS;
+ case 4: // DESCRIPTION
+ return DESCRIPTION;
+ 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 _Fields optionals[] = {_Fields.NAME,_Fields.STATUS,_Fields.DESCRIPTION};
+ 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.PORT_ID, new org.apache.thrift.meta_data.FieldMetaData("portId", 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.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ComponentStatus.class)));
+ 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)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PortModel.class, metaDataMap);
+ }
+
+ public PortModel() {
+ this.portId = "DO_NOT_SET_AT_CLIENTS";
+
+ }
+
+ public PortModel(
+ String portId)
+ {
+ this();
+ this.portId = portId;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public PortModel(PortModel other) {
+ if (other.isSetPortId()) {
+ this.portId = other.portId;
+ }
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ if (other.isSetStatus()) {
+ this.status = new ComponentStatus(other.status);
+ }
+ if (other.isSetDescription()) {
+ this.description = other.description;
+ }
+ }
+
+ public PortModel deepCopy() {
+ return new PortModel(this);
+ }
+
+ @Override
+ public void clear() {
+ this.portId = "DO_NOT_SET_AT_CLIENTS";
+
+ this.name = null;
+ this.status = null;
+ this.description = null;
+ }
+
+ public String getPortId() {
+ return this.portId;
+ }
+
+ public void setPortId(String portId) {
+ this.portId = portId;
+ }
+
+ public void unsetPortId() {
+ this.portId = null;
+ }
+
+ /** Returns true if field portId is set (has been assigned a value) and false otherwise */
+ public boolean isSetPortId() {
+ return this.portId != null;
+ }
+
+ public void setPortIdIsSet(boolean value) {
+ if (!value) {
+ this.portId = 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 ComponentStatus getStatus() {
+ return this.status;
+ }
+
+ public void setStatus(ComponentStatus status) {
+ this.status = status;
+ }
+
+ public void unsetStatus() {
+ this.status = null;
+ }
+
+ /** Returns true if field status is set (has been assigned a value) and false otherwise */
+ public boolean isSetStatus() {
+ return this.status != null;
+ }
+
+ public void setStatusIsSet(boolean value) {
+ if (!value) {
+ this.status = 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 void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case PORT_ID:
+ if (value == null) {
+ unsetPortId();
+ } else {
+ setPortId((String)value);
+ }
+ break;
+
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ case STATUS:
+ if (value == null) {
+ unsetStatus();
+ } else {
+ setStatus((ComponentStatus)value);
+ }
+ break;
+
+ case DESCRIPTION:
+ if (value == null) {
+ unsetDescription();
+ } else {
+ setDescription((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case PORT_ID:
+ return getPortId();
+
+ case NAME:
+ return getName();
+
+ case STATUS:
+ return getStatus();
+
+ case DESCRIPTION:
+ return getDescription();
+
+ }
+ 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 PORT_ID:
+ return isSetPortId();
+ case NAME:
+ return isSetName();
+ case STATUS:
+ return isSetStatus();
+ case DESCRIPTION:
+ return isSetDescription();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof PortModel)
+ return this.equals((PortModel)that);
+ return false;
+ }
+
+ public boolean equals(PortModel that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_portId = true && this.isSetPortId();
+ boolean that_present_portId = true && that.isSetPortId();
+ if (this_present_portId || that_present_portId) {
+ if (!(this_present_portId && that_present_portId))
+ return false;
+ if (!this.portId.equals(that.portId))
+ 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_status = true && this.isSetStatus();
+ boolean that_present_status = true && that.isSetStatus();
+ if (this_present_status || that_present_status) {
+ if (!(this_present_status && that_present_status))
+ return false;
+ if (!this.status.equals(that.status))
+ 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;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_portId = true && (isSetPortId());
+ list.add(present_portId);
+ if (present_portId)
+ list.add(portId);
+
+ boolean present_name = true && (isSetName());
+ list.add(present_name);
+ if (present_name)
+ list.add(name);
+
+ boolean present_status = true && (isSetStatus());
+ list.add(present_status);
+ if (present_status)
+ list.add(status);
+
+ boolean present_description = true && (isSetDescription());
+ list.add(present_description);
+ if (present_description)
+ list.add(description);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(PortModel other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetPortId()).compareTo(other.isSetPortId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPortId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.portId, other.portId);
+ 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(isSetStatus()).compareTo(other.isSetStatus());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetStatus()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status);
+ 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;
+ }
+ }
+ 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("PortModel(");
+ boolean first = true;
+
+ sb.append("portId:");
+ if (this.portId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.portId);
+ }
+ first = false;
+ if (isSetName()) {
+ if (!first) sb.append(", ");
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ }
+ if (isSetStatus()) {
+ if (!first) sb.append(", ");
+ sb.append("status:");
+ if (this.status == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.status);
+ }
+ 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;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetPortId()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'portId' is unset! Struct:" + toString());
+ }
+
+ // check for sub-struct validity
+ if (status != null) {
+ status.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 {
+ 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 PortModelStandardSchemeFactory implements SchemeFactory {
+ public PortModelStandardScheme getScheme() {
+ return new PortModelStandardScheme();
+ }
+ }
+
+ private static class PortModelStandardScheme extends StandardScheme<PortModel> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, PortModel 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: // PORT_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.portId = iprot.readString();
+ struct.setPortIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // 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 3: // STATUS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.status = new ComponentStatus();
+ struct.status.read(iprot);
+ struct.setStatusIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // 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;
+ 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, PortModel struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.portId != null) {
+ oprot.writeFieldBegin(PORT_ID_FIELD_DESC);
+ oprot.writeString(struct.portId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.name != null) {
+ if (struct.isSetName()) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.status != null) {
+ if (struct.isSetStatus()) {
+ oprot.writeFieldBegin(STATUS_FIELD_DESC);
+ struct.status.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.description != null) {
+ if (struct.isSetDescription()) {
+ oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.description);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class PortModelTupleSchemeFactory implements SchemeFactory {
+ public PortModelTupleScheme getScheme() {
+ return new PortModelTupleScheme();
+ }
+ }
+
+ private static class PortModelTupleScheme extends TupleScheme<PortModel> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, PortModel struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.portId);
+ BitSet optionals = new BitSet();
+ if (struct.isSetName()) {
+ optionals.set(0);
+ }
+ if (struct.isSetStatus()) {
+ optionals.set(1);
+ }
+ if (struct.isSetDescription()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetName()) {
+ oprot.writeString(struct.name);
+ }
+ if (struct.isSetStatus()) {
+ struct.status.write(oprot);
+ }
+ if (struct.isSetDescription()) {
+ oprot.writeString(struct.description);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, PortModel struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.portId = iprot.readString();
+ struct.setPortIdIsSet(true);
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.status = new ComponentStatus();
+ struct.status.read(iprot);
+ struct.setStatusIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/97f4ba92/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/WorkflowModel.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/WorkflowModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/WorkflowModel.java
new file mode 100644
index 0000000..4d25b93
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/WorkflowModel.java
@@ -0,0 +1,1050 @@
+/**
+ * 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.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model;
+
+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 javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-02-01")
+public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, WorkflowModel._Fields>, java.io.Serializable, Cloneable, Comparable<WorkflowModel> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("WorkflowModel");
+
+ private static final org.apache.thrift.protocol.TField TEMPLATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("templateId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ 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)2);
+ private static final org.apache.thrift.protocol.TField GRAPH_FIELD_DESC = new org.apache.thrift.protocol.TField("graph", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField IMAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("image", org.apache.thrift.protocol.TType.STRING, (short)4);
+ private static final org.apache.thrift.protocol.TField WORKFLOW_INPUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowInputs", org.apache.thrift.protocol.TType.LIST, (short)5);
+ private static final org.apache.thrift.protocol.TField WORKFLOW_OUTPUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowOutputs", 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 WorkflowModelStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new WorkflowModelTupleSchemeFactory());
+ }
+
+ private String templateId; // required
+ private String name; // required
+ private String graph; // required
+ private ByteBuffer image; // optional
+ private List<org.apache.airavata.model.application.io.InputDataObjectType> workflowInputs; // optional
+ private List<org.apache.airavata.model.application.io.OutputDataObjectType> workflowOutputs; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ TEMPLATE_ID((short)1, "templateId"),
+ NAME((short)2, "name"),
+ GRAPH((short)3, "graph"),
+ IMAGE((short)4, "image"),
+ WORKFLOW_INPUTS((short)5, "workflowInputs"),
+ WORKFLOW_OUTPUTS((short)6, "workflowOutputs");
+
+ 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: // TEMPLATE_ID
+ return TEMPLATE_ID;
+ case 2: // NAME
+ return NAME;
+ case 3: // GRAPH
+ return GRAPH;
+ case 4: // IMAGE
+ return IMAGE;
+ case 5: // WORKFLOW_INPUTS
+ return WORKFLOW_INPUTS;
+ case 6: // WORKFLOW_OUTPUTS
+ return WORKFLOW_OUTPUTS;
+ 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 _Fields optionals[] = {_Fields.IMAGE,_Fields.WORKFLOW_INPUTS,_Fields.WORKFLOW_OUTPUTS};
+ 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.TEMPLATE_ID, new org.apache.thrift.meta_data.FieldMetaData("templateId", 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.GRAPH, new org.apache.thrift.meta_data.FieldMetaData("graph", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.IMAGE, new org.apache.thrift.meta_data.FieldMetaData("image", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
+ tmpMap.put(_Fields.WORKFLOW_INPUTS, new org.apache.thrift.meta_data.FieldMetaData("workflowInputs", 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, org.apache.airavata.model.application.io.InputDataObjectType.class))));
+ tmpMap.put(_Fields.WORKFLOW_OUTPUTS, new org.apache.thrift.meta_data.FieldMetaData("workflowOutputs", 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, org.apache.airavata.model.application.io.OutputDataObjectType.class))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WorkflowModel.class, metaDataMap);
+ }
+
+ public WorkflowModel() {
+ this.templateId = "DO_NOT_SET_AT_CLIENTS";
+
+ }
+
+ public WorkflowModel(
+ String templateId,
+ String name,
+ String graph)
+ {
+ this();
+ this.templateId = templateId;
+ this.name = name;
+ this.graph = graph;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public WorkflowModel(WorkflowModel other) {
+ if (other.isSetTemplateId()) {
+ this.templateId = other.templateId;
+ }
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ if (other.isSetGraph()) {
+ this.graph = other.graph;
+ }
+ if (other.isSetImage()) {
+ this.image = org.apache.thrift.TBaseHelper.copyBinary(other.image);
+ }
+ if (other.isSetWorkflowInputs()) {
+ List<org.apache.airavata.model.application.io.InputDataObjectType> __this__workflowInputs = new ArrayList<org.apache.airavata.model.application.io.InputDataObjectType>(other.workflowInputs.size());
+ for (org.apache.airavata.model.application.io.InputDataObjectType other_element : other.workflowInputs) {
+ __this__workflowInputs.add(new org.apache.airavata.model.application.io.InputDataObjectType(other_element));
+ }
+ this.workflowInputs = __this__workflowInputs;
+ }
+ if (other.isSetWorkflowOutputs()) {
+ List<org.apache.airavata.model.application.io.OutputDataObjectType> __this__workflowOutputs = new ArrayList<org.apache.airavata.model.application.io.OutputDataObjectType>(other.workflowOutputs.size());
+ for (org.apache.airavata.model.application.io.OutputDataObjectType other_element : other.workflowOutputs) {
+ __this__workflowOutputs.add(new org.apache.airavata.model.application.io.OutputDataObjectType(other_element));
+ }
+ this.workflowOutputs = __this__workflowOutputs;
+ }
+ }
+
+ public WorkflowModel deepCopy() {
+ return new WorkflowModel(this);
+ }
+
+ @Override
+ public void clear() {
+ this.templateId = "DO_NOT_SET_AT_CLIENTS";
+
+ this.name = null;
+ this.graph = null;
+ this.image = null;
+ this.workflowInputs = null;
+ this.workflowOutputs = null;
+ }
+
+ public String getTemplateId() {
+ return this.templateId;
+ }
+
+ public void setTemplateId(String templateId) {
+ this.templateId = templateId;
+ }
+
+ public void unsetTemplateId() {
+ this.templateId = null;
+ }
+
+ /** Returns true if field templateId is set (has been assigned a value) and false otherwise */
+ public boolean isSetTemplateId() {
+ return this.templateId != null;
+ }
+
+ public void setTemplateIdIsSet(boolean value) {
+ if (!value) {
+ this.templateId = 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 getGraph() {
+ return this.graph;
+ }
+
+ public void setGraph(String graph) {
+ this.graph = graph;
+ }
+
+ public void unsetGraph() {
+ this.graph = null;
+ }
+
+ /** Returns true if field graph is set (has been assigned a value) and false otherwise */
+ public boolean isSetGraph() {
+ return this.graph != null;
+ }
+
+ public void setGraphIsSet(boolean value) {
+ if (!value) {
+ this.graph = null;
+ }
+ }
+
+ public byte[] getImage() {
+ setImage(org.apache.thrift.TBaseHelper.rightSize(image));
+ return image == null ? null : image.array();
+ }
+
+ public ByteBuffer bufferForImage() {
+ return org.apache.thrift.TBaseHelper.copyBinary(image);
+ }
+
+ public void setImage(byte[] image) {
+ this.image = image == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(image, image.length));
+ }
+
+ public void setImage(ByteBuffer image) {
+ this.image = org.apache.thrift.TBaseHelper.copyBinary(image);
+ }
+
+ public void unsetImage() {
+ this.image = null;
+ }
+
+ /** Returns true if field image is set (has been assigned a value) and false otherwise */
+ public boolean isSetImage() {
+ return this.image != null;
+ }
+
+ public void setImageIsSet(boolean value) {
+ if (!value) {
+ this.image = null;
+ }
+ }
+
+ public int getWorkflowInputsSize() {
+ return (this.workflowInputs == null) ? 0 : this.workflowInputs.size();
+ }
+
+ public java.util.Iterator<org.apache.airavata.model.application.io.InputDataObjectType> getWorkflowInputsIterator() {
+ return (this.workflowInputs == null) ? null : this.workflowInputs.iterator();
+ }
+
+ public void addToWorkflowInputs(org.apache.airavata.model.application.io.InputDataObjectType elem) {
+ if (this.workflowInputs == null) {
+ this.workflowInputs = new ArrayList<org.apache.airavata.model.application.io.InputDataObjectType>();
+ }
+ this.workflowInputs.add(elem);
+ }
+
+ public List<org.apache.airavata.model.application.io.InputDataObjectType> getWorkflowInputs() {
+ return this.workflowInputs;
+ }
+
+ public void setWorkflowInputs(List<org.apache.airavata.model.application.io.InputDataObjectType> workflowInputs) {
+ this.workflowInputs = workflowInputs;
+ }
+
+ public void unsetWorkflowInputs() {
+ this.workflowInputs = null;
+ }
+
+ /** Returns true if field workflowInputs is set (has been assigned a value) and false otherwise */
+ public boolean isSetWorkflowInputs() {
+ return this.workflowInputs != null;
+ }
+
+ public void setWorkflowInputsIsSet(boolean value) {
+ if (!value) {
+ this.workflowInputs = null;
+ }
+ }
+
+ public int getWorkflowOutputsSize() {
+ return (this.workflowOutputs == null) ? 0 : this.workflowOutputs.size();
+ }
+
+ public java.util.Iterator<org.apache.airavata.model.application.io.OutputDataObjectType> getWorkflowOutputsIterator() {
+ return (this.workflowOutputs == null) ? null : this.workflowOutputs.iterator();
+ }
+
+ public void addToWorkflowOutputs(org.apache.airavata.model.application.io.OutputDataObjectType elem) {
+ if (this.workflowOutputs == null) {
+ this.workflowOutputs = new ArrayList<org.apache.airavata.model.application.io.OutputDataObjectType>();
+ }
+ this.workflowOutputs.add(elem);
+ }
+
+ public List<org.apache.airavata.model.application.io.OutputDataObjectType> getWorkflowOutputs() {
+ return this.workflowOutputs;
+ }
+
+ public void setWorkflowOutputs(List<org.apache.airavata.model.application.io.OutputDataObjectType> workflowOutputs) {
+ this.workflowOutputs = workflowOutputs;
+ }
+
+ public void unsetWorkflowOutputs() {
+ this.workflowOutputs = null;
+ }
+
+ /** Returns true if field workflowOutputs is set (has been assigned a value) and false otherwise */
+ public boolean isSetWorkflowOutputs() {
+ return this.workflowOutputs != null;
+ }
+
+ public void setWorkflowOutputsIsSet(boolean value) {
+ if (!value) {
+ this.workflowOutputs = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case TEMPLATE_ID:
+ if (value == null) {
+ unsetTemplateId();
+ } else {
+ setTemplateId((String)value);
+ }
+ break;
+
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ case GRAPH:
+ if (value == null) {
+ unsetGraph();
+ } else {
+ setGraph((String)value);
+ }
+ break;
+
+ case IMAGE:
+ if (value == null) {
+ unsetImage();
+ } else {
+ setImage((ByteBuffer)value);
+ }
+ break;
+
+ case WORKFLOW_INPUTS:
+ if (value == null) {
+ unsetWorkflowInputs();
+ } else {
+ setWorkflowInputs((List<org.apache.airavata.model.application.io.InputDataObjectType>)value);
+ }
+ break;
+
+ case WORKFLOW_OUTPUTS:
+ if (value == null) {
+ unsetWorkflowOutputs();
+ } else {
+ setWorkflowOutputs((List<org.apache.airavata.model.application.io.OutputDataObjectType>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TEMPLATE_ID:
+ return getTemplateId();
+
+ case NAME:
+ return getName();
+
+ case GRAPH:
+ return getGraph();
+
+ case IMAGE:
+ return getImage();
+
+ case WORKFLOW_INPUTS:
+ return getWorkflowInputs();
+
+ case WORKFLOW_OUTPUTS:
+ return getWorkflowOutputs();
+
+ }
+ 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 TEMPLATE_ID:
+ return isSetTemplateId();
+ case NAME:
+ return isSetName();
+ case GRAPH:
+ return isSetGraph();
+ case IMAGE:
+ return isSetImage();
+ case WORKFLOW_INPUTS:
+ return isSetWorkflowInputs();
+ case WORKFLOW_OUTPUTS:
+ return isSetWorkflowOutputs();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof WorkflowModel)
+ return this.equals((WorkflowModel)that);
+ return false;
+ }
+
+ public boolean equals(WorkflowModel that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_templateId = true && this.isSetTemplateId();
+ boolean that_present_templateId = true && that.isSetTemplateId();
+ if (this_present_templateId || that_present_templateId) {
+ if (!(this_present_templateId && that_present_templateId))
+ return false;
+ if (!this.templateId.equals(that.templateId))
+ 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_graph = true && this.isSetGraph();
+ boolean that_present_graph = true && that.isSetGraph();
+ if (this_present_graph || that_present_graph) {
+ if (!(this_present_graph && that_present_graph))
+ return false;
+ if (!this.graph.equals(that.graph))
+ return false;
+ }
+
+ boolean this_present_image = true && this.isSetImage();
+ boolean that_present_image = true && that.isSetImage();
+ if (this_present_image || that_present_image) {
+ if (!(this_present_image && that_present_image))
+ return false;
+ if (!this.image.equals(that.image))
+ return false;
+ }
+
+ boolean this_present_workflowInputs = true && this.isSetWorkflowInputs();
+ boolean that_present_workflowInputs = true && that.isSetWorkflowInputs();
+ if (this_present_workflowInputs || that_present_workflowInputs) {
+ if (!(this_present_workflowInputs && that_present_workflowInputs))
+ return false;
+ if (!this.workflowInputs.equals(that.workflowInputs))
+ return false;
+ }
+
+ boolean this_present_workflowOutputs = true && this.isSetWorkflowOutputs();
+ boolean that_present_workflowOutputs = true && that.isSetWorkflowOutputs();
+ if (this_present_workflowOutputs || that_present_workflowOutputs) {
+ if (!(this_present_workflowOutputs && that_present_workflowOutputs))
+ return false;
+ if (!this.workflowOutputs.equals(that.workflowOutputs))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_templateId = true && (isSetTemplateId());
+ list.add(present_templateId);
+ if (present_templateId)
+ list.add(templateId);
+
+ boolean present_name = true && (isSetName());
+ list.add(present_name);
+ if (present_name)
+ list.add(name);
+
+ boolean present_graph = true && (isSetGraph());
+ list.add(present_graph);
+ if (present_graph)
+ list.add(graph);
+
+ boolean present_image = true && (isSetImage());
+ list.add(present_image);
+ if (present_image)
+ list.add(image);
+
+ boolean present_workflowInputs = true && (isSetWorkflowInputs());
+ list.add(present_workflowInputs);
+ if (present_workflowInputs)
+ list.add(workflowInputs);
+
+ boolean present_workflowOutputs = true && (isSetWorkflowOutputs());
+ list.add(present_workflowOutputs);
+ if (present_workflowOutputs)
+ list.add(workflowOutputs);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(WorkflowModel other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetTemplateId()).compareTo(other.isSetTemplateId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTemplateId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.templateId, other.templateId);
+ 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(isSetGraph()).compareTo(other.isSetGraph());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetGraph()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.graph, other.graph);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetImage()).compareTo(other.isSetImage());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImage()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.image, other.image);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetWorkflowInputs()).compareTo(other.isSetWorkflowInputs());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetWorkflowInputs()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowInputs, other.workflowInputs);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetWorkflowOutputs()).compareTo(other.isSetWorkflowOutputs());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetWorkflowOutputs()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowOutputs, other.workflowOutputs);
+ 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("WorkflowModel(");
+ boolean first = true;
+
+ sb.append("templateId:");
+ if (this.templateId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.templateId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("graph:");
+ if (this.graph == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.graph);
+ }
+ first = false;
+ if (isSetImage()) {
+ if (!first) sb.append(", ");
+ sb.append("image:");
+ if (this.image == null) {
+ sb.append("null");
+ } else {
+ org.apache.thrift.TBaseHelper.toString(this.image, sb);
+ }
+ first = false;
+ }
+ if (isSetWorkflowInputs()) {
+ if (!first) sb.append(", ");
+ sb.append("workflowInputs:");
+ if (this.workflowInputs == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.workflowInputs);
+ }
+ first = false;
+ }
+ if (isSetWorkflowOutputs()) {
+ if (!first) sb.append(", ");
+ sb.append("workflowOutputs:");
+ if (this.workflowOutputs == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.workflowOutputs);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetTemplateId()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'templateId' is unset! Struct:" + toString());
+ }
+
+ if (!isSetName()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' is unset! Struct:" + toString());
+ }
+
+ if (!isSetGraph()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'graph' 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 WorkflowModelStandardSchemeFactory implements SchemeFactory {
+ public WorkflowModelStandardScheme getScheme() {
+ return new WorkflowModelStandardScheme();
+ }
+ }
+
+ private static class WorkflowModelStandardScheme extends StandardScheme<WorkflowModel> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, WorkflowModel 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: // TEMPLATE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.templateId = iprot.readString();
+ struct.setTemplateIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // 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 3: // GRAPH
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.graph = iprot.readString();
+ struct.setGraphIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // IMAGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.image = iprot.readBinary();
+ struct.setImageIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // WORKFLOW_INPUTS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
+ struct.workflowInputs = new ArrayList<org.apache.airavata.model.application.io.InputDataObjectType>(_list0.size);
+ org.apache.airavata.model.application.io.InputDataObjectType _elem1;
+ for (int _i2 = 0; _i2 < _list0.size; ++_i2)
+ {
+ _elem1 = new org.apache.airavata.model.application.io.InputDataObjectType();
+ _elem1.read(iprot);
+ struct.workflowInputs.add(_elem1);
+ }
+ iprot.readListEnd();
+ }
+ struct.setWorkflowInputsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // WORKFLOW_OUTPUTS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list3 = iprot.readListBegin();
+ struct.workflowOutputs = new ArrayList<org.apache.airavata.model.application.io.OutputDataObjectType>(_list3.size);
+ org.apache.airavata.model.application.io.OutputDataObjectType _elem4;
+ for (int _i5 = 0; _i5 < _list3.size; ++_i5)
+ {
+ _elem4 = new org.apache.airavata.model.application.io.OutputDataObjectType();
+ _elem4.read(iprot);
+ struct.workflowOutputs.add(_elem4);
+ }
+ iprot.readListEnd();
+ }
+ struct.setWorkflowOutputsIsSet(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, WorkflowModel struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.templateId != null) {
+ oprot.writeFieldBegin(TEMPLATE_ID_FIELD_DESC);
+ oprot.writeString(struct.templateId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.name != null) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ if (struct.graph != null) {
+ oprot.writeFieldBegin(GRAPH_FIELD_DESC);
+ oprot.writeString(struct.graph);
+ oprot.writeFieldEnd();
+ }
+ if (struct.image != null) {
+ if (struct.isSetImage()) {
+ oprot.writeFieldBegin(IMAGE_FIELD_DESC);
+ oprot.writeBinary(struct.image);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.workflowInputs != null) {
+ if (struct.isSetWorkflowInputs()) {
+ oprot.writeFieldBegin(WORKFLOW_INPUTS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.workflowInputs.size()));
+ for (org.apache.airavata.model.application.io.InputDataObjectType _iter6 : struct.workflowInputs)
+ {
+ _iter6.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.workflowOutputs != null) {
+ if (struct.isSetWorkflowOutputs()) {
+ oprot.writeFieldBegin(WORKFLOW_OUTPUTS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.workflowOutputs.size()));
+ for (org.apache.airavata.model.application.io.OutputDataObjectType _iter7 : struct.workflowOutputs)
+ {
+ _iter7.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class WorkflowModelTupleSchemeFactory implements SchemeFactory {
+ public WorkflowModelTupleScheme getScheme() {
+ return new WorkflowModelTupleScheme();
+ }
+ }
+
+ private static class WorkflowModelTupleScheme extends TupleScheme<WorkflowModel> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, WorkflowModel struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.templateId);
+ oprot.writeString(struct.name);
+ oprot.writeString(struct.graph);
+ BitSet optionals = new BitSet();
+ if (struct.isSetImage()) {
+ optionals.set(0);
+ }
+ if (struct.isSetWorkflowInputs()) {
+ optionals.set(1);
+ }
+ if (struct.isSetWorkflowOutputs()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetImage()) {
+ oprot.writeBinary(struct.image);
+ }
+ if (struct.isSetWorkflowInputs()) {
+ {
+ oprot.writeI32(struct.workflowInputs.size());
+ for (org.apache.airavata.model.application.io.InputDataObjectType _iter8 : struct.workflowInputs)
+ {
+ _iter8.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetWorkflowOutputs()) {
+ {
+ oprot.writeI32(struct.workflowOutputs.size());
+ for (org.apache.airavata.model.application.io.OutputDataObjectType _iter9 : struct.workflowOutputs)
+ {
+ _iter9.write(oprot);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, WorkflowModel struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.templateId = iprot.readString();
+ struct.setTemplateIdIsSet(true);
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ struct.graph = iprot.readString();
+ struct.setGraphIsSet(true);
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.image = iprot.readBinary();
+ struct.setImageIsSet(true);
+ }
+ if (incoming.get(1)) {
+ {
+ org.apache.thrift.protocol.TList _list10 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.workflowInputs = new ArrayList<org.apache.airavata.model.application.io.InputDataObjectType>(_list10.size);
+ org.apache.airavata.model.application.io.InputDataObjectType _elem11;
+ for (int _i12 = 0; _i12 < _list10.size; ++_i12)
+ {
+ _elem11 = new org.apache.airavata.model.application.io.InputDataObjectType();
+ _elem11.read(iprot);
+ struct.workflowInputs.add(_elem11);
+ }
+ }
+ struct.setWorkflowInputsIsSet(true);
+ }
+ if (incoming.get(2)) {
+ {
+ org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.workflowOutputs = new ArrayList<org.apache.airavata.model.application.io.OutputDataObjectType>(_list13.size);
+ org.apache.airavata.model.application.io.OutputDataObjectType _elem14;
+ for (int _i15 = 0; _i15 < _list13.size; ++_i15)
+ {
+ _elem14 = new org.apache.airavata.model.application.io.OutputDataObjectType();
+ _elem14.read(iprot);
+ struct.workflowOutputs.add(_elem14);
+ }
+ }
+ struct.setWorkflowOutputsIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/97f4ba92/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/WorkflowState.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/WorkflowState.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/WorkflowState.java
new file mode 100644
index 0000000..5faac14
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/WorkflowState.java
@@ -0,0 +1,77 @@
+/**
+ * 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.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+public enum WorkflowState implements org.apache.thrift.TEnum {
+ CREATED(0),
+ STARTED(1),
+ EXECUTING(2),
+ COMPLETED(3),
+ FAILED(4),
+ CANCELLING(5),
+ CANCELED(6);
+
+ private final int value;
+
+ private WorkflowState(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 WorkflowState findByValue(int value) {
+ switch (value) {
+ case 0:
+ return CREATED;
+ case 1:
+ return STARTED;
+ case 2:
+ return EXECUTING;
+ case 3:
+ return COMPLETED;
+ case 4:
+ return FAILED;
+ case 5:
+ return CANCELLING;
+ case 6:
+ return CANCELED;
+ default:
+ return null;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/97f4ba92/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/WorkflowStatus.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/WorkflowStatus.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/WorkflowStatus.java
new file mode 100644
index 0000000..73734fb
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/WorkflowStatus.java
@@ -0,0 +1,631 @@
+/**
+ * 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.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model;
+
+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 javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-02-01")
+public class WorkflowStatus implements org.apache.thrift.TBase<WorkflowStatus, WorkflowStatus._Fields>, java.io.Serializable, Cloneable, Comparable<WorkflowStatus> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("WorkflowStatus");
+
+ private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", 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 org.apache.thrift.protocol.TField REASON_FIELD_DESC = new org.apache.thrift.protocol.TField("reason", org.apache.thrift.protocol.TType.STRING, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new WorkflowStatusStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new WorkflowStatusTupleSchemeFactory());
+ }
+
+ private WorkflowState state; // required
+ private long timeOfStateChange; // optional
+ private String reason; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ /**
+ *
+ * @see WorkflowState
+ */
+ STATE((short)1, "state"),
+ TIME_OF_STATE_CHANGE((short)2, "timeOfStateChange"),
+ REASON((short)3, "reason");
+
+ 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: // STATE
+ return STATE;
+ case 2: // TIME_OF_STATE_CHANGE
+ return TIME_OF_STATE_CHANGE;
+ case 3: // REASON
+ return REASON;
+ 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 static final _Fields optionals[] = {_Fields.TIME_OF_STATE_CHANGE,_Fields.REASON};
+ 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.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, WorkflowState.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)));
+ tmpMap.put(_Fields.REASON, new org.apache.thrift.meta_data.FieldMetaData("reason", 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(WorkflowStatus.class, metaDataMap);
+ }
+
+ public WorkflowStatus() {
+ }
+
+ public WorkflowStatus(
+ WorkflowState state)
+ {
+ this();
+ this.state = state;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public WorkflowStatus(WorkflowStatus other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetState()) {
+ this.state = other.state;
+ }
+ this.timeOfStateChange = other.timeOfStateChange;
+ if (other.isSetReason()) {
+ this.reason = other.reason;
+ }
+ }
+
+ public WorkflowStatus deepCopy() {
+ return new WorkflowStatus(this);
+ }
+
+ @Override
+ public void clear() {
+ this.state = null;
+ setTimeOfStateChangeIsSet(false);
+ this.timeOfStateChange = 0;
+ this.reason = null;
+ }
+
+ /**
+ *
+ * @see WorkflowState
+ */
+ public WorkflowState getState() {
+ return this.state;
+ }
+
+ /**
+ *
+ * @see WorkflowState
+ */
+ public void setState(WorkflowState state) {
+ this.state = state;
+ }
+
+ public void unsetState() {
+ this.state = null;
+ }
+
+ /** Returns true if field state is set (has been assigned a value) and false otherwise */
+ public boolean isSetState() {
+ return this.state != null;
+ }
+
+ public void setStateIsSet(boolean value) {
+ if (!value) {
+ this.state = 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 String getReason() {
+ return this.reason;
+ }
+
+ public void setReason(String reason) {
+ this.reason = reason;
+ }
+
+ public void unsetReason() {
+ this.reason = null;
+ }
+
+ /** Returns true if field reason is set (has been assigned a value) and false otherwise */
+ public boolean isSetReason() {
+ return this.reason != null;
+ }
+
+ public void setReasonIsSet(boolean value) {
+ if (!value) {
+ this.reason = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case STATE:
+ if (value == null) {
+ unsetState();
+ } else {
+ setState((WorkflowState)value);
+ }
+ break;
+
+ case TIME_OF_STATE_CHANGE:
+ if (value == null) {
+ unsetTimeOfStateChange();
+ } else {
+ setTimeOfStateChange((Long)value);
+ }
+ break;
+
+ case REASON:
+ if (value == null) {
+ unsetReason();
+ } else {
+ setReason((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case STATE:
+ return getState();
+
+ case TIME_OF_STATE_CHANGE:
+ return getTimeOfStateChange();
+
+ case REASON:
+ return getReason();
+
+ }
+ 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 STATE:
+ return isSetState();
+ case TIME_OF_STATE_CHANGE:
+ return isSetTimeOfStateChange();
+ case REASON:
+ return isSetReason();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof WorkflowStatus)
+ return this.equals((WorkflowStatus)that);
+ return false;
+ }
+
+ public boolean equals(WorkflowStatus that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_state = true && this.isSetState();
+ boolean that_present_state = true && that.isSetState();
+ if (this_present_state || that_present_state) {
+ if (!(this_present_state && that_present_state))
+ return false;
+ if (!this.state.equals(that.state))
+ 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;
+ }
+
+ boolean this_present_reason = true && this.isSetReason();
+ boolean that_present_reason = true && that.isSetReason();
+ if (this_present_reason || that_present_reason) {
+ if (!(this_present_reason && that_present_reason))
+ return false;
+ if (!this.reason.equals(that.reason))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_state = true && (isSetState());
+ list.add(present_state);
+ if (present_state)
+ list.add(state.getValue());
+
+ boolean present_timeOfStateChange = true && (isSetTimeOfStateChange());
+ list.add(present_timeOfStateChange);
+ if (present_timeOfStateChange)
+ list.add(timeOfStateChange);
+
+ boolean present_reason = true && (isSetReason());
+ list.add(present_reason);
+ if (present_reason)
+ list.add(reason);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(WorkflowStatus other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetState()).compareTo(other.isSetState());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetState()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, other.state);
+ 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;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetReason()).compareTo(other.isSetReason());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetReason()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reason, other.reason);
+ 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("WorkflowStatus(");
+ boolean first = true;
+
+ sb.append("state:");
+ if (this.state == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.state);
+ }
+ first = false;
+ if (isSetTimeOfStateChange()) {
+ if (!first) sb.append(", ");
+ sb.append("timeOfStateChange:");
+ sb.append(this.timeOfStateChange);
+ first = false;
+ }
+ if (isSetReason()) {
+ if (!first) sb.append(", ");
+ sb.append("reason:");
+ if (this.reason == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.reason);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetState()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'state' 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 WorkflowStatusStandardSchemeFactory implements SchemeFactory {
+ public WorkflowStatusStandardScheme getScheme() {
+ return new WorkflowStatusStandardScheme();
+ }
+ }
+
+ private static class WorkflowStatusStandardScheme extends StandardScheme<WorkflowStatus> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, WorkflowStatus 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: // STATE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.state = org.apache.airavata.model.WorkflowState.findByValue(iprot.readI32());
+ struct.setStateIsSet(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;
+ case 3: // REASON
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.reason = iprot.readString();
+ struct.setReasonIsSet(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, WorkflowStatus struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.state != null) {
+ oprot.writeFieldBegin(STATE_FIELD_DESC);
+ oprot.writeI32(struct.state.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetTimeOfStateChange()) {
+ oprot.writeFieldBegin(TIME_OF_STATE_CHANGE_FIELD_DESC);
+ oprot.writeI64(struct.timeOfStateChange);
+ oprot.writeFieldEnd();
+ }
+ if (struct.reason != null) {
+ if (struct.isSetReason()) {
+ oprot.writeFieldBegin(REASON_FIELD_DESC);
+ oprot.writeString(struct.reason);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class WorkflowStatusTupleSchemeFactory implements SchemeFactory {
+ public WorkflowStatusTupleScheme getScheme() {
+ return new WorkflowStatusTupleScheme();
+ }
+ }
+
+ private static class WorkflowStatusTupleScheme extends TupleScheme<WorkflowStatus> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, WorkflowStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeI32(struct.state.getValue());
+ BitSet optionals = new BitSet();
+ if (struct.isSetTimeOfStateChange()) {
+ optionals.set(0);
+ }
+ if (struct.isSetReason()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetTimeOfStateChange()) {
+ oprot.writeI64(struct.timeOfStateChange);
+ }
+ if (struct.isSetReason()) {
+ oprot.writeString(struct.reason);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, WorkflowStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.state = org.apache.airavata.model.WorkflowState.findByValue(iprot.readI32());
+ struct.setStateIsSet(true);
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.timeOfStateChange = iprot.readI64();
+ struct.setTimeOfStateChangeIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.reason = iprot.readString();
+ struct.setReasonIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/97f4ba92/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java
index 01d96ca..afc2676 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java
@@ -77,7 +77,7 @@ import org.slf4j.LoggerFactory;
* assigns to the environment variable "NAME" the value
*
*/
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-01-15")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-02-01")
public class ApplicationDeploymentDescription implements org.apache.thrift.TBase<ApplicationDeploymentDescription, ApplicationDeploymentDescription._Fields>, java.io.Serializable, Cloneable, Comparable<ApplicationDeploymentDescription> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ApplicationDeploymentDescription");
http://git-wip-us.apache.org/repos/asf/airavata/blob/97f4ba92/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationModule.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationModule.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationModule.java
index d442292..ee692aa 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationModule.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationModule.java
@@ -66,7 +66,7 @@ import org.slf4j.LoggerFactory;
* Descriprion of the Module
*
*/
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-01-15")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-02-01")
public class ApplicationModule implements org.apache.thrift.TBase<ApplicationModule, ApplicationModule._Fields>, java.io.Serializable, Cloneable, Comparable<ApplicationModule> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ApplicationModule");