Class MetadataCommand


final class MetadataCommand extends FormattedOutputCommand
The "metadata" sub-command.
Since:
0.3
Version:
1.0
  • Constructor Details

    • MetadataCommand

      MetadataCommand(int commandIndex, String... arguments) throws InvalidOptionException
      Creates the "metadata" sub-command.
      Parameters:
      commandIndex - index of the arguments element containing the "metadata" command name, or -1 if none.
      arguments - the command-line arguments provided by the user.
      Throws:
      InvalidOptionException - if an illegal option has been provided, or the option has an illegal value.
  • Method Details

    • options

      static EnumSet<Option> options()
      Returns valid options for the "metadata" command.
    • run

      public int run() throws Exception
      Prints metadata or CRS information.
      Specified by:
      run in class CommandRunner
      Returns:
      0 on success, or an exit code if the command failed for a reason other than an uncaught Java exception.
      Throws:
      Exception - if an error occurred while executing the sub-command.
    • getNodeFilter

      Predicate<TreeTable.Node> getNodeFilter()
      Returns the filter for simplifying the tree table to be formatted. This is used only for the tree in text format (not for XML output).

      We omit the "Metadata standard" node because it is hard-coded to the same value in all Apache SIS DataStore implementations, and that hard-coded value is verbose. The value will be shown in XML output, which is verbose anyway.

      Overrides:
      getNodeFilter in class FormattedOutputCommand