Class CTAlgorithmInfoLogging
java.lang.Object
generalDatabase.JsonConverter
clickTrainDetector.clickTrainAlgorithms.CTAlgorithmInfoLogging
- Direct Known Subclasses:
MHTAlgorithmInfoJSON
,StandardMHTChi2InfoJSON
Logging for CTAlgorithmInfo. Saves and retrieves algorithm info from
the database.
- Author:
- Jamie Macaulay
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateCTAlgorithmInfo
(String jsonString) Get the algorithmInfo class from a stringabstract CTAlgorithmInfo
createCTAlgorithmInfo
(String algorithmType, com.fasterxml.jackson.databind.JsonNode jTree) Create the CTAlgorithmInfo from a JSON string.static String
getAlgorithmType
(com.fasterxml.jackson.databind.JsonNode jTree) Get algorithm type.getJsonString
(CTAlgorithmInfo algorithmInfo) Create a standard xml like string of the algorithm inof data which can be written to the relational database.abstract void
writeJSONData
(com.fasterxml.jackson.core.JsonGenerator jg, CTAlgorithmInfo algorithmInfo) Write the algorithm info data - note that the algorithm type has already been addedMethods inherited from class generalDatabase.JsonConverter
getJSONElement, getJSONElement, quickJsonString, unpackJsonArray, writeJsonArray, writeJsonValue
-
Field Details
-
ALGORITHMFIELD
- See Also:
-
-
Constructor Details
-
CTAlgorithmInfoLogging
public CTAlgorithmInfoLogging()
-
-
Method Details
-
getJsonString
Create a standard xml like string of the algorithm inof data which can be written to the relational database.- Returns:
- algorithm info information in an XML like format.
-
writeJSONData
public abstract void writeJSONData(com.fasterxml.jackson.core.JsonGenerator jg, CTAlgorithmInfo algorithmInfo) Write the algorithm info data - note that the algorithm type has already been added- Parameters:
jg
- - the JSON string generator.algorithmInfo
- - the algorithm info.
-
createCTAlgorithmInfo
Get the algorithmInfo class from a string- Parameters:
jsonString
- - the input string.- Returns:
- the algorithm info class.
-
createCTAlgorithmInfo
public abstract CTAlgorithmInfo createCTAlgorithmInfo(String algorithmType, com.fasterxml.jackson.databind.JsonNode jTree) Create the CTAlgorithmInfo from a JSON string.- Parameters:
algorithmType
- - the algorithm type from JSON stringjTree
- - the jTree.- Returns:
- the CTAlgorithmInfo.
-
getAlgorithmType
Get algorithm type.- Parameters:
jTree
- - the JSON tree- Returns:
- the algorithm type.
-