rql_download.twistedserver.server.Search¶
-
class
rql_download.twistedserver.server.
Search
(sessions, cwusers)[source]¶ Class to access all the file paths associated to a specific user CWSearch searches.
Methods
__init__
(sessions, cwusers)Initilaize the Search class. get_file_data
(file_eid, rset_file, session_index)Get the Binary data contain in an entity. get_files
(virtpath, session_index)Return a list of file associated to CWSearch named ‘search_name’ including rset file which is a pure virtual file. get_searches
()Method to get for each user the result set with the name of the associated CWSearch entities. -
__module__
= 'rql_download.twistedserver.server'¶
-
get_file_data
(file_eid, rset_file, session_index, search_name=None)[source]¶ Get the Binary data contain in an entity.
Parameters: file_eid: int (mandatory) :
the eid of the entity containing a ‘data’ Binary attribute.
rset_file: bool (mandatory) :
True if we want the rset virtual file associated to the CWSearch, False otherwise.
session_index: int (mandatory) :
an index pointing to the instance of interest.
search_name: string (optional, default None) :
Returns: out: Binary or None :
the desired Binary data object.
-
get_files
(virtpath, session_index)[source]¶ Return a list of file associated to CWSearch named ‘search_name’ including rset file which is a pure virtual file.
Parameters: virtpath: VirtualPath (mandatory) :
a virtual path of the form (search name, search relpath, search basedir, search instance).
session_index: int (mandatory) :
an index pointing to the instance of interest.
Returns: filepaths: list of 2-uplet (mandatory) :
a list of files formated in a 2-uplet of the form (path, is_virtual).
-