# Class UcdStatus

java.lang.Object
uk.ac.starlink.vo.UcdStatus

public class UcdStatus extends Object
Categorises UCD validity. The `getStatus(String)` method tests a UCD string to determine whether it conforms to standards, and returns an object that reports this. UCD1+ and UCD1 are recognised.

Gregory Mantelet's Ucidy library is used for UCD1+ parsing.

Since:
  9 Jul 2021
Author:
  Mark Taylor

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`UcdStatus.Code`
Characterises UCD standards conformance.

## Constructor Summary

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

## Method Summary

Modifier and Type
Method
Description
`UcdStatus.Code`
`getCode()`
Returns a status element indicating conformance.
`String`
`getMessage()`
Returns a human-readable message supplying additional information.
`static UCDParser`
`getParser()`
Returns the UCD parser used by this class.
`static UcdStatus`
`getStatus(String ucd)`
Returns the status for a given UCD string.

### Methods inherited from class Object

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

## Constructor Details

### UcdStatus

protected UcdStatus(UcdStatus.Code code, String message)
Constructor.

Parameters:
  `code` - status code
  `message` - human-readable message supplying additional information

## Method Details

### getCode

public UcdStatus.Code getCode()
Returns a status element indicating conformance.

Returns:
  code

### getMessage

public String getMessage()
Returns a human-readable message supplying additional information. The returned text does not in general report the original UCD string.

Returns:
  message, or null if nothing to say (OK status)

### getStatus

public static UcdStatus getStatus(String ucd)
Returns the status for a given UCD string.

Parameters:
  `ucd` - UCD text
Returns:
  status, or null for blank input

### getParser

public static UCDParser getParser()
Returns the UCD parser used by this class.

Returns:
  parser