http://git-wip-us.apache.org/repos/asf/airavata/blob/03afa2da/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/data/product/ttypes.py ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/data/product/ttypes.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/data/product/ttypes.py index 2185060..271b9c0 100644 --- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/data/product/ttypes.py +++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/data/product/ttypes.py @@ -71,9 +71,10 @@ class DataProductType: class DataProductModel: """ Attributes: - - productId + - productUri - gatewayId - - parentProductId + - parentProductUri + - logicalPath - productName - productDescription - ownerName @@ -88,25 +89,27 @@ class DataProductModel: thrift_spec = ( None, # 0 - (1, TType.STRING, 'productId', None, None, ), # 1 + (1, TType.STRING, 'productUri', None, None, ), # 1 (2, TType.STRING, 'gatewayId', None, None, ), # 2 - (3, TType.STRING, 'parentProductId', None, None, ), # 3 - (4, TType.STRING, 'productName', None, None, ), # 4 - (5, TType.STRING, 'productDescription', None, None, ), # 5 - (6, TType.STRING, 'ownerName', None, None, ), # 6 - (7, TType.I32, 'dataProductType', None, None, ), # 7 - (8, TType.I32, 'productSize', None, None, ), # 8 - (9, TType.I64, 'creationTime', None, None, ), # 9 - (10, TType.I64, 'lastModifiedTime', None, None, ), # 10 - (11, TType.MAP, 'productMetadata', (TType.STRING,None,TType.STRING,None), None, ), # 11 - (12, TType.LIST, 'replicaLocations', (TType.STRUCT,(DataReplicaLocationModel, DataReplicaLocationModel.thrift_spec)), None, ), # 12 - (13, TType.LIST, 'childProducts', (TType.STRUCT,(DataProductModel, DataProductModel.thrift_spec)), None, ), # 13 + (3, TType.STRING, 'parentProductUri', None, None, ), # 3 + (4, TType.STRING, 'logicalPath', None, None, ), # 4 + (5, TType.STRING, 'productName', None, None, ), # 5 + (6, TType.STRING, 'productDescription', None, None, ), # 6 + (7, TType.STRING, 'ownerName', None, None, ), # 7 + (8, TType.I32, 'dataProductType', None, None, ), # 8 + (9, TType.I32, 'productSize', None, None, ), # 9 + (10, TType.I64, 'creationTime', None, None, ), # 10 + (11, TType.I64, 'lastModifiedTime', None, None, ), # 11 + (12, TType.MAP, 'productMetadata', (TType.STRING,None,TType.STRING,None), None, ), # 12 + (13, TType.LIST, 'replicaLocations', (TType.STRUCT,(DataReplicaLocationModel, DataReplicaLocationModel.thrift_spec)), None, ), # 13 + (14, TType.LIST, 'childProducts', (TType.STRUCT,(DataProductModel, DataProductModel.thrift_spec)), None, ), # 14 ) - def __init__(self, productId=None, gatewayId=None, parentProductId=None, productName=None, productDescription=None, ownerName=None, dataProductType=None, productSize=None, creationTime=None, lastModifiedTime=None, productMetadata=None, replicaLocations=None, childProducts=None,): - self.productId = productId + def __init__(self, productUri=None, gatewayId=None, parentProductUri=None, logicalPath=None, productName=None, productDescription=None, ownerName=None, dataProductType=None, productSize=None, creationTime=None, lastModifiedTime=None, productMetadata=None, replicaLocations=None, childProducts=None,): + self.productUri = productUri self.gatewayId = gatewayId - self.parentProductId = parentProductId + self.parentProductUri = parentProductUri + self.logicalPath = logicalPath self.productName = productName self.productDescription = productDescription self.ownerName = ownerName @@ -129,7 +132,7 @@ class DataProductModel: break if fid == 1: if ftype == TType.STRING: - self.productId = iprot.readString() + self.productUri = iprot.readString() else: iprot.skip(ftype) elif fid == 2: @@ -139,45 +142,50 @@ class DataProductModel: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.parentProductId = iprot.readString() + self.parentProductUri = iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.productName = iprot.readString() + self.logicalPath = iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.productDescription = iprot.readString() + self.productName = iprot.readString() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: - self.ownerName = iprot.readString() + self.productDescription = iprot.readString() else: iprot.skip(ftype) elif fid == 7: + if ftype == TType.STRING: + self.ownerName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 8: if ftype == TType.I32: self.dataProductType = iprot.readI32() else: iprot.skip(ftype) - elif fid == 8: + elif fid == 9: if ftype == TType.I32: self.productSize = iprot.readI32() else: iprot.skip(ftype) - elif fid == 9: + elif fid == 10: if ftype == TType.I64: self.creationTime = iprot.readI64() else: iprot.skip(ftype) - elif fid == 10: + elif fid == 11: if ftype == TType.I64: self.lastModifiedTime = iprot.readI64() else: iprot.skip(ftype) - elif fid == 11: + elif fid == 12: if ftype == TType.MAP: self.productMetadata = {} (_ktype1, _vtype2, _size0 ) = iprot.readMapBegin() @@ -188,7 +196,7 @@ class DataProductModel: iprot.readMapEnd() else: iprot.skip(ftype) - elif fid == 12: + elif fid == 13: if ftype == TType.LIST: self.replicaLocations = [] (_etype10, _size7) = iprot.readListBegin() @@ -199,7 +207,7 @@ class DataProductModel: iprot.readListEnd() else: iprot.skip(ftype) - elif fid == 13: + elif fid == 14: if ftype == TType.LIST: self.childProducts = [] (_etype16, _size13) = iprot.readListBegin() @@ -220,48 +228,52 @@ class DataProductModel: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('DataProductModel') - if self.productId is not None: - oprot.writeFieldBegin('productId', TType.STRING, 1) - oprot.writeString(self.productId) + if self.productUri is not None: + oprot.writeFieldBegin('productUri', TType.STRING, 1) + oprot.writeString(self.productUri) oprot.writeFieldEnd() if self.gatewayId is not None: oprot.writeFieldBegin('gatewayId', TType.STRING, 2) oprot.writeString(self.gatewayId) oprot.writeFieldEnd() - if self.parentProductId is not None: - oprot.writeFieldBegin('parentProductId', TType.STRING, 3) - oprot.writeString(self.parentProductId) + if self.parentProductUri is not None: + oprot.writeFieldBegin('parentProductUri', TType.STRING, 3) + oprot.writeString(self.parentProductUri) + oprot.writeFieldEnd() + if self.logicalPath is not None: + oprot.writeFieldBegin('logicalPath', TType.STRING, 4) + oprot.writeString(self.logicalPath) oprot.writeFieldEnd() if self.productName is not None: - oprot.writeFieldBegin('productName', TType.STRING, 4) + oprot.writeFieldBegin('productName', TType.STRING, 5) oprot.writeString(self.productName) oprot.writeFieldEnd() if self.productDescription is not None: - oprot.writeFieldBegin('productDescription', TType.STRING, 5) + oprot.writeFieldBegin('productDescription', TType.STRING, 6) oprot.writeString(self.productDescription) oprot.writeFieldEnd() if self.ownerName is not None: - oprot.writeFieldBegin('ownerName', TType.STRING, 6) + oprot.writeFieldBegin('ownerName', TType.STRING, 7) oprot.writeString(self.ownerName) oprot.writeFieldEnd() if self.dataProductType is not None: - oprot.writeFieldBegin('dataProductType', TType.I32, 7) + oprot.writeFieldBegin('dataProductType', TType.I32, 8) oprot.writeI32(self.dataProductType) oprot.writeFieldEnd() if self.productSize is not None: - oprot.writeFieldBegin('productSize', TType.I32, 8) + oprot.writeFieldBegin('productSize', TType.I32, 9) oprot.writeI32(self.productSize) oprot.writeFieldEnd() if self.creationTime is not None: - oprot.writeFieldBegin('creationTime', TType.I64, 9) + oprot.writeFieldBegin('creationTime', TType.I64, 10) oprot.writeI64(self.creationTime) oprot.writeFieldEnd() if self.lastModifiedTime is not None: - oprot.writeFieldBegin('lastModifiedTime', TType.I64, 10) + oprot.writeFieldBegin('lastModifiedTime', TType.I64, 11) oprot.writeI64(self.lastModifiedTime) oprot.writeFieldEnd() if self.productMetadata is not None: - oprot.writeFieldBegin('productMetadata', TType.MAP, 11) + oprot.writeFieldBegin('productMetadata', TType.MAP, 12) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.productMetadata)) for kiter19,viter20 in self.productMetadata.items(): oprot.writeString(kiter19) @@ -269,14 +281,14 @@ class DataProductModel: oprot.writeMapEnd() oprot.writeFieldEnd() if self.replicaLocations is not None: - oprot.writeFieldBegin('replicaLocations', TType.LIST, 12) + oprot.writeFieldBegin('replicaLocations', TType.LIST, 13) oprot.writeListBegin(TType.STRUCT, len(self.replicaLocations)) for iter21 in self.replicaLocations: iter21.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.childProducts is not None: - oprot.writeFieldBegin('childProducts', TType.LIST, 13) + oprot.writeFieldBegin('childProducts', TType.LIST, 14) oprot.writeListBegin(TType.STRUCT, len(self.childProducts)) for iter22 in self.childProducts: iter22.write(oprot) @@ -291,9 +303,10 @@ class DataProductModel: def __hash__(self): value = 17 - value = (value * 31) ^ hash(self.productId) + value = (value * 31) ^ hash(self.productUri) value = (value * 31) ^ hash(self.gatewayId) - value = (value * 31) ^ hash(self.parentProductId) + value = (value * 31) ^ hash(self.parentProductUri) + value = (value * 31) ^ hash(self.logicalPath) value = (value * 31) ^ hash(self.productName) value = (value * 31) ^ hash(self.productDescription) value = (value * 31) ^ hash(self.ownerName) @@ -321,7 +334,7 @@ class DataReplicaLocationModel: """ Attributes: - replicaId - - productId + - productUri - replicaName - replicaDescription - creationTime @@ -330,14 +343,14 @@ class DataReplicaLocationModel: - replicaLocationCategory - replicaPersistentType - storageResourceId - - fileAbsolutePath + - filePath - replicaMetadata """ thrift_spec = ( None, # 0 (1, TType.STRING, 'replicaId', None, None, ), # 1 - (2, TType.STRING, 'productId', None, None, ), # 2 + (2, TType.STRING, 'productUri', None, None, ), # 2 (3, TType.STRING, 'replicaName', None, None, ), # 3 (4, TType.STRING, 'replicaDescription', None, None, ), # 4 (5, TType.I64, 'creationTime', None, None, ), # 5 @@ -346,13 +359,13 @@ class DataReplicaLocationModel: (8, TType.I32, 'replicaLocationCategory', None, None, ), # 8 (9, TType.I32, 'replicaPersistentType', None, None, ), # 9 (10, TType.STRING, 'storageResourceId', None, None, ), # 10 - (11, TType.STRING, 'fileAbsolutePath', None, None, ), # 11 + (11, TType.STRING, 'filePath', None, None, ), # 11 (12, TType.MAP, 'replicaMetadata', (TType.STRING,None,TType.STRING,None), None, ), # 12 ) - def __init__(self, replicaId=None, productId=None, replicaName=None, replicaDescription=None, creationTime=None, lastModifiedTime=None, validUntilTime=None, replicaLocationCategory=None, replicaPersistentType=None, storageResourceId=None, fileAbsolutePath=None, replicaMetadata=None,): + def __init__(self, replicaId=None, productUri=None, replicaName=None, replicaDescription=None, creationTime=None, lastModifiedTime=None, validUntilTime=None, replicaLocationCategory=None, replicaPersistentType=None, storageResourceId=None, filePath=None, replicaMetadata=None,): self.replicaId = replicaId - self.productId = productId + self.productUri = productUri self.replicaName = replicaName self.replicaDescription = replicaDescription self.creationTime = creationTime @@ -361,7 +374,7 @@ class DataReplicaLocationModel: self.replicaLocationCategory = replicaLocationCategory self.replicaPersistentType = replicaPersistentType self.storageResourceId = storageResourceId - self.fileAbsolutePath = fileAbsolutePath + self.filePath = filePath self.replicaMetadata = replicaMetadata def read(self, iprot): @@ -380,7 +393,7 @@ class DataReplicaLocationModel: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.productId = iprot.readString() + self.productUri = iprot.readString() else: iprot.skip(ftype) elif fid == 3: @@ -425,7 +438,7 @@ class DataReplicaLocationModel: iprot.skip(ftype) elif fid == 11: if ftype == TType.STRING: - self.fileAbsolutePath = iprot.readString() + self.filePath = iprot.readString() else: iprot.skip(ftype) elif fid == 12: @@ -453,9 +466,9 @@ class DataReplicaLocationModel: oprot.writeFieldBegin('replicaId', TType.STRING, 1) oprot.writeString(self.replicaId) oprot.writeFieldEnd() - if self.productId is not None: - oprot.writeFieldBegin('productId', TType.STRING, 2) - oprot.writeString(self.productId) + if self.productUri is not None: + oprot.writeFieldBegin('productUri', TType.STRING, 2) + oprot.writeString(self.productUri) oprot.writeFieldEnd() if self.replicaName is not None: oprot.writeFieldBegin('replicaName', TType.STRING, 3) @@ -489,9 +502,9 @@ class DataReplicaLocationModel: oprot.writeFieldBegin('storageResourceId', TType.STRING, 10) oprot.writeString(self.storageResourceId) oprot.writeFieldEnd() - if self.fileAbsolutePath is not None: - oprot.writeFieldBegin('fileAbsolutePath', TType.STRING, 11) - oprot.writeString(self.fileAbsolutePath) + if self.filePath is not None: + oprot.writeFieldBegin('filePath', TType.STRING, 11) + oprot.writeString(self.filePath) oprot.writeFieldEnd() if self.replicaMetadata is not None: oprot.writeFieldBegin('replicaMetadata', TType.MAP, 12) @@ -511,7 +524,7 @@ class DataReplicaLocationModel: def __hash__(self): value = 17 value = (value * 31) ^ hash(self.replicaId) - value = (value * 31) ^ hash(self.productId) + value = (value * 31) ^ hash(self.productUri) value = (value * 31) ^ hash(self.replicaName) value = (value * 31) ^ hash(self.replicaDescription) value = (value * 31) ^ hash(self.creationTime) @@ -520,7 +533,7 @@ class DataReplicaLocationModel: value = (value * 31) ^ hash(self.replicaLocationCategory) value = (value * 31) ^ hash(self.replicaPersistentType) value = (value * 31) ^ hash(self.storageResourceId) - value = (value * 31) ^ hash(self.fileAbsolutePath) + value = (value * 31) ^ hash(self.filePath) value = (value * 31) ^ hash(self.replicaMetadata) return value
http://git-wip-us.apache.org/repos/asf/airavata/blob/03afa2da/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/product/DataProductModel.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/product/DataProductModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/product/DataProductModel.java index c16e639..cca01de 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/product/DataProductModel.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/product/DataProductModel.java @@ -55,19 +55,20 @@ import org.slf4j.LoggerFactory; public class DataProductModel implements org.apache.thrift.TBase<DataProductModel, DataProductModel._Fields>, java.io.Serializable, Cloneable, Comparable<DataProductModel> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DataProductModel"); - private static final org.apache.thrift.protocol.TField PRODUCT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("productId", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField PRODUCT_URI_FIELD_DESC = new org.apache.thrift.protocol.TField("productUri", 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_PRODUCT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("parentProductId", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField PRODUCT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("productName", org.apache.thrift.protocol.TType.STRING, (short)4); - private static final org.apache.thrift.protocol.TField PRODUCT_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("productDescription", 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_PRODUCT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("dataProductType", org.apache.thrift.protocol.TType.I32, (short)7); - private static final org.apache.thrift.protocol.TField PRODUCT_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("productSize", 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 PRODUCT_METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("productMetadata", 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_PRODUCTS_FIELD_DESC = new org.apache.thrift.protocol.TField("childProducts", org.apache.thrift.protocol.TType.LIST, (short)13); + private static final org.apache.thrift.protocol.TField PARENT_PRODUCT_URI_FIELD_DESC = new org.apache.thrift.protocol.TField("parentProductUri", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField LOGICAL_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("logicalPath", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField PRODUCT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("productName", org.apache.thrift.protocol.TType.STRING, (short)5); + private static final org.apache.thrift.protocol.TField PRODUCT_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("productDescription", org.apache.thrift.protocol.TType.STRING, (short)6); + 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)7); + private static final org.apache.thrift.protocol.TField DATA_PRODUCT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("dataProductType", org.apache.thrift.protocol.TType.I32, (short)8); + private static final org.apache.thrift.protocol.TField PRODUCT_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("productSize", org.apache.thrift.protocol.TType.I32, (short)9); + 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)10); + 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)11); + private static final org.apache.thrift.protocol.TField PRODUCT_METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("productMetadata", org.apache.thrift.protocol.TType.MAP, (short)12); + 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)13); + private static final org.apache.thrift.protocol.TField CHILD_PRODUCTS_FIELD_DESC = new org.apache.thrift.protocol.TField("childProducts", org.apache.thrift.protocol.TType.LIST, (short)14); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -75,9 +76,10 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode schemes.put(TupleScheme.class, new DataProductModelTupleSchemeFactory()); } - private String productId; // optional + private String productUri; // optional private String gatewayId; // optional - private String parentProductId; // optional + private String parentProductUri; // optional + private String logicalPath; // optional private String productName; // optional private String productDescription; // optional private String ownerName; // optional @@ -91,23 +93,24 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PRODUCT_ID((short)1, "productId"), + PRODUCT_URI((short)1, "productUri"), GATEWAY_ID((short)2, "gatewayId"), - PARENT_PRODUCT_ID((short)3, "parentProductId"), - PRODUCT_NAME((short)4, "productName"), - PRODUCT_DESCRIPTION((short)5, "productDescription"), - OWNER_NAME((short)6, "ownerName"), + PARENT_PRODUCT_URI((short)3, "parentProductUri"), + LOGICAL_PATH((short)4, "logicalPath"), + PRODUCT_NAME((short)5, "productName"), + PRODUCT_DESCRIPTION((short)6, "productDescription"), + OWNER_NAME((short)7, "ownerName"), /** * * @see DataProductType */ - DATA_PRODUCT_TYPE((short)7, "dataProductType"), - PRODUCT_SIZE((short)8, "productSize"), - CREATION_TIME((short)9, "creationTime"), - LAST_MODIFIED_TIME((short)10, "lastModifiedTime"), - PRODUCT_METADATA((short)11, "productMetadata"), - REPLICA_LOCATIONS((short)12, "replicaLocations"), - CHILD_PRODUCTS((short)13, "childProducts"); + DATA_PRODUCT_TYPE((short)8, "dataProductType"), + PRODUCT_SIZE((short)9, "productSize"), + CREATION_TIME((short)10, "creationTime"), + LAST_MODIFIED_TIME((short)11, "lastModifiedTime"), + PRODUCT_METADATA((short)12, "productMetadata"), + REPLICA_LOCATIONS((short)13, "replicaLocations"), + CHILD_PRODUCTS((short)14, "childProducts"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -122,31 +125,33 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // PRODUCT_ID - return PRODUCT_ID; + case 1: // PRODUCT_URI + return PRODUCT_URI; case 2: // GATEWAY_ID return GATEWAY_ID; - case 3: // PARENT_PRODUCT_ID - return PARENT_PRODUCT_ID; - case 4: // PRODUCT_NAME + case 3: // PARENT_PRODUCT_URI + return PARENT_PRODUCT_URI; + case 4: // LOGICAL_PATH + return LOGICAL_PATH; + case 5: // PRODUCT_NAME return PRODUCT_NAME; - case 5: // PRODUCT_DESCRIPTION + case 6: // PRODUCT_DESCRIPTION return PRODUCT_DESCRIPTION; - case 6: // OWNER_NAME + case 7: // OWNER_NAME return OWNER_NAME; - case 7: // DATA_PRODUCT_TYPE + case 8: // DATA_PRODUCT_TYPE return DATA_PRODUCT_TYPE; - case 8: // PRODUCT_SIZE + case 9: // PRODUCT_SIZE return PRODUCT_SIZE; - case 9: // CREATION_TIME + case 10: // CREATION_TIME return CREATION_TIME; - case 10: // LAST_MODIFIED_TIME + case 11: // LAST_MODIFIED_TIME return LAST_MODIFIED_TIME; - case 11: // PRODUCT_METADATA + case 12: // PRODUCT_METADATA return PRODUCT_METADATA; - case 12: // REPLICA_LOCATIONS + case 13: // REPLICA_LOCATIONS return REPLICA_LOCATIONS; - case 13: // CHILD_PRODUCTS + case 14: // CHILD_PRODUCTS return CHILD_PRODUCTS; default: return null; @@ -192,15 +197,17 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode 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.PRODUCT_ID,_Fields.GATEWAY_ID,_Fields.PARENT_PRODUCT_ID,_Fields.PRODUCT_NAME,_Fields.PRODUCT_DESCRIPTION,_Fields.OWNER_NAME,_Fields.DATA_PRODUCT_TYPE,_Fields.PRODUCT_SIZE,_Fields.CREATION_TIME,_Fields.LAST_MODIFIED_TIME,_Fields.PRODUCT_METADATA,_Fields.REPLICA_LOCATIONS,_Fields.CHILD_PRODUCTS}; + private static final _Fields optionals[] = {_Fields.PRODUCT_URI,_Fields.GATEWAY_ID,_Fields.PARENT_PRODUCT_URI,_Fields.LOGICAL_PATH,_Fields.PRODUCT_NAME,_Fields.PRODUCT_DESCRIPTION,_Fields.OWNER_NAME,_Fields.DATA_PRODUCT_TYPE,_Fields.PRODUCT_SIZE,_Fields.CREATION_TIME,_Fields.LAST_MODIFIED_TIME,_Fields.PRODUCT_METADATA,_Fields.REPLICA_LOCATIONS,_Fields.CHILD_PRODUCTS}; 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.PRODUCT_ID, new org.apache.thrift.meta_data.FieldMetaData("productId", org.apache.thrift.TFieldRequirementType.OPTIONAL, + tmpMap.put(_Fields.PRODUCT_URI, new org.apache.thrift.meta_data.FieldMetaData("productUri", 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_PRODUCT_ID, new org.apache.thrift.meta_data.FieldMetaData("parentProductId", org.apache.thrift.TFieldRequirementType.OPTIONAL, + tmpMap.put(_Fields.PARENT_PRODUCT_URI, new org.apache.thrift.meta_data.FieldMetaData("parentProductUri", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.LOGICAL_PATH, new org.apache.thrift.meta_data.FieldMetaData("logicalPath", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PRODUCT_NAME, new org.apache.thrift.meta_data.FieldMetaData("productName", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); @@ -238,14 +245,17 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode */ public DataProductModel(DataProductModel other) { __isset_bitfield = other.__isset_bitfield; - if (other.isSetProductId()) { - this.productId = other.productId; + if (other.isSetProductUri()) { + this.productUri = other.productUri; } if (other.isSetGatewayId()) { this.gatewayId = other.gatewayId; } - if (other.isSetParentProductId()) { - this.parentProductId = other.parentProductId; + if (other.isSetParentProductUri()) { + this.parentProductUri = other.parentProductUri; + } + if (other.isSetLogicalPath()) { + this.logicalPath = other.logicalPath; } if (other.isSetProductName()) { this.productName = other.productName; @@ -288,9 +298,10 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode @Override public void clear() { - this.productId = null; + this.productUri = null; this.gatewayId = null; - this.parentProductId = null; + this.parentProductUri = null; + this.logicalPath = null; this.productName = null; this.productDescription = null; this.ownerName = null; @@ -306,26 +317,26 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode this.childProducts = null; } - public String getProductId() { - return this.productId; + public String getProductUri() { + return this.productUri; } - public void setProductId(String productId) { - this.productId = productId; + public void setProductUri(String productUri) { + this.productUri = productUri; } - public void unsetProductId() { - this.productId = null; + public void unsetProductUri() { + this.productUri = null; } - /** Returns true if field productId is set (has been assigned a value) and false otherwise */ - public boolean isSetProductId() { - return this.productId != null; + /** Returns true if field productUri is set (has been assigned a value) and false otherwise */ + public boolean isSetProductUri() { + return this.productUri != null; } - public void setProductIdIsSet(boolean value) { + public void setProductUriIsSet(boolean value) { if (!value) { - this.productId = null; + this.productUri = null; } } @@ -352,26 +363,49 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode } } - public String getParentProductId() { - return this.parentProductId; + public String getParentProductUri() { + return this.parentProductUri; + } + + public void setParentProductUri(String parentProductUri) { + this.parentProductUri = parentProductUri; + } + + public void unsetParentProductUri() { + this.parentProductUri = null; + } + + /** Returns true if field parentProductUri is set (has been assigned a value) and false otherwise */ + public boolean isSetParentProductUri() { + return this.parentProductUri != null; + } + + public void setParentProductUriIsSet(boolean value) { + if (!value) { + this.parentProductUri = null; + } + } + + public String getLogicalPath() { + return this.logicalPath; } - public void setParentProductId(String parentProductId) { - this.parentProductId = parentProductId; + public void setLogicalPath(String logicalPath) { + this.logicalPath = logicalPath; } - public void unsetParentProductId() { - this.parentProductId = null; + public void unsetLogicalPath() { + this.logicalPath = null; } - /** Returns true if field parentProductId is set (has been assigned a value) and false otherwise */ - public boolean isSetParentProductId() { - return this.parentProductId != null; + /** Returns true if field logicalPath is set (has been assigned a value) and false otherwise */ + public boolean isSetLogicalPath() { + return this.logicalPath != null; } - public void setParentProductIdIsSet(boolean value) { + public void setLogicalPathIsSet(boolean value) { if (!value) { - this.parentProductId = null; + this.logicalPath = null; } } @@ -653,11 +687,11 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode public void setFieldValue(_Fields field, Object value) { switch (field) { - case PRODUCT_ID: + case PRODUCT_URI: if (value == null) { - unsetProductId(); + unsetProductUri(); } else { - setProductId((String)value); + setProductUri((String)value); } break; @@ -669,11 +703,19 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode } break; - case PARENT_PRODUCT_ID: + case PARENT_PRODUCT_URI: if (value == null) { - unsetParentProductId(); + unsetParentProductUri(); } else { - setParentProductId((String)value); + setParentProductUri((String)value); + } + break; + + case LOGICAL_PATH: + if (value == null) { + unsetLogicalPath(); + } else { + setLogicalPath((String)value); } break; @@ -762,14 +804,17 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode public Object getFieldValue(_Fields field) { switch (field) { - case PRODUCT_ID: - return getProductId(); + case PRODUCT_URI: + return getProductUri(); case GATEWAY_ID: return getGatewayId(); - case PARENT_PRODUCT_ID: - return getParentProductId(); + case PARENT_PRODUCT_URI: + return getParentProductUri(); + + case LOGICAL_PATH: + return getLogicalPath(); case PRODUCT_NAME: return getProductName(); @@ -812,12 +857,14 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode } switch (field) { - case PRODUCT_ID: - return isSetProductId(); + case PRODUCT_URI: + return isSetProductUri(); case GATEWAY_ID: return isSetGatewayId(); - case PARENT_PRODUCT_ID: - return isSetParentProductId(); + case PARENT_PRODUCT_URI: + return isSetParentProductUri(); + case LOGICAL_PATH: + return isSetLogicalPath(); case PRODUCT_NAME: return isSetProductName(); case PRODUCT_DESCRIPTION: @@ -855,12 +902,12 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode if (that == null) return false; - boolean this_present_productId = true && this.isSetProductId(); - boolean that_present_productId = true && that.isSetProductId(); - if (this_present_productId || that_present_productId) { - if (!(this_present_productId && that_present_productId)) + boolean this_present_productUri = true && this.isSetProductUri(); + boolean that_present_productUri = true && that.isSetProductUri(); + if (this_present_productUri || that_present_productUri) { + if (!(this_present_productUri && that_present_productUri)) return false; - if (!this.productId.equals(that.productId)) + if (!this.productUri.equals(that.productUri)) return false; } @@ -873,12 +920,21 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode return false; } - boolean this_present_parentProductId = true && this.isSetParentProductId(); - boolean that_present_parentProductId = true && that.isSetParentProductId(); - if (this_present_parentProductId || that_present_parentProductId) { - if (!(this_present_parentProductId && that_present_parentProductId)) + boolean this_present_parentProductUri = true && this.isSetParentProductUri(); + boolean that_present_parentProductUri = true && that.isSetParentProductUri(); + if (this_present_parentProductUri || that_present_parentProductUri) { + if (!(this_present_parentProductUri && that_present_parentProductUri)) + return false; + if (!this.parentProductUri.equals(that.parentProductUri)) + return false; + } + + boolean this_present_logicalPath = true && this.isSetLogicalPath(); + boolean that_present_logicalPath = true && that.isSetLogicalPath(); + if (this_present_logicalPath || that_present_logicalPath) { + if (!(this_present_logicalPath && that_present_logicalPath)) return false; - if (!this.parentProductId.equals(that.parentProductId)) + if (!this.logicalPath.equals(that.logicalPath)) return false; } @@ -979,20 +1035,25 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode public int hashCode() { List<Object> list = new ArrayList<Object>(); - boolean present_productId = true && (isSetProductId()); - list.add(present_productId); - if (present_productId) - list.add(productId); + boolean present_productUri = true && (isSetProductUri()); + list.add(present_productUri); + if (present_productUri) + list.add(productUri); boolean present_gatewayId = true && (isSetGatewayId()); list.add(present_gatewayId); if (present_gatewayId) list.add(gatewayId); - boolean present_parentProductId = true && (isSetParentProductId()); - list.add(present_parentProductId); - if (present_parentProductId) - list.add(parentProductId); + boolean present_parentProductUri = true && (isSetParentProductUri()); + list.add(present_parentProductUri); + if (present_parentProductUri) + list.add(parentProductUri); + + boolean present_logicalPath = true && (isSetLogicalPath()); + list.add(present_logicalPath); + if (present_logicalPath) + list.add(logicalPath); boolean present_productName = true && (isSetProductName()); list.add(present_productName); @@ -1055,12 +1116,12 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetProductId()).compareTo(other.isSetProductId()); + lastComparison = Boolean.valueOf(isSetProductUri()).compareTo(other.isSetProductUri()); if (lastComparison != 0) { return lastComparison; } - if (isSetProductId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.productId, other.productId); + if (isSetProductUri()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.productUri, other.productUri); if (lastComparison != 0) { return lastComparison; } @@ -1075,12 +1136,22 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode return lastComparison; } } - lastComparison = Boolean.valueOf(isSetParentProductId()).compareTo(other.isSetParentProductId()); + lastComparison = Boolean.valueOf(isSetParentProductUri()).compareTo(other.isSetParentProductUri()); if (lastComparison != 0) { return lastComparison; } - if (isSetParentProductId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentProductId, other.parentProductId); + if (isSetParentProductUri()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentProductUri, other.parentProductUri); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLogicalPath()).compareTo(other.isSetLogicalPath()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLogicalPath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.logicalPath, other.logicalPath); if (lastComparison != 0) { return lastComparison; } @@ -1205,12 +1276,12 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode StringBuilder sb = new StringBuilder("DataProductModel("); boolean first = true; - if (isSetProductId()) { - sb.append("productId:"); - if (this.productId == null) { + if (isSetProductUri()) { + sb.append("productUri:"); + if (this.productUri == null) { sb.append("null"); } else { - sb.append(this.productId); + sb.append(this.productUri); } first = false; } @@ -1224,13 +1295,23 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode } first = false; } - if (isSetParentProductId()) { + if (isSetParentProductUri()) { + if (!first) sb.append(", "); + sb.append("parentProductUri:"); + if (this.parentProductUri == null) { + sb.append("null"); + } else { + sb.append(this.parentProductUri); + } + first = false; + } + if (isSetLogicalPath()) { if (!first) sb.append(", "); - sb.append("parentProductId:"); - if (this.parentProductId == null) { + sb.append("logicalPath:"); + if (this.logicalPath == null) { sb.append("null"); } else { - sb.append(this.parentProductId); + sb.append(this.logicalPath); } first = false; } @@ -1367,10 +1448,10 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode break; } switch (schemeField.id) { - case 1: // PRODUCT_ID + case 1: // PRODUCT_URI if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.productId = iprot.readString(); - struct.setProductIdIsSet(true); + struct.productUri = iprot.readString(); + struct.setProductUriIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -1383,15 +1464,23 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 3: // PARENT_PRODUCT_ID + case 3: // PARENT_PRODUCT_URI if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.parentProductId = iprot.readString(); - struct.setParentProductIdIsSet(true); + struct.parentProductUri = iprot.readString(); + struct.setParentProductUriIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 4: // PRODUCT_NAME + case 4: // LOGICAL_PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.logicalPath = iprot.readString(); + struct.setLogicalPathIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // PRODUCT_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.productName = iprot.readString(); struct.setProductNameIsSet(true); @@ -1399,7 +1488,7 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 5: // PRODUCT_DESCRIPTION + case 6: // PRODUCT_DESCRIPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.productDescription = iprot.readString(); struct.setProductDescriptionIsSet(true); @@ -1407,7 +1496,7 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 6: // OWNER_NAME + case 7: // OWNER_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.ownerName = iprot.readString(); struct.setOwnerNameIsSet(true); @@ -1415,7 +1504,7 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 7: // DATA_PRODUCT_TYPE + case 8: // DATA_PRODUCT_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.dataProductType = org.apache.airavata.model.data.product.DataProductType.findByValue(iprot.readI32()); struct.setDataProductTypeIsSet(true); @@ -1423,7 +1512,7 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 8: // PRODUCT_SIZE + case 9: // PRODUCT_SIZE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.productSize = iprot.readI32(); struct.setProductSizeIsSet(true); @@ -1431,7 +1520,7 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 9: // CREATION_TIME + case 10: // CREATION_TIME if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.creationTime = iprot.readI64(); struct.setCreationTimeIsSet(true); @@ -1439,7 +1528,7 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 10: // LAST_MODIFIED_TIME + case 11: // LAST_MODIFIED_TIME if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.lastModifiedTime = iprot.readI64(); struct.setLastModifiedTimeIsSet(true); @@ -1447,7 +1536,7 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 11: // PRODUCT_METADATA + case 12: // PRODUCT_METADATA if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin(); @@ -1467,7 +1556,7 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 12: // REPLICA_LOCATIONS + case 13: // REPLICA_LOCATIONS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list4 = iprot.readListBegin(); @@ -1486,7 +1575,7 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 13: // CHILD_PRODUCTS + case 14: // CHILD_PRODUCTS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list7 = iprot.readListBegin(); @@ -1518,10 +1607,10 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.productId != null) { - if (struct.isSetProductId()) { - oprot.writeFieldBegin(PRODUCT_ID_FIELD_DESC); - oprot.writeString(struct.productId); + if (struct.productUri != null) { + if (struct.isSetProductUri()) { + oprot.writeFieldBegin(PRODUCT_URI_FIELD_DESC); + oprot.writeString(struct.productUri); oprot.writeFieldEnd(); } } @@ -1532,10 +1621,17 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode oprot.writeFieldEnd(); } } - if (struct.parentProductId != null) { - if (struct.isSetParentProductId()) { - oprot.writeFieldBegin(PARENT_PRODUCT_ID_FIELD_DESC); - oprot.writeString(struct.parentProductId); + if (struct.parentProductUri != null) { + if (struct.isSetParentProductUri()) { + oprot.writeFieldBegin(PARENT_PRODUCT_URI_FIELD_DESC); + oprot.writeString(struct.parentProductUri); + oprot.writeFieldEnd(); + } + } + if (struct.logicalPath != null) { + if (struct.isSetLogicalPath()) { + oprot.writeFieldBegin(LOGICAL_PATH_FIELD_DESC); + oprot.writeString(struct.logicalPath); oprot.writeFieldEnd(); } } @@ -1643,54 +1739,60 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode public void write(org.apache.thrift.protocol.TProtocol prot, DataProductModel struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetProductId()) { + if (struct.isSetProductUri()) { optionals.set(0); } if (struct.isSetGatewayId()) { optionals.set(1); } - if (struct.isSetParentProductId()) { + if (struct.isSetParentProductUri()) { optionals.set(2); } - if (struct.isSetProductName()) { + if (struct.isSetLogicalPath()) { optionals.set(3); } - if (struct.isSetProductDescription()) { + if (struct.isSetProductName()) { optionals.set(4); } - if (struct.isSetOwnerName()) { + if (struct.isSetProductDescription()) { optionals.set(5); } - if (struct.isSetDataProductType()) { + if (struct.isSetOwnerName()) { optionals.set(6); } - if (struct.isSetProductSize()) { + if (struct.isSetDataProductType()) { optionals.set(7); } - if (struct.isSetCreationTime()) { + if (struct.isSetProductSize()) { optionals.set(8); } - if (struct.isSetLastModifiedTime()) { + if (struct.isSetCreationTime()) { optionals.set(9); } - if (struct.isSetProductMetadata()) { + if (struct.isSetLastModifiedTime()) { optionals.set(10); } - if (struct.isSetReplicaLocations()) { + if (struct.isSetProductMetadata()) { optionals.set(11); } - if (struct.isSetChildProducts()) { + if (struct.isSetReplicaLocations()) { optionals.set(12); } - oprot.writeBitSet(optionals, 13); - if (struct.isSetProductId()) { - oprot.writeString(struct.productId); + if (struct.isSetChildProducts()) { + optionals.set(13); + } + oprot.writeBitSet(optionals, 14); + if (struct.isSetProductUri()) { + oprot.writeString(struct.productUri); } if (struct.isSetGatewayId()) { oprot.writeString(struct.gatewayId); } - if (struct.isSetParentProductId()) { - oprot.writeString(struct.parentProductId); + if (struct.isSetParentProductUri()) { + oprot.writeString(struct.parentProductUri); + } + if (struct.isSetLogicalPath()) { + oprot.writeString(struct.logicalPath); } if (struct.isSetProductName()) { oprot.writeString(struct.productName); @@ -1746,48 +1848,52 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode @Override public void read(org.apache.thrift.protocol.TProtocol prot, DataProductModel struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(13); + BitSet incoming = iprot.readBitSet(14); if (incoming.get(0)) { - struct.productId = iprot.readString(); - struct.setProductIdIsSet(true); + struct.productUri = iprot.readString(); + struct.setProductUriIsSet(true); } if (incoming.get(1)) { struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(true); } if (incoming.get(2)) { - struct.parentProductId = iprot.readString(); - struct.setParentProductIdIsSet(true); + struct.parentProductUri = iprot.readString(); + struct.setParentProductUriIsSet(true); } if (incoming.get(3)) { + struct.logicalPath = iprot.readString(); + struct.setLogicalPathIsSet(true); + } + if (incoming.get(4)) { struct.productName = iprot.readString(); struct.setProductNameIsSet(true); } - if (incoming.get(4)) { + if (incoming.get(5)) { struct.productDescription = iprot.readString(); struct.setProductDescriptionIsSet(true); } - if (incoming.get(5)) { + if (incoming.get(6)) { struct.ownerName = iprot.readString(); struct.setOwnerNameIsSet(true); } - if (incoming.get(6)) { + if (incoming.get(7)) { struct.dataProductType = org.apache.airavata.model.data.product.DataProductType.findByValue(iprot.readI32()); struct.setDataProductTypeIsSet(true); } - if (incoming.get(7)) { + if (incoming.get(8)) { struct.productSize = iprot.readI32(); struct.setProductSizeIsSet(true); } - if (incoming.get(8)) { + if (incoming.get(9)) { struct.creationTime = iprot.readI64(); struct.setCreationTimeIsSet(true); } - if (incoming.get(9)) { + if (incoming.get(10)) { struct.lastModifiedTime = iprot.readI64(); struct.setLastModifiedTimeIsSet(true); } - if (incoming.get(10)) { + if (incoming.get(11)) { { 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.productMetadata = new HashMap<String,String>(2*_map16.size); @@ -1802,7 +1908,7 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode } struct.setProductMetadataIsSet(true); } - if (incoming.get(11)) { + if (incoming.get(12)) { { 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); @@ -1816,7 +1922,7 @@ public class DataProductModel implements org.apache.thrift.TBase<DataProductMode } struct.setReplicaLocationsIsSet(true); } - if (incoming.get(12)) { + if (incoming.get(13)) { { org.apache.thrift.protocol.TList _list23 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.childProducts = new ArrayList<DataProductModel>(_list23.size); http://git-wip-us.apache.org/repos/asf/airavata/blob/03afa2da/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/product/DataReplicaLocationModel.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/product/DataReplicaLocationModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/product/DataReplicaLocationModel.java index d426a2e..a17acf0 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/product/DataReplicaLocationModel.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/product/DataReplicaLocationModel.java @@ -23,15 +23,32 @@ */ package org.apache.airavata.model.data.product; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.protocol.TTupleProtocol; 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.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 java.util.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) @Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-03-22") @@ -39,7 +56,7 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DataReplicaLocationModel"); private static final org.apache.thrift.protocol.TField REPLICA_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("replicaId", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField PRODUCT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("productId", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField PRODUCT_URI_FIELD_DESC = new org.apache.thrift.protocol.TField("productUri", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField REPLICA_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("replicaName", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField REPLICA_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("replicaDescription", org.apache.thrift.protocol.TType.STRING, (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); @@ -48,7 +65,7 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep private static final org.apache.thrift.protocol.TField REPLICA_LOCATION_CATEGORY_FIELD_DESC = new org.apache.thrift.protocol.TField("replicaLocationCategory", org.apache.thrift.protocol.TType.I32, (short)8); private static final org.apache.thrift.protocol.TField REPLICA_PERSISTENT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("replicaPersistentType", org.apache.thrift.protocol.TType.I32, (short)9); private static final org.apache.thrift.protocol.TField STORAGE_RESOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("storageResourceId", org.apache.thrift.protocol.TType.STRING, (short)10); - private static final org.apache.thrift.protocol.TField FILE_ABSOLUTE_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("filePath", org.apache.thrift.protocol.TType.STRING, (short)11); + private static final org.apache.thrift.protocol.TField FILE_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("filePath", org.apache.thrift.protocol.TType.STRING, (short)11); private static final org.apache.thrift.protocol.TField REPLICA_METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("replicaMetadata", org.apache.thrift.protocol.TType.MAP, (short)12); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); @@ -58,7 +75,7 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep } private String replicaId; // optional - private String productId; // optional + private String productUri; // optional private String replicaName; // optional private String replicaDescription; // optional private long creationTime; // optional @@ -73,7 +90,7 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { REPLICA_ID((short)1, "replicaId"), - PRODUCT_ID((short)2, "productId"), + PRODUCT_URI((short)2, "productUri"), REPLICA_NAME((short)3, "replicaName"), REPLICA_DESCRIPTION((short)4, "replicaDescription"), CREATION_TIME((short)5, "creationTime"), @@ -90,7 +107,7 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep */ REPLICA_PERSISTENT_TYPE((short)9, "replicaPersistentType"), STORAGE_RESOURCE_ID((short)10, "storageResourceId"), - FILE_ABSOLUTE_PATH((short)11, "filePath"), + FILE_PATH((short)11, "filePath"), REPLICA_METADATA((short)12, "replicaMetadata"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -108,8 +125,8 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep switch(fieldId) { case 1: // REPLICA_ID return REPLICA_ID; - case 2: // PRODUCT_ID - return PRODUCT_ID; + case 2: // PRODUCT_URI + return PRODUCT_URI; case 3: // REPLICA_NAME return REPLICA_NAME; case 4: // REPLICA_DESCRIPTION @@ -126,8 +143,8 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep return REPLICA_PERSISTENT_TYPE; case 10: // STORAGE_RESOURCE_ID return STORAGE_RESOURCE_ID; - case 11: // FILE_ABSOLUTE_PATH - return FILE_ABSOLUTE_PATH; + case 11: // FILE_PATH + return FILE_PATH; case 12: // REPLICA_METADATA return REPLICA_METADATA; default: @@ -174,13 +191,13 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep private static final int __LASTMODIFIEDTIME_ISSET_ID = 1; private static final int __VALIDUNTILTIME_ISSET_ID = 2; private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.REPLICA_ID,_Fields.PRODUCT_ID,_Fields.REPLICA_NAME,_Fields.REPLICA_DESCRIPTION,_Fields.CREATION_TIME,_Fields.LAST_MODIFIED_TIME,_Fields.VALID_UNTIL_TIME,_Fields.REPLICA_LOCATION_CATEGORY,_Fields.REPLICA_PERSISTENT_TYPE,_Fields.STORAGE_RESOURCE_ID,_Fields.FILE_ABSOLUTE_PATH,_Fields.REPLICA_METADATA}; + private static final _Fields optionals[] = {_Fields.REPLICA_ID,_Fields.PRODUCT_URI,_Fields.REPLICA_NAME,_Fields.REPLICA_DESCRIPTION,_Fields.CREATION_TIME,_Fields.LAST_MODIFIED_TIME,_Fields.VALID_UNTIL_TIME,_Fields.REPLICA_LOCATION_CATEGORY,_Fields.REPLICA_PERSISTENT_TYPE,_Fields.STORAGE_RESOURCE_ID,_Fields.FILE_PATH,_Fields.REPLICA_METADATA}; 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.REPLICA_ID, new org.apache.thrift.meta_data.FieldMetaData("replicaId", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PRODUCT_ID, new org.apache.thrift.meta_data.FieldMetaData("productId", org.apache.thrift.TFieldRequirementType.OPTIONAL, + tmpMap.put(_Fields.PRODUCT_URI, new org.apache.thrift.meta_data.FieldMetaData("productUri", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.REPLICA_NAME, new org.apache.thrift.meta_data.FieldMetaData("replicaName", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); @@ -198,7 +215,7 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ReplicaPersistentType.class))); tmpMap.put(_Fields.STORAGE_RESOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("storageResourceId", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.FILE_ABSOLUTE_PATH, new org.apache.thrift.meta_data.FieldMetaData("filePath", org.apache.thrift.TFieldRequirementType.OPTIONAL, + tmpMap.put(_Fields.FILE_PATH, new org.apache.thrift.meta_data.FieldMetaData("filePath", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.REPLICA_METADATA, new org.apache.thrift.meta_data.FieldMetaData("replicaMetadata", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, @@ -219,8 +236,8 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep if (other.isSetReplicaId()) { this.replicaId = other.replicaId; } - if (other.isSetProductId()) { - this.productId = other.productId; + if (other.isSetProductUri()) { + this.productUri = other.productUri; } if (other.isSetReplicaName()) { this.replicaName = other.replicaName; @@ -240,7 +257,7 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep if (other.isSetStorageResourceId()) { this.storageResourceId = other.storageResourceId; } - if (other.isSetFileAbsolutePath()) { + if (other.isSetFilePath()) { this.filePath = other.filePath; } if (other.isSetReplicaMetadata()) { @@ -256,7 +273,7 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep @Override public void clear() { this.replicaId = null; - this.productId = null; + this.productUri = null; this.replicaName = null; this.replicaDescription = null; setCreationTimeIsSet(false); @@ -295,26 +312,26 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep } } - public String getProductId() { - return this.productId; + public String getProductUri() { + return this.productUri; } - public void setProductId(String productId) { - this.productId = productId; + public void setProductUri(String productUri) { + this.productUri = productUri; } - public void unsetProductId() { - this.productId = null; + public void unsetProductUri() { + this.productUri = null; } - /** Returns true if field productId is set (has been assigned a value) and false otherwise */ - public boolean isSetProductId() { - return this.productId != null; + /** Returns true if field productUri is set (has been assigned a value) and false otherwise */ + public boolean isSetProductUri() { + return this.productUri != null; } - public void setProductIdIsSet(boolean value) { + public void setProductUriIsSet(boolean value) { if (!value) { - this.productId = null; + this.productUri = null; } } @@ -523,16 +540,16 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep this.filePath = filePath; } - public void unsetFileAbsolutePath() { + public void unsetFilePath() { this.filePath = null; } /** Returns true if field filePath is set (has been assigned a value) and false otherwise */ - public boolean isSetFileAbsolutePath() { + public boolean isSetFilePath() { return this.filePath != null; } - public void setFileAbsolutePathIsSet(boolean value) { + public void setFilePathIsSet(boolean value) { if (!value) { this.filePath = null; } @@ -582,11 +599,11 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep } break; - case PRODUCT_ID: + case PRODUCT_URI: if (value == null) { - unsetProductId(); + unsetProductUri(); } else { - setProductId((String)value); + setProductUri((String)value); } break; @@ -654,11 +671,11 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep } break; - case FILE_ABSOLUTE_PATH: + case FILE_PATH: if (value == null) { - unsetFileAbsolutePath(); + unsetFilePath(); } else { - setFilePath((String) value); + setFilePath((String)value); } break; @@ -678,8 +695,8 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep case REPLICA_ID: return getReplicaId(); - case PRODUCT_ID: - return getProductId(); + case PRODUCT_URI: + return getProductUri(); case REPLICA_NAME: return getReplicaName(); @@ -705,7 +722,7 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep case STORAGE_RESOURCE_ID: return getStorageResourceId(); - case FILE_ABSOLUTE_PATH: + case FILE_PATH: return getFilePath(); case REPLICA_METADATA: @@ -724,8 +741,8 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep switch (field) { case REPLICA_ID: return isSetReplicaId(); - case PRODUCT_ID: - return isSetProductId(); + case PRODUCT_URI: + return isSetProductUri(); case REPLICA_NAME: return isSetReplicaName(); case REPLICA_DESCRIPTION: @@ -742,8 +759,8 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep return isSetReplicaPersistentType(); case STORAGE_RESOURCE_ID: return isSetStorageResourceId(); - case FILE_ABSOLUTE_PATH: - return isSetFileAbsolutePath(); + case FILE_PATH: + return isSetFilePath(); case REPLICA_METADATA: return isSetReplicaMetadata(); } @@ -772,12 +789,12 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep return false; } - boolean this_present_productId = true && this.isSetProductId(); - boolean that_present_productId = true && that.isSetProductId(); - if (this_present_productId || that_present_productId) { - if (!(this_present_productId && that_present_productId)) + boolean this_present_productUri = true && this.isSetProductUri(); + boolean that_present_productUri = true && that.isSetProductUri(); + if (this_present_productUri || that_present_productUri) { + if (!(this_present_productUri && that_present_productUri)) return false; - if (!this.productId.equals(that.productId)) + if (!this.productUri.equals(that.productUri)) return false; } @@ -853,10 +870,10 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep return false; } - boolean this_present_fileAbsolutePath = true && this.isSetFileAbsolutePath(); - boolean that_present_fileAbsolutePath = true && that.isSetFileAbsolutePath(); - if (this_present_fileAbsolutePath || that_present_fileAbsolutePath) { - if (!(this_present_fileAbsolutePath && that_present_fileAbsolutePath)) + boolean this_present_filePath = true && this.isSetFilePath(); + boolean that_present_filePath = true && that.isSetFilePath(); + if (this_present_filePath || that_present_filePath) { + if (!(this_present_filePath && that_present_filePath)) return false; if (!this.filePath.equals(that.filePath)) return false; @@ -883,10 +900,10 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep if (present_replicaId) list.add(replicaId); - boolean present_productId = true && (isSetProductId()); - list.add(present_productId); - if (present_productId) - list.add(productId); + boolean present_productUri = true && (isSetProductUri()); + list.add(present_productUri); + if (present_productUri) + list.add(productUri); boolean present_replicaName = true && (isSetReplicaName()); list.add(present_replicaName); @@ -928,9 +945,9 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep if (present_storageResourceId) list.add(storageResourceId); - boolean present_fileAbsolutePath = true && (isSetFileAbsolutePath()); - list.add(present_fileAbsolutePath); - if (present_fileAbsolutePath) + boolean present_filePath = true && (isSetFilePath()); + list.add(present_filePath); + if (present_filePath) list.add(filePath); boolean present_replicaMetadata = true && (isSetReplicaMetadata()); @@ -959,12 +976,12 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep return lastComparison; } } - lastComparison = Boolean.valueOf(isSetProductId()).compareTo(other.isSetProductId()); + lastComparison = Boolean.valueOf(isSetProductUri()).compareTo(other.isSetProductUri()); if (lastComparison != 0) { return lastComparison; } - if (isSetProductId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.productId, other.productId); + if (isSetProductUri()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.productUri, other.productUri); if (lastComparison != 0) { return lastComparison; } @@ -1049,11 +1066,11 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFileAbsolutePath()).compareTo(other.isSetFileAbsolutePath()); + lastComparison = Boolean.valueOf(isSetFilePath()).compareTo(other.isSetFilePath()); if (lastComparison != 0) { return lastComparison; } - if (isSetFileAbsolutePath()) { + if (isSetFilePath()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filePath, other.filePath); if (lastComparison != 0) { return lastComparison; @@ -1098,13 +1115,13 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep } first = false; } - if (isSetProductId()) { + if (isSetProductUri()) { if (!first) sb.append(", "); - sb.append("productId:"); - if (this.productId == null) { + sb.append("productUri:"); + if (this.productUri == null) { sb.append("null"); } else { - sb.append(this.productId); + sb.append(this.productUri); } first = false; } @@ -1176,7 +1193,7 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep } first = false; } - if (isSetFileAbsolutePath()) { + if (isSetFilePath()) { if (!first) sb.append(", "); sb.append("filePath:"); if (this.filePath == null) { @@ -1249,10 +1266,10 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // PRODUCT_ID + case 2: // PRODUCT_URI if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.productId = iprot.readString(); - struct.setProductIdIsSet(true); + struct.productUri = iprot.readString(); + struct.setProductUriIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -1321,10 +1338,10 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 11: // FILE_ABSOLUTE_PATH + case 11: // FILE_PATH if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.filePath = iprot.readString(); - struct.setFileAbsolutePathIsSet(true); + struct.setFilePathIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -1369,10 +1386,10 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep oprot.writeFieldEnd(); } } - if (struct.productId != null) { - if (struct.isSetProductId()) { - oprot.writeFieldBegin(PRODUCT_ID_FIELD_DESC); - oprot.writeString(struct.productId); + if (struct.productUri != null) { + if (struct.isSetProductUri()) { + oprot.writeFieldBegin(PRODUCT_URI_FIELD_DESC); + oprot.writeString(struct.productUri); oprot.writeFieldEnd(); } } @@ -1427,8 +1444,8 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep } } if (struct.filePath != null) { - if (struct.isSetFileAbsolutePath()) { - oprot.writeFieldBegin(FILE_ABSOLUTE_PATH_FIELD_DESC); + if (struct.isSetFilePath()) { + oprot.writeFieldBegin(FILE_PATH_FIELD_DESC); oprot.writeString(struct.filePath); oprot.writeFieldEnd(); } @@ -1469,7 +1486,7 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep if (struct.isSetReplicaId()) { optionals.set(0); } - if (struct.isSetProductId()) { + if (struct.isSetProductUri()) { optionals.set(1); } if (struct.isSetReplicaName()) { @@ -1496,7 +1513,7 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep if (struct.isSetStorageResourceId()) { optionals.set(9); } - if (struct.isSetFileAbsolutePath()) { + if (struct.isSetFilePath()) { optionals.set(10); } if (struct.isSetReplicaMetadata()) { @@ -1506,8 +1523,8 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep if (struct.isSetReplicaId()) { oprot.writeString(struct.replicaId); } - if (struct.isSetProductId()) { - oprot.writeString(struct.productId); + if (struct.isSetProductUri()) { + oprot.writeString(struct.productUri); } if (struct.isSetReplicaName()) { oprot.writeString(struct.replicaName); @@ -1533,7 +1550,7 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep if (struct.isSetStorageResourceId()) { oprot.writeString(struct.storageResourceId); } - if (struct.isSetFileAbsolutePath()) { + if (struct.isSetFilePath()) { oprot.writeString(struct.filePath); } if (struct.isSetReplicaMetadata()) { @@ -1557,8 +1574,8 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep struct.setReplicaIdIsSet(true); } if (incoming.get(1)) { - struct.productId = iprot.readString(); - struct.setProductIdIsSet(true); + struct.productUri = iprot.readString(); + struct.setProductUriIsSet(true); } if (incoming.get(2)) { struct.replicaName = iprot.readString(); @@ -1594,7 +1611,7 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataRep } if (incoming.get(10)) { struct.filePath = iprot.readString(); - struct.setFileAbsolutePathIsSet(true); + struct.setFilePathIsSet(true); } if (incoming.get(11)) { { http://git-wip-us.apache.org/repos/asf/airavata/blob/03afa2da/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/impl/DataCatalogImpl.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/impl/DataCatalogImpl.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/impl/DataCatalogImpl.java index 887b6d0..31148ab 100644 --- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/impl/DataCatalogImpl.java +++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/impl/DataCatalogImpl.java @@ -43,14 +43,14 @@ public class DataCatalogImpl implements DataCatalog { @Override public String registerDataProduct(DataProductModel productModel) throws DataCatalogException { - String productId = UUID.randomUUID().toString(); - productModel.setProductId(productId); + String productUri = UUID.randomUUID().toString(); + productModel.setProductUri(productUri); long currentTime = System.currentTimeMillis(); productModel.setCreationTime(currentTime); productModel.setLastModifiedTime(currentTime); if(productModel.getReplicaLocations() != null){ productModel.getReplicaLocations().stream().forEach(r-> { - r.setProductId(productId); + r.setProductUri(productUri); r.setReplicaId(UUID.randomUUID().toString()); r.setCreationTime(currentTime); r.setLastModifiedTime(currentTime); @@ -77,15 +77,15 @@ public class DataCatalogImpl implements DataCatalog { em.close(); } } - return productId; + return productUri; } @Override - public boolean removeDataProduct(String productId) throws DataCatalogException { + public boolean removeDataProduct(String productUri) throws DataCatalogException { EntityManager em = null; try { em = DataCatalogJPAUtils.getEntityManager(); - DataProduct dataProduct = em.find(DataProduct.class, productId); + DataProduct dataProduct = em.find(DataProduct.class, productUri); if(dataProduct == null) return false; em.getTransaction().begin(); @@ -111,7 +111,7 @@ public class DataCatalogImpl implements DataCatalog { EntityManager em = null; try { em = DataCatalogJPAUtils.getEntityManager(); - DataProduct dataProduct = em.find(DataProduct.class, productModel.getProductId()); + DataProduct dataProduct = em.find(DataProduct.class, productModel.getProductUri()); if(dataProduct == null) return false; em.getTransaction().begin(); @@ -135,11 +135,11 @@ public class DataCatalogImpl implements DataCatalog { } @Override - public DataProductModel getDataProduct(String productId) throws DataCatalogException { + public DataProductModel getDataProduct(String productUri) throws DataCatalogException { EntityManager em = null; try { em = DataCatalogJPAUtils.getEntityManager(); - DataProduct dataProduct = em.find(DataProduct.class, productId); + DataProduct dataProduct = em.find(DataProduct.class, productUri); return ThriftDataModelConversion.getDataProductModel(dataProduct); } catch (Exception e) { logger.error(e.getMessage(), e); @@ -261,11 +261,11 @@ public class DataCatalogImpl implements DataCatalog { @Override public List<DataReplicaLocationModel> getAllReplicaLocations(String - productId) throws DataCatalogException { + productUri) throws DataCatalogException { EntityManager em = null; try { em = DataCatalogJPAUtils.getEntityManager(); - DataProduct dataProduct = em.find(DataProduct.class, productId); + DataProduct dataProduct = em.find(DataProduct.class, productUri); if(dataProduct == null) return null; ArrayList<DataReplicaLocationModel> dataReplicaLocationModels = new ArrayList<>(); http://git-wip-us.apache.org/repos/asf/airavata/blob/03afa2da/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/DataProduct.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/DataProduct.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/DataProduct.java index 52ea8c7..4774bf3 100644 --- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/DataProduct.java +++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/DataProduct.java @@ -31,13 +31,14 @@ import java.util.Collection; @Table(name = "DATA_PRODUCT") public class DataProduct { private final static Logger logger = LoggerFactory.getLogger(DataProduct.class); - private String resourceId; + private String productUri; private String gatewayId; private String productName; + private String logicalPath; private String productDescription; private String dataProductType; private String ownerName; - private String parentProductId; + private String parentProductUri; private int productSize; private Timestamp creationTime; private Timestamp lastModifiedTime; @@ -48,13 +49,13 @@ public class DataProduct { private Collection<DataProduct> childDataProducts; @Id - @Column(name = "PRODUCT_ID") - public String getResourceId() { - return resourceId; + @Column(name = "PRODUCT_URI") + public String getProductUri() { + return productUri; } - public void setResourceId(String resourceId) { - this.resourceId = resourceId; + public void setProductUri(String productUri) { + this.productUri = productUri; } @Column(name = "GATEWAY_ID") @@ -84,6 +85,15 @@ public class DataProduct { this.productDescription = productDescription; } + @Column(name = "LOGICAL_PATH") + public String getLogicalPath() { + return logicalPath; + } + + public void setLogicalPath(String logicalPath) { + this.logicalPath = logicalPath; + } + @Column(name = "OWNER_NAME") public String getOwnerName() { return ownerName; @@ -93,13 +103,13 @@ public class DataProduct { this.ownerName = ownerName; } - @Column(name = "PARENT_PRODUCT_ID") - public String getParentProductId() { - return parentProductId; + @Column(name = "PARENT_PRODUCT_URI") + public String getParentProductUri() { + return parentProductUri; } - public void setParentProductId(String parentProductId) { - this.parentProductId = parentProductId; + public void setParentProductUri(String parentProductUri) { + this.parentProductUri = parentProductUri; } @Column(name = "PRODUCT_TYPE") @@ -157,7 +167,7 @@ public class DataProduct { } @ManyToOne - @JoinColumn(name = "PARENT_PRODUCT_ID", referencedColumnName = "PRODUCT_ID") + @JoinColumn(name = "PARENT_PRODUCT_URI", referencedColumnName = "PRODUCT_URI") public DataProduct getParentDataProduct() { return parentDataProduct; }
