Class TfcatStatus

java.lang.Object
uk.ac.starlink.tfcat.TfcatStatus

public class TfcatStatus extends Object
Utility class to represent the validity status of a TFCat text. The getStatus(java.lang.String) method parses a given text to return an instance of this class.
Since:
9 Feb 2022
Author:
Mark Taylor
  • Constructor Details

    • TfcatStatus

      protected TfcatStatus(TfcatStatus.Code code, String message)
      Constructor.
      Parameters:
      code - validity code
      message - message giving error reports, or null for valid
  • Method Details

    • getCode

      public TfcatStatus.Code getCode()
      Returns a code summarising the validity status.
      Returns:
      code
    • getMessage

      public String getMessage()
      Returns a message containing information about compliancy issues during parsing.
      Returns:
      error report message, or null for compliant text
    • getStatus

      public static TfcatStatus getStatus(String tfcatTxt)
      Parses a given TFCat text and returns a status.
      Parameters:
      tfcatTxt - TFCat text; this should be a JSON Object or null
      Returns:
      parse status, or null for null/empty input