Package com.t4a.predict
Class SwaggerPredictionLoader
java.lang.Object
com.t4a.predict.SwaggerPredictionLoader
The SwaggerPredictionLoader class is responsible for loading and parsing the Swagger configuration.
It reads the configuration from a JSON file and creates a map of AIAction predictions.
It also constructs a list of action names and a list of actions.
The class uses Gson for JSON processing and OpenAPI for parsing the Swagger configuration.
It handles exceptions by throwing a LoaderException.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidload(Map<String, AIAction> predictions, StringBuilder actionNameList, ActionList listOfActions) voidloadURL(String jsonURL, Map<String, AIAction> predictions, StringBuilder actionNameList, String baseURL, Map<String, String> headers, String group, String groupDiscription, ActionList listOfActions) voidparseConfig(Map<String, AIAction> predictions, StringBuilder actionNameList, ActionList listOfActions)
-
Constructor Details
-
SwaggerPredictionLoader
public SwaggerPredictionLoader()
-
-
Method Details
-
load
public void load(Map<String, AIAction> predictions, StringBuilder actionNameList, ActionList listOfActions) throws LoaderException- Throws:
LoaderException
-
parseConfig
public void parseConfig(Map<String, AIAction> predictions, StringBuilder actionNameList, ActionList listOfActions) throws IOException- Throws:
IOException
-
loadURL
-