Class DexpiMappingLoader
java.lang.Object
neqsim.process.processmodel.dexpi.DexpiMappingLoader
Loads DEXPI-to-NeqSim equipment and piping component mappings from properties files on the
classpath.
The mapping files are located at:
neqsim/process/processmodel/dexpi_equipment_mapping.propertiesneqsim/process/processmodel/dexpi_piping_component_mapping.properties
Each properties file maps a DEXPI ComponentClass string (e.g. "CentrifugalPump") to a
EquipmentEnum name (e.g. "Pump"). If a properties file cannot be loaded, the loader falls
back to a built-in default mapping.
- Version:
- 1.0
- Author:
- NeqSim
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static Map<String, EquipmentEnum> private static Map<String, EquipmentEnum> private static final Stringprivate static final org.apache.logging.log4j.Loggerprivate static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidClears the cached mappings so they will be reloaded on next access.static Map<String, EquipmentEnum> Loads the DEXPI equipment class to NeqSim EquipmentEnum mapping from the classpath properties file.private static Map<String, EquipmentEnum> loadMapping(String resourcePath, String label) Loads a mapping from a properties file on the classpath.static Map<String, EquipmentEnum> Loads the DEXPI piping component class to NeqSim EquipmentEnum mapping from the classpath properties file.
-
Field Details
-
logger
private static final org.apache.logging.log4j.Logger logger -
EQUIPMENT_RESOURCE
- See Also:
-
PIPING_RESOURCE
- See Also:
-
cachedEquipmentMapping
-
cachedPipingMapping
-
-
Constructor Details
-
DexpiMappingLoader
private DexpiMappingLoader()
-
-
Method Details
-
loadEquipmentMapping
Loads the DEXPI equipment class to NeqSim EquipmentEnum mapping from the classpath properties file.- Returns:
- an unmodifiable map from DEXPI ComponentClass to EquipmentEnum
-
loadPipingComponentMapping
Loads the DEXPI piping component class to NeqSim EquipmentEnum mapping from the classpath properties file.- Returns:
- an unmodifiable map from DEXPI ComponentClass to EquipmentEnum
-
clearCache
public static void clearCache()Clears the cached mappings so they will be reloaded on next access. Useful for testing. -
loadMapping
Loads a mapping from a properties file on the classpath.- Parameters:
resourcePath- the classpath resource pathlabel- a descriptive label for logging- Returns:
- an unmodifiable map from DEXPI class name to EquipmentEnum
-