http://git-wip-us.apache.org/repos/asf/airavata/blob/5881af94/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 deleted file mode 100644 index 9dc6b83..0000000 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/DataResourceModel.java +++ /dev/null @@ -1,2049 +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.3) - * - * 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.3)", date = "2015-12-22") -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 SHA256_CHECKSUM_FIELD_DESC = new org.apache.thrift.protocol.TField("sha256Checksum", org.apache.thrift.protocol.TType.STRING, (short)7); - 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)8); - 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)9); - private static final org.apache.thrift.protocol.TField NATIVE_FORMAT_FIELD_DESC = new org.apache.thrift.protocol.TField("nativeFormat", org.apache.thrift.protocol.TType.STRING, (short)10); - 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)11); - 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)12); - 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)13); - 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)14); - 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)15); - - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new DataResourceModelStandardSchemeFactory()); - schemes.put(TupleScheme.class, new DataResourceModelTupleSchemeFactory()); - } - - 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 String sha256Checksum; // optional - private DataResourceType dataResourceType; // optional - private int resourceSize; // optional - private String nativeFormat; // 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 - - /** 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"), - SHA256_CHECKSUM((short)7, "sha256Checksum"), - /** - * - * @see DataResourceType - */ - DATA_RESOURCE_TYPE((short)8, "dataResourceType"), - RESOURCE_SIZE((short)9, "resourceSize"), - NATIVE_FORMAT((short)10, "nativeFormat"), - CREATION_TIME((short)11, "creationTime"), - LAST_MODIFIED_TIME((short)12, "lastModifiedTime"), - RESOURCE_METADATA((short)13, "resourceMetadata"), - REPLICA_LOCATIONS((short)14, "replicaLocations"), - CHILD_RESOURCES((short)15, "childResources"); - - 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: // 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 - return RESOURCE_NAME; - case 5: // RESOURCE_DESCRIPTION - return RESOURCE_DESCRIPTION; - case 6: // OWNER_NAME - return OWNER_NAME; - case 7: // SHA256_CHECKSUM - return SHA256_CHECKSUM; - case 8: // DATA_RESOURCE_TYPE - return DATA_RESOURCE_TYPE; - case 9: // RESOURCE_SIZE - return RESOURCE_SIZE; - case 10: // NATIVE_FORMAT - return NATIVE_FORMAT; - case 11: // CREATION_TIME - return CREATION_TIME; - case 12: // LAST_MODIFIED_TIME - return LAST_MODIFIED_TIME; - case 13: // RESOURCE_METADATA - return RESOURCE_METADATA; - case 14: // REPLICA_LOCATIONS - return REPLICA_LOCATIONS; - case 15: // CHILD_RESOURCES - return CHILD_RESOURCES; - 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 __RESOURCESIZE_ISSET_ID = 0; - 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.SHA256_CHECKSUM,_Fields.DATA_RESOURCE_TYPE,_Fields.RESOURCE_SIZE,_Fields.NATIVE_FORMAT,_Fields.CREATION_TIME,_Fields.LAST_MODIFIED_TIME,_Fields.RESOURCE_METADATA,_Fields.REPLICA_LOCATIONS,_Fields.CHILD_RESOURCES}; - 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.SHA256_CHECKSUM, new org.apache.thrift.meta_data.FieldMetaData("sha256Checksum", 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.NATIVE_FORMAT, new org.apache.thrift.meta_data.FieldMetaData("nativeFormat", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("creationTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.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, - 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); - } - - public DataResourceModel() { - } - - /** - * Performs a deep copy on <i>other</i>. - */ - public DataResourceModel(DataResourceModel other) { - __isset_bitfield = other.__isset_bitfield; - 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.isSetSha256Checksum()) { - this.sha256Checksum = other.sha256Checksum; - } - if (other.isSetDataResourceType()) { - this.dataResourceType = other.dataResourceType; - } - this.resourceSize = other.resourceSize; - if (other.isSetNativeFormat()) { - this.nativeFormat = other.nativeFormat; - } - 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) { - __this__replicaLocations.add(other_element); - } - 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() { - return new DataResourceModel(this); - } - - @Override - public void clear() { - this.resourceId = null; - this.gatewayId = null; - this.parentResourceId = null; - this.resourceName = null; - this.resourceDescription = null; - this.ownerName = null; - this.sha256Checksum = null; - this.dataResourceType = null; - setResourceSizeIsSet(false); - this.resourceSize = 0; - this.nativeFormat = null; - setCreationTimeIsSet(false); - this.creationTime = 0; - setLastModifiedTimeIsSet(false); - this.lastModifiedTime = 0; - this.resourceMetadata = null; - this.replicaLocations = null; - this.childResources = null; - } - - public String getResourceId() { - return this.resourceId; - } - - public void setResourceId(String resourceId) { - this.resourceId = resourceId; - } - - public void unsetResourceId() { - this.resourceId = null; - } - - /** Returns true if field resourceId is set (has been assigned a value) and false otherwise */ - public boolean isSetResourceId() { - return this.resourceId != null; - } - - public void setResourceIdIsSet(boolean value) { - if (!value) { - this.resourceId = null; - } - } - - 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; - } - - public void setResourceName(String resourceName) { - this.resourceName = resourceName; - } - - public void unsetResourceName() { - this.resourceName = null; - } - - /** Returns true if field resourceName is set (has been assigned a value) and false otherwise */ - public boolean isSetResourceName() { - return this.resourceName != null; - } - - public void setResourceNameIsSet(boolean value) { - if (!value) { - this.resourceName = null; - } - } - - public String getResourceDescription() { - return this.resourceDescription; - } - - public void setResourceDescription(String resourceDescription) { - this.resourceDescription = resourceDescription; - } - - public void unsetResourceDescription() { - this.resourceDescription = null; - } - - /** Returns true if field resourceDescription is set (has been assigned a value) and false otherwise */ - public boolean isSetResourceDescription() { - return this.resourceDescription != null; - } - - public void setResourceDescriptionIsSet(boolean value) { - if (!value) { - this.resourceDescription = null; - } - } - - 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; - } - } - - public String getSha256Checksum() { - return this.sha256Checksum; - } - - public void setSha256Checksum(String sha256Checksum) { - this.sha256Checksum = sha256Checksum; - } - - public void unsetSha256Checksum() { - this.sha256Checksum = null; - } - - /** Returns true if field sha256Checksum is set (has been assigned a value) and false otherwise */ - public boolean isSetSha256Checksum() { - return this.sha256Checksum != null; - } - - public void setSha256ChecksumIsSet(boolean value) { - if (!value) { - this.sha256Checksum = 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; - } - - public void setResourceSize(int resourceSize) { - this.resourceSize = resourceSize; - setResourceSizeIsSet(true); - } - - public void unsetResourceSize() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RESOURCESIZE_ISSET_ID); - } - - /** Returns true if field resourceSize is set (has been assigned a value) and false otherwise */ - public boolean isSetResourceSize() { - return EncodingUtils.testBit(__isset_bitfield, __RESOURCESIZE_ISSET_ID); - } - - public void setResourceSizeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RESOURCESIZE_ISSET_ID, value); - } - - public String getNativeFormat() { - return this.nativeFormat; - } - - public void setNativeFormat(String nativeFormat) { - this.nativeFormat = nativeFormat; - } - - public void unsetNativeFormat() { - this.nativeFormat = null; - } - - /** Returns true if field nativeFormat is set (has been assigned a value) and false otherwise */ - public boolean isSetNativeFormat() { - return this.nativeFormat != null; - } - - public void setNativeFormatIsSet(boolean value) { - if (!value) { - this.nativeFormat = null; - } - } - - public long getCreationTime() { - return this.creationTime; - } - - public void setCreationTime(long creationTime) { - this.creationTime = creationTime; - setCreationTimeIsSet(true); - } - - public void unsetCreationTime() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATIONTIME_ISSET_ID); - } - - /** Returns true if field creationTime is set (has been assigned a value) and false otherwise */ - public boolean isSetCreationTime() { - return EncodingUtils.testBit(__isset_bitfield, __CREATIONTIME_ISSET_ID); - } - - public void setCreationTimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATIONTIME_ISSET_ID, value); - } - - public long getLastModifiedTime() { - return this.lastModifiedTime; - } - - public void setLastModifiedTime(long lastModifiedTime) { - this.lastModifiedTime = lastModifiedTime; - setLastModifiedTimeIsSet(true); - } - - public void unsetLastModifiedTime() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LASTMODIFIEDTIME_ISSET_ID); - } - - /** Returns true if field lastModifiedTime is set (has been assigned a value) and false otherwise */ - public boolean isSetLastModifiedTime() { - return EncodingUtils.testBit(__isset_bitfield, __LASTMODIFIEDTIME_ISSET_ID); - } - - public void setLastModifiedTimeIsSet(boolean value) { - __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(); - } - - public java.util.Iterator<DataReplicaLocationModel> getReplicaLocationsIterator() { - return (this.replicaLocations == null) ? null : this.replicaLocations.iterator(); - } - - public void addToReplicaLocations(DataReplicaLocationModel elem) { - if (this.replicaLocations == null) { - this.replicaLocations = new ArrayList<DataReplicaLocationModel>(); - } - this.replicaLocations.add(elem); - } - - public List<DataReplicaLocationModel> getReplicaLocations() { - return this.replicaLocations; - } - - public void setReplicaLocations(List<DataReplicaLocationModel> replicaLocations) { - this.replicaLocations = replicaLocations; - } - - public void unsetReplicaLocations() { - this.replicaLocations = null; - } - - /** Returns true if field replicaLocations is set (has been assigned a value) and false otherwise */ - public boolean isSetReplicaLocations() { - return this.replicaLocations != null; - } - - public void setReplicaLocationsIsSet(boolean value) { - if (!value) { - this.replicaLocations = null; - } - } - - 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: - if (value == null) { - unsetResourceId(); - } else { - setResourceId((String)value); - } - 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(); - } else { - setResourceName((String)value); - } - break; - - case RESOURCE_DESCRIPTION: - if (value == null) { - unsetResourceDescription(); - } else { - setResourceDescription((String)value); - } - break; - - case OWNER_NAME: - if (value == null) { - unsetOwnerName(); - } else { - setOwnerName((String)value); - } - break; - - case SHA256_CHECKSUM: - if (value == null) { - unsetSha256Checksum(); - } else { - setSha256Checksum((String)value); - } - break; - - case DATA_RESOURCE_TYPE: - if (value == null) { - unsetDataResourceType(); - } else { - setDataResourceType((DataResourceType)value); - } - break; - - case RESOURCE_SIZE: - if (value == null) { - unsetResourceSize(); - } else { - setResourceSize((Integer)value); - } - break; - - case NATIVE_FORMAT: - if (value == null) { - unsetNativeFormat(); - } else { - setNativeFormat((String)value); - } - break; - - case CREATION_TIME: - if (value == null) { - unsetCreationTime(); - } else { - setCreationTime((Long)value); - } - break; - - case LAST_MODIFIED_TIME: - if (value == null) { - unsetLastModifiedTime(); - } else { - setLastModifiedTime((Long)value); - } - break; - - case RESOURCE_METADATA: - if (value == null) { - unsetResourceMetadata(); - } else { - setResourceMetadata((Map<String,String>)value); - } - break; - - case REPLICA_LOCATIONS: - if (value == null) { - unsetReplicaLocations(); - } else { - setReplicaLocations((List<DataReplicaLocationModel>)value); - } - break; - - case CHILD_RESOURCES: - if (value == null) { - unsetChildResources(); - } else { - setChildResources((List<DataResourceModel>)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - 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 SHA256_CHECKSUM: - return getSha256Checksum(); - - case DATA_RESOURCE_TYPE: - return getDataResourceType(); - - case RESOURCE_SIZE: - return getResourceSize(); - - case NATIVE_FORMAT: - return getNativeFormat(); - - case CREATION_TIME: - return getCreationTime(); - - case LAST_MODIFIED_TIME: - return getLastModifiedTime(); - - case RESOURCE_METADATA: - return getResourceMetadata(); - - case REPLICA_LOCATIONS: - return getReplicaLocations(); - - case CHILD_RESOURCES: - return getChildResources(); - - } - 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 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 SHA256_CHECKSUM: - return isSetSha256Checksum(); - case DATA_RESOURCE_TYPE: - return isSetDataResourceType(); - case RESOURCE_SIZE: - return isSetResourceSize(); - case NATIVE_FORMAT: - return isSetNativeFormat(); - 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(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof DataResourceModel) - return this.equals((DataResourceModel)that); - return false; - } - - public boolean equals(DataResourceModel that) { - if (that == null) - return false; - - boolean this_present_resourceId = true && this.isSetResourceId(); - boolean that_present_resourceId = true && that.isSetResourceId(); - if (this_present_resourceId || that_present_resourceId) { - if (!(this_present_resourceId && that_present_resourceId)) - return false; - if (!this.resourceId.equals(that.resourceId)) - 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) { - if (!(this_present_resourceName && that_present_resourceName)) - return false; - if (!this.resourceName.equals(that.resourceName)) - return false; - } - - boolean this_present_resourceDescription = true && this.isSetResourceDescription(); - boolean that_present_resourceDescription = true && that.isSetResourceDescription(); - if (this_present_resourceDescription || that_present_resourceDescription) { - if (!(this_present_resourceDescription && that_present_resourceDescription)) - return false; - if (!this.resourceDescription.equals(that.resourceDescription)) - 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_sha256Checksum = true && this.isSetSha256Checksum(); - boolean that_present_sha256Checksum = true && that.isSetSha256Checksum(); - if (this_present_sha256Checksum || that_present_sha256Checksum) { - if (!(this_present_sha256Checksum && that_present_sha256Checksum)) - return false; - if (!this.sha256Checksum.equals(that.sha256Checksum)) - 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) { - if (!(this_present_resourceSize && that_present_resourceSize)) - return false; - if (this.resourceSize != that.resourceSize) - return false; - } - - boolean this_present_nativeFormat = true && this.isSetNativeFormat(); - boolean that_present_nativeFormat = true && that.isSetNativeFormat(); - if (this_present_nativeFormat || that_present_nativeFormat) { - if (!(this_present_nativeFormat && that_present_nativeFormat)) - return false; - if (!this.nativeFormat.equals(that.nativeFormat)) - return false; - } - - boolean this_present_creationTime = true && this.isSetCreationTime(); - boolean that_present_creationTime = true && that.isSetCreationTime(); - if (this_present_creationTime || that_present_creationTime) { - if (!(this_present_creationTime && that_present_creationTime)) - return false; - if (this.creationTime != that.creationTime) - return false; - } - - boolean this_present_lastModifiedTime = true && this.isSetLastModifiedTime(); - boolean that_present_lastModifiedTime = true && that.isSetLastModifiedTime(); - if (this_present_lastModifiedTime || that_present_lastModifiedTime) { - if (!(this_present_lastModifiedTime && that_present_lastModifiedTime)) - return false; - if (this.lastModifiedTime != that.lastModifiedTime) - 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) { - if (!(this_present_replicaLocations && that_present_replicaLocations)) - return false; - if (!this.replicaLocations.equals(that.replicaLocations)) - 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; - } - - @Override - public int hashCode() { - List<Object> list = new ArrayList<Object>(); - - boolean present_resourceId = true && (isSetResourceId()); - list.add(present_resourceId); - 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) - list.add(resourceName); - - boolean present_resourceDescription = true && (isSetResourceDescription()); - list.add(present_resourceDescription); - if (present_resourceDescription) - list.add(resourceDescription); - - boolean present_ownerName = true && (isSetOwnerName()); - list.add(present_ownerName); - if (present_ownerName) - list.add(ownerName); - - boolean present_sha256Checksum = true && (isSetSha256Checksum()); - list.add(present_sha256Checksum); - if (present_sha256Checksum) - list.add(sha256Checksum); - - 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) - list.add(resourceSize); - - boolean present_nativeFormat = true && (isSetNativeFormat()); - list.add(present_nativeFormat); - if (present_nativeFormat) - list.add(nativeFormat); - - boolean present_creationTime = true && (isSetCreationTime()); - list.add(present_creationTime); - if (present_creationTime) - list.add(creationTime); - - boolean present_lastModifiedTime = true && (isSetLastModifiedTime()); - list.add(present_lastModifiedTime); - 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(); - } - - @Override - public int compareTo(DataResourceModel other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetResourceId()).compareTo(other.isSetResourceId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetResourceId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resourceId, other.resourceId); - if (lastComparison != 0) { - 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; - } - if (isSetResourceName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resourceName, other.resourceName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetResourceDescription()).compareTo(other.isSetResourceDescription()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetResourceDescription()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resourceDescription, other.resourceDescription); - if (lastComparison != 0) { - 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(isSetSha256Checksum()).compareTo(other.isSetSha256Checksum()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSha256Checksum()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sha256Checksum, other.sha256Checksum); - 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; - } - if (isSetResourceSize()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resourceSize, other.resourceSize); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNativeFormat()).compareTo(other.isSetNativeFormat()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNativeFormat()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nativeFormat, other.nativeFormat); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCreationTime()).compareTo(other.isSetCreationTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCreationTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creationTime, other.creationTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetLastModifiedTime()).compareTo(other.isSetLastModifiedTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLastModifiedTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastModifiedTime, other.lastModifiedTime); - if (lastComparison != 0) { - 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; - } - if (isSetReplicaLocations()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.replicaLocations, other.replicaLocations); - if (lastComparison != 0) { - 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; - } - - 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("DataResourceModel("); - boolean first = true; - - if (isSetResourceId()) { - sb.append("resourceId:"); - if (this.resourceId == null) { - sb.append("null"); - } else { - sb.append(this.resourceId); - } - 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:"); - if (this.resourceName == null) { - sb.append("null"); - } else { - sb.append(this.resourceName); - } - first = false; - } - if (isSetResourceDescription()) { - if (!first) sb.append(", "); - sb.append("resourceDescription:"); - if (this.resourceDescription == null) { - sb.append("null"); - } else { - sb.append(this.resourceDescription); - } - 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 (isSetSha256Checksum()) { - if (!first) sb.append(", "); - sb.append("sha256Checksum:"); - if (this.sha256Checksum == null) { - sb.append("null"); - } else { - sb.append(this.sha256Checksum); - } - 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:"); - sb.append(this.resourceSize); - first = false; - } - if (isSetNativeFormat()) { - if (!first) sb.append(", "); - sb.append("nativeFormat:"); - if (this.nativeFormat == null) { - sb.append("null"); - } else { - sb.append(this.nativeFormat); - } - first = false; - } - if (isSetCreationTime()) { - if (!first) sb.append(", "); - sb.append("creationTime:"); - sb.append(this.creationTime); - first = false; - } - if (isSetLastModifiedTime()) { - if (!first) sb.append(", "); - sb.append("lastModifiedTime:"); - 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; - } - 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 { - // 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 DataResourceModelStandardSchemeFactory implements SchemeFactory { - public DataResourceModelStandardScheme getScheme() { - return new DataResourceModelStandardScheme(); - } - } - - private static class DataResourceModelStandardScheme extends StandardScheme<DataResourceModel> { - - public void read(org.apache.thrift.protocol.TProtocol iprot, DataResourceModel 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: // RESOURCE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.resourceId = iprot.readString(); - struct.setResourceIdIsSet(true); - } else { - 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 - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.resourceName = iprot.readString(); - struct.setResourceNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // RESOURCE_DESCRIPTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.resourceDescription = iprot.readString(); - struct.setResourceDescriptionIsSet(true); - } else { - 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: // SHA256_CHECKSUM - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.sha256Checksum = iprot.readString(); - struct.setSha256ChecksumIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // 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 9: // RESOURCE_SIZE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.resourceSize = iprot.readI32(); - struct.setResourceSizeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 10: // NATIVE_FORMAT - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.nativeFormat = iprot.readString(); - struct.setNativeFormatIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 11: // CREATION_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.creationTime = iprot.readI64(); - struct.setCreationTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 12: // LAST_MODIFIED_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.lastModifiedTime = iprot.readI64(); - struct.setLastModifiedTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 13: // 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 14: // 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) - { - _elem5 = new DataReplicaLocationModel(); - _elem5.read(iprot); - struct.replicaLocations.add(_elem5); - } - iprot.readListEnd(); - } - struct.setReplicaLocationsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 15: // 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); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, DataResourceModel struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.resourceId != null) { - if (struct.isSetResourceId()) { - oprot.writeFieldBegin(RESOURCE_ID_FIELD_DESC); - oprot.writeString(struct.resourceId); - 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); - oprot.writeString(struct.resourceName); - oprot.writeFieldEnd(); - } - } - if (struct.resourceDescription != null) { - if (struct.isSetResourceDescription()) { - oprot.writeFieldBegin(RESOURCE_DESCRIPTION_FIELD_DESC); - oprot.writeString(struct.resourceDescription); - oprot.writeFieldEnd(); - } - } - if (struct.ownerName != null) { - if (struct.isSetOwnerName()) { - oprot.writeFieldBegin(OWNER_NAME_FIELD_DESC); - oprot.writeString(struct.ownerName); - oprot.writeFieldEnd(); - } - } - if (struct.sha256Checksum != null) { - if (struct.isSetSha256Checksum()) { - oprot.writeFieldBegin(SHA256_CHECKSUM_FIELD_DESC); - oprot.writeString(struct.sha256Checksum); - 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); - oprot.writeFieldEnd(); - } - if (struct.nativeFormat != null) { - if (struct.isSetNativeFormat()) { - oprot.writeFieldBegin(NATIVE_FORMAT_FIELD_DESC); - oprot.writeString(struct.nativeFormat); - oprot.writeFieldEnd(); - } - } - if (struct.isSetCreationTime()) { - oprot.writeFieldBegin(CREATION_TIME_FIELD_DESC); - oprot.writeI64(struct.creationTime); - oprot.writeFieldEnd(); - } - if (struct.isSetLastModifiedTime()) { - oprot.writeFieldBegin(LAST_MODIFIED_TIME_FIELD_DESC); - 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.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(); - } - 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.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class DataResourceModelTupleSchemeFactory implements SchemeFactory { - public DataResourceModelTupleScheme getScheme() { - return new DataResourceModelTupleScheme(); - } - } - - private static class DataResourceModelTupleScheme extends TupleScheme<DataResourceModel> { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, DataResourceModel struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetResourceId()) { - optionals.set(0); - } - if (struct.isSetGatewayId()) { - optionals.set(1); - } - if (struct.isSetParentResourceId()) { - optionals.set(2); - } - if (struct.isSetResourceName()) { - optionals.set(3); - } - if (struct.isSetResourceDescription()) { - optionals.set(4); - } - if (struct.isSetOwnerName()) { - optionals.set(5); - } - if (struct.isSetSha256Checksum()) { - optionals.set(6); - } - if (struct.isSetDataResourceType()) { - optionals.set(7); - } - if (struct.isSetResourceSize()) { - optionals.set(8); - } - if (struct.isSetNativeFormat()) { - optionals.set(9); - } - if (struct.isSetCreationTime()) { - optionals.set(10); - } - if (struct.isSetLastModifiedTime()) { - optionals.set(11); - } - if (struct.isSetResourceMetadata()) { - optionals.set(12); - } - if (struct.isSetReplicaLocations()) { - optionals.set(13); - } - if (struct.isSetChildResources()) { - optionals.set(14); - } - oprot.writeBitSet(optionals, 15); - 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.isSetSha256Checksum()) { - oprot.writeString(struct.sha256Checksum); - } - if (struct.isSetDataResourceType()) { - oprot.writeI32(struct.dataResourceType.getValue()); - } - if (struct.isSetResourceSize()) { - oprot.writeI32(struct.resourceSize); - } - if (struct.isSetNativeFormat()) { - oprot.writeString(struct.nativeFormat); - } - if (struct.isSetCreationTime()) { - oprot.writeI64(struct.creationTime); - } - 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) - { - _iter14.write(oprot); - } - } - } - if (struct.isSetChildResources()) { - { - oprot.writeI32(struct.childResources.size()); - for (DataResourceModel _iter15 : struct.childResources) - { - _iter15.write(oprot); - } - } - } - } - - @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(15); - 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)) { - struct.resourceDescription = iprot.readString(); - struct.setResourceDescriptionIsSet(true); - } - if (incoming.get(5)) { - struct.ownerName = iprot.readString(); - struct.setOwnerNameIsSet(true); - } - if (incoming.get(6)) { - struct.sha256Checksum = iprot.readString(); - struct.setSha256ChecksumIsSet(true); - } - if (incoming.get(7)) { - struct.dataResourceType = org.apache.airavata.model.data.resource.DataResourceType.findByValue(iprot.readI32()); - struct.setDataResourceTypeIsSet(true); - } - if (incoming.get(8)) { - struct.resourceSize = iprot.readI32(); - struct.setResourceSizeIsSet(true); - } - if (incoming.get(9)) { - struct.nativeFormat = iprot.readString(); - struct.setNativeFormatIsSet(true); - } - if (incoming.get(10)) { - struct.creationTime = iprot.readI64(); - struct.setCreationTimeIsSet(true); - } - if (incoming.get(11)) { - struct.lastModifiedTime = iprot.readI64(); - struct.setLastModifiedTimeIsSet(true); - } - if (incoming.get(12)) { - { - 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(13)) { - { - 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) - { - _elem21 = new DataReplicaLocationModel(); - _elem21.read(iprot); - struct.replicaLocations.add(_elem21); - } - } - struct.setReplicaLocationsIsSet(true); - } - if (incoming.get(14)) { - { - 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/5881af94/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/DataResourceType.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/DataResourceType.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/DataResourceType.java deleted file mode 100644 index 41577a9..0000000 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/DataResourceType.java +++ /dev/null @@ -1,62 +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.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.airavata.model.data.resource; - - -import java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum DataResourceType implements org.apache.thrift.TEnum { - COLLECTION(0), - FILE(1); - - private final int value; - - private DataResourceType(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 DataResourceType findByValue(int value) { - switch (value) { - case 0: - return COLLECTION; - case 1: - return FILE; - default: - return null; - } - } -} http://git-wip-us.apache.org/repos/asf/airavata/blob/5881af94/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/ReplicaLocationCategory.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/ReplicaLocationCategory.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/ReplicaLocationCategory.java deleted file mode 100644 index a527995..0000000 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/ReplicaLocationCategory.java +++ /dev/null @@ -1,68 +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.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.airavata.model.data.resource; - - -import java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum ReplicaLocationCategory implements org.apache.thrift.TEnum { - GATEWAY_DATA_STORE(0), - COMPUTE_RESOURCE(1), - LONG_TERM_STORAGE_RESOURCE(2), - OTHER(3); - - private final int value; - - private ReplicaLocationCategory(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 ReplicaLocationCategory findByValue(int value) { - switch (value) { - case 0: - return GATEWAY_DATA_STORE; - case 1: - return COMPUTE_RESOURCE; - case 2: - return LONG_TERM_STORAGE_RESOURCE; - case 3: - return OTHER; - default: - return null; - } - } -} http://git-wip-us.apache.org/repos/asf/airavata/blob/5881af94/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/ReplicaPersistentType.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/ReplicaPersistentType.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/ReplicaPersistentType.java deleted file mode 100644 index 1844f89..0000000 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/ReplicaPersistentType.java +++ /dev/null @@ -1,62 +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.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.airavata.model.data.resource; - - -import java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum ReplicaPersistentType implements org.apache.thrift.TEnum { - TRANSIENT(0), - PERSISTENT(1); - - private final int value; - - private ReplicaPersistentType(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 ReplicaPersistentType findByValue(int value) { - switch (value) { - case 0: - return TRANSIENT; - case 1: - return PERSISTENT; - default: - return null; - } - } -} http://git-wip-us.apache.org/repos/asf/airavata/blob/5881af94/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AiravataClientException.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AiravataClientException.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AiravataClientException.java index 700b875..5816fbe 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AiravataClientException.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AiravataClientException.java @@ -66,7 +66,7 @@ import org.slf4j.LoggerFactory; * parameter: If the error applied to a particular input parameter, this will * indicate which parameter. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-22") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-23") public class AiravataClientException extends TException implements org.apache.thrift.TBase<AiravataClientException, AiravataClientException._Fields>, java.io.Serializable, Cloneable, Comparable<AiravataClientException> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AiravataClientException"); http://git-wip-us.apache.org/repos/asf/airavata/blob/5881af94/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AiravataSystemException.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AiravataSystemException.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AiravataSystemException.java index 892eed1..f7a3047 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AiravataSystemException.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AiravataSystemException.java @@ -61,7 +61,7 @@ import org.slf4j.LoggerFactory; * message: This may contain additional information about the error * */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-22") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-23") public class AiravataSystemException extends TException implements org.apache.thrift.TBase<AiravataSystemException, AiravataSystemException._Fields>, java.io.Serializable, Cloneable, Comparable<AiravataSystemException> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AiravataSystemException"); http://git-wip-us.apache.org/repos/asf/airavata/blob/5881af94/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AuthenticationException.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AuthenticationException.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AuthenticationException.java index 6b73164..8df608d 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AuthenticationException.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AuthenticationException.java @@ -56,7 +56,7 @@ import org.slf4j.LoggerFactory; * * message: contains the cause of the authorization failure. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-22") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-23") public class AuthenticationException extends TException implements org.apache.thrift.TBase<AuthenticationException, AuthenticationException._Fields>, java.io.Serializable, Cloneable, Comparable<AuthenticationException> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AuthenticationException"); http://git-wip-us.apache.org/repos/asf/airavata/blob/5881af94/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AuthorizationException.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AuthorizationException.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AuthorizationException.java index aa0c52a..e057c4c 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AuthorizationException.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AuthorizationException.java @@ -56,7 +56,7 @@ import org.slf4j.LoggerFactory; * * message: contains the authorization failure message */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-22") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-23") public class AuthorizationException extends TException implements org.apache.thrift.TBase<AuthorizationException, AuthorizationException._Fields>, java.io.Serializable, Cloneable, Comparable<AuthorizationException> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AuthorizationException");
