ingest.handlers package

Submodules

ingest.handlers.file_handler module

Defines the handler for files processed by Strike and Scan

class ingest.handlers.file_handler.FileHandler

Bases: object

This class handles the rules for files processed by Strike and Scan

add_rule(rule)

Adds the given rule to the handler

Parameters:rule (ingest.handlers.file_rule.FileRule) – The name of the file
match_file_name(file_name)

Checks the given file name and returns the first rule that matches it, returning None if no match is made

Parameters:file_name (string) – The name of the file
Returns:The matched rule, possibly None
Return type:ingest.handlers.file_rule.FileRule

ingest.handlers.file_rule module

Defines a file rule for handling files processed by Strike and Scan

class ingest.handlers.file_rule.FileRule(filename_regex, data_types, new_workspace, new_file_path)

Bases: object

This class represents a rule for handling files processed by Strike and Scan

matches_file_name(file_name)

Indicates whether the given file name matches this rule

Parameters:file_name (string) – The name of the file
Returns:True if this file name matches the rule, False otherwise
Return type:bool

Module contents