Package uk.ac.starlink.tfcat
Class BasicReporter
java.lang.Object
uk.ac.starlink.tfcat.BasicReporter
- All Implemented Interfaces:
Reporter
Standard reporter implementation.
- Since:
- 9 Feb 2022
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsConstructorDescriptionBasicReporter
(boolean isDebug) Constructs a BasicReporter with no UCD or VOUnit validation.BasicReporter
(boolean isDebug, WordChecker ucdChecker, WordChecker unitChecker) Constructs a BasicReporter with configurable UCD and VOUnit validation. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Report on validity of the supplied Uniform Content Descriptor.void
Report on validity of the supplied unit string.createReporter
(int subContext) Returns a reporter suitable for use in a subcontext characterised by an integer, that usually means an indexed array element below the current level.createReporter
(String subContext) Returns a reporter suitable for use in a subcontext characterised by a string, that usually means a level down in the object hierarchy.Returns a list of all the messages accumulated by this reporter and its sub-reporters.void
Reports an error message.
-
Constructor Details
-
BasicReporter
public BasicReporter(boolean isDebug) Constructs a BasicReporter with no UCD or VOUnit validation.- Parameters:
isDebug
- if true, reports will be trigger a stack trace on standard error
-
BasicReporter
Constructs a BasicReporter with configurable UCD and VOUnit validation.- Parameters:
isDebug
- if true, reports will be trigger a stack trace on standard errorucdChecker
- checks UCD stringsunitChecker
- checks unit strings
-
-
Method Details
-
getMessages
Returns a list of all the messages accumulated by this reporter and its sub-reporters.- Returns:
- message list; empty for fully valid input
-
createReporter
Description copied from interface:Reporter
Returns a reporter suitable for use in a subcontext characterised by a string, that usually means a level down in the object hierarchy.- Specified by:
createReporter
in interfaceReporter
- Parameters:
subContext
- subcontext designation- Returns:
- new reporter
-
createReporter
Description copied from interface:Reporter
Returns a reporter suitable for use in a subcontext characterised by an integer, that usually means an indexed array element below the current level.- Specified by:
createReporter
in interfaceReporter
- Parameters:
subContext
- subcontext designation- Returns:
- new reporter
-
report
Description copied from interface:Reporter
Reports an error message. The message should generally contain human-readable information about some conformance error, but the location of the error is not required. -
checkUcd
Description copied from interface:Reporter
Report on validity of the supplied Uniform Content Descriptor. Any issues of concern will be reported. -
checkUnit
Description copied from interface:Reporter
Report on validity of the supplied unit string. Any issues of concern will be reported.
-