Class TorgManager
java.lang.Object
neqsim.process.mechanicaldesign.torg.TorgManager
Manager class for applying Technical Requirements Documents (TORG) to process systems.
The TorgManager provides methods to:
- Load TORG documents from various data sources
- Apply TORG requirements to individual equipment or entire process systems
- Validate equipment designs against TORG specifications
- Generate compliance reports
Example usage:
// Create TORG manager with CSV data source
TorgManager manager = new TorgManager();
manager.addDataSource(CsvTorgDataSource.fromResource("designdata/torg/projects.csv"));
// Load and apply TORG to process system
manager.loadAndApply("PROJECT-001", processSystem);
// Or manually create and apply a TORG
TechnicalRequirementsDocument torg =
TechnicalRequirementsDocument.builder().projectId("MANUAL-001")
.addStandard("pressure vessel design code", StandardType.ASME_VIII_DIV1).build();
manager.apply(torg, processSystem);
- Version:
- 1.0
- Author:
- esol
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate TechnicalRequirementsDocumentCurrently active TORG.private final Map<String, List<StandardType>> Cache of applied standards per equipment.private final List<TorgDataSource> Data sources for loading TORG documents.private static final org.apache.logging.log4j.Logger -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new TorgManager with no data sources.TorgManager(TorgDataSource dataSource) Create a TorgManager with a single data source. -
Method Summary
Modifier and TypeMethodDescriptionaddDataSource(TorgDataSource dataSource) Add a data source for loading TORG documents.voidapply(TechnicalRequirementsDocument torg, ProcessSystem processSystem) Apply a TORG to a process system.voidapplyToEquipment(TechnicalRequirementsDocument torg, ProcessEquipmentInterface equipment) Apply a TORG to a single equipment item.Generate a summary report of applied standards.Get the currently active TORG.Get all applied standards across all equipment.getAppliedStandards(String equipmentName) Get the standards that were applied to a specific equipment.Get a list of all available project IDs across all data sources.Load a TORG by project ID from the configured data sources.Load a TORG by company and project name.booleanloadAndApply(String projectId, ProcessSystem processSystem) Load a TORG and apply it to a process system.voidreset()Clear all applied standards and reset the manager.voidSet the active TORG without applying it.
-
Field Details
-
logger
private static final org.apache.logging.log4j.Logger logger -
dataSources
Data sources for loading TORG documents. -
activeTorg
Currently active TORG. -
appliedStandards
Cache of applied standards per equipment.
-
-
Constructor Details
-
TorgManager
public TorgManager()Create a new TorgManager with no data sources. -
TorgManager
Create a TorgManager with a single data source.- Parameters:
dataSource- the data source to use
-
-
Method Details
-
addDataSource
Add a data source for loading TORG documents.- Parameters:
dataSource- the data source to add- Returns:
- this manager for chaining
-
load
Load a TORG by project ID from the configured data sources.- Parameters:
projectId- the project identifier- Returns:
- optional containing the TORG if found
-
load
Load a TORG by company and project name.- Parameters:
companyIdentifier- the company identifierprojectName- the project name- Returns:
- optional containing the TORG if found
-
loadAndApply
Load a TORG and apply it to a process system.- Parameters:
projectId- the project identifierprocessSystem- the process system to configure- Returns:
- true if TORG was found and applied
-
apply
Apply a TORG to a process system.This method iterates through all equipment in the process system and applies the appropriate design standards from the TORG based on equipment type.
- Parameters:
torg- the TORG to applyprocessSystem- the process system to configure
-
applyToEquipment
public void applyToEquipment(TechnicalRequirementsDocument torg, ProcessEquipmentInterface equipment) Apply a TORG to a single equipment item.- Parameters:
torg- the TORG to applyequipment- the equipment to configure
-
getActiveTorg
Get the currently active TORG.- Returns:
- the active TORG, or null if none
-
setActiveTorg
Set the active TORG without applying it.- Parameters:
torg- the TORG to set as active
-
getAppliedStandards
Get the standards that were applied to a specific equipment.- Parameters:
equipmentName- the equipment name- Returns:
- list of applied standards, empty if none
-
getAllAppliedStandards
Get all applied standards across all equipment.- Returns:
- map of equipment name to applied standards
-
getAvailableProjects
-
generateSummary
Generate a summary report of applied standards.- Returns:
- formatted summary string
-
reset
public void reset()Clear all applied standards and reset the manager.
-