Class IdentifierCommand


final class IdentifierCommand extends FormattedOutputCommand
The "identifier" sub-command.
Since:
0.3
Version:
0.8
  • Constructor Details

  • Method Details

    • options

      @Workaround(library="JDK", version="1.7") private static EnumSet<Option> options()
      Work around for RFE #4093999 in Sun's bug database ("Relax constraint on placement of this()/super() call in constructors").
    • run

      public int run() throws Exception
      Prints identifier 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.
    • 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

      private void print(Iterable<IdentifierCommand.Row> rows) throws IOException
      Prints all non-null rows.
      Throws:
      IOException