Class CsvMechanicalDesignDataSource
java.lang.Object
neqsim.process.mechanicaldesign.data.CsvMechanicalDesignDataSource
- All Implemented Interfaces:
MechanicalDesignDataSource
Loads mechanical design limits from a CSV file. The file is expected to contain the columns
EQUIPMENTTYPE, COMPANY, MAXPRESSURE, MINPRESSURE,
MAXTEMPERATURE, MINTEMPERATURE, CORROSIONALLOWANCE, and
JOINTEFFICIENCY. Column order is flexible as long as the header matches.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDesignLimits(String equipmentTypeName, String companyIdentifier) Retrieve design limit data for a given equipment type and company identifier.private Stringprivate DesignLimitDataparse(String[] tokens, CsvMechanicalDesignDataSource.ColumnIndex index) private doubleparseDouble(String[] tokens, int index) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface MechanicalDesignDataSource
getAvailableStandards, getAvailableVersions, getDesignLimitsByStandard, hasStandard
-
Field Details
-
logger
private static final org.apache.logging.log4j.Logger logger -
csvPath
-
-
Constructor Details
-
CsvMechanicalDesignDataSource
-
-
Method Details
-
getDesignLimits
public Optional<DesignLimitData> getDesignLimits(String equipmentTypeName, String companyIdentifier) Description copied from interface:MechanicalDesignDataSourceRetrieve design limit data for a given equipment type and company identifier.- Specified by:
getDesignLimitsin interfaceMechanicalDesignDataSource- Parameters:
equipmentTypeName- canonical equipment type identifier (e.g. "Pipeline").companyIdentifier- company specific design code identifier.- Returns:
- optional design limit data if available.
-
parse
-
parseDouble
-
normalize
-