StrategusModule defines the base class for each HADES module
Source:R/StrategusModule.R
StrategusModule.Rd
StrategusModule serves as an internal base class that defines the core functions and structure to be inherited and implemented by any specific HADES module. It provides a standardized framework for creating modular components within the Strategus pipeline.
Public fields
moduleName
The name of the module taken from the class name. This is set in the constructor of the class.
moduleClassName
The class name that identifies the module specifications in the overall analysis specification. This is set in the constructor of the class.
internalModuleSpecificationClassName
A constant value. The base class name that identifies a module specification in the analysis specification.
internalSharedResourcesClassName
A constant value. The class name that identifies the shared resources section in the overall analysis specification.
Methods
Method execute()
Executes the module
Arguments
connectionDetails
An object of class
connectionDetails
as created by theDatabaseConnector::createConnectionDetails()
function.analysisSpecifications
An object of type
AnalysisSpecifications
as created bycreateEmptyAnalysisSpecificiations()
.analysisSpecifications
An object of type
AnalysisSpecifications
as created bycreateEmptyAnalysisSpecificiations()
.executionSettings
An object of type
ExecutionSettings
as created bycreateCdmExecutionSettings()
orcreateResultsExecutionSettings()
.
Method createResultsDataModel()
Create the results data model for the module
Usage
StrategusModule$createResultsDataModel(
resultsConnectionDetails,
resultsDatabaseSchema,
tablePrefix = ""
)
Arguments
resultsConnectionDetails
The connection details to the results database which is an object of class
connectionDetails
as created by theDatabaseConnector::createConnectionDetails()
function.resultsConnectionDetails
The connection details to the results database which is an object of class
connectionDetails
as created by theDatabaseConnector::createConnectionDetails()
function.resultsDatabaseSchema
The schema in the results database that holds the results data model.
tablePrefix
A prefix to apply to the database table names (optional).
tablePrefix
A prefix to apply to the database table names (optional).
Method uploadResults()
Upload the results for the module
Usage
StrategusModule$uploadResults(
resultsConnectionDetails,
analysisSpecifications,
resultsDataModelSettings
)
Arguments
resultsConnectionDetails
The connection details to the results database which is an object of class
connectionDetails
as created by theDatabaseConnector::createConnectionDetails()
function.resultsConnectionDetails
The connection details to the results database which is an object of class
connectionDetails
as created by theDatabaseConnector::createConnectionDetails()
function.analysisSpecifications
An object of type
AnalysisSpecifications
as created bycreateEmptyAnalysisSpecificiations()
.analysisSpecifications
An object of type
AnalysisSpecifications
as created bycreateEmptyAnalysisSpecificiations()
.resultsDataModelSettings
The results data model settings as created using [@seealso
createResultsDataModelSettings()
]
Method createModuleSpecifications()
Base function for creating the module settings object. Each module will have its own implementation and this base class method will be used to ensure the class of the specifications is set properly.
Method createSharedResourcesSpecifications()
Base function for creating the shared resources settings object. Each module will have its own implementation if it needs to create a shared resource.
Method validateModuleSpecifications()
Base function for validating the module settings object. Each module will have its own implementation and this base class method will be used to ensure the module specifications are valid ahead of execution
Method validateSharedResourcesSpecifications()
Base function for validating the shared resources specification settings object. Each module will have its own implementation and this base class method will be used to ensure the module specifications are valid ahead of execution