StrategusModule defines the base class for each HADES module
Source:R/StrategusModule.R
StrategusModule.RdStrategusModule 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
moduleNameThe name of the module taken from the class name. This is set in the constructor of the class.
moduleClassNameThe class name that identifies the module specifications in the overall analysis specification. This is set in the constructor of the class.
internalModuleSpecificationClassNameA constant value. The base class name that identifies a module specification in the analysis specification.
internalSharedResourcesClassNameA constant value. The class name that identifies the shared resources section in the overall analysis specification.
Methods
Method execute()
Executes the module
Arguments
connectionDetailsAn object of class
connectionDetailsas created by theDatabaseConnector::createConnectionDetails()function.analysisSpecificationsAn object of type
AnalysisSpecificationsas created bycreateEmptyAnalysisSpecificiations().analysisSpecificationsAn object of type
AnalysisSpecificationsas created bycreateEmptyAnalysisSpecificiations().executionSettingsAn object of type
ExecutionSettingsas created bycreateCdmExecutionSettings()orcreateResultsExecutionSettings().
Method createResultsDataModel()
Create the results data model for the module
Usage
StrategusModule$createResultsDataModel(
resultsConnectionDetails,
resultsDatabaseSchema,
tablePrefix = ""
)Arguments
resultsConnectionDetailsThe connection details to the results database which is an object of class
connectionDetailsas created by theDatabaseConnector::createConnectionDetails()function.resultsConnectionDetailsThe connection details to the results database which is an object of class
connectionDetailsas created by theDatabaseConnector::createConnectionDetails()function.resultsDatabaseSchemaThe schema in the results database that holds the results data model.
tablePrefixA prefix to apply to the database table names (optional).
tablePrefixA prefix to apply to the database table names (optional).
Method uploadResults()
Upload the results for the module
Usage
StrategusModule$uploadResults(
resultsConnectionDetails,
analysisSpecifications,
resultsDataModelSettings
)Arguments
resultsConnectionDetailsThe connection details to the results database which is an object of class
connectionDetailsas created by theDatabaseConnector::createConnectionDetails()function.resultsConnectionDetailsThe connection details to the results database which is an object of class
connectionDetailsas created by theDatabaseConnector::createConnectionDetails()function.analysisSpecificationsAn object of type
AnalysisSpecificationsas created bycreateEmptyAnalysisSpecificiations().analysisSpecificationsAn object of type
AnalysisSpecificationsas created bycreateEmptyAnalysisSpecificiations().resultsDataModelSettingsThe 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