Class SecurityAnalysisPreprocessors
java.lang.Object
com.powsybl.security.preprocessor.SecurityAnalysisPreprocessors
Provides instances of
SecurityAnalysisPreprocessor
s or factories.- Author:
- Sylvain Leclerc <sylvain.leclerc at rte-france.com>
-
Method Summary
Modifier and TypeMethodDescriptionconfiguredFactory
(PlatformConfig platformConfig) The preprocessor factory based on the specified platformconfig
.The default preprocessor factory, based on default platformconfig
.static SecurityAnalysisPreprocessor
contingenciesPreprocessor
(ContingenciesProviderFactory factory, com.google.common.io.ByteSource source) Create a preprocessor which will create and inject aContingenciesProvider
into security analysis inputs, based on the specified factory and the specified source of data (raw bytes to be interpreted by the factory).The default preprocessor factory, based on default platformconfig
.factoryForName
(String name) Look for a factory with specified name, among the factories loaded as services.wrap
(ContingenciesProviderFactory factory) Create a preprocessor which will create and inject aContingenciesProvider
into security analysis inputs, based on the specified factory and the specified source of data (raw bytes to be interpreted by the factory).
-
Method Details
-
factoryForName
Look for a factory with specified name, among the factories loaded as services. Throws if no matching factory is found.- Parameters:
name
- the name identifying the requested factory.- Returns:
- the factory corresponding to the specified name.
-
defaultConfiguredFactory
The default preprocessor factory, based on default platformconfig
.- Returns:
- The preprocessor factory as defined in default platform config.
-
configuredFactory
public static Optional<SecurityAnalysisPreprocessorFactory> configuredFactory(PlatformConfig platformConfig) The preprocessor factory based on the specified platformconfig
.- Returns:
- The preprocessor factory as defined in default platform config.
-
configuredFactory
public static Optional<SecurityAnalysisPreprocessorFactory> configuredFactory(SecurityAnalysisConfig config) The default preprocessor factory, based on default platformconfig
.If a preprocessor is specified in security-analysis config module, returns the corresponding factory, else return the default factory which delegates data interpretation to the configured
ContingenciesProviderFactory
.- Returns:
- The preprocessor factory as defined in default platform config.
-
wrap
Create a preprocessor which will create and inject aContingenciesProvider
into security analysis inputs, based on the specified factory and the specified source of data (raw bytes to be interpreted by the factory).- Parameters:
factory
- the factory in charge of creating theContingenciesProvider
.- Returns:
- a preprocessor which will create and inject a
ContingenciesProvider
.
-
contingenciesPreprocessor
public static SecurityAnalysisPreprocessor contingenciesPreprocessor(ContingenciesProviderFactory factory, com.google.common.io.ByteSource source) Create a preprocessor which will create and inject aContingenciesProvider
into security analysis inputs, based on the specified factory and the specified source of data (raw bytes to be interpreted by the factory).- Parameters:
factory
- the factory in charge of creating theContingenciesProvider
.source
- the source of data to be used by the factory.- Returns:
- a preprocessor which will create and inject a
ContingenciesProvider
.
-