moving data-manager relatedthings to a service
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavata_errors_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavata_errors_types.cpp
index 08c02cf..4339bc4 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavata_errors_types.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavata_errors_types.cpp
@@ -1220,4 +1220,101 @@
}
}
+
+DataManagerServiceException::~DataManagerServiceException() throw() {
+}
+
+
+void DataManagerServiceException::__set_message(const std::string& val) {
+ this->message = val;
+}
+
+uint32_t DataManagerServiceException::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+ bool isset_message = false;
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->message);
+ isset_message = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ if (!isset_message)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ return xfer;
+}
+
+uint32_t DataManagerServiceException::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
+ xfer += oprot->writeStructBegin("DataManagerServiceException");
+
+ xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->message);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+void swap(DataManagerServiceException &a, DataManagerServiceException &b) {
+ using ::std::swap;
+ swap(a.message, b.message);
+}
+
+DataManagerServiceException::DataManagerServiceException(const DataManagerServiceException& other30) : TException() {
+ message = other30.message;
+}
+DataManagerServiceException& DataManagerServiceException::operator=(const DataManagerServiceException& other31) {
+ message = other31.message;
+ return *this;
+}
+void DataManagerServiceException::printTo(std::ostream& out) const {
+ using ::apache::thrift::to_string;
+ out << "DataManagerServiceException(";
+ out << "message=" << to_string(message);
+ out << ")";
+}
+
+const char* DataManagerServiceException::what() const throw() {
+ try {
+ std::stringstream ss;
+ ss << "TException - service has thrown: " << *this;
+ this->thriftTExceptionMessageHolder_ = ss.str();
+ return this->thriftTExceptionMessageHolder_.c_str();
+ } catch (const std::exception&) {
+ return "TException - service has thrown: DataManagerServiceException";
+ }
+}
+
}}}} // namespace
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavata_errors_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavata_errors_types.h
index e756d0a..c2fa605 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavata_errors_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavata_errors_types.h
@@ -74,6 +74,8 @@
class AiravataSystemException;
+class DataManagerServiceException;
+
class ExperimentNotFoundException : public ::apache::thrift::TException {
public:
@@ -584,6 +586,48 @@
return out;
}
+
+class DataManagerServiceException : public ::apache::thrift::TException {
+ public:
+
+ DataManagerServiceException(const DataManagerServiceException&);
+ DataManagerServiceException& operator=(const DataManagerServiceException&);
+ DataManagerServiceException() : message() {
+ }
+
+ virtual ~DataManagerServiceException() throw();
+ std::string message;
+
+ void __set_message(const std::string& val);
+
+ bool operator == (const DataManagerServiceException & rhs) const
+ {
+ if (!(message == rhs.message))
+ return false;
+ return true;
+ }
+ bool operator != (const DataManagerServiceException &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const DataManagerServiceException & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+ virtual void printTo(std::ostream& out) const;
+ mutable std::string thriftTExceptionMessageHolder_;
+ const char* what() const throw();
+};
+
+void swap(DataManagerServiceException &a, DataManagerServiceException &b);
+
+inline std::ostream& operator<<(std::ostream& out, const DataManagerServiceException& obj)
+{
+ obj.printTo(out);
+ return out;
+}
+
}}}} // namespace
#endif
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/metadata_models_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/metadata_models_types.cpp
index f7d964e..b111fa7 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/metadata_models_types.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/metadata_models_types.cpp
@@ -60,6 +60,11 @@
__isset.username = true;
}
+void MetadataModel::__set_size(const double val) {
+ this->size = val;
+__isset.size = true;
+}
+
void MetadataModel::__set_sharedUsers(const std::vector<std::string> & val) {
this->sharedUsers = val;
__isset.sharedUsers = true;
@@ -95,6 +100,16 @@
__isset.customInformation = true;
}
+void MetadataModel::__set_creationTime(const int64_t val) {
+ this->creationTime = val;
+__isset.creationTime = true;
+}
+
+void MetadataModel::__set_lastModifiedTime(const int64_t val) {
+ this->lastModifiedTime = val;
+__isset.lastModifiedTime = true;
+}
+
uint32_t MetadataModel::read(::apache::thrift::protocol::TProtocol* iprot) {
apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
@@ -141,6 +156,14 @@
}
break;
case 4:
+ if (ftype == ::apache::thrift::protocol::T_DOUBLE) {
+ xfer += iprot->readDouble(this->size);
+ this->__isset.size = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 5:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->sharedUsers.clear();
@@ -160,7 +183,7 @@
xfer += iprot->skip(ftype);
}
break;
- case 5:
+ case 6:
if (ftype == ::apache::thrift::protocol::T_BOOL) {
xfer += iprot->readBool(this->sharedPublic);
this->__isset.sharedPublic = true;
@@ -168,7 +191,7 @@
xfer += iprot->skip(ftype);
}
break;
- case 6:
+ case 7:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->userFriendlyName);
this->__isset.userFriendlyName = true;
@@ -176,7 +199,7 @@
xfer += iprot->skip(ftype);
}
break;
- case 7:
+ case 8:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->userFriendlyDescription);
this->__isset.userFriendlyDescription = true;
@@ -184,7 +207,7 @@
xfer += iprot->skip(ftype);
}
break;
- case 8:
+ case 9:
if (ftype == ::apache::thrift::protocol::T_I32) {
int32_t ecast5;
xfer += iprot->readI32(ecast5);
@@ -194,7 +217,7 @@
xfer += iprot->skip(ftype);
}
break;
- case 9:
+ case 10:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->associatedEntityId);
this->__isset.associatedEntityId = true;
@@ -202,7 +225,7 @@
xfer += iprot->skip(ftype);
}
break;
- case 10:
+ case 11:
if (ftype == ::apache::thrift::protocol::T_MAP) {
{
this->customInformation.clear();
@@ -225,6 +248,22 @@
xfer += iprot->skip(ftype);
}
break;
+ case 12:
+ if (ftype == ::apache::thrift::protocol::T_I64) {
+ xfer += iprot->readI64(this->creationTime);
+ this->__isset.creationTime = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 13:
+ if (ftype == ::apache::thrift::protocol::T_I64) {
+ xfer += iprot->readI64(this->lastModifiedTime);
+ this->__isset.lastModifiedTime = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
default:
xfer += iprot->skip(ftype);
break;
@@ -257,8 +296,13 @@
xfer += oprot->writeString(this->username);
xfer += oprot->writeFieldEnd();
}
+ if (this->__isset.size) {
+ xfer += oprot->writeFieldBegin("size", ::apache::thrift::protocol::T_DOUBLE, 4);
+ xfer += oprot->writeDouble(this->size);
+ xfer += oprot->writeFieldEnd();
+ }
if (this->__isset.sharedUsers) {
- xfer += oprot->writeFieldBegin("sharedUsers", ::apache::thrift::protocol::T_LIST, 4);
+ xfer += oprot->writeFieldBegin("sharedUsers", ::apache::thrift::protocol::T_LIST, 5);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->sharedUsers.size()));
std::vector<std::string> ::const_iterator _iter13;
@@ -271,32 +315,32 @@
xfer += oprot->writeFieldEnd();
}
if (this->__isset.sharedPublic) {
- xfer += oprot->writeFieldBegin("sharedPublic", ::apache::thrift::protocol::T_BOOL, 5);
+ xfer += oprot->writeFieldBegin("sharedPublic", ::apache::thrift::protocol::T_BOOL, 6);
xfer += oprot->writeBool(this->sharedPublic);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.userFriendlyName) {
- xfer += oprot->writeFieldBegin("userFriendlyName", ::apache::thrift::protocol::T_STRING, 6);
+ xfer += oprot->writeFieldBegin("userFriendlyName", ::apache::thrift::protocol::T_STRING, 7);
xfer += oprot->writeString(this->userFriendlyName);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.userFriendlyDescription) {
- xfer += oprot->writeFieldBegin("userFriendlyDescription", ::apache::thrift::protocol::T_STRING, 7);
+ xfer += oprot->writeFieldBegin("userFriendlyDescription", ::apache::thrift::protocol::T_STRING, 8);
xfer += oprot->writeString(this->userFriendlyDescription);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.metadataType) {
- xfer += oprot->writeFieldBegin("metadataType", ::apache::thrift::protocol::T_I32, 8);
+ xfer += oprot->writeFieldBegin("metadataType", ::apache::thrift::protocol::T_I32, 9);
xfer += oprot->writeI32((int32_t)this->metadataType);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.associatedEntityId) {
- xfer += oprot->writeFieldBegin("associatedEntityId", ::apache::thrift::protocol::T_STRING, 9);
+ xfer += oprot->writeFieldBegin("associatedEntityId", ::apache::thrift::protocol::T_STRING, 10);
xfer += oprot->writeString(this->associatedEntityId);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.customInformation) {
- xfer += oprot->writeFieldBegin("customInformation", ::apache::thrift::protocol::T_MAP, 10);
+ xfer += oprot->writeFieldBegin("customInformation", ::apache::thrift::protocol::T_MAP, 11);
{
xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->customInformation.size()));
std::map<std::string, std::string> ::const_iterator _iter14;
@@ -309,6 +353,16 @@
}
xfer += oprot->writeFieldEnd();
}
+ if (this->__isset.creationTime) {
+ xfer += oprot->writeFieldBegin("creationTime", ::apache::thrift::protocol::T_I64, 12);
+ xfer += oprot->writeI64(this->creationTime);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.lastModifiedTime) {
+ xfer += oprot->writeFieldBegin("lastModifiedTime", ::apache::thrift::protocol::T_I64, 13);
+ xfer += oprot->writeI64(this->lastModifiedTime);
+ xfer += oprot->writeFieldEnd();
+ }
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
@@ -319,6 +373,7 @@
swap(a.metadataId, b.metadataId);
swap(a.gatewayId, b.gatewayId);
swap(a.username, b.username);
+ swap(a.size, b.size);
swap(a.sharedUsers, b.sharedUsers);
swap(a.sharedPublic, b.sharedPublic);
swap(a.userFriendlyName, b.userFriendlyName);
@@ -326,6 +381,8 @@
swap(a.metadataType, b.metadataType);
swap(a.associatedEntityId, b.associatedEntityId);
swap(a.customInformation, b.customInformation);
+ swap(a.creationTime, b.creationTime);
+ swap(a.lastModifiedTime, b.lastModifiedTime);
swap(a.__isset, b.__isset);
}
@@ -333,6 +390,7 @@
metadataId = other15.metadataId;
gatewayId = other15.gatewayId;
username = other15.username;
+ size = other15.size;
sharedUsers = other15.sharedUsers;
sharedPublic = other15.sharedPublic;
userFriendlyName = other15.userFriendlyName;
@@ -340,12 +398,15 @@
metadataType = other15.metadataType;
associatedEntityId = other15.associatedEntityId;
customInformation = other15.customInformation;
+ creationTime = other15.creationTime;
+ lastModifiedTime = other15.lastModifiedTime;
__isset = other15.__isset;
}
MetadataModel& MetadataModel::operator=(const MetadataModel& other16) {
metadataId = other16.metadataId;
gatewayId = other16.gatewayId;
username = other16.username;
+ size = other16.size;
sharedUsers = other16.sharedUsers;
sharedPublic = other16.sharedPublic;
userFriendlyName = other16.userFriendlyName;
@@ -353,6 +414,8 @@
metadataType = other16.metadataType;
associatedEntityId = other16.associatedEntityId;
customInformation = other16.customInformation;
+ creationTime = other16.creationTime;
+ lastModifiedTime = other16.lastModifiedTime;
__isset = other16.__isset;
return *this;
}
@@ -362,6 +425,7 @@
out << "metadataId="; (__isset.metadataId ? (out << to_string(metadataId)) : (out << "<null>"));
out << ", " << "gatewayId="; (__isset.gatewayId ? (out << to_string(gatewayId)) : (out << "<null>"));
out << ", " << "username="; (__isset.username ? (out << to_string(username)) : (out << "<null>"));
+ out << ", " << "size="; (__isset.size ? (out << to_string(size)) : (out << "<null>"));
out << ", " << "sharedUsers="; (__isset.sharedUsers ? (out << to_string(sharedUsers)) : (out << "<null>"));
out << ", " << "sharedPublic="; (__isset.sharedPublic ? (out << to_string(sharedPublic)) : (out << "<null>"));
out << ", " << "userFriendlyName="; (__isset.userFriendlyName ? (out << to_string(userFriendlyName)) : (out << "<null>"));
@@ -369,6 +433,8 @@
out << ", " << "metadataType="; (__isset.metadataType ? (out << to_string(metadataType)) : (out << "<null>"));
out << ", " << "associatedEntityId="; (__isset.associatedEntityId ? (out << to_string(associatedEntityId)) : (out << "<null>"));
out << ", " << "customInformation="; (__isset.customInformation ? (out << to_string(customInformation)) : (out << "<null>"));
+ out << ", " << "creationTime="; (__isset.creationTime ? (out << to_string(creationTime)) : (out << "<null>"));
+ out << ", " << "lastModifiedTime="; (__isset.lastModifiedTime ? (out << to_string(lastModifiedTime)) : (out << "<null>"));
out << ")";
}
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/metadata_models_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/metadata_models_types.h
index 2be82d9..71866e7 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/metadata_models_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/metadata_models_types.h
@@ -48,10 +48,11 @@
class MetadataModel;
typedef struct _MetadataModel__isset {
- _MetadataModel__isset() : metadataId(false), gatewayId(false), username(false), sharedUsers(false), sharedPublic(false), userFriendlyName(false), userFriendlyDescription(false), metadataType(false), associatedEntityId(false), customInformation(false) {}
+ _MetadataModel__isset() : metadataId(false), gatewayId(false), username(false), size(false), sharedUsers(false), sharedPublic(false), userFriendlyName(false), userFriendlyDescription(false), metadataType(false), associatedEntityId(false), customInformation(false), creationTime(false), lastModifiedTime(false) {}
bool metadataId :1;
bool gatewayId :1;
bool username :1;
+ bool size :1;
bool sharedUsers :1;
bool sharedPublic :1;
bool userFriendlyName :1;
@@ -59,6 +60,8 @@
bool metadataType :1;
bool associatedEntityId :1;
bool customInformation :1;
+ bool creationTime :1;
+ bool lastModifiedTime :1;
} _MetadataModel__isset;
class MetadataModel {
@@ -66,13 +69,14 @@
MetadataModel(const MetadataModel&);
MetadataModel& operator=(const MetadataModel&);
- MetadataModel() : metadataId(), gatewayId(), username(), sharedPublic(0), userFriendlyName(), userFriendlyDescription(), metadataType((MetadataType::type)0), associatedEntityId() {
+ MetadataModel() : metadataId(), gatewayId(), username(), size(0), sharedPublic(0), userFriendlyName(), userFriendlyDescription(), metadataType((MetadataType::type)0), associatedEntityId(), creationTime(0), lastModifiedTime(0) {
}
virtual ~MetadataModel() throw();
std::string metadataId;
std::string gatewayId;
std::string username;
+ double size;
std::vector<std::string> sharedUsers;
bool sharedPublic;
std::string userFriendlyName;
@@ -80,6 +84,8 @@
MetadataType::type metadataType;
std::string associatedEntityId;
std::map<std::string, std::string> customInformation;
+ int64_t creationTime;
+ int64_t lastModifiedTime;
_MetadataModel__isset __isset;
@@ -89,6 +95,8 @@
void __set_username(const std::string& val);
+ void __set_size(const double val);
+
void __set_sharedUsers(const std::vector<std::string> & val);
void __set_sharedPublic(const bool val);
@@ -103,6 +111,10 @@
void __set_customInformation(const std::map<std::string, std::string> & val);
+ void __set_creationTime(const int64_t val);
+
+ void __set_lastModifiedTime(const int64_t val);
+
bool operator == (const MetadataModel & rhs) const
{
if (__isset.metadataId != rhs.__isset.metadataId)
@@ -117,6 +129,10 @@
return false;
else if (__isset.username && !(username == rhs.username))
return false;
+ if (__isset.size != rhs.__isset.size)
+ return false;
+ else if (__isset.size && !(size == rhs.size))
+ return false;
if (__isset.sharedUsers != rhs.__isset.sharedUsers)
return false;
else if (__isset.sharedUsers && !(sharedUsers == rhs.sharedUsers))
@@ -145,6 +161,14 @@
return false;
else if (__isset.customInformation && !(customInformation == rhs.customInformation))
return false;
+ if (__isset.creationTime != rhs.__isset.creationTime)
+ return false;
+ else if (__isset.creationTime && !(creationTime == rhs.creationTime))
+ return false;
+ if (__isset.lastModifiedTime != rhs.__isset.lastModifiedTime)
+ return false;
+ else if (__isset.lastModifiedTime && !(lastModifiedTime == rhs.lastModifiedTime))
+ return false;
return true;
}
bool operator != (const MetadataModel &rhs) const {
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Error/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Error/Types.php
index edaa6de..15ed5fa 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Error/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Error/Types.php
@@ -1061,4 +1061,79 @@
}
+class DataManagerServiceException extends TException {
+ static $_TSPEC;
+
+ /**
+ * @var string
+ */
+ public $message = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'message',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['message'])) {
+ $this->message = $vals['message'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'DataManagerServiceException';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->message);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('DataManagerServiceException');
+ if ($this->message !== null) {
+ $xfer += $output->writeFieldBegin('message', TType::STRING, 1);
+ $xfer += $output->writeString($this->message);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Data/metadata/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Data/metadata/Types.php
index bb99359..ccc9ede 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Data/metadata/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Data/metadata/Types.php
@@ -1,5 +1,5 @@
<?php
-namespace Airavata\Model\data\metadata;
+namespace Airavata\Model\Data\Metadata;
/**
* Autogenerated by Thrift Compiler (0.9.3)
@@ -42,6 +42,10 @@
*/
public $username = null;
/**
+ * @var double
+ */
+ public $size = null;
+ /**
* @var string[]
*/
public $sharedUsers = null;
@@ -69,6 +73,14 @@
* @var array
*/
public $customInformation = null;
+ /**
+ * @var int
+ */
+ public $creationTime = null;
+ /**
+ * @var int
+ */
+ public $lastModifiedTime = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
@@ -86,6 +98,10 @@
'type' => TType::STRING,
),
4 => array(
+ 'var' => 'size',
+ 'type' => TType::DOUBLE,
+ ),
+ 5 => array(
'var' => 'sharedUsers',
'type' => TType::LST,
'etype' => TType::STRING,
@@ -93,27 +109,27 @@
'type' => TType::STRING,
),
),
- 5 => array(
+ 6 => array(
'var' => 'sharedPublic',
'type' => TType::BOOL,
),
- 6 => array(
+ 7 => array(
'var' => 'userFriendlyName',
'type' => TType::STRING,
),
- 7 => array(
+ 8 => array(
'var' => 'userFriendlyDescription',
'type' => TType::STRING,
),
- 8 => array(
+ 9 => array(
'var' => 'metadataType',
'type' => TType::I32,
),
- 9 => array(
+ 10 => array(
'var' => 'associatedEntityId',
'type' => TType::STRING,
),
- 10 => array(
+ 11 => array(
'var' => 'customInformation',
'type' => TType::MAP,
'ktype' => TType::STRING,
@@ -125,6 +141,14 @@
'type' => TType::STRING,
),
),
+ 12 => array(
+ 'var' => 'creationTime',
+ 'type' => TType::I64,
+ ),
+ 13 => array(
+ 'var' => 'lastModifiedTime',
+ 'type' => TType::I64,
+ ),
);
}
if (is_array($vals)) {
@@ -137,6 +161,9 @@
if (isset($vals['username'])) {
$this->username = $vals['username'];
}
+ if (isset($vals['size'])) {
+ $this->size = $vals['size'];
+ }
if (isset($vals['sharedUsers'])) {
$this->sharedUsers = $vals['sharedUsers'];
}
@@ -158,6 +185,12 @@
if (isset($vals['customInformation'])) {
$this->customInformation = $vals['customInformation'];
}
+ if (isset($vals['creationTime'])) {
+ $this->creationTime = $vals['creationTime'];
+ }
+ if (isset($vals['lastModifiedTime'])) {
+ $this->lastModifiedTime = $vals['lastModifiedTime'];
+ }
}
}
@@ -202,6 +235,13 @@
}
break;
case 4:
+ if ($ftype == TType::DOUBLE) {
+ $xfer += $input->readDouble($this->size);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 5:
if ($ftype == TType::LST) {
$this->sharedUsers = array();
$_size0 = 0;
@@ -218,42 +258,42 @@
$xfer += $input->skip($ftype);
}
break;
- case 5:
+ case 6:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->sharedPublic);
} else {
$xfer += $input->skip($ftype);
}
break;
- case 6:
+ case 7:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->userFriendlyName);
} else {
$xfer += $input->skip($ftype);
}
break;
- case 7:
+ case 8:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->userFriendlyDescription);
} else {
$xfer += $input->skip($ftype);
}
break;
- case 8:
+ case 9:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->metadataType);
} else {
$xfer += $input->skip($ftype);
}
break;
- case 9:
+ case 10:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->associatedEntityId);
} else {
$xfer += $input->skip($ftype);
}
break;
- case 10:
+ case 11:
if ($ftype == TType::MAP) {
$this->customInformation = array();
$_size6 = 0;
@@ -273,6 +313,20 @@
$xfer += $input->skip($ftype);
}
break;
+ case 12:
+ if ($ftype == TType::I64) {
+ $xfer += $input->readI64($this->creationTime);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 13:
+ if ($ftype == TType::I64) {
+ $xfer += $input->readI64($this->lastModifiedTime);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
default:
$xfer += $input->skip($ftype);
break;
@@ -301,11 +355,16 @@
$xfer += $output->writeString($this->username);
$xfer += $output->writeFieldEnd();
}
+ if ($this->size !== null) {
+ $xfer += $output->writeFieldBegin('size', TType::DOUBLE, 4);
+ $xfer += $output->writeDouble($this->size);
+ $xfer += $output->writeFieldEnd();
+ }
if ($this->sharedUsers !== null) {
if (!is_array($this->sharedUsers)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
- $xfer += $output->writeFieldBegin('sharedUsers', TType::LST, 4);
+ $xfer += $output->writeFieldBegin('sharedUsers', TType::LST, 5);
{
$output->writeListBegin(TType::STRING, count($this->sharedUsers));
{
@@ -319,27 +378,27 @@
$xfer += $output->writeFieldEnd();
}
if ($this->sharedPublic !== null) {
- $xfer += $output->writeFieldBegin('sharedPublic', TType::BOOL, 5);
+ $xfer += $output->writeFieldBegin('sharedPublic', TType::BOOL, 6);
$xfer += $output->writeBool($this->sharedPublic);
$xfer += $output->writeFieldEnd();
}
if ($this->userFriendlyName !== null) {
- $xfer += $output->writeFieldBegin('userFriendlyName', TType::STRING, 6);
+ $xfer += $output->writeFieldBegin('userFriendlyName', TType::STRING, 7);
$xfer += $output->writeString($this->userFriendlyName);
$xfer += $output->writeFieldEnd();
}
if ($this->userFriendlyDescription !== null) {
- $xfer += $output->writeFieldBegin('userFriendlyDescription', TType::STRING, 7);
+ $xfer += $output->writeFieldBegin('userFriendlyDescription', TType::STRING, 8);
$xfer += $output->writeString($this->userFriendlyDescription);
$xfer += $output->writeFieldEnd();
}
if ($this->metadataType !== null) {
- $xfer += $output->writeFieldBegin('metadataType', TType::I32, 8);
+ $xfer += $output->writeFieldBegin('metadataType', TType::I32, 9);
$xfer += $output->writeI32($this->metadataType);
$xfer += $output->writeFieldEnd();
}
if ($this->associatedEntityId !== null) {
- $xfer += $output->writeFieldBegin('associatedEntityId', TType::STRING, 9);
+ $xfer += $output->writeFieldBegin('associatedEntityId', TType::STRING, 10);
$xfer += $output->writeString($this->associatedEntityId);
$xfer += $output->writeFieldEnd();
}
@@ -347,7 +406,7 @@
if (!is_array($this->customInformation)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
- $xfer += $output->writeFieldBegin('customInformation', TType::MAP, 10);
+ $xfer += $output->writeFieldBegin('customInformation', TType::MAP, 11);
{
$output->writeMapBegin(TType::STRING, TType::STRING, count($this->customInformation));
{
@@ -361,6 +420,16 @@
}
$xfer += $output->writeFieldEnd();
}
+ if ($this->creationTime !== null) {
+ $xfer += $output->writeFieldBegin('creationTime', TType::I64, 12);
+ $xfer += $output->writeI64($this->creationTime);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->lastModifiedTime !== null) {
+ $xfer += $output->writeFieldBegin('lastModifiedTime', TType::I64, 13);
+ $xfer += $output->writeI64($this->lastModifiedTime);
+ $xfer += $output->writeFieldEnd();
+ }
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/error/ttypes.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/error/ttypes.py
index 522cc18..dc2ca9d 100644
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/error/ttypes.py
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/error/ttypes.py
@@ -938,3 +938,73 @@
def __ne__(self, other):
return not (self == other)
+
+class DataManagerServiceException(TException):
+ """
+ Attributes:
+ - message
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.STRING, 'message', None, None, ), # 1
+ )
+
+ def __init__(self, message=None,):
+ self.message = message
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 1:
+ if ftype == TType.STRING:
+ self.message = iprot.readString()
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('DataManagerServiceException')
+ if self.message is not None:
+ oprot.writeFieldBegin('message', TType.STRING, 1)
+ oprot.writeString(self.message)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.message is None:
+ raise TProtocol.TProtocolException(message='Required field message is unset!')
+ return
+
+
+ def __str__(self):
+ return repr(self)
+
+ def __hash__(self):
+ value = 17
+ value = (value * 31) ^ hash(self.message)
+ return value
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/data/metadata/ttypes.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/data/metadata/ttypes.py
index b50ac94..863a2aa 100644
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/data/metadata/ttypes.py
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/data/metadata/ttypes.py
@@ -37,6 +37,7 @@
- metadataId
- gatewayId
- username
+ - size
- sharedUsers
- sharedPublic
- userFriendlyName
@@ -44,6 +45,8 @@
- metadataType
- associatedEntityId
- customInformation
+ - creationTime
+ - lastModifiedTime
"""
thrift_spec = (
@@ -51,19 +54,23 @@
(1, TType.STRING, 'metadataId', None, None, ), # 1
(2, TType.STRING, 'gatewayId', None, None, ), # 2
(3, TType.STRING, 'username', None, None, ), # 3
- (4, TType.LIST, 'sharedUsers', (TType.STRING,None), None, ), # 4
- (5, TType.BOOL, 'sharedPublic', None, None, ), # 5
- (6, TType.STRING, 'userFriendlyName', None, None, ), # 6
- (7, TType.STRING, 'userFriendlyDescription', None, None, ), # 7
- (8, TType.I32, 'metadataType', None, None, ), # 8
- (9, TType.STRING, 'associatedEntityId', None, None, ), # 9
- (10, TType.MAP, 'customInformation', (TType.STRING,None,TType.STRING,None), None, ), # 10
+ (4, TType.DOUBLE, 'size', None, None, ), # 4
+ (5, TType.LIST, 'sharedUsers', (TType.STRING,None), None, ), # 5
+ (6, TType.BOOL, 'sharedPublic', None, None, ), # 6
+ (7, TType.STRING, 'userFriendlyName', None, None, ), # 7
+ (8, TType.STRING, 'userFriendlyDescription', None, None, ), # 8
+ (9, TType.I32, 'metadataType', None, None, ), # 9
+ (10, TType.STRING, 'associatedEntityId', None, None, ), # 10
+ (11, TType.MAP, 'customInformation', (TType.STRING,None,TType.STRING,None), None, ), # 11
+ (12, TType.I64, 'creationTime', None, None, ), # 12
+ (13, TType.I64, 'lastModifiedTime', None, None, ), # 13
)
- def __init__(self, metadataId=None, gatewayId=None, username=None, sharedUsers=None, sharedPublic=None, userFriendlyName=None, userFriendlyDescription=None, metadataType=None, associatedEntityId=None, customInformation=None,):
+ def __init__(self, metadataId=None, gatewayId=None, username=None, size=None, sharedUsers=None, sharedPublic=None, userFriendlyName=None, userFriendlyDescription=None, metadataType=None, associatedEntityId=None, customInformation=None, creationTime=None, lastModifiedTime=None,):
self.metadataId = metadataId
self.gatewayId = gatewayId
self.username = username
+ self.size = size
self.sharedUsers = sharedUsers
self.sharedPublic = sharedPublic
self.userFriendlyName = userFriendlyName
@@ -71,6 +78,8 @@
self.metadataType = metadataType
self.associatedEntityId = associatedEntityId
self.customInformation = customInformation
+ self.creationTime = creationTime
+ self.lastModifiedTime = lastModifiedTime
def read(self, iprot):
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
@@ -97,6 +106,11 @@
else:
iprot.skip(ftype)
elif fid == 4:
+ if ftype == TType.DOUBLE:
+ self.size = iprot.readDouble()
+ else:
+ iprot.skip(ftype)
+ elif fid == 5:
if ftype == TType.LIST:
self.sharedUsers = []
(_etype3, _size0) = iprot.readListBegin()
@@ -106,32 +120,32 @@
iprot.readListEnd()
else:
iprot.skip(ftype)
- elif fid == 5:
+ elif fid == 6:
if ftype == TType.BOOL:
self.sharedPublic = iprot.readBool()
else:
iprot.skip(ftype)
- elif fid == 6:
+ elif fid == 7:
if ftype == TType.STRING:
self.userFriendlyName = iprot.readString()
else:
iprot.skip(ftype)
- elif fid == 7:
+ elif fid == 8:
if ftype == TType.STRING:
self.userFriendlyDescription = iprot.readString()
else:
iprot.skip(ftype)
- elif fid == 8:
+ elif fid == 9:
if ftype == TType.I32:
self.metadataType = iprot.readI32()
else:
iprot.skip(ftype)
- elif fid == 9:
+ elif fid == 10:
if ftype == TType.STRING:
self.associatedEntityId = iprot.readString()
else:
iprot.skip(ftype)
- elif fid == 10:
+ elif fid == 11:
if ftype == TType.MAP:
self.customInformation = {}
(_ktype7, _vtype8, _size6 ) = iprot.readMapBegin()
@@ -142,6 +156,16 @@
iprot.readMapEnd()
else:
iprot.skip(ftype)
+ elif fid == 12:
+ if ftype == TType.I64:
+ self.creationTime = iprot.readI64()
+ else:
+ iprot.skip(ftype)
+ elif fid == 13:
+ if ftype == TType.I64:
+ self.lastModifiedTime = iprot.readI64()
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -164,41 +188,53 @@
oprot.writeFieldBegin('username', TType.STRING, 3)
oprot.writeString(self.username)
oprot.writeFieldEnd()
+ if self.size is not None:
+ oprot.writeFieldBegin('size', TType.DOUBLE, 4)
+ oprot.writeDouble(self.size)
+ oprot.writeFieldEnd()
if self.sharedUsers is not None:
- oprot.writeFieldBegin('sharedUsers', TType.LIST, 4)
+ oprot.writeFieldBegin('sharedUsers', TType.LIST, 5)
oprot.writeListBegin(TType.STRING, len(self.sharedUsers))
for iter13 in self.sharedUsers:
oprot.writeString(iter13)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.sharedPublic is not None:
- oprot.writeFieldBegin('sharedPublic', TType.BOOL, 5)
+ oprot.writeFieldBegin('sharedPublic', TType.BOOL, 6)
oprot.writeBool(self.sharedPublic)
oprot.writeFieldEnd()
if self.userFriendlyName is not None:
- oprot.writeFieldBegin('userFriendlyName', TType.STRING, 6)
+ oprot.writeFieldBegin('userFriendlyName', TType.STRING, 7)
oprot.writeString(self.userFriendlyName)
oprot.writeFieldEnd()
if self.userFriendlyDescription is not None:
- oprot.writeFieldBegin('userFriendlyDescription', TType.STRING, 7)
+ oprot.writeFieldBegin('userFriendlyDescription', TType.STRING, 8)
oprot.writeString(self.userFriendlyDescription)
oprot.writeFieldEnd()
if self.metadataType is not None:
- oprot.writeFieldBegin('metadataType', TType.I32, 8)
+ oprot.writeFieldBegin('metadataType', TType.I32, 9)
oprot.writeI32(self.metadataType)
oprot.writeFieldEnd()
if self.associatedEntityId is not None:
- oprot.writeFieldBegin('associatedEntityId', TType.STRING, 9)
+ oprot.writeFieldBegin('associatedEntityId', TType.STRING, 10)
oprot.writeString(self.associatedEntityId)
oprot.writeFieldEnd()
if self.customInformation is not None:
- oprot.writeFieldBegin('customInformation', TType.MAP, 10)
+ oprot.writeFieldBegin('customInformation', TType.MAP, 11)
oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.customInformation))
for kiter14,viter15 in self.customInformation.items():
oprot.writeString(kiter14)
oprot.writeString(viter15)
oprot.writeMapEnd()
oprot.writeFieldEnd()
+ if self.creationTime is not None:
+ oprot.writeFieldBegin('creationTime', TType.I64, 12)
+ oprot.writeI64(self.creationTime)
+ oprot.writeFieldEnd()
+ if self.lastModifiedTime is not None:
+ oprot.writeFieldBegin('lastModifiedTime', TType.I64, 13)
+ oprot.writeI64(self.lastModifiedTime)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -211,6 +247,7 @@
value = (value * 31) ^ hash(self.metadataId)
value = (value * 31) ^ hash(self.gatewayId)
value = (value * 31) ^ hash(self.username)
+ value = (value * 31) ^ hash(self.size)
value = (value * 31) ^ hash(self.sharedUsers)
value = (value * 31) ^ hash(self.sharedPublic)
value = (value * 31) ^ hash(self.userFriendlyName)
@@ -218,6 +255,8 @@
value = (value * 31) ^ hash(self.metadataType)
value = (value * 31) ^ hash(self.associatedEntityId)
value = (value * 31) ^ hash(self.customInformation)
+ value = (value * 31) ^ hash(self.creationTime)
+ value = (value * 31) ^ hash(self.lastModifiedTime)
return value
def __repr__(self):
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/metadata/MetadataModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/metadata/MetadataModel.java
index d6688e8..d1e3c01 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/metadata/MetadataModel.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/metadata/MetadataModel.java
@@ -58,13 +58,16 @@
private static final org.apache.thrift.protocol.TField METADATA_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("metadataId", 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 USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField SHARED_USERS_FIELD_DESC = new org.apache.thrift.protocol.TField("sharedUsers", org.apache.thrift.protocol.TType.LIST, (short)4);
- private static final org.apache.thrift.protocol.TField SHARED_PUBLIC_FIELD_DESC = new org.apache.thrift.protocol.TField("sharedPublic", org.apache.thrift.protocol.TType.BOOL, (short)5);
- private static final org.apache.thrift.protocol.TField USER_FRIENDLY_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userFriendlyName", org.apache.thrift.protocol.TType.STRING, (short)6);
- private static final org.apache.thrift.protocol.TField USER_FRIENDLY_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("userFriendlyDescription", org.apache.thrift.protocol.TType.STRING, (short)7);
- private static final org.apache.thrift.protocol.TField METADATA_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("metadataType", org.apache.thrift.protocol.TType.I32, (short)8);
- private static final org.apache.thrift.protocol.TField ASSOCIATED_ENTITY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("associatedEntityId", org.apache.thrift.protocol.TType.STRING, (short)9);
- private static final org.apache.thrift.protocol.TField CUSTOM_INFORMATION_FIELD_DESC = new org.apache.thrift.protocol.TField("customInformation", org.apache.thrift.protocol.TType.MAP, (short)10);
+ private static final org.apache.thrift.protocol.TField SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("size", org.apache.thrift.protocol.TType.DOUBLE, (short)4);
+ private static final org.apache.thrift.protocol.TField SHARED_USERS_FIELD_DESC = new org.apache.thrift.protocol.TField("sharedUsers", org.apache.thrift.protocol.TType.LIST, (short)5);
+ private static final org.apache.thrift.protocol.TField SHARED_PUBLIC_FIELD_DESC = new org.apache.thrift.protocol.TField("sharedPublic", org.apache.thrift.protocol.TType.BOOL, (short)6);
+ private static final org.apache.thrift.protocol.TField USER_FRIENDLY_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userFriendlyName", org.apache.thrift.protocol.TType.STRING, (short)7);
+ private static final org.apache.thrift.protocol.TField USER_FRIENDLY_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("userFriendlyDescription", org.apache.thrift.protocol.TType.STRING, (short)8);
+ private static final org.apache.thrift.protocol.TField METADATA_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("metadataType", org.apache.thrift.protocol.TType.I32, (short)9);
+ private static final org.apache.thrift.protocol.TField ASSOCIATED_ENTITY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("associatedEntityId", org.apache.thrift.protocol.TType.STRING, (short)10);
+ private static final org.apache.thrift.protocol.TField CUSTOM_INFORMATION_FIELD_DESC = new org.apache.thrift.protocol.TField("customInformation", org.apache.thrift.protocol.TType.MAP, (short)11);
+ 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)12);
+ 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)13);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -75,6 +78,7 @@
private String metadataId; // optional
private String gatewayId; // optional
private String username; // optional
+ private double size; // optional
private List<String> sharedUsers; // optional
private boolean sharedPublic; // optional
private String userFriendlyName; // optional
@@ -82,23 +86,28 @@
private MetadataType metadataType; // optional
private String associatedEntityId; // optional
private Map<String,String> customInformation; // optional
+ private long creationTime; // optional
+ private long lastModifiedTime; // 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 {
METADATA_ID((short)1, "metadataId"),
GATEWAY_ID((short)2, "gatewayId"),
USERNAME((short)3, "username"),
- SHARED_USERS((short)4, "sharedUsers"),
- SHARED_PUBLIC((short)5, "sharedPublic"),
- USER_FRIENDLY_NAME((short)6, "userFriendlyName"),
- USER_FRIENDLY_DESCRIPTION((short)7, "userFriendlyDescription"),
+ SIZE((short)4, "size"),
+ SHARED_USERS((short)5, "sharedUsers"),
+ SHARED_PUBLIC((short)6, "sharedPublic"),
+ USER_FRIENDLY_NAME((short)7, "userFriendlyName"),
+ USER_FRIENDLY_DESCRIPTION((short)8, "userFriendlyDescription"),
/**
*
* @see MetadataType
*/
- METADATA_TYPE((short)8, "metadataType"),
- ASSOCIATED_ENTITY_ID((short)9, "associatedEntityId"),
- CUSTOM_INFORMATION((short)10, "customInformation");
+ METADATA_TYPE((short)9, "metadataType"),
+ ASSOCIATED_ENTITY_ID((short)10, "associatedEntityId"),
+ CUSTOM_INFORMATION((short)11, "customInformation"),
+ CREATION_TIME((short)12, "creationTime"),
+ LAST_MODIFIED_TIME((short)13, "lastModifiedTime");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -119,20 +128,26 @@
return GATEWAY_ID;
case 3: // USERNAME
return USERNAME;
- case 4: // SHARED_USERS
+ case 4: // SIZE
+ return SIZE;
+ case 5: // SHARED_USERS
return SHARED_USERS;
- case 5: // SHARED_PUBLIC
+ case 6: // SHARED_PUBLIC
return SHARED_PUBLIC;
- case 6: // USER_FRIENDLY_NAME
+ case 7: // USER_FRIENDLY_NAME
return USER_FRIENDLY_NAME;
- case 7: // USER_FRIENDLY_DESCRIPTION
+ case 8: // USER_FRIENDLY_DESCRIPTION
return USER_FRIENDLY_DESCRIPTION;
- case 8: // METADATA_TYPE
+ case 9: // METADATA_TYPE
return METADATA_TYPE;
- case 9: // ASSOCIATED_ENTITY_ID
+ case 10: // ASSOCIATED_ENTITY_ID
return ASSOCIATED_ENTITY_ID;
- case 10: // CUSTOM_INFORMATION
+ case 11: // CUSTOM_INFORMATION
return CUSTOM_INFORMATION;
+ case 12: // CREATION_TIME
+ return CREATION_TIME;
+ case 13: // LAST_MODIFIED_TIME
+ return LAST_MODIFIED_TIME;
default:
return null;
}
@@ -173,9 +188,12 @@
}
// isset id assignments
- private static final int __SHAREDPUBLIC_ISSET_ID = 0;
+ private static final int __SIZE_ISSET_ID = 0;
+ private static final int __SHAREDPUBLIC_ISSET_ID = 1;
+ private static final int __CREATIONTIME_ISSET_ID = 2;
+ private static final int __LASTMODIFIEDTIME_ISSET_ID = 3;
private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.METADATA_ID,_Fields.GATEWAY_ID,_Fields.USERNAME,_Fields.SHARED_USERS,_Fields.SHARED_PUBLIC,_Fields.USER_FRIENDLY_NAME,_Fields.USER_FRIENDLY_DESCRIPTION,_Fields.METADATA_TYPE,_Fields.ASSOCIATED_ENTITY_ID,_Fields.CUSTOM_INFORMATION};
+ private static final _Fields optionals[] = {_Fields.METADATA_ID,_Fields.GATEWAY_ID,_Fields.USERNAME,_Fields.SIZE,_Fields.SHARED_USERS,_Fields.SHARED_PUBLIC,_Fields.USER_FRIENDLY_NAME,_Fields.USER_FRIENDLY_DESCRIPTION,_Fields.METADATA_TYPE,_Fields.ASSOCIATED_ENTITY_ID,_Fields.CUSTOM_INFORMATION,_Fields.CREATION_TIME,_Fields.LAST_MODIFIED_TIME};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -185,6 +203,8 @@
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.SIZE, new org.apache.thrift.meta_data.FieldMetaData("size", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
tmpMap.put(_Fields.SHARED_USERS, new org.apache.thrift.meta_data.FieldMetaData("sharedUsers", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
@@ -202,6 +222,10 @@
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.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)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MetadataModel.class, metaDataMap);
}
@@ -223,6 +247,7 @@
if (other.isSetUsername()) {
this.username = other.username;
}
+ this.size = other.size;
if (other.isSetSharedUsers()) {
List<String> __this__sharedUsers = new ArrayList<String>(other.sharedUsers);
this.sharedUsers = __this__sharedUsers;
@@ -244,6 +269,8 @@
Map<String,String> __this__customInformation = new HashMap<String,String>(other.customInformation);
this.customInformation = __this__customInformation;
}
+ this.creationTime = other.creationTime;
+ this.lastModifiedTime = other.lastModifiedTime;
}
public MetadataModel deepCopy() {
@@ -255,6 +282,8 @@
this.metadataId = null;
this.gatewayId = null;
this.username = null;
+ setSizeIsSet(false);
+ this.size = 0.0;
this.sharedUsers = null;
setSharedPublicIsSet(false);
this.sharedPublic = false;
@@ -263,6 +292,10 @@
this.metadataType = null;
this.associatedEntityId = null;
this.customInformation = null;
+ setCreationTimeIsSet(false);
+ this.creationTime = 0;
+ setLastModifiedTimeIsSet(false);
+ this.lastModifiedTime = 0;
}
public String getMetadataId() {
@@ -334,6 +367,28 @@
}
}
+ public double getSize() {
+ return this.size;
+ }
+
+ public void setSize(double size) {
+ this.size = size;
+ setSizeIsSet(true);
+ }
+
+ public void unsetSize() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SIZE_ISSET_ID);
+ }
+
+ /** Returns true if field size is set (has been assigned a value) and false otherwise */
+ public boolean isSetSize() {
+ return EncodingUtils.testBit(__isset_bitfield, __SIZE_ISSET_ID);
+ }
+
+ public void setSizeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SIZE_ISSET_ID, value);
+ }
+
public int getSharedUsersSize() {
return (this.sharedUsers == null) ? 0 : this.sharedUsers.size();
}
@@ -528,6 +583,50 @@
}
}
+ 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 void setFieldValue(_Fields field, Object value) {
switch (field) {
case METADATA_ID:
@@ -554,6 +653,14 @@
}
break;
+ case SIZE:
+ if (value == null) {
+ unsetSize();
+ } else {
+ setSize((Double)value);
+ }
+ break;
+
case SHARED_USERS:
if (value == null) {
unsetSharedUsers();
@@ -610,6 +717,22 @@
}
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;
+
}
}
@@ -624,6 +747,9 @@
case USERNAME:
return getUsername();
+ case SIZE:
+ return getSize();
+
case SHARED_USERS:
return getSharedUsers();
@@ -645,6 +771,12 @@
case CUSTOM_INFORMATION:
return getCustomInformation();
+ case CREATION_TIME:
+ return getCreationTime();
+
+ case LAST_MODIFIED_TIME:
+ return getLastModifiedTime();
+
}
throw new IllegalStateException();
}
@@ -662,6 +794,8 @@
return isSetGatewayId();
case USERNAME:
return isSetUsername();
+ case SIZE:
+ return isSetSize();
case SHARED_USERS:
return isSetSharedUsers();
case SHARED_PUBLIC:
@@ -676,6 +810,10 @@
return isSetAssociatedEntityId();
case CUSTOM_INFORMATION:
return isSetCustomInformation();
+ case CREATION_TIME:
+ return isSetCreationTime();
+ case LAST_MODIFIED_TIME:
+ return isSetLastModifiedTime();
}
throw new IllegalStateException();
}
@@ -720,6 +858,15 @@
return false;
}
+ boolean this_present_size = true && this.isSetSize();
+ boolean that_present_size = true && that.isSetSize();
+ if (this_present_size || that_present_size) {
+ if (!(this_present_size && that_present_size))
+ return false;
+ if (this.size != that.size)
+ return false;
+ }
+
boolean this_present_sharedUsers = true && this.isSetSharedUsers();
boolean that_present_sharedUsers = true && that.isSetSharedUsers();
if (this_present_sharedUsers || that_present_sharedUsers) {
@@ -783,6 +930,24 @@
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;
+ }
+
return true;
}
@@ -805,6 +970,11 @@
if (present_username)
list.add(username);
+ boolean present_size = true && (isSetSize());
+ list.add(present_size);
+ if (present_size)
+ list.add(size);
+
boolean present_sharedUsers = true && (isSetSharedUsers());
list.add(present_sharedUsers);
if (present_sharedUsers)
@@ -840,6 +1010,16 @@
if (present_customInformation)
list.add(customInformation);
+ 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);
+
return list.hashCode();
}
@@ -881,6 +1061,16 @@
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetSize()).compareTo(other.isSetSize());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSize()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.size, other.size);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
lastComparison = Boolean.valueOf(isSetSharedUsers()).compareTo(other.isSetSharedUsers());
if (lastComparison != 0) {
return lastComparison;
@@ -951,6 +1141,26 @@
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;
+ }
+ }
return 0;
}
@@ -1000,6 +1210,12 @@
}
first = false;
}
+ if (isSetSize()) {
+ if (!first) sb.append(", ");
+ sb.append("size:");
+ sb.append(this.size);
+ first = false;
+ }
if (isSetSharedUsers()) {
if (!first) sb.append(", ");
sb.append("sharedUsers:");
@@ -1066,6 +1282,18 @@
}
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;
+ }
sb.append(")");
return sb.toString();
}
@@ -1135,7 +1363,15 @@
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 4: // SHARED_USERS
+ case 4: // SIZE
+ if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
+ struct.size = iprot.readDouble();
+ struct.setSizeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // SHARED_USERS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
@@ -1153,7 +1389,7 @@
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 5: // SHARED_PUBLIC
+ case 6: // SHARED_PUBLIC
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.sharedPublic = iprot.readBool();
struct.setSharedPublicIsSet(true);
@@ -1161,7 +1397,7 @@
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 6: // USER_FRIENDLY_NAME
+ case 7: // USER_FRIENDLY_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.userFriendlyName = iprot.readString();
struct.setUserFriendlyNameIsSet(true);
@@ -1169,7 +1405,7 @@
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 7: // USER_FRIENDLY_DESCRIPTION
+ case 8: // USER_FRIENDLY_DESCRIPTION
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.userFriendlyDescription = iprot.readString();
struct.setUserFriendlyDescriptionIsSet(true);
@@ -1177,7 +1413,7 @@
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 8: // METADATA_TYPE
+ case 9: // METADATA_TYPE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.metadataType = org.apache.airavata.model.data.metadata.MetadataType.findByValue(iprot.readI32());
struct.setMetadataTypeIsSet(true);
@@ -1185,7 +1421,7 @@
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 9: // ASSOCIATED_ENTITY_ID
+ case 10: // ASSOCIATED_ENTITY_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.associatedEntityId = iprot.readString();
struct.setAssociatedEntityIdIsSet(true);
@@ -1193,7 +1429,7 @@
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 10: // CUSTOM_INFORMATION
+ case 11: // CUSTOM_INFORMATION
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map3 = iprot.readMapBegin();
@@ -1213,6 +1449,22 @@
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 12: // 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 13: // 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;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -1247,6 +1499,11 @@
oprot.writeFieldEnd();
}
}
+ if (struct.isSetSize()) {
+ oprot.writeFieldBegin(SIZE_FIELD_DESC);
+ oprot.writeDouble(struct.size);
+ oprot.writeFieldEnd();
+ }
if (struct.sharedUsers != null) {
if (struct.isSetSharedUsers()) {
oprot.writeFieldBegin(SHARED_USERS_FIELD_DESC);
@@ -1309,6 +1566,16 @@
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();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -1336,28 +1603,37 @@
if (struct.isSetUsername()) {
optionals.set(2);
}
- if (struct.isSetSharedUsers()) {
+ if (struct.isSetSize()) {
optionals.set(3);
}
- if (struct.isSetSharedPublic()) {
+ if (struct.isSetSharedUsers()) {
optionals.set(4);
}
- if (struct.isSetUserFriendlyName()) {
+ if (struct.isSetSharedPublic()) {
optionals.set(5);
}
- if (struct.isSetUserFriendlyDescription()) {
+ if (struct.isSetUserFriendlyName()) {
optionals.set(6);
}
- if (struct.isSetMetadataType()) {
+ if (struct.isSetUserFriendlyDescription()) {
optionals.set(7);
}
- if (struct.isSetAssociatedEntityId()) {
+ if (struct.isSetMetadataType()) {
optionals.set(8);
}
- if (struct.isSetCustomInformation()) {
+ if (struct.isSetAssociatedEntityId()) {
optionals.set(9);
}
- oprot.writeBitSet(optionals, 10);
+ if (struct.isSetCustomInformation()) {
+ optionals.set(10);
+ }
+ if (struct.isSetCreationTime()) {
+ optionals.set(11);
+ }
+ if (struct.isSetLastModifiedTime()) {
+ optionals.set(12);
+ }
+ oprot.writeBitSet(optionals, 13);
if (struct.isSetMetadataId()) {
oprot.writeString(struct.metadataId);
}
@@ -1367,6 +1643,9 @@
if (struct.isSetUsername()) {
oprot.writeString(struct.username);
}
+ if (struct.isSetSize()) {
+ oprot.writeDouble(struct.size);
+ }
if (struct.isSetSharedUsers()) {
{
oprot.writeI32(struct.sharedUsers.size());
@@ -1401,12 +1680,18 @@
}
}
}
+ if (struct.isSetCreationTime()) {
+ oprot.writeI64(struct.creationTime);
+ }
+ if (struct.isSetLastModifiedTime()) {
+ oprot.writeI64(struct.lastModifiedTime);
+ }
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, MetadataModel struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(10);
+ BitSet incoming = iprot.readBitSet(13);
if (incoming.get(0)) {
struct.metadataId = iprot.readString();
struct.setMetadataIdIsSet(true);
@@ -1420,6 +1705,10 @@
struct.setUsernameIsSet(true);
}
if (incoming.get(3)) {
+ struct.size = iprot.readDouble();
+ struct.setSizeIsSet(true);
+ }
+ if (incoming.get(4)) {
{
org.apache.thrift.protocol.TList _list11 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.sharedUsers = new ArrayList<String>(_list11.size);
@@ -1432,27 +1721,27 @@
}
struct.setSharedUsersIsSet(true);
}
- if (incoming.get(4)) {
+ if (incoming.get(5)) {
struct.sharedPublic = iprot.readBool();
struct.setSharedPublicIsSet(true);
}
- if (incoming.get(5)) {
+ if (incoming.get(6)) {
struct.userFriendlyName = iprot.readString();
struct.setUserFriendlyNameIsSet(true);
}
- if (incoming.get(6)) {
+ if (incoming.get(7)) {
struct.userFriendlyDescription = iprot.readString();
struct.setUserFriendlyDescriptionIsSet(true);
}
- if (incoming.get(7)) {
+ if (incoming.get(8)) {
struct.metadataType = org.apache.airavata.model.data.metadata.MetadataType.findByValue(iprot.readI32());
struct.setMetadataTypeIsSet(true);
}
- if (incoming.get(8)) {
+ if (incoming.get(9)) {
struct.associatedEntityId = iprot.readString();
struct.setAssociatedEntityIdIsSet(true);
}
- if (incoming.get(9)) {
+ if (incoming.get(10)) {
{
org.apache.thrift.protocol.TMap _map14 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.customInformation = new HashMap<String,String>(2*_map14.size);
@@ -1467,6 +1756,14 @@
}
struct.setCustomInformationIsSet(true);
}
+ if (incoming.get(11)) {
+ struct.creationTime = iprot.readI64();
+ struct.setCreationTimeIsSet(true);
+ }
+ if (incoming.get(12)) {
+ struct.lastModifiedTime = iprot.readI64();
+ struct.setLastModifiedTimeIsSet(true);
+ }
}
}
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/DataManagerServiceException.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/DataManagerServiceException.java
new file mode 100644
index 0000000..5d6a116
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/DataManagerServiceException.java
@@ -0,0 +1,406 @@
+/**
+ * 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.error;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-01-12")
+public class DataManagerServiceException extends TException implements org.apache.thrift.TBase<DataManagerServiceException, DataManagerServiceException._Fields>, java.io.Serializable, Cloneable, Comparable<DataManagerServiceException> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DataManagerServiceException");
+
+ private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new DataManagerServiceExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new DataManagerServiceExceptionTupleSchemeFactory());
+ }
+
+ private String message; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ MESSAGE((short)1, "message");
+
+ 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: // MESSAGE
+ return MESSAGE;
+ 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
+ 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.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DataManagerServiceException.class, metaDataMap);
+ }
+
+ public DataManagerServiceException() {
+ }
+
+ public DataManagerServiceException(
+ String message)
+ {
+ this();
+ this.message = message;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public DataManagerServiceException(DataManagerServiceException other) {
+ if (other.isSetMessage()) {
+ this.message = other.message;
+ }
+ }
+
+ public DataManagerServiceException deepCopy() {
+ return new DataManagerServiceException(this);
+ }
+
+ @Override
+ public void clear() {
+ this.message = null;
+ }
+
+ public String getMessage() {
+ return this.message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public void unsetMessage() {
+ this.message = null;
+ }
+
+ /** Returns true if field message is set (has been assigned a value) and false otherwise */
+ public boolean isSetMessage() {
+ return this.message != null;
+ }
+
+ public void setMessageIsSet(boolean value) {
+ if (!value) {
+ this.message = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case MESSAGE:
+ if (value == null) {
+ unsetMessage();
+ } else {
+ setMessage((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case MESSAGE:
+ return getMessage();
+
+ }
+ 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 MESSAGE:
+ return isSetMessage();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof DataManagerServiceException)
+ return this.equals((DataManagerServiceException)that);
+ return false;
+ }
+
+ public boolean equals(DataManagerServiceException that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_message = true && this.isSetMessage();
+ boolean that_present_message = true && that.isSetMessage();
+ if (this_present_message || that_present_message) {
+ if (!(this_present_message && that_present_message))
+ return false;
+ if (!this.message.equals(that.message))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_message = true && (isSetMessage());
+ list.add(present_message);
+ if (present_message)
+ list.add(message);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(DataManagerServiceException other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMessage()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
+ 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("DataManagerServiceException(");
+ boolean first = true;
+
+ sb.append("message:");
+ if (this.message == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.message);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetMessage()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'message' is unset! Struct:" + toString());
+ }
+
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class DataManagerServiceExceptionStandardSchemeFactory implements SchemeFactory {
+ public DataManagerServiceExceptionStandardScheme getScheme() {
+ return new DataManagerServiceExceptionStandardScheme();
+ }
+ }
+
+ private static class DataManagerServiceExceptionStandardScheme extends StandardScheme<DataManagerServiceException> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, DataManagerServiceException 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: // MESSAGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(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, DataManagerServiceException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.message != null) {
+ oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+ oprot.writeString(struct.message);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class DataManagerServiceExceptionTupleSchemeFactory implements SchemeFactory {
+ public DataManagerServiceExceptionTupleScheme getScheme() {
+ return new DataManagerServiceExceptionTupleScheme();
+ }
+ }
+
+ private static class DataManagerServiceExceptionTupleScheme extends TupleScheme<DataManagerServiceException> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, DataManagerServiceException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.message);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, DataManagerServiceException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(true);
+ }
+ }
+
+}
+
diff --git a/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/FileManagerFactory.java b/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/DataManagerFactory.java
similarity index 87%
rename from modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/FileManagerFactory.java
rename to modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/DataManagerFactory.java
index af908a3..cd92146 100644
--- a/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/FileManagerFactory.java
+++ b/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/DataManagerFactory.java
@@ -25,10 +25,10 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class FileManagerFactory {
- private final static Logger logger = LoggerFactory.getLogger(FileManagerFactory.class);
+public class DataManagerFactory {
+ private final static Logger logger = LoggerFactory.getLogger(DataManagerFactory.class);
- public static DataManager getFileManager() throws DataManagerException {
- return new FileManagerImpl();
+ public static DataManager getDataManager() throws DataManagerException {
+ return new DataManagerImpl();
}
}
\ No newline at end of file
diff --git a/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/FileManagerImpl.java b/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/DataManagerImpl.java
similarity index 84%
rename from modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/FileManagerImpl.java
rename to modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/DataManagerImpl.java
index 2570fc5..f675890 100644
--- a/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/FileManagerImpl.java
+++ b/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/DataManagerImpl.java
@@ -20,16 +20,13 @@
*/
package org.apache.airavata.data.manager.core;
-import org.apache.airavata.data.manager.cpi.DataManager;
-import org.apache.airavata.data.manager.cpi.DataManagerException;
-import org.apache.airavata.data.manager.cpi.FileTransferService;
-import org.apache.airavata.data.manager.cpi.ReplicaCatalogService;
+import org.apache.airavata.data.manager.cpi.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class FileManagerImpl implements DataManager {
- private final static Logger logger = LoggerFactory.getLogger(FileManagerImpl.class);
+public class DataManagerImpl implements DataManager {
+ private final static Logger logger = LoggerFactory.getLogger(DataManagerImpl.class);
/**
* Return file transfer service instance
@@ -67,9 +64,11 @@
* @return
*/
@Override
+
+
public MetadataCatalogService getMetadataCatalogService() throws DataManagerException {
try{
- return new MetadataCatalogServiceImpl();
+ return new MetadataCatalogServiceImpl();
}catch (Exception e){
logger.error(e.getMessage(), e);
throw new DataManagerException(e);
diff --git a/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/MetadataCatalogService.java b/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/MetadataCatalogService.java
deleted file mode 100644
index 15172a3..0000000
--- a/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/MetadataCatalogService.java
+++ /dev/null
@@ -1,76 +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.
- *
-*/
-package org.apache.airavata.data.manager.core;
-
-import org.apache.airavata.data.manager.cpi.DataManagerException;
-import org.apache.airavata.model.data.metadata.MetadataModel;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class MetadataCatalogService implements org.apache.airavata.data.manager.cpi.MetadataCatalogService {
- private final static Logger logger = LoggerFactory.getLogger(MetadataCatalogService.class);
-
- /**
- * Create new metadata model
- *
- * @param metadataModel
- * @return
- * @throws DataManagerException
- */
- @Override
- public String createMetadata(MetadataModel metadataModel) throws DataManagerException {
- return null;
- }
-
- /**
- * Update existing metadata model
- *
- * @param metadataModel
- * @throws DataManagerException
- */
- @Override
- public void updateMetadata(MetadataModel metadataModel) throws DataManagerException {
-
- }
-
- /**
- * Delete existing metadata model
- *
- * @param metadataId
- * @throws DataManagerException
- */
- @Override
- public void deleteMetadata(String metadataId) throws DataManagerException {
-
- }
-
- /**
- * Retrieve metadata model
- *
- * @param metadataId
- * @return
- * @throws DataManagerException
- */
- @Override
- public MetadataModel getMetadata(String metadataId) throws DataManagerException {
- return null;
- }
-}
\ No newline at end of file
diff --git a/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/MetadataCatalogServiceImpl.java b/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/MetadataCatalogServiceImpl.java
index 9f29c92..a297744 100644
--- a/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/MetadataCatalogServiceImpl.java
+++ b/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/MetadataCatalogServiceImpl.java
@@ -22,13 +22,15 @@
import org.apache.airavata.data.manager.core.db.dao.MetadataDao;
import org.apache.airavata.data.manager.cpi.DataManagerException;
+import org.apache.airavata.data.manager.cpi.MetadataCatalogService;
import org.apache.airavata.model.data.metadata.MetadataModel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
+import java.util.List;
-public class MetadataCatalogServiceImpl extends MetadataCatalogService {
+public class MetadataCatalogServiceImpl implements MetadataCatalogService {
private final static Logger logger = LoggerFactory.getLogger(MetadataCatalogServiceImpl.class);
private MetadataDao metadataDao;
@@ -102,4 +104,34 @@
throw new DataManagerException(e);
}
}
+
+ /**
+ * Search Metadata
+ *
+ * @param username
+ * @param gatewayId
+ * @param searchText
+ * @return
+ * @throws DataManagerException
+ */
+ @Override
+ public List<MetadataModel> searchMetadata(String username, String gatewayId, String searchText) throws DataManagerException {
+ try{
+ return metadataDao.searchMetaDataModels(username, gatewayId, searchText);
+ }catch (Exception e){
+ logger.error(e.getMessage(), e);
+ throw new DataManagerException(e);
+ }
+ }
+
+// public static void main(String[] args) throws IOException, DataManagerServiceException {
+// MetadataModel metadataModel = new MetadataModel();
+// metadataModel.setUsername("scnakandala");
+// metadataModel.setUserFriendlyName("Stress Free, 100km Tlayer");
+// metadataModel.setSize(103.67 * 1024);
+// metadataModel.setUserFriendlyDescription("Dynamo similar to C2-2, with a stress-free boundaries and a 100km thick" +
+// " thermal layer codBC.txt.in 2 0 0 0.129 0.0");
+// MetadataCatalogServiceImpl metadataCatalogService = new MetadataCatalogServiceImpl();
+// System.out.println(metadataCatalogService.searchMetadata("scnakandala", "default", "").size());
+// }
}
\ No newline at end of file
diff --git a/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/db/conversion/AbstractThriftDeserializer.java b/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/db/conversion/AbstractThriftDeserializer.java
index 0841f45..0201cf6 100644
--- a/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/db/conversion/AbstractThriftDeserializer.java
+++ b/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/db/conversion/AbstractThriftDeserializer.java
@@ -65,7 +65,8 @@
* number types, which in turn will make Thrift think the field
* has been set. Also we ignore the MongoDB specific _id field
*/
- if(currentField.getValue().getNodeType() != JsonNodeType.NULL) {
+ if(!currentField.getKey().equalsIgnoreCase("_id")
+ && currentField.getValue().getNodeType() != JsonNodeType.NULL) {
final E field = getField(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.UPPER_UNDERSCORE, currentField.getKey()));
final JsonParser parser = currentField.getValue().traverse();
parser.setCodec(mapper);
diff --git a/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/db/dao/MetadataDao.java b/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/db/dao/MetadataDao.java
index c9c4951..52c2732 100644
--- a/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/db/dao/MetadataDao.java
+++ b/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/db/dao/MetadataDao.java
@@ -31,6 +31,8 @@
import org.slf4j.LoggerFactory;
import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
import java.util.UUID;
public class MetadataDao {
@@ -58,6 +60,8 @@
public String createMetadata(MetadataModel metadataModel) throws JsonProcessingException {
metadataModel.setMetadataId(DataManagerConstants.AIRAVATA_METADATA_ID_PREFIX + UUID.randomUUID().toString());
+ metadataModel.setCreationTime(System.currentTimeMillis());
+ metadataModel.setLastModifiedTime(metadataModel.getCreationTime());
WriteResult result = collection.insert((DBObject) JSON.parse(
modelConversionHelper.serializeObject(metadataModel)));
logger.debug("No of inserted results " + result.getN());
@@ -67,6 +71,7 @@
public void updateMetadata(MetadataModel metadataModel) throws JsonProcessingException {
DBObject query = BasicDBObjectBuilder.start().add(
METADATA_ID, metadataModel.getMetadataId()).get();
+ metadataModel.setLastModifiedTime(System.currentTimeMillis());
WriteResult result = collection.update(query, (DBObject) JSON.parse(
modelConversionHelper.serializeObject(metadataModel)));
logger.debug("No of updated results " + result.getN());
@@ -90,4 +95,15 @@
}
return null;
}
+
+ public List<MetadataModel> searchMetaDataModels(String username, String gatewayId, String searchText) throws IOException{
+ List<MetadataModel> metadataModels = new ArrayList<>();
+ DBCursor cursor = collection.find();
+ for(DBObject document: cursor){
+ metadataModels.add((MetadataModel) modelConversionHelper.deserializeObject(
+ MetadataModel.class, document.toString()));
+ }
+ return metadataModels;
+ }
+
}
\ No newline at end of file
diff --git a/modules/data-manager/data-manager-cpi/src/main/java/org/apache/airavata/data/manager/cpi/MetadataCatalogService.java b/modules/data-manager/data-manager-cpi/src/main/java/org/apache/airavata/data/manager/cpi/MetadataCatalogService.java
index a75e0d4..602e7db 100644
--- a/modules/data-manager/data-manager-cpi/src/main/java/org/apache/airavata/data/manager/cpi/MetadataCatalogService.java
+++ b/modules/data-manager/data-manager-cpi/src/main/java/org/apache/airavata/data/manager/cpi/MetadataCatalogService.java
@@ -22,6 +22,8 @@
import org.apache.airavata.model.data.metadata.MetadataModel;
+import java.util.List;
+
public interface MetadataCatalogService {
/**
@@ -53,4 +55,15 @@
* @throws DataManagerException
*/
MetadataModel getMetadata(String metadataId) throws DataManagerException;
+
+
+ /**
+ * Search Metadata
+ * @param username
+ * @param gatewayId
+ * @param searchText
+ * @return
+ * @throws DataManagerException
+ */
+ List<MetadataModel> searchMetadata(String username, String gatewayId, String searchText) throws DataManagerException;
}
\ No newline at end of file
diff --git a/modules/data-manager/data-manager-service/pom.xml b/modules/data-manager/data-manager-service/pom.xml
index ff00d83..d4dae52 100644
--- a/modules/data-manager/data-manager-service/pom.xml
+++ b/modules/data-manager/data-manager-service/pom.xml
@@ -20,5 +20,15 @@
<artifactId>data-manager-stubs</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.airavata</groupId>
+ <artifactId>data-manager-cpi</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.airavata</groupId>
+ <artifactId>data-manager-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
diff --git a/modules/data-manager/data-manager-service/src/main/java/org/apache/airavata/data/manager/server/DataManagerServerHandler.java b/modules/data-manager/data-manager-service/src/main/java/org/apache/airavata/data/manager/server/DataManagerServerHandler.java
index 0ac3080..f30465a 100644
--- a/modules/data-manager/data-manager-service/src/main/java/org/apache/airavata/data/manager/server/DataManagerServerHandler.java
+++ b/modules/data-manager/data-manager-service/src/main/java/org/apache/airavata/data/manager/server/DataManagerServerHandler.java
@@ -20,15 +20,33 @@
*/
package org.apache.airavata.data.manager.server;
+import org.apache.airavata.data.manager.core.DataManagerFactory;
+import org.apache.airavata.data.manager.cpi.DataManager;
+import org.apache.airavata.data.manager.cpi.DataManagerException;
import org.apache.airavata.data.manager.cpi.DataManagerService;
import org.apache.airavata.data.manager.cpi.data_manager_cpiConstants;
+import org.apache.airavata.model.data.metadata.MetadataModel;
+import org.apache.airavata.model.error.DataManagerServiceException;
import org.apache.thrift.TException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.util.List;
+
public class DataManagerServerHandler implements DataManagerService.Iface {
private final static Logger logger = LoggerFactory.getLogger(DataManagerServerHandler.class);
+ private final DataManager dataManager;
+
+ public DataManagerServerHandler() throws DataManagerServiceException {
+ try {
+ dataManager = DataManagerFactory.getDataManager();
+ } catch (DataManagerException e) {
+ logger.error(e.getMessage());
+ throw new DataManagerServiceException(e.getMessage());
+ }
+ }
+
/**
* Query DM server to fetch the CPI version
*/
@@ -36,4 +54,23 @@
public String getDMServiceVersion() throws TException {
return data_manager_cpiConstants.DM_CPI_VERSION;
}
+
+ /**
+ * * Query the DM server to fetch matching metadata models
+ * *
+ *
+ * @param username
+ * @param gatewayId
+ * @param searchText
+ */
+ @Override
+ public List<MetadataModel> searchMetadata(String username, String gatewayId, String searchText) throws
+ DataManagerServiceException, TException {
+ try {
+ return dataManager.getMetadataCatalogService().searchMetadata(username, gatewayId, searchText);
+ } catch (org.apache.airavata.data.manager.cpi.DataManagerException e) {
+ logger.error(e.getMessage());
+ throw new DataManagerServiceException(e.getMessage());
+ }
+ }
}
\ No newline at end of file
diff --git a/modules/data-manager/data-manager-stubs/src/main/java/org/apache/airavata/data/manager/cpi/DataManagerService.java b/modules/data-manager/data-manager-stubs/src/main/java/org/apache/airavata/data/manager/cpi/DataManagerService.java
index dbc06ef..b53d585 100644
--- a/modules/data-manager/data-manager-stubs/src/main/java/org/apache/airavata/data/manager/cpi/DataManagerService.java
+++ b/modules/data-manager/data-manager-stubs/src/main/java/org/apache/airavata/data/manager/cpi/DataManagerService.java
@@ -22,14 +22,13 @@
*/
package org.apache.airavata.data.manager.cpi;
+import org.apache.airavata.model.error.DataManagerServiceException;
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.*;
@@ -38,13 +37,9 @@
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;
@@ -60,12 +55,24 @@
*/
public String getDMServiceVersion() throws org.apache.thrift.TException;
+ /**
+ * * Query the DM server to fetch matching metadata models
+ * *
+ *
+ * @param username
+ * @param gatewayId
+ * @param searchText
+ */
+ public List<org.apache.airavata.model.data.metadata.MetadataModel> searchMetadata(String username, String gatewayId, String searchText) throws DataManagerServiceException, org.apache.thrift.TException;
+
}
public interface AsyncIface {
public void getDMServiceVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void searchMetadata(String username, String gatewayId, String searchText, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
}
public static class Client extends org.apache.thrift.TServiceClient implements Iface {
@@ -110,6 +117,34 @@
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getDMServiceVersion failed: unknown result");
}
+ public List<org.apache.airavata.model.data.metadata.MetadataModel> searchMetadata(String username, String gatewayId, String searchText) throws DataManagerServiceException, org.apache.thrift.TException
+ {
+ send_searchMetadata(username, gatewayId, searchText);
+ return recv_searchMetadata();
+ }
+
+ public void send_searchMetadata(String username, String gatewayId, String searchText) throws org.apache.thrift.TException
+ {
+ searchMetadata_args args = new searchMetadata_args();
+ args.setUsername(username);
+ args.setGatewayId(gatewayId);
+ args.setSearchText(searchText);
+ sendBase("searchMetadata", args);
+ }
+
+ public List<org.apache.airavata.model.data.metadata.MetadataModel> recv_searchMetadata() throws DataManagerServiceException, org.apache.thrift.TException
+ {
+ searchMetadata_result result = new searchMetadata_result();
+ receiveBase(result, "searchMetadata");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.dme != null) {
+ throw result.dme;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "searchMetadata failed: unknown result");
+ }
+
}
public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
@@ -157,6 +192,44 @@
}
}
+ public void searchMetadata(String username, String gatewayId, String searchText, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ searchMetadata_call method_call = new searchMetadata_call(username, gatewayId, searchText, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class searchMetadata_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String username;
+ private String gatewayId;
+ private String searchText;
+ public searchMetadata_call(String username, String gatewayId, String searchText, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.username = username;
+ this.gatewayId = gatewayId;
+ this.searchText = searchText;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("searchMetadata", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ searchMetadata_args args = new searchMetadata_args();
+ args.setUsername(username);
+ args.setGatewayId(gatewayId);
+ args.setSearchText(searchText);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<org.apache.airavata.model.data.metadata.MetadataModel> getResult() throws DataManagerServiceException, org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_searchMetadata();
+ }
+ }
+
}
public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
@@ -171,6 +244,7 @@
private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
processMap.put("getDMServiceVersion", new getDMServiceVersion());
+ processMap.put("searchMetadata", new searchMetadata());
return processMap;
}
@@ -194,6 +268,30 @@
}
}
+ public static class searchMetadata<I extends Iface> extends org.apache.thrift.ProcessFunction<I, searchMetadata_args> {
+ public searchMetadata() {
+ super("searchMetadata");
+ }
+
+ public searchMetadata_args getEmptyArgsInstance() {
+ return new searchMetadata_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public searchMetadata_result getResult(I iface, searchMetadata_args args) throws org.apache.thrift.TException {
+ searchMetadata_result result = new searchMetadata_result();
+ try {
+ result.success = iface.searchMetadata(args.username, args.gatewayId, args.searchText);
+ } catch (DataManagerServiceException dme) {
+ result.dme = dme;
+ }
+ return result;
+ }
+ }
+
}
public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
@@ -208,6 +306,7 @@
private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
processMap.put("getDMServiceVersion", new getDMServiceVersion());
+ processMap.put("searchMetadata", new searchMetadata());
return processMap;
}
@@ -262,6 +361,63 @@
}
}
+ public static class searchMetadata<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, searchMetadata_args, List<org.apache.airavata.model.data.metadata.MetadataModel>> {
+ public searchMetadata() {
+ super("searchMetadata");
+ }
+
+ public searchMetadata_args getEmptyArgsInstance() {
+ return new searchMetadata_args();
+ }
+
+ public AsyncMethodCallback<List<org.apache.airavata.model.data.metadata.MetadataModel>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<List<org.apache.airavata.model.data.metadata.MetadataModel>>() {
+ public void onComplete(List<org.apache.airavata.model.data.metadata.MetadataModel> o) {
+ searchMetadata_result result = new searchMetadata_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ searchMetadata_result result = new searchMetadata_result();
+ if (e instanceof DataManagerServiceException) {
+ result.dme = (DataManagerServiceException) e;
+ result.setDmeIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, searchMetadata_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.data.metadata.MetadataModel>> resultHandler) throws TException {
+ iface.searchMetadata(args.username, args.gatewayId, args.searchText,resultHandler);
+ }
+ }
+
}
public static class getDMServiceVersion_args implements org.apache.thrift.TBase<getDMServiceVersion_args, getDMServiceVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<getDMServiceVersion_args> {
@@ -873,4 +1029,1097 @@
}
+ public static class searchMetadata_args implements org.apache.thrift.TBase<searchMetadata_args, searchMetadata_args._Fields>, java.io.Serializable, Cloneable, Comparable<searchMetadata_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("searchMetadata_args");
+
+ private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", 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 SEARCH_TEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("searchText", org.apache.thrift.protocol.TType.STRING, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new searchMetadata_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new searchMetadata_argsTupleSchemeFactory());
+ }
+
+ public String username; // required
+ public String gatewayId; // required
+ public String searchText; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ USERNAME((short)1, "username"),
+ GATEWAY_ID((short)2, "gatewayId"),
+ SEARCH_TEXT((short)3, "searchText");
+
+ 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: // USERNAME
+ return USERNAME;
+ case 2: // GATEWAY_ID
+ return GATEWAY_ID;
+ case 3: // SEARCH_TEXT
+ return SEARCH_TEXT;
+ 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
+ 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.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ 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.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.SEARCH_TEXT, new org.apache.thrift.meta_data.FieldMetaData("searchText", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(searchMetadata_args.class, metaDataMap);
+ }
+
+ public searchMetadata_args() {
+ }
+
+ public searchMetadata_args(
+ String username,
+ String gatewayId,
+ String searchText)
+ {
+ this();
+ this.username = username;
+ this.gatewayId = gatewayId;
+ this.searchText = searchText;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public searchMetadata_args(searchMetadata_args other) {
+ if (other.isSetUsername()) {
+ this.username = other.username;
+ }
+ if (other.isSetGatewayId()) {
+ this.gatewayId = other.gatewayId;
+ }
+ if (other.isSetSearchText()) {
+ this.searchText = other.searchText;
+ }
+ }
+
+ public searchMetadata_args deepCopy() {
+ return new searchMetadata_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.username = null;
+ this.gatewayId = null;
+ this.searchText = null;
+ }
+
+ public String getUsername() {
+ return this.username;
+ }
+
+ public searchMetadata_args setUsername(String username) {
+ this.username = username;
+ return this;
+ }
+
+ public void unsetUsername() {
+ this.username = null;
+ }
+
+ /** Returns true if field username is set (has been assigned a value) and false otherwise */
+ public boolean isSetUsername() {
+ return this.username != null;
+ }
+
+ public void setUsernameIsSet(boolean value) {
+ if (!value) {
+ this.username = null;
+ }
+ }
+
+ public String getGatewayId() {
+ return this.gatewayId;
+ }
+
+ public searchMetadata_args setGatewayId(String gatewayId) {
+ this.gatewayId = gatewayId;
+ return this;
+ }
+
+ 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 getSearchText() {
+ return this.searchText;
+ }
+
+ public searchMetadata_args setSearchText(String searchText) {
+ this.searchText = searchText;
+ return this;
+ }
+
+ public void unsetSearchText() {
+ this.searchText = null;
+ }
+
+ /** Returns true if field searchText is set (has been assigned a value) and false otherwise */
+ public boolean isSetSearchText() {
+ return this.searchText != null;
+ }
+
+ public void setSearchTextIsSet(boolean value) {
+ if (!value) {
+ this.searchText = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case USERNAME:
+ if (value == null) {
+ unsetUsername();
+ } else {
+ setUsername((String)value);
+ }
+ break;
+
+ case GATEWAY_ID:
+ if (value == null) {
+ unsetGatewayId();
+ } else {
+ setGatewayId((String)value);
+ }
+ break;
+
+ case SEARCH_TEXT:
+ if (value == null) {
+ unsetSearchText();
+ } else {
+ setSearchText((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USERNAME:
+ return getUsername();
+
+ case GATEWAY_ID:
+ return getGatewayId();
+
+ case SEARCH_TEXT:
+ return getSearchText();
+
+ }
+ 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 USERNAME:
+ return isSetUsername();
+ case GATEWAY_ID:
+ return isSetGatewayId();
+ case SEARCH_TEXT:
+ return isSetSearchText();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof searchMetadata_args)
+ return this.equals((searchMetadata_args)that);
+ return false;
+ }
+
+ public boolean equals(searchMetadata_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_username = true && this.isSetUsername();
+ boolean that_present_username = true && that.isSetUsername();
+ if (this_present_username || that_present_username) {
+ if (!(this_present_username && that_present_username))
+ return false;
+ if (!this.username.equals(that.username))
+ return false;
+ }
+
+ boolean this_present_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_searchText = true && this.isSetSearchText();
+ boolean that_present_searchText = true && that.isSetSearchText();
+ if (this_present_searchText || that_present_searchText) {
+ if (!(this_present_searchText && that_present_searchText))
+ return false;
+ if (!this.searchText.equals(that.searchText))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_username = true && (isSetUsername());
+ list.add(present_username);
+ if (present_username)
+ list.add(username);
+
+ boolean present_gatewayId = true && (isSetGatewayId());
+ list.add(present_gatewayId);
+ if (present_gatewayId)
+ list.add(gatewayId);
+
+ boolean present_searchText = true && (isSetSearchText());
+ list.add(present_searchText);
+ if (present_searchText)
+ list.add(searchText);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(searchMetadata_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUsername()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(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(isSetSearchText()).compareTo(other.isSetSearchText());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSearchText()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.searchText, other.searchText);
+ 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("searchMetadata_args(");
+ boolean first = true;
+
+ sb.append("username:");
+ if (this.username == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.username);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("gatewayId:");
+ if (this.gatewayId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.gatewayId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("searchText:");
+ if (this.searchText == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.searchText);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class searchMetadata_argsStandardSchemeFactory implements SchemeFactory {
+ public searchMetadata_argsStandardScheme getScheme() {
+ return new searchMetadata_argsStandardScheme();
+ }
+ }
+
+ private static class searchMetadata_argsStandardScheme extends StandardScheme<searchMetadata_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, searchMetadata_args 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: // USERNAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.username = iprot.readString();
+ struct.setUsernameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 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: // SEARCH_TEXT
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.searchText = iprot.readString();
+ struct.setSearchTextIsSet(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();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, searchMetadata_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.username != null) {
+ oprot.writeFieldBegin(USERNAME_FIELD_DESC);
+ oprot.writeString(struct.username);
+ oprot.writeFieldEnd();
+ }
+ if (struct.gatewayId != null) {
+ oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
+ oprot.writeString(struct.gatewayId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.searchText != null) {
+ oprot.writeFieldBegin(SEARCH_TEXT_FIELD_DESC);
+ oprot.writeString(struct.searchText);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class searchMetadata_argsTupleSchemeFactory implements SchemeFactory {
+ public searchMetadata_argsTupleScheme getScheme() {
+ return new searchMetadata_argsTupleScheme();
+ }
+ }
+
+ private static class searchMetadata_argsTupleScheme extends TupleScheme<searchMetadata_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, searchMetadata_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetUsername()) {
+ optionals.set(0);
+ }
+ if (struct.isSetGatewayId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetSearchText()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetUsername()) {
+ oprot.writeString(struct.username);
+ }
+ if (struct.isSetGatewayId()) {
+ oprot.writeString(struct.gatewayId);
+ }
+ if (struct.isSetSearchText()) {
+ oprot.writeString(struct.searchText);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, searchMetadata_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.username = iprot.readString();
+ struct.setUsernameIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.gatewayId = iprot.readString();
+ struct.setGatewayIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.searchText = iprot.readString();
+ struct.setSearchTextIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class searchMetadata_result implements org.apache.thrift.TBase<searchMetadata_result, searchMetadata_result._Fields>, java.io.Serializable, Cloneable, Comparable<searchMetadata_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("searchMetadata_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
+ private static final org.apache.thrift.protocol.TField DME_FIELD_DESC = new org.apache.thrift.protocol.TField("dme", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new searchMetadata_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new searchMetadata_resultTupleSchemeFactory());
+ }
+
+ public List<org.apache.airavata.model.data.metadata.MetadataModel> success; // required
+ public DataManagerServiceException dme; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success"),
+ DME((short)1, "dme");
+
+ 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 0: // SUCCESS
+ return SUCCESS;
+ case 1: // DME
+ return DME;
+ 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
+ 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.data.metadata.MetadataModel.class))));
+ tmpMap.put(_Fields.DME, new org.apache.thrift.meta_data.FieldMetaData("dme", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(searchMetadata_result.class, metaDataMap);
+ }
+
+ public searchMetadata_result() {
+ }
+
+ public searchMetadata_result(
+ List<org.apache.airavata.model.data.metadata.MetadataModel> success,
+ DataManagerServiceException dme)
+ {
+ this();
+ this.success = success;
+ this.dme = dme;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public searchMetadata_result(searchMetadata_result other) {
+ if (other.isSetSuccess()) {
+ List<org.apache.airavata.model.data.metadata.MetadataModel> __this__success = new ArrayList<org.apache.airavata.model.data.metadata.MetadataModel>(other.success.size());
+ for (org.apache.airavata.model.data.metadata.MetadataModel other_element : other.success) {
+ __this__success.add(new org.apache.airavata.model.data.metadata.MetadataModel(other_element));
+ }
+ this.success = __this__success;
+ }
+ if (other.isSetDme()) {
+ this.dme = new DataManagerServiceException(other.dme);
+ }
+ }
+
+ public searchMetadata_result deepCopy() {
+ return new searchMetadata_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.dme = null;
+ }
+
+ public int getSuccessSize() {
+ return (this.success == null) ? 0 : this.success.size();
+ }
+
+ public java.util.Iterator<org.apache.airavata.model.data.metadata.MetadataModel> getSuccessIterator() {
+ return (this.success == null) ? null : this.success.iterator();
+ }
+
+ public void addToSuccess(org.apache.airavata.model.data.metadata.MetadataModel elem) {
+ if (this.success == null) {
+ this.success = new ArrayList<org.apache.airavata.model.data.metadata.MetadataModel>();
+ }
+ this.success.add(elem);
+ }
+
+ public List<org.apache.airavata.model.data.metadata.MetadataModel> getSuccess() {
+ return this.success;
+ }
+
+ public searchMetadata_result setSuccess(List<org.apache.airavata.model.data.metadata.MetadataModel> success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ if (!value) {
+ this.success = null;
+ }
+ }
+
+ public DataManagerServiceException getDme() {
+ return this.dme;
+ }
+
+ public searchMetadata_result setDme(DataManagerServiceException dme) {
+ this.dme = dme;
+ return this;
+ }
+
+ public void unsetDme() {
+ this.dme = null;
+ }
+
+ /** Returns true if field dme is set (has been assigned a value) and false otherwise */
+ public boolean isSetDme() {
+ return this.dme != null;
+ }
+
+ public void setDmeIsSet(boolean value) {
+ if (!value) {
+ this.dme = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((List<org.apache.airavata.model.data.metadata.MetadataModel>)value);
+ }
+ break;
+
+ case DME:
+ if (value == null) {
+ unsetDme();
+ } else {
+ setDme((DataManagerServiceException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case DME:
+ return getDme();
+
+ }
+ 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 SUCCESS:
+ return isSetSuccess();
+ case DME:
+ return isSetDme();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof searchMetadata_result)
+ return this.equals((searchMetadata_result)that);
+ return false;
+ }
+
+ public boolean equals(searchMetadata_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true && this.isSetSuccess();
+ boolean that_present_success = true && that.isSetSuccess();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(that.success))
+ return false;
+ }
+
+ boolean this_present_dme = true && this.isSetDme();
+ boolean that_present_dme = true && that.isSetDme();
+ if (this_present_dme || that_present_dme) {
+ if (!(this_present_dme && that_present_dme))
+ return false;
+ if (!this.dme.equals(that.dme))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_success = true && (isSetSuccess());
+ list.add(present_success);
+ if (present_success)
+ list.add(success);
+
+ boolean present_dme = true && (isSetDme());
+ list.add(present_dme);
+ if (present_dme)
+ list.add(dme);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(searchMetadata_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDme()).compareTo(other.isSetDme());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDme()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dme, other.dme);
+ 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("searchMetadata_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("dme:");
+ if (this.dme == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.dme);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class searchMetadata_resultStandardSchemeFactory implements SchemeFactory {
+ public searchMetadata_resultStandardScheme getScheme() {
+ return new searchMetadata_resultStandardScheme();
+ }
+ }
+
+ private static class searchMetadata_resultStandardScheme extends StandardScheme<searchMetadata_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, searchMetadata_result 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 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
+ struct.success = new ArrayList<org.apache.airavata.model.data.metadata.MetadataModel>(_list0.size);
+ org.apache.airavata.model.data.metadata.MetadataModel _elem1;
+ for (int _i2 = 0; _i2 < _list0.size; ++_i2)
+ {
+ _elem1 = new org.apache.airavata.model.data.metadata.MetadataModel();
+ _elem1.read(iprot);
+ struct.success.add(_elem1);
+ }
+ iprot.readListEnd();
+ }
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // DME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.dme = new DataManagerServiceException();
+ struct.dme.read(iprot);
+ struct.setDmeIsSet(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();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, searchMetadata_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.success != null) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
+ for (org.apache.airavata.model.data.metadata.MetadataModel _iter3 : struct.success)
+ {
+ _iter3.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.dme != null) {
+ oprot.writeFieldBegin(DME_FIELD_DESC);
+ struct.dme.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class searchMetadata_resultTupleSchemeFactory implements SchemeFactory {
+ public searchMetadata_resultTupleScheme getScheme() {
+ return new searchMetadata_resultTupleScheme();
+ }
+ }
+
+ private static class searchMetadata_resultTupleScheme extends TupleScheme<searchMetadata_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, searchMetadata_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetDme()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetSuccess()) {
+ {
+ oprot.writeI32(struct.success.size());
+ for (org.apache.airavata.model.data.metadata.MetadataModel _iter4 : struct.success)
+ {
+ _iter4.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetDme()) {
+ struct.dme.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, searchMetadata_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ {
+ org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.success = new ArrayList<org.apache.airavata.model.data.metadata.MetadataModel>(_list5.size);
+ org.apache.airavata.model.data.metadata.MetadataModel _elem6;
+ for (int _i7 = 0; _i7 < _list5.size; ++_i7)
+ {
+ _elem6 = new org.apache.airavata.model.data.metadata.MetadataModel();
+ _elem6.read(iprot);
+ struct.success.add(_elem6);
+ }
+ }
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.dme = new DataManagerServiceException();
+ struct.dme.read(iprot);
+ struct.setDmeIsSet(true);
+ }
+ }
+ }
+
+ }
+
}
diff --git a/pom.xml b/pom.xml
index 056108a..c82cc8d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -555,7 +555,6 @@
<module>modules/registry</module>
<module>modules/security</module>
<module>modules/credential-store</module>
- <module>modules/data-manager</module>
<module>modules/orchestrator</module>
<module>modules/server</module>
<module>modules/test-suite</module>
diff --git a/thrift-interface-descriptions/airavata-apis/airavata_errors.thrift b/thrift-interface-descriptions/airavata-apis/airavata_errors.thrift
index c8e4999..484b33a 100644
--- a/thrift-interface-descriptions/airavata-apis/airavata_errors.thrift
+++ b/thrift-interface-descriptions/airavata-apis/airavata_errors.thrift
@@ -169,4 +169,8 @@
2: optional string message,
}
+exception DataManagerServiceException {
+ 1: required string message
+}
+
diff --git a/thrift-interface-descriptions/component-cpis/data-manager-cpi.thrift b/thrift-interface-descriptions/component-cpis/data-manager-cpi.thrift
index f830033..10097a3 100644
--- a/thrift-interface-descriptions/component-cpis/data-manager-cpi.thrift
+++ b/thrift-interface-descriptions/component-cpis/data-manager-cpi.thrift
@@ -25,8 +25,10 @@
include "../data-models/data-manager-models/metadata_models.thrift"
include "../data-models/data-manager-models/replica_models.thrift"
+include "../airavata-apis/airavata_errors.thrift"
namespace java org.apache.airavata.data.manager.cpi
+namespace php Airavata.Data.Manager.Cpi
const string DM_CPI_VERSION = "0.16.0"
@@ -35,4 +37,9 @@
/** Query DM server to fetch the CPI version */
string getDMServiceVersion(),
+ /**
+ * Query the DM server to fetch matching metadata models
+ **/
+ list<metadata_models.MetadataModel> searchMetadata(1: string username,2: string gatewayId,3: string searchText)
+ throws(1: airavata_errors.DataManagerServiceException dme)
}
\ No newline at end of file
diff --git a/thrift-interface-descriptions/data-models/data-manager-models/metadata_models.thrift b/thrift-interface-descriptions/data-models/data-manager-models/metadata_models.thrift
index b3a3649..714eb37 100644
--- a/thrift-interface-descriptions/data-models/data-manager-models/metadata_models.thrift
+++ b/thrift-interface-descriptions/data-models/data-manager-models/metadata_models.thrift
@@ -19,7 +19,7 @@
*/
namespace java org.apache.airavata.model.data.metadata
- namespace php Airavata.Model.data.metadata
+ namespace php Airavata.Model.Data.Metadata
namespace cpp apache.airavata.model.data.metadata
namespace py apache.airavata.model.data.metadata
@@ -31,11 +31,14 @@
1: optional string metadataId,
2: optional string gatewayId,
3: optional string username,
- 4: optional list<string> sharedUsers,
- 5: optional bool sharedPublic,
- 6: optional string userFriendlyName,
- 7: optional string userFriendlyDescription,
- 8: optional MetadataType metadataType,
- 9: optional string associatedEntityId,
- 10: optional map<string,string> customInformation
+ 4: optional double size,
+ 5: optional list<string> sharedUsers,
+ 6: optional bool sharedPublic,
+ 7: optional string userFriendlyName,
+ 8: optional string userFriendlyDescription,
+ 9: optional MetadataType metadataType,
+ 10: optional string associatedEntityId,
+ 11: optional map<string,string> customInformation
+ 12: optional i64 creationTime,
+ 13: optional i64 lastModifiedTime
}
\ No newline at end of file