Class DexpiMappingLoader

java.lang.Object
neqsim.process.processmodel.dexpi.DexpiMappingLoader

public final class DexpiMappingLoader extends Object
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.properties
  • neqsim/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 Details

  • Constructor Details

    • DexpiMappingLoader

      private DexpiMappingLoader()
  • Method Details

    • loadEquipmentMapping

      public static Map<String, EquipmentEnum> 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

      public static Map<String, 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

      private static Map<String, EquipmentEnum> loadMapping(String resourcePath, String label)
      Loads a mapping from a properties file on the classpath.
      Parameters:
      resourcePath - the classpath resource path
      label - a descriptive label for logging
      Returns:
      an unmodifiable map from DEXPI class name to EquipmentEnum