def __dataset_directory_relative_path(self, access_level, group_uuid,
                                          dataset_uuid, published):
        grp_name = AuthHelper.getGroupDisplayName(group_uuid)
        if access_level == 'protected':
            endpoint_id = self.appconfig['GLOBUS_PROTECTED_ENDPOINT_UUID']
            rel_path = str(
                os.path.join(
                    self.
                    appconfig['RELATIVE_GLOBUS_PROTECTED_ENDPOINT_FILEPATH'],
                    grp_name, dataset_uuid))
        elif published:
            endpoint_id = self.appconfig['GLOBUS_PUBLIC_ENDPOINT_UUID']
            rel_path = str(
                os.path.join(
                    self.appconfig['RELATIVE_GLOBUS_PUBLIC_ENDPOINT_FILEPATH'],
                    dataset_uuid))
        else:
            endpoint_id = self.appconfig['GLOBUS_CONSORTIUM_ENDPOINT_UUID']
            rel_path = str(
                os.path.join(
                    self.
                    appconfig['RELATIVE_GLOBUS_CONSORTIUM_ENDPOINT_FILEPATH'],
                    grp_name, dataset_uuid))

        return {"rel_path": rel_path, "globus_endpoint_uuid": endpoint_id}
    def __dataset_directory_absolute_path(self, access_level, group_uuid,
                                          dataset_uuid, published):
        grp_name = AuthHelper.getGroupDisplayName(group_uuid)
        if access_level == 'protected':
            base_dir = self.appconfig['GLOBUS_PROTECTED_ENDPOINT_FILEPATH']
            abs_path = str(os.path.join(base_dir, grp_name, dataset_uuid))
        elif published:
            base_dir = self.appconfig['GLOBUS_PUBLIC_ENDPOINT_FILEPATH']
            abs_path = str(os.path.join(base_dir, dataset_uuid))
        else:
            base_dir = self.appconfig['GLOBUS_CONSORTIUM_ENDPOINT_FILEPATH']
            abs_path = str(os.path.join(base_dir, grp_name, dataset_uuid))

        return abs_path
 def get_upload_directory_absolute_path(self, group_uuid, upload_uuid):
     grp_name = AuthHelper.getGroupDisplayName(group_uuid)
     base_dir = self.appconfig['GLOBUS_PROTECTED_ENDPOINT_FILEPATH']
     abs_path = str(os.path.join(base_dir, grp_name, upload_uuid))
     return abs_path