public class Util
extends java.lang.Object
Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
static void |
displayAndLogError(java.lang.String message,
java.lang.Throwable cause)
Outputs messages to the error log and administration console, with
additional tagging to assist servicability.
|
static void |
displayAndLogError(java.lang.Throwable cause)
Outputs messages to the error log and administration console, with
additional tagging to assist servicability.
|
static void |
displayCommandOptions(java.lang.String syntax,
org.apache.commons.cli.Options options,
java.lang.String example,
java.lang.Throwable parseErr)
Outputs a standard message to administration console indicating supported
command line options.
|
static void |
displayExporterStatus(Exporter exporter)
Displays any available status messages, polling periodically and
returning when the export operation is complete.
|
static void |
displayLoaderStatus(Loader loader)
Displays any available status messages, polling periodically and
returning when the load operation is complete.
|
static void |
displayMessage(java.lang.String message)
Displays a message to the administration console.
|
static void |
displayStatus(StatusReporter reporter)
Displays any available status messages, polling periodically and
returning when the export operation is complete.
|
static void |
displayTaggedMessage(java.lang.String message)
Displays a message to the administration console, with additional tagging
to assist servicability.
|
static void |
displayTaggedMessage(java.lang.String message,
java.lang.Throwable cause,
java.lang.String logID)
Displays a message to the administration console, with additional tagging
to assist servicability.
|
static char |
getConsoleCharacter()
Read and return a single character based on user input to the
Administration console.
|
static java.lang.String |
getPromptForSchemeHelp()
Returns common text to append to displayed help for commands that allow
the user to prompt for coding scheme information instead of providing urn
and version information as parameters.
|
static CodingSchemeRendering |
getRenderingDetail(CodingSchemeSummary css)
Returns rendering detail associated with the following coding scheme
summary; null if not available.
|
static java.lang.String |
getURIHelp()
Returns common text to append to displayed help for commands that accept
URI parameters (e.g. how to deal with imbedded spaces).
|
static CodingSchemeSummary |
promptForCodeSystem()
Display a list of available code systems and
|
static java.net.URI |
string2FileURI(java.lang.String s)
Returns a file URI corresponding to the given string.
|
public static void displayAndLogError(java.lang.String message, java.lang.Throwable cause)
message
- The message to display.cause
- Error associated with the message.public static void displayAndLogError(java.lang.Throwable cause)
cause
- Error associated with the message.public static void displayCommandOptions(java.lang.String syntax, org.apache.commons.cli.Options options, java.lang.String example, java.lang.Throwable parseErr)
syntax
- Named syntax.options
- Provided options.example
- Example usage, if applicable.parseErr
- Error that occurred parsing the command line, if applicable.public static void displayStatus(StatusReporter reporter)
loader
- public static void displayExporterStatus(Exporter exporter)
loader
- public static void displayLoaderStatus(Loader loader)
loader
- public static void displayMessage(java.lang.String message)
message
- The message to display.public static void displayTaggedMessage(java.lang.String message)
message
- The message to display.public static void displayTaggedMessage(java.lang.String message, java.lang.Throwable cause, java.lang.String logID)
message
- The message to display.cause
- Optional error associated with the message.logID
- Optional identifier as registered in the LexBIG logs.public static char getConsoleCharacter() throws java.io.IOException
java.io.IOException
public static java.lang.String getPromptForSchemeHelp()
public static CodingSchemeRendering getRenderingDetail(CodingSchemeSummary css)
css
- public static java.lang.String getURIHelp()
public static CodingSchemeSummary promptForCodeSystem()
public static java.net.URI string2FileURI(java.lang.String s) throws LBResourceUnavailableException
s
- LBResourceUnavailableException