# 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(String)` method parses a given text to return an instance of this class.

Since:
  9 Feb 2022
Author:
  Mark Taylor

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`TfcatStatus.Code`
Parse result code.

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`TfcatStatus(TfcatStatus.Code code, String message)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`TfcatStatus.Code`
`getCode()`
Returns a code summarising the validity status.
`String`
`getMessage()`
Returns a message containing information about compliancy issues during parsing.
`static TfcatStatus`
`getStatus(String tfcatTxt)`
Parses a given TFCat text and returns a status.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## 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