Package org.apache.sis.console
Class MetadataCommand
java.lang.Object
org.apache.sis.console.CommandRunner
org.apache.sis.console.FormattedOutputCommand
org.apache.sis.console.MetadataCommand
The "metadata" sub-command.
- Since:
- 0.3
- Version:
- 1.0
-
Field Summary
Fields inherited from class org.apache.sis.console.FormattedOutputCommand
convention, hasUnexpectedFileCount
Fields inherited from class org.apache.sis.console.CommandRunner
colors, commandName, debug, encoding, err, files, instance, locale, options, out, outputBuffer, TEST, timezone
-
Constructor Summary
ConstructorsConstructorDescriptionMetadataCommand
(int commandIndex, String... arguments) Creates the"metadata"
sub-command. -
Method Summary
Modifier and TypeMethodDescription(package private) Predicate
<TreeTable.Node> Returns the filter for simplifying the tree table to be formatted.options()
Returns valid options for the"metadata"
command.int
run()
Prints metadata or CRS information.Methods inherited from class org.apache.sis.console.FormattedOutputCommand
format, readMetadataOrCRS
Methods inherited from class org.apache.sis.console.CommandRunner
canNotOpen, error, hasContradictoryOptions, hasUnexpectedFileCount, help, useStandardInput
-
Constructor Details
-
MetadataCommand
MetadataCommand(int commandIndex, String... arguments) throws InvalidOptionException Creates the"metadata"
sub-command.- Parameters:
commandIndex
- index of thearguments
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
Returns valid options for the"metadata"
command. -
run
Prints metadata or CRS information.- Specified by:
run
in classCommandRunner
- 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 classFormattedOutputCommand
-