plasoscaffolder.bll.mappings package

Submodules

plasoscaffolder.bll.mappings.base_mapping_helper module

Helper methods for mapping.

class plasoscaffolder.bll.mappings.base_mapping_helper.BaseMappingHelper[source]

Bases: object

Base Mapping Helper base class.

GenerateClassName(plugin_name: str) → str[source]

Generates the class name from the plugin name.

Parameters:plugin_name (str) – the name of the plugin
Returns:the name of the class
Return type:str
RenderTemplate(template_filename: str, context: dict) → str[source]

Renders the template with the context to return a string.

Parameters:
  • template_filename (str) – the name of the template
  • context (dict) – the context of the template as a dictionary
Returns:

the rendered template as a string

Return type:

str

plasoscaffolder.bll.mappings.base_sqliteplugin_mapping module

Base class for mapper of SQLite plugins.

class plasoscaffolder.bll.mappings.base_sqliteplugin_mapping.BaseSQLitePluginMapper[source]

Bases: object

Class representing the SQLite plugin base mapper.

GetRenderedTemplate(data: plasoscaffolder.model.base_data_model.BaseDataModel) → str[source]

Retrieves the template.

Parameters:data (base_data_model.BaseDataModel) – the data for template
Returns:the rendered template
Return type:str

plasoscaffolder.bll.mappings.formatter_init_mapping module

Class representing the mapper for the formatter init files.

class plasoscaffolder.bll.mappings.formatter_init_mapping.FormatterInitMapping(mapping_helper: plasoscaffolder.bll.mappings.base_mapping_helper.BaseMappingHelper)[source]

Bases: plasoscaffolder.bll.mappings.base_sqliteplugin_mapping.BaseSQLitePluginMapper

Class representing the formatter init mapper.

GetRenderedTemplate(data: plasoscaffolder.model.init_data_model.InitDataModel) → str[source]

Retrieves the formatter.

Parameters:data (init_data_model.InitDataModel) – the data for init file
Returns:the rendered template
Return type:str

plasoscaffolder.bll.mappings.formatter_mapping module

Class representing the mapper for the formatter.

class plasoscaffolder.bll.mappings.formatter_mapping.FormatterMapper(mapping_helper: plasoscaffolder.bll.mappings.base_mapping_helper.BaseMappingHelper)[source]

Bases: plasoscaffolder.bll.mappings.base_sqliteplugin_mapping.BaseSQLitePluginMapper

Class representing the formatter mapper.

GetRenderedTemplate(formatter_data: plasoscaffolder.model.formatter_data_model.FormatterDataModel) → str[source]

Retrieves the formatter.

Parameters:formatter_data (formatter_data_model.FormatterDataModel) – the data for the formatter
Returns:the rendered template
Return type:str

plasoscaffolder.bll.mappings.formatter_test_mapping module

Class representing mapper for formatter test file.

class plasoscaffolder.bll.mappings.formatter_test_mapping.FormatterTestMapper(mapping_helper: plasoscaffolder.bll.mappings.base_mapping_helper.BaseMappingHelper)[source]

Bases: plasoscaffolder.bll.mappings.base_sqliteplugin_mapping.BaseSQLitePluginMapper

Class representing the formatter test mapper.

GetRenderedTemplate(formatter_test_data: plasoscaffolder.model.formatter_test_data_model.FormatterTestDataModel) → str[source]

Retrieves the formatter test.

Parameters:formatter_test_data (formatter_test_data_model.FormatterTestDataModel) – the data for the formatter test
Returns:the rendered template
Return type:str

plasoscaffolder.bll.mappings.mapping_helper module

Helper methods for mapping.

class plasoscaffolder.bll.mappings.mapping_helper.MappingHelper(template_path: str, yapf_path: str)[source]

Bases: plasoscaffolder.bll.mappings.base_mapping_helper.BaseMappingHelper

Mapping Helper class.

GenerateClassName(plugin_name: str) → str[source]

Generates the class name from the plugin name.

Parameters:plugin_name (str) – the name of the plugin
Returns:the name of the class
Return type:str
RenderTemplate(template_filename: str, context: dict) → str[source]

Renders the template with the context to return a string.

Parameters:
  • template_filename (str) – the name of the template
  • context (dict) – the context of the template as a dictionary
Returns:

the rendered template as a string

Return type:

str

plasoscaffolder.bll.mappings.parser_init_mapping module

Class representing the mapper for the parser init files.

class plasoscaffolder.bll.mappings.parser_init_mapping.ParserInitMapping(mapping_helper: plasoscaffolder.bll.mappings.base_mapping_helper.BaseMappingHelper)[source]

Bases: plasoscaffolder.bll.mappings.base_sqliteplugin_mapping.BaseSQLitePluginMapper

Class representing the parser mapper.

GetRenderedTemplate(data: plasoscaffolder.model.init_data_model.InitDataModel) → str[source]

Retrieves the parser init file.

Parameters:data (init_data_model.InitDataModel) – the data for init file
Returns:the rendered template
Return type:str

plasoscaffolder.bll.mappings.parser_mapping module

Class representing the mapper for the parser file.

class plasoscaffolder.bll.mappings.parser_mapping.ParserMapper(mapping_helper: plasoscaffolder.bll.mappings.base_mapping_helper.BaseMappingHelper)[source]

Bases: plasoscaffolder.bll.mappings.base_sqliteplugin_mapping.BaseSQLitePluginMapper

Class representing the parser mapper.

GetRenderedTemplate(parser_data: plasoscaffolder.model.parser_data_model.ParserDataModel) → str[source]

Retrieves the parser.

Parameters:parser_data (parser_data_model.ParserDataModel) – the data for the parser
Returns:the rendered template
Return type:str

plasoscaffolder.bll.mappings.parser_test_mapping module

Class representing the mapper for the parser test file.

class plasoscaffolder.bll.mappings.parser_test_mapping.ParserTestMapper(mapping_helper: plasoscaffolder.bll.mappings.base_mapping_helper.BaseMappingHelper)[source]

Bases: plasoscaffolder.bll.mappings.base_sqliteplugin_mapping.BaseSQLitePluginMapper

Class representing the parser mapper.

GetAmountEvents(queries: [<class 'plasoscaffolder.model.sql_query_model.SQLQueryModel'>]) → int[source]

Calculates the amount of events from the queries.

Parameters:queries ([sql_query_model.SQLQueryModel]) – the queries
Returns:the amount of events
Return type:int
GetRenderedTemplate(parser_test_data: plasoscaffolder.model.parser_test_data_model.ParserTestDataModel) → str[source]

Retrieves the parser test.

Parameters:parser_test_data (parser_test_data_model.ParserTestDataModel) – the data for the parser test
Returns:the rendered template
Return type:str

Module contents