Class CTAlgorithmInfoLogging

java.lang.Object
generalDatabase.JsonConverter
clickTrainDetector.clickTrainAlgorithms.CTAlgorithmInfoLogging
Direct Known Subclasses:
MHTAlgorithmInfoJSON, StandardMHTChi2InfoJSON

public abstract class CTAlgorithmInfoLogging extends JsonConverter
Logging for CTAlgorithmInfo. Saves and retrieves algorithm info from the database.
Author:
Jamie Macaulay
  • Field Details

  • Constructor Details

    • CTAlgorithmInfoLogging

      public CTAlgorithmInfoLogging()
  • Method Details

    • getJsonString

      public String getJsonString(CTAlgorithmInfo algorithmInfo)
      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

      public CTAlgorithmInfo createCTAlgorithmInfo(String jsonString)
      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 string
      jTree - - the jTree.
      Returns:
      the CTAlgorithmInfo.
    • getAlgorithmType

      public static String getAlgorithmType(com.fasterxml.jackson.databind.JsonNode jTree)
      Get algorithm type.
      Parameters:
      jTree - - the JSON tree
      Returns:
      the algorithm type.