adding the initial version of the data catalog
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/d3d5c97a Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/d3d5c97a Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/d3d5c97a Branch: refs/heads/master Commit: d3d5c97ab7ddeedb042299b266af1ef4966148f8 Parents: 5d80c91 Author: scnakandala <[email protected]> Authored: Wed Dec 2 17:53:48 2015 -0500 Committer: scnakandala <[email protected]> Committed: Tue Dec 15 21:11:38 2015 -0500 ---------------------------------------------------------------------- .../model/data/resource/DataResourceModel.java | 907 +----- .../data/resource/ReplicaLocationModel.java | 459 --- .../model/data/resource/ResourceModel.java | 679 ---- .../main/resources/airavata-server.properties | 13 + .../test/resources/airavata-server.properties | 13 + .../airavata/data/manager/DataManager.java | 6 +- modules/registry/logs/airavata.log | 2929 ++++++++++++++++++ .../src/test/resources/datacatalog-derby.sql | 52 + .../airavata-api/data_resource_models.thrift | 18 +- 9 files changed, 3102 insertions(+), 1974 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata/blob/d3d5c97a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/DataResourceModel.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/DataResourceModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/DataResourceModel.java index 561efe8..86bd878 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/DataResourceModel.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/DataResourceModel.java @@ -51,23 +51,17 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-15") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-2") public class DataResourceModel implements org.apache.thrift.TBase<DataResourceModel, DataResourceModel._Fields>, java.io.Serializable, Cloneable, Comparable<DataResourceModel> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DataResourceModel"); private static final org.apache.thrift.protocol.TField RESOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceId", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField PARENT_RESOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("parentResourceId", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField RESOURCE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceName", org.apache.thrift.protocol.TType.STRING, (short)4); - private static final org.apache.thrift.protocol.TField RESOURCE_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceDescription", org.apache.thrift.protocol.TType.STRING, (short)5); - private static final org.apache.thrift.protocol.TField OWNER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerName", org.apache.thrift.protocol.TType.STRING, (short)6); - private static final org.apache.thrift.protocol.TField DATA_RESOURCE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("dataResourceType", org.apache.thrift.protocol.TType.I32, (short)7); - private static final org.apache.thrift.protocol.TField RESOURCE_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceSize", org.apache.thrift.protocol.TType.I32, (short)8); - 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)9); - private static final org.apache.thrift.protocol.TField LAST_MODIFIED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastModifiedTime", org.apache.thrift.protocol.TType.I64, (short)10); - private static final org.apache.thrift.protocol.TField RESOURCE_METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceMetadata", org.apache.thrift.protocol.TType.MAP, (short)11); - private static final org.apache.thrift.protocol.TField REPLICA_LOCATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("replicaLocations", org.apache.thrift.protocol.TType.LIST, (short)12); - private static final org.apache.thrift.protocol.TField CHILD_RESOURCES_FIELD_DESC = new org.apache.thrift.protocol.TField("childResources", org.apache.thrift.protocol.TType.LIST, (short)13); + private static final org.apache.thrift.protocol.TField RESOURCE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceName", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField RESOURCE_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceDescription", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField RESOURCE_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceSize", org.apache.thrift.protocol.TType.I32, (short)4); + 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)5); + private static final org.apache.thrift.protocol.TField LAST_MODIFIED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastModifiedTime", org.apache.thrift.protocol.TType.I64, (short)6); + private static final org.apache.thrift.protocol.TField REPLICA_LOCATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("replicaLocations", org.apache.thrift.protocol.TType.LIST, (short)7); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -76,38 +70,22 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo } private String resourceId; // optional - private String gatewayId; // optional - private String parentResourceId; // optional private String resourceName; // optional private String resourceDescription; // optional - private String ownerName; // optional - private DataResourceType dataResourceType; // optional private int resourceSize; // optional private long creationTime; // optional private long lastModifiedTime; // optional - private Map<String,String> resourceMetadata; // optional - private List<DataReplicaLocationModel> replicaLocations; // optional - private List<DataResourceModel> childResources; // optional + private List<DataReplicaLocationModel> replicaLocations; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { RESOURCE_ID((short)1, "resourceId"), - GATEWAY_ID((short)2, "gatewayId"), - PARENT_RESOURCE_ID((short)3, "parentResourceId"), - RESOURCE_NAME((short)4, "resourceName"), - RESOURCE_DESCRIPTION((short)5, "resourceDescription"), - OWNER_NAME((short)6, "ownerName"), - /** - * - * @see DataResourceType - */ - DATA_RESOURCE_TYPE((short)7, "dataResourceType"), - RESOURCE_SIZE((short)8, "resourceSize"), - CREATION_TIME((short)9, "creationTime"), - LAST_MODIFIED_TIME((short)10, "lastModifiedTime"), - RESOURCE_METADATA((short)11, "resourceMetadata"), - REPLICA_LOCATIONS((short)12, "replicaLocations"), - CHILD_RESOURCES((short)13, "childResources"); + RESOURCE_NAME((short)2, "resourceName"), + RESOURCE_DESCRIPTION((short)3, "resourceDescription"), + RESOURCE_SIZE((short)4, "resourceSize"), + CREATION_TIME((short)5, "creationTime"), + LAST_MODIFIED_TIME((short)6, "lastModifiedTime"), + REPLICA_LOCATIONS((short)7, "replicaLocations"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -124,30 +102,18 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo switch(fieldId) { case 1: // RESOURCE_ID return RESOURCE_ID; - case 2: // GATEWAY_ID - return GATEWAY_ID; - case 3: // PARENT_RESOURCE_ID - return PARENT_RESOURCE_ID; - case 4: // RESOURCE_NAME + case 2: // RESOURCE_NAME return RESOURCE_NAME; - case 5: // RESOURCE_DESCRIPTION + case 3: // RESOURCE_DESCRIPTION return RESOURCE_DESCRIPTION; - case 6: // OWNER_NAME - return OWNER_NAME; - case 7: // DATA_RESOURCE_TYPE - return DATA_RESOURCE_TYPE; - case 8: // RESOURCE_SIZE + case 4: // RESOURCE_SIZE return RESOURCE_SIZE; - case 9: // CREATION_TIME + case 5: // CREATION_TIME return CREATION_TIME; - case 10: // LAST_MODIFIED_TIME + case 6: // LAST_MODIFIED_TIME return LAST_MODIFIED_TIME; - case 11: // RESOURCE_METADATA - return RESOURCE_METADATA; - case 12: // REPLICA_LOCATIONS + case 7: // REPLICA_LOCATIONS return REPLICA_LOCATIONS; - case 13: // CHILD_RESOURCES - return CHILD_RESOURCES; default: return null; } @@ -192,40 +158,25 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo private static final int __CREATIONTIME_ISSET_ID = 1; private static final int __LASTMODIFIEDTIME_ISSET_ID = 2; private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.RESOURCE_ID,_Fields.GATEWAY_ID,_Fields.PARENT_RESOURCE_ID,_Fields.RESOURCE_NAME,_Fields.RESOURCE_DESCRIPTION,_Fields.OWNER_NAME,_Fields.DATA_RESOURCE_TYPE,_Fields.RESOURCE_SIZE,_Fields.CREATION_TIME,_Fields.LAST_MODIFIED_TIME,_Fields.RESOURCE_METADATA,_Fields.REPLICA_LOCATIONS,_Fields.CHILD_RESOURCES}; + private static final _Fields optionals[] = {_Fields.RESOURCE_ID,_Fields.RESOURCE_NAME,_Fields.RESOURCE_DESCRIPTION,_Fields.RESOURCE_SIZE,_Fields.CREATION_TIME,_Fields.LAST_MODIFIED_TIME}; 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.RESOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("resourceId", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PARENT_RESOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("parentResourceId", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.RESOURCE_NAME, new org.apache.thrift.meta_data.FieldMetaData("resourceName", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.RESOURCE_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("resourceDescription", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.OWNER_NAME, new org.apache.thrift.meta_data.FieldMetaData("ownerName", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DATA_RESOURCE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("dataResourceType", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, DataResourceType.class))); tmpMap.put(_Fields.RESOURCE_SIZE, new org.apache.thrift.meta_data.FieldMetaData("resourceSize", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); 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.LAST_MODIFIED_TIME, new org.apache.thrift.meta_data.FieldMetaData("lastModifiedTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.RESOURCE_METADATA, new org.apache.thrift.meta_data.FieldMetaData("resourceMetadata", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.REPLICA_LOCATIONS, new org.apache.thrift.meta_data.FieldMetaData("replicaLocations", org.apache.thrift.TFieldRequirementType.OPTIONAL, + tmpMap.put(_Fields.REPLICA_LOCATIONS, new org.apache.thrift.meta_data.FieldMetaData("replicaLocations", org.apache.thrift.TFieldRequirementType.DEFAULT, 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.STRUCT , "DataReplicaLocationModel")))); - tmpMap.put(_Fields.CHILD_RESOURCES, new org.apache.thrift.meta_data.FieldMetaData("childResources", 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.STRUCT , "DataResourceModel")))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DataResourceModel.class, metaDataMap); } @@ -233,6 +184,13 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo public DataResourceModel() { } + public DataResourceModel( + List<DataReplicaLocationModel> replicaLocations) + { + this(); + this.replicaLocations = replicaLocations; + } + /** * Performs a deep copy on <i>other</i>. */ @@ -241,31 +199,15 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo if (other.isSetResourceId()) { this.resourceId = other.resourceId; } - if (other.isSetGatewayId()) { - this.gatewayId = other.gatewayId; - } - if (other.isSetParentResourceId()) { - this.parentResourceId = other.parentResourceId; - } if (other.isSetResourceName()) { this.resourceName = other.resourceName; } if (other.isSetResourceDescription()) { this.resourceDescription = other.resourceDescription; } - if (other.isSetOwnerName()) { - this.ownerName = other.ownerName; - } - if (other.isSetDataResourceType()) { - this.dataResourceType = other.dataResourceType; - } this.resourceSize = other.resourceSize; this.creationTime = other.creationTime; this.lastModifiedTime = other.lastModifiedTime; - if (other.isSetResourceMetadata()) { - Map<String,String> __this__resourceMetadata = new HashMap<String,String>(other.resourceMetadata); - this.resourceMetadata = __this__resourceMetadata; - } if (other.isSetReplicaLocations()) { List<DataReplicaLocationModel> __this__replicaLocations = new ArrayList<DataReplicaLocationModel>(other.replicaLocations.size()); for (DataReplicaLocationModel other_element : other.replicaLocations) { @@ -273,13 +215,6 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo } this.replicaLocations = __this__replicaLocations; } - if (other.isSetChildResources()) { - List<DataResourceModel> __this__childResources = new ArrayList<DataResourceModel>(other.childResources.size()); - for (DataResourceModel other_element : other.childResources) { - __this__childResources.add(other_element); - } - this.childResources = __this__childResources; - } } public DataResourceModel deepCopy() { @@ -289,21 +224,15 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo @Override public void clear() { this.resourceId = null; - this.gatewayId = null; - this.parentResourceId = null; this.resourceName = null; this.resourceDescription = null; - this.ownerName = null; - this.dataResourceType = null; setResourceSizeIsSet(false); this.resourceSize = 0; setCreationTimeIsSet(false); this.creationTime = 0; setLastModifiedTimeIsSet(false); this.lastModifiedTime = 0; - this.resourceMetadata = null; this.replicaLocations = null; - this.childResources = null; } public String getResourceId() { @@ -329,52 +258,6 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo } } - public String getGatewayId() { - return this.gatewayId; - } - - public void setGatewayId(String gatewayId) { - this.gatewayId = gatewayId; - } - - public void unsetGatewayId() { - this.gatewayId = null; - } - - /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */ - public boolean isSetGatewayId() { - return this.gatewayId != null; - } - - public void setGatewayIdIsSet(boolean value) { - if (!value) { - this.gatewayId = null; - } - } - - public String getParentResourceId() { - return this.parentResourceId; - } - - public void setParentResourceId(String parentResourceId) { - this.parentResourceId = parentResourceId; - } - - public void unsetParentResourceId() { - this.parentResourceId = null; - } - - /** Returns true if field parentResourceId is set (has been assigned a value) and false otherwise */ - public boolean isSetParentResourceId() { - return this.parentResourceId != null; - } - - public void setParentResourceIdIsSet(boolean value) { - if (!value) { - this.parentResourceId = null; - } - } - public String getResourceName() { return this.resourceName; } @@ -421,60 +304,6 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo } } - public String getOwnerName() { - return this.ownerName; - } - - public void setOwnerName(String ownerName) { - this.ownerName = ownerName; - } - - public void unsetOwnerName() { - this.ownerName = null; - } - - /** Returns true if field ownerName is set (has been assigned a value) and false otherwise */ - public boolean isSetOwnerName() { - return this.ownerName != null; - } - - public void setOwnerNameIsSet(boolean value) { - if (!value) { - this.ownerName = null; - } - } - - /** - * - * @see DataResourceType - */ - public DataResourceType getDataResourceType() { - return this.dataResourceType; - } - - /** - * - * @see DataResourceType - */ - public void setDataResourceType(DataResourceType dataResourceType) { - this.dataResourceType = dataResourceType; - } - - public void unsetDataResourceType() { - this.dataResourceType = null; - } - - /** Returns true if field dataResourceType is set (has been assigned a value) and false otherwise */ - public boolean isSetDataResourceType() { - return this.dataResourceType != null; - } - - public void setDataResourceTypeIsSet(boolean value) { - if (!value) { - this.dataResourceType = null; - } - } - public int getResourceSize() { return this.resourceSize; } @@ -541,40 +370,6 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTMODIFIEDTIME_ISSET_ID, value); } - public int getResourceMetadataSize() { - return (this.resourceMetadata == null) ? 0 : this.resourceMetadata.size(); - } - - public void putToResourceMetadata(String key, String val) { - if (this.resourceMetadata == null) { - this.resourceMetadata = new HashMap<String,String>(); - } - this.resourceMetadata.put(key, val); - } - - public Map<String,String> getResourceMetadata() { - return this.resourceMetadata; - } - - public void setResourceMetadata(Map<String,String> resourceMetadata) { - this.resourceMetadata = resourceMetadata; - } - - public void unsetResourceMetadata() { - this.resourceMetadata = null; - } - - /** Returns true if field resourceMetadata is set (has been assigned a value) and false otherwise */ - public boolean isSetResourceMetadata() { - return this.resourceMetadata != null; - } - - public void setResourceMetadataIsSet(boolean value) { - if (!value) { - this.resourceMetadata = null; - } - } - public int getReplicaLocationsSize() { return (this.replicaLocations == null) ? 0 : this.replicaLocations.size(); } @@ -613,44 +408,6 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo } } - public int getChildResourcesSize() { - return (this.childResources == null) ? 0 : this.childResources.size(); - } - - public java.util.Iterator<DataResourceModel> getChildResourcesIterator() { - return (this.childResources == null) ? null : this.childResources.iterator(); - } - - public void addToChildResources(DataResourceModel elem) { - if (this.childResources == null) { - this.childResources = new ArrayList<DataResourceModel>(); - } - this.childResources.add(elem); - } - - public List<DataResourceModel> getChildResources() { - return this.childResources; - } - - public void setChildResources(List<DataResourceModel> childResources) { - this.childResources = childResources; - } - - public void unsetChildResources() { - this.childResources = null; - } - - /** Returns true if field childResources is set (has been assigned a value) and false otherwise */ - public boolean isSetChildResources() { - return this.childResources != null; - } - - public void setChildResourcesIsSet(boolean value) { - if (!value) { - this.childResources = null; - } - } - public void setFieldValue(_Fields field, Object value) { switch (field) { case RESOURCE_ID: @@ -661,22 +418,6 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo } break; - case GATEWAY_ID: - if (value == null) { - unsetGatewayId(); - } else { - setGatewayId((String)value); - } - break; - - case PARENT_RESOURCE_ID: - if (value == null) { - unsetParentResourceId(); - } else { - setParentResourceId((String)value); - } - break; - case RESOURCE_NAME: if (value == null) { unsetResourceName(); @@ -693,22 +434,6 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo } break; - case OWNER_NAME: - if (value == null) { - unsetOwnerName(); - } else { - setOwnerName((String)value); - } - break; - - case DATA_RESOURCE_TYPE: - if (value == null) { - unsetDataResourceType(); - } else { - setDataResourceType((DataResourceType)value); - } - break; - case RESOURCE_SIZE: if (value == null) { unsetResourceSize(); @@ -733,14 +458,6 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo } break; - case RESOURCE_METADATA: - if (value == null) { - unsetResourceMetadata(); - } else { - setResourceMetadata((Map<String,String>)value); - } - break; - case REPLICA_LOCATIONS: if (value == null) { unsetReplicaLocations(); @@ -749,14 +466,6 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo } break; - case CHILD_RESOURCES: - if (value == null) { - unsetChildResources(); - } else { - setChildResources((List<DataResourceModel>)value); - } - break; - } } @@ -765,24 +474,12 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo case RESOURCE_ID: return getResourceId(); - case GATEWAY_ID: - return getGatewayId(); - - case PARENT_RESOURCE_ID: - return getParentResourceId(); - case RESOURCE_NAME: return getResourceName(); case RESOURCE_DESCRIPTION: return getResourceDescription(); - case OWNER_NAME: - return getOwnerName(); - - case DATA_RESOURCE_TYPE: - return getDataResourceType(); - case RESOURCE_SIZE: return Integer.valueOf(getResourceSize()); @@ -792,15 +489,9 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo case LAST_MODIFIED_TIME: return Long.valueOf(getLastModifiedTime()); - case RESOURCE_METADATA: - return getResourceMetadata(); - case REPLICA_LOCATIONS: return getReplicaLocations(); - case CHILD_RESOURCES: - return getChildResources(); - } throw new IllegalStateException(); } @@ -814,30 +505,18 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo switch (field) { case RESOURCE_ID: return isSetResourceId(); - case GATEWAY_ID: - return isSetGatewayId(); - case PARENT_RESOURCE_ID: - return isSetParentResourceId(); case RESOURCE_NAME: return isSetResourceName(); case RESOURCE_DESCRIPTION: return isSetResourceDescription(); - case OWNER_NAME: - return isSetOwnerName(); - case DATA_RESOURCE_TYPE: - return isSetDataResourceType(); case RESOURCE_SIZE: return isSetResourceSize(); case CREATION_TIME: return isSetCreationTime(); case LAST_MODIFIED_TIME: return isSetLastModifiedTime(); - case RESOURCE_METADATA: - return isSetResourceMetadata(); case REPLICA_LOCATIONS: return isSetReplicaLocations(); - case CHILD_RESOURCES: - return isSetChildResources(); } throw new IllegalStateException(); } @@ -864,24 +543,6 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo return false; } - boolean this_present_gatewayId = true && this.isSetGatewayId(); - boolean that_present_gatewayId = true && that.isSetGatewayId(); - if (this_present_gatewayId || that_present_gatewayId) { - if (!(this_present_gatewayId && that_present_gatewayId)) - return false; - if (!this.gatewayId.equals(that.gatewayId)) - return false; - } - - boolean this_present_parentResourceId = true && this.isSetParentResourceId(); - boolean that_present_parentResourceId = true && that.isSetParentResourceId(); - if (this_present_parentResourceId || that_present_parentResourceId) { - if (!(this_present_parentResourceId && that_present_parentResourceId)) - return false; - if (!this.parentResourceId.equals(that.parentResourceId)) - return false; - } - boolean this_present_resourceName = true && this.isSetResourceName(); boolean that_present_resourceName = true && that.isSetResourceName(); if (this_present_resourceName || that_present_resourceName) { @@ -900,24 +561,6 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo return false; } - boolean this_present_ownerName = true && this.isSetOwnerName(); - boolean that_present_ownerName = true && that.isSetOwnerName(); - if (this_present_ownerName || that_present_ownerName) { - if (!(this_present_ownerName && that_present_ownerName)) - return false; - if (!this.ownerName.equals(that.ownerName)) - return false; - } - - boolean this_present_dataResourceType = true && this.isSetDataResourceType(); - boolean that_present_dataResourceType = true && that.isSetDataResourceType(); - if (this_present_dataResourceType || that_present_dataResourceType) { - if (!(this_present_dataResourceType && that_present_dataResourceType)) - return false; - if (!this.dataResourceType.equals(that.dataResourceType)) - return false; - } - boolean this_present_resourceSize = true && this.isSetResourceSize(); boolean that_present_resourceSize = true && that.isSetResourceSize(); if (this_present_resourceSize || that_present_resourceSize) { @@ -945,15 +588,6 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo return false; } - boolean this_present_resourceMetadata = true && this.isSetResourceMetadata(); - boolean that_present_resourceMetadata = true && that.isSetResourceMetadata(); - if (this_present_resourceMetadata || that_present_resourceMetadata) { - if (!(this_present_resourceMetadata && that_present_resourceMetadata)) - return false; - if (!this.resourceMetadata.equals(that.resourceMetadata)) - return false; - } - boolean this_present_replicaLocations = true && this.isSetReplicaLocations(); boolean that_present_replicaLocations = true && that.isSetReplicaLocations(); if (this_present_replicaLocations || that_present_replicaLocations) { @@ -963,15 +597,6 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo return false; } - boolean this_present_childResources = true && this.isSetChildResources(); - boolean that_present_childResources = true && that.isSetChildResources(); - if (this_present_childResources || that_present_childResources) { - if (!(this_present_childResources && that_present_childResources)) - return false; - if (!this.childResources.equals(that.childResources)) - return false; - } - return true; } @@ -984,16 +609,6 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo if (present_resourceId) list.add(resourceId); - boolean present_gatewayId = true && (isSetGatewayId()); - list.add(present_gatewayId); - if (present_gatewayId) - list.add(gatewayId); - - boolean present_parentResourceId = true && (isSetParentResourceId()); - list.add(present_parentResourceId); - if (present_parentResourceId) - list.add(parentResourceId); - boolean present_resourceName = true && (isSetResourceName()); list.add(present_resourceName); if (present_resourceName) @@ -1004,16 +619,6 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo if (present_resourceDescription) list.add(resourceDescription); - boolean present_ownerName = true && (isSetOwnerName()); - list.add(present_ownerName); - if (present_ownerName) - list.add(ownerName); - - boolean present_dataResourceType = true && (isSetDataResourceType()); - list.add(present_dataResourceType); - if (present_dataResourceType) - list.add(dataResourceType.getValue()); - boolean present_resourceSize = true && (isSetResourceSize()); list.add(present_resourceSize); if (present_resourceSize) @@ -1029,21 +634,11 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo if (present_lastModifiedTime) list.add(lastModifiedTime); - boolean present_resourceMetadata = true && (isSetResourceMetadata()); - list.add(present_resourceMetadata); - if (present_resourceMetadata) - list.add(resourceMetadata); - boolean present_replicaLocations = true && (isSetReplicaLocations()); list.add(present_replicaLocations); if (present_replicaLocations) list.add(replicaLocations); - boolean present_childResources = true && (isSetChildResources()); - list.add(present_childResources); - if (present_childResources) - list.add(childResources); - return list.hashCode(); } @@ -1065,26 +660,6 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo return lastComparison; } } - lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetGatewayId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetParentResourceId()).compareTo(other.isSetParentResourceId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetParentResourceId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentResourceId, other.parentResourceId); - if (lastComparison != 0) { - return lastComparison; - } - } lastComparison = Boolean.valueOf(isSetResourceName()).compareTo(other.isSetResourceName()); if (lastComparison != 0) { return lastComparison; @@ -1105,26 +680,6 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOwnerName()).compareTo(other.isSetOwnerName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetOwnerName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerName, other.ownerName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDataResourceType()).compareTo(other.isSetDataResourceType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDataResourceType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataResourceType, other.dataResourceType); - if (lastComparison != 0) { - return lastComparison; - } - } lastComparison = Boolean.valueOf(isSetResourceSize()).compareTo(other.isSetResourceSize()); if (lastComparison != 0) { return lastComparison; @@ -1155,16 +710,6 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo return lastComparison; } } - lastComparison = Boolean.valueOf(isSetResourceMetadata()).compareTo(other.isSetResourceMetadata()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetResourceMetadata()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resourceMetadata, other.resourceMetadata); - if (lastComparison != 0) { - return lastComparison; - } - } lastComparison = Boolean.valueOf(isSetReplicaLocations()).compareTo(other.isSetReplicaLocations()); if (lastComparison != 0) { return lastComparison; @@ -1175,16 +720,6 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo return lastComparison; } } - lastComparison = Boolean.valueOf(isSetChildResources()).compareTo(other.isSetChildResources()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetChildResources()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.childResources, other.childResources); - if (lastComparison != 0) { - return lastComparison; - } - } return 0; } @@ -1214,26 +749,6 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo } first = false; } - if (isSetGatewayId()) { - if (!first) sb.append(", "); - sb.append("gatewayId:"); - if (this.gatewayId == null) { - sb.append("null"); - } else { - sb.append(this.gatewayId); - } - first = false; - } - if (isSetParentResourceId()) { - if (!first) sb.append(", "); - sb.append("parentResourceId:"); - if (this.parentResourceId == null) { - sb.append("null"); - } else { - sb.append(this.parentResourceId); - } - first = false; - } if (isSetResourceName()) { if (!first) sb.append(", "); sb.append("resourceName:"); @@ -1254,26 +769,6 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo } first = false; } - if (isSetOwnerName()) { - if (!first) sb.append(", "); - sb.append("ownerName:"); - if (this.ownerName == null) { - sb.append("null"); - } else { - sb.append(this.ownerName); - } - first = false; - } - if (isSetDataResourceType()) { - if (!first) sb.append(", "); - sb.append("dataResourceType:"); - if (this.dataResourceType == null) { - sb.append("null"); - } else { - sb.append(this.dataResourceType); - } - first = false; - } if (isSetResourceSize()) { if (!first) sb.append(", "); sb.append("resourceSize:"); @@ -1292,36 +787,14 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo sb.append(this.lastModifiedTime); first = false; } - if (isSetResourceMetadata()) { - if (!first) sb.append(", "); - sb.append("resourceMetadata:"); - if (this.resourceMetadata == null) { - sb.append("null"); - } else { - sb.append(this.resourceMetadata); - } - first = false; - } - if (isSetReplicaLocations()) { - if (!first) sb.append(", "); - sb.append("replicaLocations:"); - if (this.replicaLocations == null) { - sb.append("null"); - } else { - sb.append(this.replicaLocations); - } - first = false; - } - if (isSetChildResources()) { - if (!first) sb.append(", "); - sb.append("childResources:"); - if (this.childResources == null) { - sb.append("null"); - } else { - sb.append(this.childResources); - } - first = false; + if (!first) sb.append(", "); + sb.append("replicaLocations:"); + if (this.replicaLocations == null) { + sb.append("null"); + } else { + sb.append(this.replicaLocations); } + first = false; sb.append(")"); return sb.toString(); } @@ -1375,23 +848,7 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // GATEWAY_ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.gatewayId = iprot.readString(); - struct.setGatewayIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // PARENT_RESOURCE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.parentResourceId = iprot.readString(); - struct.setParentResourceIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // RESOURCE_NAME + case 2: // RESOURCE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.resourceName = iprot.readString(); struct.setResourceNameIsSet(true); @@ -1399,7 +856,7 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 5: // RESOURCE_DESCRIPTION + case 3: // RESOURCE_DESCRIPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.resourceDescription = iprot.readString(); struct.setResourceDescriptionIsSet(true); @@ -1407,23 +864,7 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 6: // OWNER_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.ownerName = iprot.readString(); - struct.setOwnerNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // DATA_RESOURCE_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.dataResourceType = org.apache.airavata.model.data.resource.DataResourceType.findByValue(iprot.readI32()); - struct.setDataResourceTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // RESOURCE_SIZE + case 4: // RESOURCE_SIZE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.resourceSize = iprot.readI32(); struct.setResourceSizeIsSet(true); @@ -1431,7 +872,7 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 9: // CREATION_TIME + case 5: // CREATION_TIME if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.creationTime = iprot.readI64(); struct.setCreationTimeIsSet(true); @@ -1439,7 +880,7 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 10: // LAST_MODIFIED_TIME + case 6: // LAST_MODIFIED_TIME if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.lastModifiedTime = iprot.readI64(); struct.setLastModifiedTimeIsSet(true); @@ -1447,37 +888,17 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 11: // RESOURCE_METADATA - if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin(); - struct.resourceMetadata = new HashMap<String,String>(2*_map0.size); - String _key1; - String _val2; - for (int _i3 = 0; _i3 < _map0.size; ++_i3) - { - _key1 = iprot.readString(); - _val2 = iprot.readString(); - struct.resourceMetadata.put(_key1, _val2); - } - iprot.readMapEnd(); - } - struct.setResourceMetadataIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 12: // REPLICA_LOCATIONS + case 7: // REPLICA_LOCATIONS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list4 = iprot.readListBegin(); - struct.replicaLocations = new ArrayList<DataReplicaLocationModel>(_list4.size); - DataReplicaLocationModel _elem5; - for (int _i6 = 0; _i6 < _list4.size; ++_i6) + org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); + struct.replicaLocations = new ArrayList<DataReplicaLocationModel>(_list0.size); + DataReplicaLocationModel _elem1; + for (int _i2 = 0; _i2 < _list0.size; ++_i2) { - _elem5 = new DataReplicaLocationModel(); - _elem5.read(iprot); - struct.replicaLocations.add(_elem5); + _elem1 = new DataReplicaLocationModel(); + _elem1.read(iprot); + struct.replicaLocations.add(_elem1); } iprot.readListEnd(); } @@ -1486,25 +907,6 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 13: // CHILD_RESOURCES - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list7 = iprot.readListBegin(); - struct.childResources = new ArrayList<DataResourceModel>(_list7.size); - DataResourceModel _elem8; - for (int _i9 = 0; _i9 < _list7.size; ++_i9) - { - _elem8 = new DataResourceModel(); - _elem8.read(iprot); - struct.childResources.add(_elem8); - } - iprot.readListEnd(); - } - struct.setChildResourcesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -1525,20 +927,6 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo oprot.writeFieldEnd(); } } - if (struct.gatewayId != null) { - if (struct.isSetGatewayId()) { - oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC); - oprot.writeString(struct.gatewayId); - oprot.writeFieldEnd(); - } - } - if (struct.parentResourceId != null) { - if (struct.isSetParentResourceId()) { - oprot.writeFieldBegin(PARENT_RESOURCE_ID_FIELD_DESC); - oprot.writeString(struct.parentResourceId); - oprot.writeFieldEnd(); - } - } if (struct.resourceName != null) { if (struct.isSetResourceName()) { oprot.writeFieldBegin(RESOURCE_NAME_FIELD_DESC); @@ -1553,20 +941,6 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo oprot.writeFieldEnd(); } } - if (struct.ownerName != null) { - if (struct.isSetOwnerName()) { - oprot.writeFieldBegin(OWNER_NAME_FIELD_DESC); - oprot.writeString(struct.ownerName); - oprot.writeFieldEnd(); - } - } - if (struct.dataResourceType != null) { - if (struct.isSetDataResourceType()) { - oprot.writeFieldBegin(DATA_RESOURCE_TYPE_FIELD_DESC); - oprot.writeI32(struct.dataResourceType.getValue()); - oprot.writeFieldEnd(); - } - } if (struct.isSetResourceSize()) { oprot.writeFieldBegin(RESOURCE_SIZE_FIELD_DESC); oprot.writeI32(struct.resourceSize); @@ -1582,48 +956,17 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo oprot.writeI64(struct.lastModifiedTime); oprot.writeFieldEnd(); } - if (struct.resourceMetadata != null) { - if (struct.isSetResourceMetadata()) { - oprot.writeFieldBegin(RESOURCE_METADATA_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.resourceMetadata.size())); - for (Map.Entry<String, String> _iter10 : struct.resourceMetadata.entrySet()) - { - oprot.writeString(_iter10.getKey()); - oprot.writeString(_iter10.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - } if (struct.replicaLocations != null) { - if (struct.isSetReplicaLocations()) { - oprot.writeFieldBegin(REPLICA_LOCATIONS_FIELD_DESC); + oprot.writeFieldBegin(REPLICA_LOCATIONS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.replicaLocations.size())); + for (DataReplicaLocationModel _iter3 : struct.replicaLocations) { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.replicaLocations.size())); - for (DataReplicaLocationModel _iter11 : struct.replicaLocations) - { - _iter11.write(oprot); - } - oprot.writeListEnd(); + _iter3.write(oprot); } - oprot.writeFieldEnd(); - } - } - if (struct.childResources != null) { - if (struct.isSetChildResources()) { - oprot.writeFieldBegin(CHILD_RESOURCES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.childResources.size())); - for (DataResourceModel _iter12 : struct.childResources) - { - _iter12.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); + oprot.writeListEnd(); } + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); @@ -1646,64 +989,34 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo if (struct.isSetResourceId()) { optionals.set(0); } - if (struct.isSetGatewayId()) { - optionals.set(1); - } - if (struct.isSetParentResourceId()) { - optionals.set(2); - } if (struct.isSetResourceName()) { - optionals.set(3); + optionals.set(1); } if (struct.isSetResourceDescription()) { - optionals.set(4); - } - if (struct.isSetOwnerName()) { - optionals.set(5); - } - if (struct.isSetDataResourceType()) { - optionals.set(6); + optionals.set(2); } if (struct.isSetResourceSize()) { - optionals.set(7); + optionals.set(3); } if (struct.isSetCreationTime()) { - optionals.set(8); + optionals.set(4); } if (struct.isSetLastModifiedTime()) { - optionals.set(9); - } - if (struct.isSetResourceMetadata()) { - optionals.set(10); + optionals.set(5); } if (struct.isSetReplicaLocations()) { - optionals.set(11); - } - if (struct.isSetChildResources()) { - optionals.set(12); + optionals.set(6); } - oprot.writeBitSet(optionals, 13); + oprot.writeBitSet(optionals, 7); if (struct.isSetResourceId()) { oprot.writeString(struct.resourceId); } - if (struct.isSetGatewayId()) { - oprot.writeString(struct.gatewayId); - } - if (struct.isSetParentResourceId()) { - oprot.writeString(struct.parentResourceId); - } if (struct.isSetResourceName()) { oprot.writeString(struct.resourceName); } if (struct.isSetResourceDescription()) { oprot.writeString(struct.resourceDescription); } - if (struct.isSetOwnerName()) { - oprot.writeString(struct.ownerName); - } - if (struct.isSetDataResourceType()) { - oprot.writeI32(struct.dataResourceType.getValue()); - } if (struct.isSetResourceSize()) { oprot.writeI32(struct.resourceSize); } @@ -1713,31 +1026,12 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo if (struct.isSetLastModifiedTime()) { oprot.writeI64(struct.lastModifiedTime); } - if (struct.isSetResourceMetadata()) { - { - oprot.writeI32(struct.resourceMetadata.size()); - for (Map.Entry<String, String> _iter13 : struct.resourceMetadata.entrySet()) - { - oprot.writeString(_iter13.getKey()); - oprot.writeString(_iter13.getValue()); - } - } - } if (struct.isSetReplicaLocations()) { { oprot.writeI32(struct.replicaLocations.size()); - for (DataReplicaLocationModel _iter14 : struct.replicaLocations) + for (DataReplicaLocationModel _iter4 : struct.replicaLocations) { - _iter14.write(oprot); - } - } - } - if (struct.isSetChildResources()) { - { - oprot.writeI32(struct.childResources.size()); - for (DataResourceModel _iter15 : struct.childResources) - { - _iter15.write(oprot); + _iter4.write(oprot); } } } @@ -1746,90 +1040,45 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo @Override public void read(org.apache.thrift.protocol.TProtocol prot, DataResourceModel struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(13); + BitSet incoming = iprot.readBitSet(7); if (incoming.get(0)) { struct.resourceId = iprot.readString(); struct.setResourceIdIsSet(true); } if (incoming.get(1)) { - struct.gatewayId = iprot.readString(); - struct.setGatewayIdIsSet(true); - } - if (incoming.get(2)) { - struct.parentResourceId = iprot.readString(); - struct.setParentResourceIdIsSet(true); - } - if (incoming.get(3)) { struct.resourceName = iprot.readString(); struct.setResourceNameIsSet(true); } - if (incoming.get(4)) { + if (incoming.get(2)) { struct.resourceDescription = iprot.readString(); struct.setResourceDescriptionIsSet(true); } - if (incoming.get(5)) { - struct.ownerName = iprot.readString(); - struct.setOwnerNameIsSet(true); - } - if (incoming.get(6)) { - struct.dataResourceType = org.apache.airavata.model.data.resource.DataResourceType.findByValue(iprot.readI32()); - struct.setDataResourceTypeIsSet(true); - } - if (incoming.get(7)) { + if (incoming.get(3)) { struct.resourceSize = iprot.readI32(); struct.setResourceSizeIsSet(true); } - if (incoming.get(8)) { + if (incoming.get(4)) { struct.creationTime = iprot.readI64(); struct.setCreationTimeIsSet(true); } - if (incoming.get(9)) { + if (incoming.get(5)) { struct.lastModifiedTime = iprot.readI64(); struct.setLastModifiedTimeIsSet(true); } - if (incoming.get(10)) { - { - org.apache.thrift.protocol.TMap _map16 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.resourceMetadata = new HashMap<String,String>(2*_map16.size); - String _key17; - String _val18; - for (int _i19 = 0; _i19 < _map16.size; ++_i19) - { - _key17 = iprot.readString(); - _val18 = iprot.readString(); - struct.resourceMetadata.put(_key17, _val18); - } - } - struct.setResourceMetadataIsSet(true); - } - if (incoming.get(11)) { + if (incoming.get(6)) { { - org.apache.thrift.protocol.TList _list20 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.replicaLocations = new ArrayList<DataReplicaLocationModel>(_list20.size); - DataReplicaLocationModel _elem21; - for (int _i22 = 0; _i22 < _list20.size; ++_i22) + org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.replicaLocations = new ArrayList<DataReplicaLocationModel>(_list5.size); + DataReplicaLocationModel _elem6; + for (int _i7 = 0; _i7 < _list5.size; ++_i7) { - _elem21 = new DataReplicaLocationModel(); - _elem21.read(iprot); - struct.replicaLocations.add(_elem21); + _elem6 = new DataReplicaLocationModel(); + _elem6.read(iprot); + struct.replicaLocations.add(_elem6); } } struct.setReplicaLocationsIsSet(true); } - if (incoming.get(12)) { - { - org.apache.thrift.protocol.TList _list23 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.childResources = new ArrayList<DataResourceModel>(_list23.size); - DataResourceModel _elem24; - for (int _i25 = 0; _i25 < _list23.size; ++_i25) - { - _elem24 = new DataResourceModel(); - _elem24.read(iprot); - struct.childResources.add(_elem24); - } - } - struct.setChildResourcesIsSet(true); - } } } http://git-wip-us.apache.org/repos/asf/airavata/blob/d3d5c97a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/ReplicaLocationModel.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/ReplicaLocationModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/ReplicaLocationModel.java deleted file mode 100644 index f3af020..0000000 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/ReplicaLocationModel.java +++ /dev/null @@ -1,459 +0,0 @@ -/** - * 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.2) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.airavata.model.data.resource; - -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.2)", date = "2015-12-2") -public class ReplicaLocationModel implements org.apache.thrift.TBase<ReplicaLocationModel, ReplicaLocationModel._Fields>, java.io.Serializable, Cloneable, Comparable<ReplicaLocationModel> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ReplicaLocationModel"); - - private static final org.apache.thrift.protocol.TField PHYSICAL_LOCATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("physicalLocations", org.apache.thrift.protocol.TType.LIST, (short)1); - - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new ReplicaLocationModelStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ReplicaLocationModelTupleSchemeFactory()); - } - - private List<String> physicalLocations; // 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 { - PHYSICAL_LOCATIONS((short)1, "physicalLocations"); - - 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: // PHYSICAL_LOCATIONS - return PHYSICAL_LOCATIONS; - 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.PHYSICAL_LOCATIONS}; - 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.PHYSICAL_LOCATIONS, new org.apache.thrift.meta_data.FieldMetaData("physicalLocations", 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(ReplicaLocationModel.class, metaDataMap); - } - - public ReplicaLocationModel() { - } - - /** - * Performs a deep copy on <i>other</i>. - */ - public ReplicaLocationModel(ReplicaLocationModel other) { - if (other.isSetPhysicalLocations()) { - List<String> __this__physicalLocations = new ArrayList<String>(other.physicalLocations); - this.physicalLocations = __this__physicalLocations; - } - } - - public ReplicaLocationModel deepCopy() { - return new ReplicaLocationModel(this); - } - - @Override - public void clear() { - this.physicalLocations = null; - } - - public int getPhysicalLocationsSize() { - return (this.physicalLocations == null) ? 0 : this.physicalLocations.size(); - } - - public java.util.Iterator<String> getPhysicalLocationsIterator() { - return (this.physicalLocations == null) ? null : this.physicalLocations.iterator(); - } - - public void addToPhysicalLocations(String elem) { - if (this.physicalLocations == null) { - this.physicalLocations = new ArrayList<String>(); - } - this.physicalLocations.add(elem); - } - - public List<String> getPhysicalLocations() { - return this.physicalLocations; - } - - public void setPhysicalLocations(List<String> physicalLocations) { - this.physicalLocations = physicalLocations; - } - - public void unsetPhysicalLocations() { - this.physicalLocations = null; - } - - /** Returns true if field physicalLocations is set (has been assigned a value) and false otherwise */ - public boolean isSetPhysicalLocations() { - return this.physicalLocations != null; - } - - public void setPhysicalLocationsIsSet(boolean value) { - if (!value) { - this.physicalLocations = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PHYSICAL_LOCATIONS: - if (value == null) { - unsetPhysicalLocations(); - } else { - setPhysicalLocations((List<String>)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PHYSICAL_LOCATIONS: - return getPhysicalLocations(); - - } - 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 PHYSICAL_LOCATIONS: - return isSetPhysicalLocations(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof ReplicaLocationModel) - return this.equals((ReplicaLocationModel)that); - return false; - } - - public boolean equals(ReplicaLocationModel that) { - if (that == null) - return false; - - boolean this_present_physicalLocations = true && this.isSetPhysicalLocations(); - boolean that_present_physicalLocations = true && that.isSetPhysicalLocations(); - if (this_present_physicalLocations || that_present_physicalLocations) { - if (!(this_present_physicalLocations && that_present_physicalLocations)) - return false; - if (!this.physicalLocations.equals(that.physicalLocations)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List<Object> list = new ArrayList<Object>(); - - boolean present_physicalLocations = true && (isSetPhysicalLocations()); - list.add(present_physicalLocations); - if (present_physicalLocations) - list.add(physicalLocations); - - return list.hashCode(); - } - - @Override - public int compareTo(ReplicaLocationModel other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPhysicalLocations()).compareTo(other.isSetPhysicalLocations()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPhysicalLocations()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.physicalLocations, other.physicalLocations); - 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("ReplicaLocationModel("); - boolean first = true; - - if (isSetPhysicalLocations()) { - sb.append("physicalLocations:"); - if (this.physicalLocations == null) { - sb.append("null"); - } else { - sb.append(this.physicalLocations); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // 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 ReplicaLocationModelStandardSchemeFactory implements SchemeFactory { - public ReplicaLocationModelStandardScheme getScheme() { - return new ReplicaLocationModelStandardScheme(); - } - } - - private static class ReplicaLocationModelStandardScheme extends StandardScheme<ReplicaLocationModel> { - - public void read(org.apache.thrift.protocol.TProtocol iprot, ReplicaLocationModel 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: // PHYSICAL_LOCATIONS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list8 = iprot.readListBegin(); - struct.physicalLocations = new ArrayList<String>(_list8.size); - String _elem9; - for (int _i10 = 0; _i10 < _list8.size; ++_i10) - { - _elem9 = iprot.readString(); - struct.physicalLocations.add(_elem9); - } - iprot.readListEnd(); - } - struct.setPhysicalLocationsIsSet(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, ReplicaLocationModel struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.physicalLocations != null) { - if (struct.isSetPhysicalLocations()) { - oprot.writeFieldBegin(PHYSICAL_LOCATIONS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.physicalLocations.size())); - for (String _iter11 : struct.physicalLocations) - { - oprot.writeString(_iter11); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class ReplicaLocationModelTupleSchemeFactory implements SchemeFactory { - public ReplicaLocationModelTupleScheme getScheme() { - return new ReplicaLocationModelTupleScheme(); - } - } - - private static class ReplicaLocationModelTupleScheme extends TupleScheme<ReplicaLocationModel> { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, ReplicaLocationModel struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetPhysicalLocations()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetPhysicalLocations()) { - { - oprot.writeI32(struct.physicalLocations.size()); - for (String _iter12 : struct.physicalLocations) - { - oprot.writeString(_iter12); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, ReplicaLocationModel struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.physicalLocations = new ArrayList<String>(_list13.size); - String _elem14; - for (int _i15 = 0; _i15 < _list13.size; ++_i15) - { - _elem14 = iprot.readString(); - struct.physicalLocations.add(_elem14); - } - } - struct.setPhysicalLocationsIsSet(true); - } - } - } - -} -
