Package org.apache.sis.console
Class IdentifierCommand
java.lang.Object
org.apache.sis.console.CommandRunner
org.apache.sis.console.FormattedOutputCommand
org.apache.sis.console.IdentifierCommand
The "identifier" sub-command.
- Since:
- 0.3
- Version:
- 0.8
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
A row containing a metadata or CRS identifier, its name and a status flag.private static enum
The state to write in the left margin before the identifier. -
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
ConstructorsConstructorDescriptionIdentifierCommand
(int commandIndex, String... args) Creates the"identifier"
sub-command. -
Method Summary
Modifier and TypeMethodDescription(package private) static IdentifierCommand.Row
create
(org.opengis.referencing.ReferenceSystem rs) Creates an identifier row for the given CRS.options()
Work around for RFE #4093999 in Sun's bug database ("Relax constraint on placement of this()/super() call in constructors").private void
print
(Iterable<IdentifierCommand.Row> rows) Prints all non-null rows.int
run()
Prints identifier information.Methods inherited from class org.apache.sis.console.FormattedOutputCommand
format, getNodeFilter, readMetadataOrCRS
Methods inherited from class org.apache.sis.console.CommandRunner
canNotOpen, error, hasContradictoryOptions, hasUnexpectedFileCount, help, useStandardInput
-
Constructor Details
-
IdentifierCommand
IdentifierCommand(int commandIndex, String... args) throws InvalidOptionException Creates the"identifier"
sub-command.- Throws:
InvalidOptionException
-
-
Method Details
-
options
Work around for RFE #4093999 in Sun's bug database ("Relax constraint on placement of this()/super() call in constructors"). -
run
Prints identifier 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.
-
create
static IdentifierCommand.Row create(org.opengis.referencing.ReferenceSystem rs) throws org.opengis.util.FactoryException Creates an identifier row for the given CRS. This method gives precedence to"urn:ogc:def:"
identifiers if possible.- Returns:
- the row, or
null
if no identifier has been found. - Throws:
org.opengis.util.FactoryException
-
print
Prints all non-null rows.- Throws:
IOException
-