Class DataCatalogRunner
java.lang.Object
neqsim.mcp.runners.DataCatalogRunner
Read-only data catalog runner that exposes NeqSim databases as browsable resources.
Provides structured access to the component database, design standards tables, thermodynamic property data, and material properties without running simulations. Agents can discover available data before deciding what tools to invoke.
- Version:
- 1.0
- Author:
- Even Solbraa
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePrivate constructor — all methods are static. -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidaddEOS(com.google.gson.JsonArray models, String code, String fullName, String description, String applicability, String year) Adds an EOS model entry to the models array.private static voidAdds a table description entry.static StringgetComponentProperties(String componentName) Gets full thermodynamic properties for a component from the database.static StringLists all available component families (categories) in the component database.static StringLists available data tables in both thermodynamic and design databases.static StringLists all available design standards in the standards index.static StringLists all available equation of state models with descriptions and applicability.static StringlistMaterials(String materialType) Lists available material properties (pipe materials, plate materials, casing, etc.).private static StringmapStandardToTable(String standardCode) Maps a standard code prefix to a database table name.static StringqueryStandard(String standardCode, String equipmentType) Queries a specific standards table for parameters applicable to an equipment type.static StringMain entry point for data catalog operations.private static StringSanitizes a string for safe SQL use (basic defense against injection).
-
Field Details
-
GSON
private static final com.google.gson.Gson GSON
-
-
Constructor Details
-
DataCatalogRunner
private DataCatalogRunner()Private constructor — all methods are static.
-
-
Method Details
-
run
-
listComponentFamilies
Lists all available component families (categories) in the component database.- Returns:
- JSON with component families and count
-
getComponentProperties
-
listDesignStandards
Lists all available design standards in the standards index.- Returns:
- JSON with all standards, their scope, and data file references
-
queryStandard
Queries a specific standards table for parameters applicable to an equipment type.- Parameters:
standardCode- the standard code (e.g., "ASME-VIII-Div1")equipmentType- the equipment type to filter by (optional)- Returns:
- JSON with standard parameters
-
listMaterials
-
listEOSModels
Lists all available equation of state models with descriptions and applicability.- Returns:
- JSON with EOS models catalog
-
listDataTables
Lists available data tables in both thermodynamic and design databases.- Returns:
- JSON with table names and descriptions
-
mapStandardToTable
-
sanitize
-
addEOS
private static void addEOS(com.google.gson.JsonArray models, String code, String fullName, String description, String applicability, String year) Adds an EOS model entry to the models array.- Parameters:
models- the array to add tocode- the short codefullName- the full namedescription- the descriptionapplicability- when to use this modelyear- the year introduced
-
addTable
-