sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1789729 [1/9] - in /sis/branches/JDK9: ./ application/sis-console/ application/sis-console/src/main/java/org/apache/sis/console/ application/sis-console/src/test/java/org/apache/sis/console/ core/ core/sis-feature/src/main/java/org/apache/...
Date Fri, 31 Mar 2017 18:49:18 GMT
Author: desruisseaux
Date: Fri Mar 31 18:49:16 2017
New Revision: 1789729

URL: http://svn.apache.org/viewvc?rev=1789729&view=rev
Log:
Merge from the JDK8 branch.

Added:
    sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/FormattedOutputCommand.java
      - copied unchanged from r1789725, sis/branches/JDK8/application/sis-console/src/main/java/org/apache/sis/console/FormattedOutputCommand.java
    sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/OutputFormat.java
      - copied unchanged from r1789725, sis/branches/JDK8/application/sis-console/src/main/java/org/apache/sis/console/OutputFormat.java
    sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/Freezer.java
      - copied unchanged from r1789725, sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/Freezer.java
    sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataCopier.java
      - copied unchanged from r1789725, sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataCopier.java
    sis/branches/JDK9/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataCopierTest.java
      - copied unchanged from r1789725, sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataCopierTest.java
    sis/branches/JDK9/core/sis-referencing-by-identifiers/
      - copied from r1789725, sis/branches/JDK8/core/sis-referencing-by-identifiers/
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/geometry/CoordinateFormat.java
      - copied unchanged from r1789725, sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/geometry/CoordinateFormat.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/j2d/IntervalRectangle.java
      - copied unchanged from r1789725, sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/j2d/IntervalRectangle.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ZonedTransverseMercator.java
      - copied unchanged from r1789725, sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ZonedTransverseMercator.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/LocalizationGridBuilder.java
      - copied unchanged from r1789725, sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/LocalizationGridBuilder.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/ResidualGrid.java
      - copied unchanged from r1789725, sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/ResidualGrid.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/TransformBuilder.java
      - copied unchanged from r1789725, sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/TransformBuilder.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ZonedGridSystem.java
      - copied unchanged from r1789725, sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ZonedGridSystem.java
    sis/branches/JDK9/core/sis-referencing/src/test/java/org/apache/sis/geometry/CoordinateFormatTest.java
      - copied unchanged from r1789725, sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/geometry/CoordinateFormatTest.java
    sis/branches/JDK9/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/builder/LocalizationGridBuilderTest.java
      - copied unchanged from r1789725, sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/builder/LocalizationGridBuilderTest.java
    sis/branches/JDK9/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ZonedGridSystemTest.java
      - copied unchanged from r1789725, sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ZonedGridSystemTest.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/xml/Implementation.java
      - copied unchanged from r1789725, sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/Implementation.java
    sis/branches/JDK9/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/FormattedWriter.java
      - copied unchanged from r1789725, sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/FormattedWriter.java
Removed:
    sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/Cloner.java
    sis/branches/JDK9/storage/sis-storage/src/test/java/org/apache/sis/index/GeoHashCoderTest.java
Modified:
    sis/branches/JDK9/   (props changed)
    sis/branches/JDK9/README
    sis/branches/JDK9/application/sis-console/pom.xml
    sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/AboutCommand.java
    sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/CRSCommand.java
    sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/Command.java
    sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/CommandRunner.java
    sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/HelpCommand.java
    sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/IdentifierCommand.java
    sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/MetadataCommand.java
    sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/MimeTypeCommand.java
    sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/TransformCommand.java
    sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/package-info.java
    sis/branches/JDK9/application/sis-console/src/test/java/org/apache/sis/console/HelpCommandTest.java
    sis/branches/JDK9/core/pom.xml
    sis/branches/JDK9/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureFormat.java
    sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataTypes.java
    sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ReferencingServices.java
    sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ServicesForUtility.java
    sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/Initializer.java
    sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/ScriptRunner.java
    sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/FormattableObject.java
    sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java
    sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/WKTFormat.java
    sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/CacheKey.java
    sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java
    sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java
    sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java
    sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyComparator.java
    sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/SpecialCases.java
    sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/StandardImplementation.java
    sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNodeChildren.java
    sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/UnmodifiableMetadataException.java
    sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBox.java
    sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/Extents.java
    sis/branches/JDK9/core/sis-metadata/src/main/resources/org/apache/sis/metadata/sql/Create.sql
    sis/branches/JDK9/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/MergerTest.java
    sis/branches/JDK9/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataTestCase.java
    sis/branches/JDK9/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyAccessorTest.java
    sis/branches/JDK9/core/sis-metadata/src/test/java/org/apache/sis/metadata/SpecialCasesTest.java
    sis/branches/JDK9/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableFormatTest.java
    sis/branches/JDK9/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBoxTest.java
    sis/branches/JDK9/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/ExtentsTest.java
    sis/branches/JDK9/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/lineage/DefaultProcessStepTest.java
    sis/branches/JDK9/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java
    sis/branches/JDK9/core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/lineage/ProcessStep.xml
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractEnvelope.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/geometry/DirectPosition1D.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/geometry/DirectPosition2D.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelope2D.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralDirectPosition.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralEnvelope.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/geometry/Shapes2D.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/geometry/package-info.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ExtendedPrecisionMatrix.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/GeodeticObjectBuilder.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ReferencingTypes.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Resources.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Resources.properties
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Resources_fr.properties
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ServicesForMetadata.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/DatumShiftGridCompressed.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/DatumShiftGridFile.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeocentricAffine.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicA.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercator.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractReferenceSystem.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/EPSGFactoryFallback.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/StandardDefinitions.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DatumShiftGrid.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/CommonAuthorityFactory.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/LinearTransformBuilder.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/package-info.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/MatrixSIS.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/package-info.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/NormalizedProjection.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/TransverseMercator.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform1D.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform2D.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ContextualParameters.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedTransform.java
    sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/package-info.java
    sis/branches/JDK9/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod
    sis/branches/JDK9/core/sis-referencing/src/test/java/org/apache/sis/geometry/TransformTestCase.java
    sis/branches/JDK9/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/ServicesForMetadataTest.java
    sis/branches/JDK9/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java
    sis/branches/JDK9/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/TransverseMercatorTest.java
    sis/branches/JDK9/core/sis-referencing/src/test/java/org/apache/sis/referencing/CRSTest.java
    sis/branches/JDK9/core/sis-referencing/src/test/java/org/apache/sis/referencing/CommonCRSTest.java
    sis/branches/JDK9/core/sis-referencing/src/test/java/org/apache/sis/referencing/EPSGFactoryFallbackTest.java
    sis/branches/JDK9/core/sis-referencing/src/test/java/org/apache/sis/referencing/StandardDefinitionsTest.java
    sis/branches/JDK9/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGInstallerTest.java
    sis/branches/JDK9/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/CoordinateOperationFinderTest.java
    sis/branches/JDK9/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/builder/LinearTransformBuilderTest.java
    sis/branches/JDK9/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/GeneralMatrixTest.java
    sis/branches/JDK9/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/Matrix3Test.java
    sis/branches/JDK9/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatrixTestCase.java
    sis/branches/JDK9/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CoordinateDomain.java
    sis/branches/JDK9/core/sis-referencing/src/test/java/org/apache/sis/referencing/report/HTMLGenerator.java
    sis/branches/JDK9/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ConverterRegistry.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/TypeRegistration.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/internal/system/Modules.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/internal/system/OptionalDependency.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/internal/util/Cloner.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/internal/util/Constants.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/internal/util/MetadataServices.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/internal/util/StreamWriterDelegate.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/internal/util/Utilities.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/internal/util/XPaths.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/io/CompoundFormat.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/io/DefaultFormat.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/io/TableAppender.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/math/ArrayVector.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/math/CompoundDirectPositions.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/math/Line.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/math/Plane.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/math/StatisticsFormat.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/measure/AbstractUnit.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/measure/Angle.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/measure/AngleFormat.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/measure/ConcatenatedConverter.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/measure/ConventionalUnit.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/measure/Latitude.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/measure/LinearConverter.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/measure/Longitude.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/measure/Range.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/measure/SystemUnit.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/measure/UnitFormat.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/measure/package-info.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/setup/OptionKey.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/util/StringBuilders.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/util/Version.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTableFormat.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/xml/MarshallerPool.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/xml/Pooled.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/xml/PooledMarshaller.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/xml/PooledTemplate.java
    sis/branches/JDK9/core/sis-utility/src/main/java/org/apache/sis/xml/XML.java
    sis/branches/JDK9/core/sis-utility/src/test/java/org/apache/sis/internal/util/XPathsTest.java
    sis/branches/JDK9/core/sis-utility/src/test/java/org/apache/sis/math/PlaneTest.java
    sis/branches/JDK9/core/sis-utility/src/test/java/org/apache/sis/measure/AngleFormatTest.java
    sis/branches/JDK9/core/sis-utility/src/test/java/org/apache/sis/measure/UnitFormatTest.java
    sis/branches/JDK9/core/sis-utility/src/test/java/org/apache/sis/util/StringBuildersTest.java
    sis/branches/JDK9/ide-project/NetBeans/build.xml
    sis/branches/JDK9/ide-project/NetBeans/nbproject/build-impl.xml
    sis/branches/JDK9/ide-project/NetBeans/nbproject/genfiles.properties
    sis/branches/JDK9/ide-project/NetBeans/nbproject/project.properties
    sis/branches/JDK9/ide-project/NetBeans/nbproject/project.xml
    sis/branches/JDK9/pom.xml
    sis/branches/JDK9/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/ProfileTypes.java
    sis/branches/JDK9/src/main/javadoc/stylesheet.css
    sis/branches/JDK9/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/LandsatReader.java
    sis/branches/JDK9/storage/sis-earth-observation/src/test/java/org/apache/sis/storage/earthobservation/LandsatReaderTest.java
    sis/branches/JDK9/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/GeoTiffStore.java
    sis/branches/JDK9/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/ImageFileDirectory.java
    sis/branches/JDK9/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/Resources.java
    sis/branches/JDK9/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/Resources.properties
    sis/branches/JDK9/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/Resources_fr.properties
    sis/branches/JDK9/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStoreProvider.java
    sis/branches/JDK9/storage/sis-netcdf/src/test/java/org/apache/sis/storage/netcdf/MetadataReaderTest.java
    sis/branches/JDK9/storage/sis-storage/src/main/java/org/apache/sis/index/GeoHashCoder.java
    sis/branches/JDK9/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/FeatureStore.java
    sis/branches/JDK9/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/Store.java
    sis/branches/JDK9/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStoreProvider.java
    sis/branches/JDK9/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStoreRegistry.java
    sis/branches/JDK9/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStores.java
    sis/branches/JDK9/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/csv/StoreTest.java
    sis/branches/JDK9/storage/sis-storage/src/test/java/org/apache/sis/test/suite/StorageTestSuite.java
    sis/branches/JDK9/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Metadata.java
    sis/branches/JDK9/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Reader.java
    sis/branches/JDK9/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Store.java
    sis/branches/JDK9/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/StoreProvider.java
    sis/branches/JDK9/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Types.java
    sis/branches/JDK9/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Writer.java
    sis/branches/JDK9/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StaxDataStore.java
    sis/branches/JDK9/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StaxStreamWriter.java
    sis/branches/JDK9/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/ReaderTest.java
    sis/branches/JDK9/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/WriterTest.java

Propchange: sis/branches/JDK9/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Mar 31 18:49:16 2017
@@ -1,4 +1,4 @@
 /sis/branches/Android:1430670-1480699
 /sis/branches/JDK6:1394913-1508480
-/sis/branches/JDK8:1773327-1779817
+/sis/branches/JDK8:1773327-1789725
 /sis/trunk:1394364-1508466,1519089-1519674

Modified: sis/branches/JDK9/README
URL: http://svn.apache.org/viewvc/sis/branches/JDK9/README?rev=1789729&r1=1789728&r2=1789729&view=diff
==============================================================================
--- sis/branches/JDK9/README (original)
+++ sis/branches/JDK9/README Fri Mar 31 18:49:16 2017
@@ -38,7 +38,7 @@ Information for running a command-line t
 License (see also LICENSE)
 ==========================
 
-Collective work: Copyright 2010-2016 The Apache Software Foundation.
+Collective work: Copyright 2010-2017 The Apache Software Foundation.
 
 Licensed to the Apache Software Foundation (ASF) under one or more
 contributor license agreements.  See the NOTICE file distributed with

Modified: sis/branches/JDK9/application/sis-console/pom.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK9/application/sis-console/pom.xml?rev=1789729&r1=1789728&r2=1789729&view=diff
==============================================================================
--- sis/branches/JDK9/application/sis-console/pom.xml (original)
+++ sis/branches/JDK9/application/sis-console/pom.xml Fri Mar 31 18:49:16 2017
@@ -109,7 +109,7 @@ Console application.
       <groupId>org.apache.sis.storage</groupId>
       <artifactId>sis-xmlstore</artifactId>
       <version>${project.version}</version>
-      <scope>runtime</scope>
+      <scope>compile</scope>  <!-- Should be runtime after the hack in FormattedOutputCommand has been fixed. -->
     </dependency>
     <dependency>
       <groupId>org.apache.sis.storage</groupId>

Modified: sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/AboutCommand.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/AboutCommand.java?rev=1789729&r1=1789728&r2=1789729&view=diff
==============================================================================
--- sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/AboutCommand.java [UTF-8] (original)
+++ sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/AboutCommand.java [UTF-8] Fri Mar 31 18:49:16 2017
@@ -59,20 +59,27 @@ import org.apache.sis.internal.util.X364
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
- * @version 0.7
+ * @version 0.8
  * @module
  */
 final class AboutCommand extends CommandRunner {
     /**
      * Creates the {@code "about"} sub-command.
+     *
+     * @param  commandIndex  index of the {@code arguments} element containing the {@code "about"} command name, or -1 if none.
+     * @param  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.
      */
-    AboutCommand(final int commandIndex, final String... args) throws InvalidOptionException {
-        super(commandIndex, args, EnumSet.of(Option.LOCALE, Option.TIMEZONE, Option.ENCODING,
+    AboutCommand(final int commandIndex, final String... arguments) throws InvalidOptionException {
+        super(commandIndex, arguments, EnumSet.of(Option.LOCALE, Option.TIMEZONE, Option.ENCODING,
                 Option.BRIEF, Option.VERBOSE, Option.HELP, Option.DEBUG));
     }
 
     /**
      * Prints the information to the output stream.
+     *
+     * @return 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.
      */
     @Override
     public int run() throws Exception {
@@ -154,7 +161,7 @@ final class AboutCommand extends Command
                 out.print(X364.BOLD.sequence());
                 out.print(' ');
             }
-            out.print(Vocabulary.getResources(locale).getLabel(Vocabulary.Keys.Warnings));
+            Vocabulary.getResources(locale).appendLabel(Vocabulary.Keys.Warnings, out);
             if (colors) {
                 out.print(' ');
                 out.println(X364.RESET.sequence());

Modified: sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/CRSCommand.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/CRSCommand.java?rev=1789729&r1=1789728&r2=1789729&view=diff
==============================================================================
--- sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/CRSCommand.java [UTF-8] (original)
+++ sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/CRSCommand.java [UTF-8] Fri Mar 31 18:49:16 2017
@@ -16,14 +16,9 @@
  */
 package org.apache.sis.console;
 
-import java.io.IOException;
-import javax.xml.bind.JAXBException;
 import org.opengis.metadata.Metadata;
-import org.opengis.util.FactoryException;
 import org.opengis.referencing.ReferenceSystem;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
-import org.apache.sis.storage.DataStoreException;
-import org.apache.sis.io.wkt.Convention;
 
 
 /**
@@ -32,32 +27,24 @@ import org.apache.sis.io.wkt.Convention;
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
- * @version 0.7
+ * @version 0.8
  * @module
  */
-final class CRSCommand extends MetadataCommand {
+final class CRSCommand extends FormattedOutputCommand {
     /**
      * Creates the {@code "crs"} sub-command.
      */
     CRSCommand(final int commandIndex, final String... args) throws InvalidOptionException {
-        super(commandIndex, args);
-
-        // Default output format.
-        outputFormat = Format.WKT;
-        convention = Convention.WKT2_SIMPLIFIED;
+        super(commandIndex, args, MetadataCommand.options(), OutputFormat.WKT, OutputFormat.XML);
     }
 
     /**
      * Prints metadata or CRS information.
      *
-     * @throws DataStoreException if an error occurred while reading the file.
-     * @throws JAXBException if an error occurred while producing the XML output.
-     * @throws FactoryException if an error occurred while looking for a CRS identifier.
-     * @throws IOException should never happen, since we are appending to a print writer.
+     * @return 0 on success, or an exit code if the command failed for a reason other than an uncaught Java exception.
      */
     @Override
-    public int run() throws InvalidOptionException, DataStoreException, JAXBException, FactoryException, IOException {
-        parseArguments();
+    public int run() throws Exception {
         final Object metadata = readMetadataOrCRS();
         if (hasUnexpectedFileCount) {
             return Command.INVALID_ARGUMENT_EXIT_CODE;

Modified: sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/Command.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/Command.java?rev=1789729&r1=1789728&r2=1789729&view=diff
==============================================================================
--- sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/Command.java [UTF-8] (original)
+++ sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/Command.java [UTF-8] Fri Mar 31 18:49:16 2017
@@ -71,7 +71,7 @@ import org.apache.sis.util.logging.Monol
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
- * @version 0.7
+ * @version 0.8
  * @module
  */
 public final class Command {
@@ -115,11 +115,6 @@ public final class Command {
     public static final int OTHER_ERROR_EXIT_CODE = 199;
 
     /**
-     * The sub-command name.
-     */
-    private final String commandName;
-
-    /**
      * The sub-command to execute.
      */
     private final CommandRunner command;
@@ -153,8 +148,7 @@ public final class Command {
         if (commandName == null) {
             command = new HelpCommand(-1, args);
         } else {
-            commandName = commandName.toLowerCase(Locale.US);
-            switch (commandName) {
+            switch (commandName.toLowerCase(Locale.US)) {
                 case "help":       command = new HelpCommand      (commandIndex, args); break;
                 case "about":      command = new AboutCommand     (commandIndex, args); break;
                 case "mime-type":  command = new MimeTypeCommand  (commandIndex, args); break;
@@ -166,7 +160,6 @@ public final class Command {
                             Errors.Keys.UnknownCommand_1, commandName), commandName);
             }
         }
-        this.commandName = commandName;
         CommandRunner.instance = command;       // For ResourcesDownloader only.
     }
 
@@ -184,7 +177,7 @@ public final class Command {
             return INVALID_OPTION_EXIT_CODE;
         }
         if (command.options.containsKey(Option.HELP)) {
-            command.help(commandName);
+            command.help(command.commandName.toLowerCase(Locale.US));
         } else try {
             return command.run();
         } catch (Exception e) {

Modified: sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/CommandRunner.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/CommandRunner.java?rev=1789729&r1=1789728&r2=1789729&view=diff
==============================================================================
--- sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/CommandRunner.java [UTF-8] (original)
+++ sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/CommandRunner.java [UTF-8] Fri Mar 31 18:49:16 2017
@@ -23,6 +23,7 @@ import java.util.EnumSet;
 import java.util.EnumMap;
 import java.util.TimeZone;
 import java.io.Console;
+import java.io.IOException;
 import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.io.OutputStreamWriter;
@@ -34,11 +35,13 @@ import org.apache.sis.internal.util.X364
 
 
 /**
- * Base class of sub-commands.
+ * Base class of all sub-commands.
+ * A subclasses is initialized by the {@link Command} constructor,
+ * then the {@link #run()} method is invoked by {@link Command#run()}.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
- * @version 0.7
+ * @version 0.8
  * @module
  */
 abstract class CommandRunner {
@@ -58,6 +61,12 @@ abstract class CommandRunner {
     static CommandRunner instance;
 
     /**
+     * The name of this command, as specified by the user on the command-line.
+     * May contain a mix of lower-case and upper-case letters if the user specified the command that way.
+     */
+    protected final String commandName;
+
+    /**
      * The set of legal options for this command.
      *
      * @see #help(String)
@@ -70,8 +79,8 @@ abstract class CommandRunner {
     protected final EnumMap<Option,String> options;
 
     /**
-     * The locale specified by the {@code "--locale"} option. If no such option was
-     * provided, then this field is set to the {@linkplain Locale#getDefault() default locale}.
+     * The locale specified by the {@code "--locale"} option. If no such option was provided,
+     * then this field is set to the {@linkplain Locale#getDefault() default locale}.
      */
     protected final Locale locale;
 
@@ -130,6 +139,7 @@ abstract class CommandRunner {
      * only when a command needs to delegates part of its work to an other command.
      */
     CommandRunner(final CommandRunner parent) {
+        this.commandName  = parent.commandName;
         this.validOptions = parent.validOptions;
         this.options      = parent.options;
         this.locale       = parent.locale;
@@ -149,7 +159,7 @@ abstract class CommandRunner {
      * The argument at index {@code commandIndex} is the name of this command, and will be ignored except for
      * the special {@value #TEST} value which is used only at JUnit testing time.
      *
-     * @param  commandIndex  index of the {@code args} element containing the sub-command name.
+     * @param  commandIndex  index of the {@code arguments} element containing the sub-command name, or -1 if none.
      * @param  arguments     the command-line arguments provided by the user.
      * @param  validOptions  the command-line options allowed by this sub-command.
      * @throws InvalidOptionException if an illegal option has been provided, or the option has an illegal value.
@@ -158,16 +168,15 @@ abstract class CommandRunner {
     protected CommandRunner(final int commandIndex, final String[] arguments, final EnumSet<Option> validOptions)
             throws InvalidOptionException
     {
-        boolean isTest = false;
+        commandName = (commandIndex >= 0) ? arguments[commandIndex] : null;
         this.validOptions = validOptions;
         options = new EnumMap<>(Option.class);
         files = new ArrayList<>(arguments.length);
-        for (int i=0; i<arguments.length; i++) {
-            final String arg = arguments[i];
+        for (int i=0; i < arguments.length; i++) {
             if (i == commandIndex) {
-                isTest = arg.equals(TEST);
                 continue;
             }
+            final String arg = arguments[i];
             if (arg.startsWith(Option.PREFIX)) {
                 final String name = arg.substring(Option.PREFIX.length());
                 final Option option = Option.forLabel(name);
@@ -222,7 +231,7 @@ abstract class CommandRunner {
          * output to a StringBuffer. Otherwise the output will be sent to the java.io.Console if possible,
          * or to the standard output stream otherwise.
          */
-        if (isTest) {
+        if (TEST.equals(commandName)) {
             final StringWriter s = new StringWriter();
             outputBuffer = s.getBuffer();
             out = new PrintWriter(s);
@@ -322,19 +331,22 @@ abstract class CommandRunner {
     }
 
     /**
-     * Shows the help instructions for a specific command. This method is invoked
-     * instead of {@link #run()} if the the user provided the {@code --help} option.
+     * Shows the help instructions for a specific command. This method is invoked instead of {@link #run()}
+     * if the the user provided the {@code --help} option. The default implementation builds a description
+     * from the texts associated to the given {@code resourceKey} in various resource bundles provided in
+     * this {@code sis-console} module. Subclasses can override if needed.
      *
-     * @param commandName  the command name converted to lower cases.
+     * @param  resourceKey  the key for the resource to print. This is usually {@link #commandName} in lower-cases.
+     * @throws IOException should never happen, because we are writing to a {@code PrintWriter}.
      */
-    protected void help(final String commandName) {
-        new HelpCommand(this).help(false, new String[] {commandName}, validOptions);
+    protected void help(final String resourceKey) throws IOException {
+        new HelpCommand(this).help(false, new String[] {resourceKey}, validOptions);
     }
 
     /**
      * Executes the sub-command.
      *
-     * @return 0 on success, or an exit code if the command failed for a reason other than a Java exception.
+     * @return 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.
      */
     public abstract int run() throws Exception;

Modified: sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/HelpCommand.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/HelpCommand.java?rev=1789729&r1=1789728&r2=1789729&view=diff
==============================================================================
--- sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/HelpCommand.java [UTF-8] (original)
+++ sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/HelpCommand.java [UTF-8] Fri Mar 31 18:49:16 2017
@@ -28,7 +28,7 @@ import org.apache.sis.util.resources.Voc
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
- * @version 0.7
+ * @version 0.8
  * @module
  */
 final class HelpCommand extends CommandRunner {
@@ -46,8 +46,8 @@ final class HelpCommand extends CommandR
     };
 
     /**
-     * Copies the configuration of the given sub-command. This constructor is used
-     * for printing help about an other command.
+     * Copies the configuration of the given sub-command.
+     * This constructor is used for printing help about another command.
      */
     HelpCommand(final CommandRunner parent) {
         super(parent);
@@ -55,16 +55,23 @@ final class HelpCommand extends CommandR
 
     /**
      * Creates the {@code "help"} sub-command.
+     *
+     * @param  commandIndex  index of the {@code arguments} element containing the {@code "help"} command name, or -1 if none.
+     * @param  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.
      */
-    HelpCommand(final int commandIndex, final String... args) throws InvalidOptionException {
-        super(commandIndex, args, EnumSet.of(Option.LOCALE, Option.ENCODING, Option.HELP, Option.DEBUG));
+    HelpCommand(final int commandIndex, final String... arguments) throws InvalidOptionException {
+        super(commandIndex, arguments, EnumSet.of(Option.LOCALE, Option.ENCODING, Option.HELP, Option.DEBUG));
     }
 
     /**
      * Prints the help instructions.
+     *
+     * @return 0 on success, or an exit code if the command failed for a reason other than a Java exception.
+     * @throws IOException should never happen, because we are writing to a {@code PrintWriter}.
      */
     @Override
-    public int run() {
+    public int run() throws IOException {
         if (hasUnexpectedFileCount(0, 0)) {
             return Command.INVALID_ARGUMENT_EXIT_CODE;
         }
@@ -78,8 +85,9 @@ final class HelpCommand extends CommandR
      * @param  showHeader    {@code true} for printing the "Apache SIS" header.
      * @param  commandNames  the names of the commands to list.
      * @param  validOptions  the options to list.
+     * @throws IOException should never happen, because we are writing to a {@code PrintWriter}.
      */
-    void help(final boolean showHeader, final String[] commandNames, final EnumSet<Option> validOptions) {
+    void help(final boolean showHeader, final String[] commandNames, final EnumSet<Option> validOptions) throws IOException {
         final ResourceBundle commands = ResourceBundle.getBundle("org.apache.sis.console.Commands", locale);
         final ResourceBundle options  = ResourceBundle.getBundle("org.apache.sis.console.Options",  locale);
         final Vocabulary vocabulary = Vocabulary.getResources(locale);
@@ -91,34 +99,30 @@ final class HelpCommand extends CommandR
             out.print(vocabulary.getString(Vocabulary.Keys.Commands));
             out.println(':');
         }
-        try {
-            final TableAppender table = new TableAppender(out, "  ");
-            for (final String command : commandNames) {
-                if (showHeader) {
-                    table.append("  ");
-                }
-                table.append(command);
-                if (!showHeader) {
-                    table.append(':');
-                }
-                table.nextColumn();
-                table.append(commands.getString(command));
-                table.nextLine();
+        final TableAppender table = new TableAppender(out, "  ");
+        for (final String command : commandNames) {
+            if (showHeader) {
+                table.append("  ");
             }
-            table.flush();
-            out.println();
-            out.print(vocabulary.getString(Vocabulary.Keys.Options));
-            out.println(':');
-            for (final Option option : validOptions) {
-                final String name = option.label();
-                table.append("  ").append(Option.PREFIX).append(name);
-                table.nextColumn();
-                table.append(options.getString(name));
-                table.nextLine();
+            table.append(command);
+            if (!showHeader) {
+                table.append(':');
             }
-            table.flush();
-        } catch (IOException e) {
-            throw new AssertionError(e);            // Should never happen, because we are writing to a PrintWriter.
+            table.nextColumn();
+            table.append(commands.getString(command));
+            table.nextLine();
+        }
+        table.flush();
+        out.println();
+        out.print(vocabulary.getString(Vocabulary.Keys.Options));
+        out.println(':');
+        for (final Option option : validOptions) {
+            final String name = option.label();
+            table.append("  ").append(Option.PREFIX).append(name);
+            table.nextColumn();
+            table.append(options.getString(name));
+            table.nextLine();
         }
+        table.flush();
     }
 }

Modified: sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/IdentifierCommand.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/IdentifierCommand.java?rev=1789729&r1=1789728&r2=1789729&view=diff
==============================================================================
--- sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/IdentifierCommand.java [UTF-8] (original)
+++ sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/IdentifierCommand.java [UTF-8] Fri Mar 31 18:49:16 2017
@@ -16,14 +16,13 @@
  */
 package org.apache.sis.console;
 
+import java.io.IOException;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Set;
 import java.util.EnumSet;
 import java.util.Collections;
 import java.util.ResourceBundle;
-import java.io.IOException;
-import javax.xml.bind.JAXBException;
 import org.opengis.metadata.Metadata;
 import org.opengis.metadata.Identifier;
 import org.opengis.referencing.NoSuchAuthorityCodeException;
@@ -32,10 +31,9 @@ import org.opengis.referencing.Reference
 import org.apache.sis.internal.util.X364;
 import org.apache.sis.referencing.CRS;
 import org.apache.sis.referencing.IdentifiedObjects;
-import org.apache.sis.storage.DataStoreException;
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.util.ComparisonMode;
-import org.apache.sis.util.resources.Errors;
+import org.apache.sis.util.Workaround;
 import org.apache.sis.util.resources.Vocabulary;
 
 
@@ -44,10 +42,10 @@ import org.apache.sis.util.resources.Voc
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
- * @version 0.7
+ * @version 0.8
  * @module
  */
-final class IdentifierCommand extends MetadataCommand {
+final class IdentifierCommand extends FormattedOutputCommand {
     /**
      * The state to write in the left margin before the identifier.
      *
@@ -91,27 +89,31 @@ final class IdentifierCommand extends Me
     }
 
     /**
+     * Work around for RFE #4093999 in Sun's bug database
+     * ("Relax constraint on placement of this()/super() call in constructors").
+     */
+    @Workaround(library="JDK", version="1.7")
+    private static EnumSet<Option> options() {
+        final EnumSet<Option> options = MetadataCommand.options();
+        options.remove(Option.TIMEZONE);
+        options.remove(Option.FORMAT);
+        return options;
+    }
+
+    /**
      * Creates the {@code "identifier"} sub-command.
      */
     IdentifierCommand(final int commandIndex, final String... args) throws InvalidOptionException {
-        super(commandIndex, args);
+        super(commandIndex, args, options(), OutputFormat.TEXT);
     }
 
     /**
      * Prints identifier information.
      *
-     * @throws DataStoreException if an error occurred while reading the file.
-     * @throws JAXBException if an error occurred while producing the XML output.
-     * @throws FactoryException if an error occurred while looking for a CRS identifier.
-     * @throws IOException should never happen, since we are appending to a print writer.
+     * @return 0 on success, or an exit code if the command failed for a reason other than an uncaught Java exception.
      */
     @Override
-    public int run() throws InvalidOptionException, DataStoreException, JAXBException, FactoryException, IOException {
-        parseArguments();
-        if (outputFormat != Format.TEXT) {
-            final String format = outputFormat.name();
-            throw new InvalidOptionException(Errors.format(Errors.Keys.IncompatibleFormat_2, "identifier", format), format);
-        }
+    public int run() throws Exception {
         /*
          * Read metadata from the data storage only after we verified that the arguments are valid.
          * The input can be a file given on the command line, or the standard input stream.
@@ -203,7 +205,7 @@ final class IdentifierCommand extends Me
     /**
      * Prints all non-null rows.
      */
-    private void print(final Iterable<Row> rows) {
+    private void print(final Iterable<Row> rows) throws IOException {
         int width = 0;
         for (final Row row : rows) {
             if (row != null) {
@@ -231,7 +233,8 @@ final class IdentifierCommand extends Me
         states.remove(State.VALID);
         if (!states.isEmpty()) {
             out.println();
-            out.println(Vocabulary.getResources(locale).getLabel(Vocabulary.Keys.Legend));
+            Vocabulary.getResources(locale).appendLabel(Vocabulary.Keys.Legend, out);
+            out.println();
             final ResourceBundle resources = ResourceBundle.getBundle("org.apache.sis.console.IdentifierState", locale);
             for (final State state : states) {
                 final boolean warning = colors && state.text.startsWith("!");

Modified: sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/MetadataCommand.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/MetadataCommand.java?rev=1789729&r1=1789728&r2=1789729&view=diff
==============================================================================
--- sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/MetadataCommand.java [UTF-8] (original)
+++ sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/MetadataCommand.java [UTF-8] Fri Mar 31 18:49:16 2017
@@ -18,156 +18,46 @@ package org.apache.sis.console;
 
 import java.util.Collections;
 import java.util.EnumSet;
-import java.io.Console;
-import java.io.IOException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.JAXBException;
 import org.opengis.metadata.Metadata;
 import org.opengis.referencing.ReferenceSystem;
-import org.opengis.referencing.crs.CoordinateReferenceSystem;
-import org.opengis.util.FactoryException;
-import org.apache.sis.io.wkt.WKTFormat;
-import org.apache.sis.io.wkt.Convention;
-import org.apache.sis.io.wkt.Colors;
-import org.apache.sis.metadata.MetadataStandard;
-import org.apache.sis.metadata.ValueExistencePolicy;
 import org.apache.sis.metadata.iso.DefaultMetadata;
-import org.apache.sis.referencing.CRS;
-import org.apache.sis.storage.DataStore;
-import org.apache.sis.storage.DataStores;
-import org.apache.sis.storage.DataStoreException;
-import org.apache.sis.internal.storage.CodeType;
-import org.apache.sis.util.collection.TableColumn;
-import org.apache.sis.util.collection.TreeTable;
-import org.apache.sis.util.collection.TreeTableFormat;
-import org.apache.sis.util.resources.Errors;
-import org.apache.sis.xml.MarshallerPool;
-import org.apache.sis.xml.XML;
 
 
 /**
- * The "metadata" sub-command. This class is also used as the base class of other sub-commands
- * that perform most of their work on the basis of metadata information.
+ * The "metadata" sub-command.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
  * @version 0.8
  * @module
  */
-class MetadataCommand extends CommandRunner {
+final class MetadataCommand extends FormattedOutputCommand {
     /**
-     * The output format.
+     * Returns valid options for the {@code "metadata"} command.
      */
-    static enum Format {
-        TEXT, WKT, XML
+    static EnumSet<Option> options() {
+        return EnumSet.of(Option.FORMAT, Option.LOCALE, Option.TIMEZONE,
+                Option.ENCODING, Option.COLORS, Option.HELP, Option.DEBUG);
     }
 
     /**
-     * The output format. Default value can be overridden by {@link #parseArguments()}.
-     */
-    Format outputFormat = Format.TEXT;
-
-    /**
-     * The WKT convention, or {@code null} if it does not apply.
-     */
-    Convention convention;
-
-    /**
-     * Sets to {@code true} by {@link #readMetadata()} if the users provided an unexpected number of file arguments.
-     * In such case, the {@link #run()} should terminate with exit code {@link Command#INVALID_ARGUMENT_EXIT_CODE}.
-     */
-    boolean hasUnexpectedFileCount;
-
-    /**
      * Creates the {@code "metadata"} sub-command.
-     */
-    MetadataCommand(final int commandIndex, final String... args) throws InvalidOptionException {
-        super(commandIndex, args, EnumSet.of(Option.FORMAT, Option.LOCALE, Option.TIMEZONE, Option.ENCODING,
-                Option.COLORS, Option.HELP, Option.DEBUG));
-    }
-
-    /**
-     * Creates a new sub-command with the given command-line arguments.
-     * This constructor is for {@code MetadataCommand} subclasses only.
      *
-     * @param  commandIndex  index of the {@code args} element containing the sub-command name.
+     * @param  commandIndex  index of the {@code arguments} element containing the {@code "metadata"} command name, or -1 if none.
      * @param  arguments     the command-line arguments provided by the user.
-     * @param  validOptions  the command-line options allowed by this sub-command.
      * @throws InvalidOptionException if an illegal option has been provided, or the option has an illegal value.
      */
-    MetadataCommand(final int commandIndex, final String[] args, final EnumSet<Option> validOptions)
-            throws InvalidOptionException
-    {
-        super(commandIndex, args, validOptions);
-    }
-
-    /**
-     * Parses the command-line arguments and initializes the {@link #outputFormat} and {@link #convention} fields
-     * accordingly.
-     */
-    final void parseArguments() throws InvalidOptionException {
-        /*
-         * Output format can be either "text" (the default) or "xml".
-         * In the case of "crs" sub-command, we accept also WKT variants.
-         */
-        final String format = options.get(Option.FORMAT);
-        if (format != null && !format.equalsIgnoreCase("text")) {
-            if (format.equalsIgnoreCase("wkt") || format.equalsIgnoreCase("wkt2")) {
-                outputFormat = Format.WKT;
-                convention = Convention.WKT2;
-            } else if (format.equalsIgnoreCase("wkt1")) {
-                outputFormat = Format.WKT;
-                convention = Convention.WKT1;
-            } else if (format.equalsIgnoreCase("xml")) {
-                outputFormat = Format.XML;
-            } else {
-                throw new InvalidOptionException(Errors.format(
-                        Errors.Keys.IllegalOptionValue_2, "format", format), format);
-            }
-        }
-    }
-
-    /**
-     * If the given argument seems to be an authority code ("URN", "EPSG", "CRS", "AUTO", <i>etc.</i>),
-     * delegates to {@link CRS#forCode(String)}. Otherwise reads the metadata using a datastore.
-     *
-     * @return a {@link Metadata} or {@link CoordinateReferenceSystem} instance, or {@code null} if none.
-     */
-    final Object readMetadataOrCRS() throws DataStoreException, FactoryException {
-        if (useStandardInput()) {
-            try (DataStore store = DataStores.open(System.in)) {
-                return store.getMetadata();
-            }
-        } else if (hasUnexpectedFileCount(1, 1)) {
-            hasUnexpectedFileCount = true;
-            return null;
-        } else {
-            final String file = files.get(0);
-            if (CodeType.guess(file).isCRS) {
-                return CRS.forCode(file);
-            } else {
-                try (DataStore store = DataStores.open(file)) {
-                    return store.getMetadata();
-                }
-            }
-        }
+    MetadataCommand(final int commandIndex, final String... arguments) throws InvalidOptionException {
+        super(commandIndex, arguments, options(), OutputFormat.TEXT, OutputFormat.XML, OutputFormat.GPX);
     }
 
     /**
      * Prints metadata or CRS information.
      *
-     * @throws DataStoreException if an error occurred while reading the file.
-     * @throws JAXBException if an error occurred while producing the XML output.
-     * @throws FactoryException if an error occurred while looking for a CRS identifier.
-     * @throws IOException should never happen, since we are appending to a print writer.
+     * @return 0 on success, or an exit code if the command failed for a reason other than an uncaught Java exception.
      */
     @Override
     public int run() throws Exception {
-        parseArguments();
-        if (convention != null) {
-            final String format = outputFormat.name();
-            throw new InvalidOptionException(Errors.format(Errors.Keys.IncompatibleFormat_2, "metadata", format), format);
-        }
         /*
          * Read metadata from the data storage only after we verified that the arguments are valid.
          * The input can be a file given on the command line, or the standard input stream.
@@ -186,65 +76,4 @@ class MetadataCommand extends CommandRun
         }
         return 0;
     }
-
-    /**
-     * Format the given metadata or CRS object to the standard output stream.
-     * The format is determined by {@link #outputFormat} and (in WKT case only) {@link #convention}.
-     */
-    @SuppressWarnings("UseOfSystemOutOrSystemErr")
-    final void format(final Object object) throws IOException, JAXBException {
-        switch (outputFormat) {
-            case TEXT: {
-                final TreeTable tree = MetadataStandard.ISO_19115.asTreeTable(object,
-                        (object instanceof Metadata) ? Metadata.class : null,
-                        ValueExistencePolicy.NON_EMPTY);
-                final TreeTableFormat tf = new TreeTableFormat(locale, timezone);
-                tf.setColumns(TableColumn.NAME, TableColumn.VALUE);
-                tf.format(tree, out);
-                break;
-            }
-
-            case WKT: {
-                final WKTFormat f = new WKTFormat(locale, timezone);
-                if (convention != null) {
-                    f.setConvention(convention);
-                }
-                if (colors) {
-                    f.setColors(Colors.DEFAULT);
-                }
-                f.format(object, out);
-                out.println();
-                break;
-            }
-
-            case XML: {
-                final MarshallerPool pool = new MarshallerPool(null);
-                final Marshaller marshaller = pool.acquireMarshaller();
-                marshaller.setProperty(XML.LOCALE,   locale);
-                marshaller.setProperty(XML.TIMEZONE, timezone);
-                if (isConsole()) {
-                    marshaller.marshal(object, out);
-                } else {
-                    out.flush();
-                    marshaller.setProperty(Marshaller.JAXB_ENCODING, encoding.name());
-                    marshaller.marshal(object, System.out);     // Intentionally use OutputStream instead than Writer.
-                    System.out.flush();
-                }
-                break;
-            }
-        }
-        out.flush();
-    }
-
-    /**
-     * Returns {@code true} if {@link #out} is sending its output to the console.
-     * If not, then we are probably writing to a file or the user specified his own encoding.
-     * In such case, we will send the XML output to an {@code OutputStream} instead than to a
-     * {@code Writer} and let the marshaller apply the encoding itself.
-     */
-    private boolean isConsole() {
-        if (outputBuffer != null) return true;                      // Special case for JUnit tests only.
-        final Console console = System.console();
-        return (console != null) && console.writer() == out;
-    }
 }

Modified: sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/MimeTypeCommand.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/MimeTypeCommand.java?rev=1789729&r1=1789728&r2=1789729&view=diff
==============================================================================
--- sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/MimeTypeCommand.java [UTF-8] (original)
+++ sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/MimeTypeCommand.java [UTF-8] Fri Mar 31 18:49:16 2017
@@ -18,14 +18,12 @@ package org.apache.sis.console;
 
 import java.net.URI;
 import java.util.EnumSet;
-import java.io.IOException;
 import java.net.URISyntaxException;
 import java.nio.file.Files;
 import java.nio.file.Paths;
 import java.nio.file.NoSuchFileException;
 import java.nio.file.FileSystemNotFoundException;
 import org.apache.sis.storage.DataStores;
-import org.apache.sis.storage.DataStoreException;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.CharSequences;
 
@@ -41,7 +39,7 @@ import org.apache.sis.util.CharSequences
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
- * @version 0.4
+ * @version 0.8
  * @module
  *
  * @see Files#probeContentType(Path)
@@ -50,18 +48,23 @@ import org.apache.sis.util.CharSequences
 final class MimeTypeCommand extends CommandRunner {
     /**
      * Creates the {@code "mime-type"} sub-command.
+     *
+     * @param  commandIndex  index of the {@code arguments} element containing the {@code "mime-type"} command name, or -1 if none.
+     * @param  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.
      */
-    MimeTypeCommand(final int commandIndex, final String... args) throws InvalidOptionException {
-        super(commandIndex, args, EnumSet.of(Option.ENCODING, Option.HELP, Option.DEBUG));
+    MimeTypeCommand(final int commandIndex, final String... arguments) throws InvalidOptionException {
+        super(commandIndex, arguments, EnumSet.of(Option.ENCODING, Option.HELP, Option.DEBUG));
     }
 
     /**
      * Prints mime-type information.
      *
-     * @throws IOException if an error occurred while reading the file.
+     * @return 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.
      */
     @Override
-    public int run() throws InvalidOptionException, IOException, DataStoreException, URISyntaxException {
+    public int run() throws Exception {
         if (hasUnexpectedFileCount(1, Integer.MAX_VALUE)) {
             return Command.INVALID_ARGUMENT_EXIT_CODE;
         }

Modified: sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/TransformCommand.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/TransformCommand.java?rev=1789729&r1=1789728&r2=1789729&view=diff
==============================================================================
--- sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/TransformCommand.java [UTF-8] (original)
+++ sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/TransformCommand.java [UTF-8] Fri Mar 31 18:49:16 2017
@@ -58,7 +58,6 @@ import org.apache.sis.internal.util.X364
 import org.apache.sis.io.LineAppender;
 import org.apache.sis.io.TableAppender;
 import org.apache.sis.io.wkt.Colors;
-import org.apache.sis.io.wkt.Convention;
 import org.apache.sis.io.wkt.Transliterator;
 import org.apache.sis.io.wkt.WKTFormat;
 import org.apache.sis.io.wkt.Warnings;
@@ -81,10 +80,10 @@ import org.apache.sis.util.CharSequences
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.7
- * @version 0.7
+ * @version 0.8
  * @module
  */
-final class TransformCommand extends MetadataCommand {
+final class TransformCommand extends FormattedOutputCommand {
     /**
      * The coordinate operation from the given source CRS to target CRS.
      */
@@ -136,16 +135,19 @@ final class TransformCommand extends Met
     private NumberFormatException errorCause;
 
     /**
+     * Returns valid options for the {@code "transform"} commands.
+     */
+    private static EnumSet<Option> options() {
+        return EnumSet.of(Option.SOURCE_CRS, Option.TARGET_CRS, Option.VERBOSE,
+                Option.LOCALE, Option.TIMEZONE, Option.ENCODING, Option.COLORS, Option.HELP, Option.DEBUG);
+    }
+
+    /**
      * Creates the {@code "transform"} sub-command.
      */
     TransformCommand(final int commandIndex, final String... args) throws InvalidOptionException {
-        super(commandIndex, args, EnumSet.of(Option.SOURCE_CRS, Option.TARGET_CRS, Option.VERBOSE,
-                Option.LOCALE, Option.TIMEZONE, Option.ENCODING, Option.COLORS, Option.HELP, Option.DEBUG));
-
-        // Default output format for CRS.
-        outputFormat = Format.WKT;
-        convention   = Convention.WKT2_SIMPLIFIED;
-        resources    = Vocabulary.getResources(locale);
+        super(commandIndex, args, options(), OutputFormat.WKT, OutputFormat.TEXT);
+        resources = Vocabulary.getResources(locale);
     }
 
     /**
@@ -185,14 +187,11 @@ final class TransformCommand extends Met
 
     /**
      * Transforms coordinates from the files given in argument or from the standard input stream.
+     *
+     * @return 0 on success, or an exit code if the command failed for a reason other than an uncaught Java exception.
      */
     @Override
     public int run() throws Exception {
-        parseArguments();
-        if (outputFormat == Format.XML) {
-            final String format = outputFormat.name();
-            throw new InvalidOptionException(Errors.format(Errors.Keys.IncompatibleFormat_2, "transform", format), format);
-        }
         final CoordinateReferenceSystem sourceCRS = fetchCRS(Option.SOURCE_CRS);
         final CoordinateReferenceSystem targetCRS = fetchCRS(Option.TARGET_CRS);
         /*
@@ -282,9 +281,9 @@ final class TransformCommand extends Met
      *
      * @param  key  a {@code Vocabulary.Keys} constant for the header to print.
      */
-    private void printHeader(final short key) {
+    private void printHeader(final short key) throws IOException {
         printCommentLinePrefix();
-        outHeader.append(resources.getLabel(key));
+        resources.appendLabel(key, outHeader);
         outHeader.nextColumn();
     }
 
@@ -355,7 +354,7 @@ final class TransformCommand extends Met
     /**
      * Prints the accuracy.
      */
-    private void printAccuracy(double accuracy) {
+    private void printAccuracy(double accuracy) throws IOException {
         if (accuracy >= 0) {
             if (accuracy == 0) {
                 accuracy = Formulas.LINEAR_TOLERANCE;
@@ -385,7 +384,7 @@ final class TransformCommand extends Met
      *
      * <blockquote>Canada - onshore and offshore</blockquote>
      */
-    private void printDomainOfValidity(final Extent domain) {
+    private void printDomainOfValidity(final Extent domain) throws IOException {
         if (domain != null) {
             final InternationalString description = domain.getDescription();
             if (description != null) {
@@ -411,7 +410,7 @@ final class TransformCommand extends Met
      * Prints the coordinate operation or math transform in Well Known Text format.
      * This information is printed only if the {@code --verbose} option was specified.
      */
-    private void printDetails() {
+    private void printDetails() throws IOException {
         final boolean debug = options.containsKey(Option.DEBUG);
         final WKTFormat f = new WKTFormat(locale, timezone);
         if (colors) f.setColors(Colors.DEFAULT);

Modified: sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/package-info.java?rev=1789729&r1=1789728&r2=1789729&view=diff
==============================================================================
--- sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/package-info.java [UTF-8] (original)
+++ sis/branches/JDK9/application/sis-console/src/main/java/org/apache/sis/console/package-info.java [UTF-8] Fri Mar 31 18:49:16 2017
@@ -48,7 +48,7 @@
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
- * @version 0.7
+ * @version 0.8
  * @module
  */
 package org.apache.sis.console;

Modified: sis/branches/JDK9/application/sis-console/src/test/java/org/apache/sis/console/HelpCommandTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK9/application/sis-console/src/test/java/org/apache/sis/console/HelpCommandTest.java?rev=1789729&r1=1789728&r2=1789729&view=diff
==============================================================================
--- sis/branches/JDK9/application/sis-console/src/test/java/org/apache/sis/console/HelpCommandTest.java [UTF-8] (original)
+++ sis/branches/JDK9/application/sis-console/src/test/java/org/apache/sis/console/HelpCommandTest.java [UTF-8] Fri Mar 31 18:49:16 2017
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.console;
 
+import java.io.IOException;
 import org.apache.sis.test.DependsOn;
 import org.apache.sis.test.TestCase;
 import org.junit.Test;
@@ -28,7 +29,7 @@ import static org.junit.Assert.*;
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
- * @version 0.3
+ * @version 0.8
  * @module
  */
 @DependsOn(CommandRunnerTest.class)
@@ -37,9 +38,10 @@ public final strictfp class HelpCommandT
      * Tests the sub-command without option.
      *
      * @throws InvalidOptionException should never happen.
+     * @throws IOException should never happen, because we are writing to a {@code PrintWriter}.
      */
     @Test
-    public void testDefault() throws InvalidOptionException {
+    public void testDefault() throws InvalidOptionException, IOException {
         final HelpCommand test = new HelpCommand(0, CommandRunner.TEST);
         test.run();
         final String result = test.outputBuffer.toString();
@@ -57,9 +59,10 @@ public final strictfp class HelpCommandT
      * Shall contain only a subset of {@link #testDefault()}.
      *
      * @throws InvalidOptionException should never happen.
+     * @throws IOException should never happen, because we are writing to a {@code PrintWriter}.
      */
     @Test
-    public void testHelp() throws InvalidOptionException {
+    public void testHelp() throws InvalidOptionException, IOException {
         final HelpCommand test = new HelpCommand(0, CommandRunner.TEST, "--help");
         test.help("help");
         final String result = test.outputBuffer.toString();
@@ -76,9 +79,10 @@ public final strictfp class HelpCommandT
      * Tests the sub-command with the {@code --locale en} option.
      *
      * @throws InvalidOptionException should never happen.
+     * @throws IOException should never happen, because we are writing to a {@code PrintWriter}.
      */
     @Test
-    public void testEnglishLocale() throws InvalidOptionException {
+    public void testEnglishLocale() throws InvalidOptionException, IOException {
         final HelpCommand test = new HelpCommand(0, CommandRunner.TEST, "--help", "--locale", "en");
         test.help("help");
         final String result = test.outputBuffer.toString();
@@ -90,9 +94,10 @@ public final strictfp class HelpCommandT
      * Tests the sub-command with the {@code --locale fr} option.
      *
      * @throws InvalidOptionException should never happen.
+     * @throws IOException should never happen, because we are writing to a {@code PrintWriter}.
      */
     @Test
-    public void testFrenchLocale() throws InvalidOptionException {
+    public void testFrenchLocale() throws InvalidOptionException, IOException {
         final HelpCommand test = new HelpCommand(0, CommandRunner.TEST, "--help", "--locale", "fr");
         test.help("help");
         final String result = test.outputBuffer.toString();

Modified: sis/branches/JDK9/core/pom.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/pom.xml?rev=1789729&r1=1789728&r2=1789729&view=diff
==============================================================================
--- sis/branches/JDK9/core/pom.xml (original)
+++ sis/branches/JDK9/core/pom.xml Fri Mar 31 18:49:16 2017
@@ -190,6 +190,7 @@
     <module>sis-utility</module>
     <module>sis-metadata</module>
     <module>sis-referencing</module>
+    <module>sis-referencing-by-identifiers</module>
     <module>sis-feature</module>
   </modules>
 

Modified: sis/branches/JDK9/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureFormat.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureFormat.java?rev=1789729&r1=1789728&r2=1789729&view=diff
==============================================================================
--- sis/branches/JDK9/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureFormat.java [UTF-8] (original)
+++ sis/branches/JDK9/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureFormat.java [UTF-8] Fri Mar 31 18:49:16 2017
@@ -73,9 +73,11 @@ import org.apache.sis.util.Characters;
  *   └────────────┴─────────┴─────────────┴───────────┘
  * }</div>
  *
- * <div class="warning"><b>Limitation:</b>
- * Current implementation supports only formatting, not parsing.
- * </div>
+ * <p><b>Limitations:</b></p>
+ * <ul>
+ *   <li>The current implementation can only format features — parsing is not yet implemented.</li>
+ *   <li>{@code FeatureFormat}, like most {@code java.text.Format} subclasses, is not thread-safe.</li>
+ * </ul>
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.5
@@ -501,7 +503,7 @@ header: for (int i=0; ; i++) {
     @Override
     public Object parse(final CharSequence text, final ParsePosition pos) throws ParseException {
         throw new ParseException(Errors.getResources(displayLocale)
-                .getString(Errors.Keys.UnsupportedOperation_1, "parse"), 0);
+                .getString(Errors.Keys.UnsupportedOperation_1, "parse"), pos.getIndex());
     }
 
     /**

Modified: sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataTypes.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataTypes.java?rev=1789729&r1=1789728&r2=1789729&view=diff
==============================================================================
--- sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataTypes.java [UTF-8] (original)
+++ sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataTypes.java [UTF-8] Fri Mar 31 18:49:16 2017
@@ -17,8 +17,24 @@
 package org.apache.sis.internal.metadata;
 
 import java.util.Collection;
+import org.opengis.metadata.Metadata;
+import org.opengis.metadata.content.Band;
+import org.opengis.metadata.content.ImageDescription;
+import org.opengis.metadata.lineage.ProcessStep;
+import org.opengis.metadata.lineage.Source;
 import org.apache.sis.internal.jaxb.TypeRegistration;
+import org.apache.sis.internal.jaxb.gmi.LE_ProcessStep;
+import org.apache.sis.internal.jaxb.gmi.LE_Source;
+import org.apache.sis.internal.jaxb.gmi.MI_Band;
+import org.apache.sis.internal.jaxb.gmi.MI_CoverageDescription;
+import org.apache.sis.internal.jaxb.gmi.MI_Georectified;
+import org.apache.sis.internal.jaxb.gmi.MI_Georeferenceable;
+import org.apache.sis.internal.jaxb.gmi.MI_ImageDescription;
+import org.apache.sis.internal.jaxb.gmi.MI_Metadata;
 import org.apache.sis.metadata.iso.DefaultMetadata;
+import org.opengis.metadata.content.CoverageDescription;
+import org.opengis.metadata.spatial.Georectified;
+import org.opengis.metadata.spatial.Georeferenceable;
 
 
 /**
@@ -27,7 +43,7 @@ import org.apache.sis.metadata.iso.Defau
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
- * @version 0.3
+ * @version 0.8
  * @module
  */
 public final class MetadataTypes extends TypeRegistration {
@@ -35,7 +51,45 @@ public final class MetadataTypes extends
      * Adds to the given collection the metadata types that should be given to the initial JAXB context.
      */
     @Override
-    public void getTypes(final Collection<Class<?>> addTo) {
+    protected void getTypes(final Collection<Class<?>> addTo) {
         addTo.add(DefaultMetadata.class);
     }
+
+    /**
+     * Notifies that the {@code sis-metadata} module can marshal arbitrary implementations of some metadata interfaces.
+     *
+     * @return {@code true}.
+     */
+    @Override
+    protected boolean canMarshalInterfaces() {
+        return true;
+    }
+
+    /**
+     * Ensures that the given value is an instance of a class that can be marshalled, or returns {@code null}
+     * if the type of the given value is not handled by this method. Current implementation handles all types
+     * that may need to be put in the ISO 19115-3 namespace; we have to do that ourself because those classes
+     * are not public. Other types may be added if needed, but we do not want to handle too many of them (for
+     * performance reasons). However the list or recognized types shall contain at least {@link Metadata}.
+     *
+     * @param  value  the value to marshal.
+     * @return the given value as a type that can be marshalled, or {@code null}.
+     */
+    @Override
+    public Object toImplementation(final Object value) {
+        /*
+         * Classes that are most likely to be used should be checked first.  If a type is a specialization
+         * of another type (e.g. ImageDescription extends CoverageDescription), the specialized type shall
+         * be before the more generic type.
+         */
+        if (value instanceof Metadata)            return MI_Metadata           .castOrCopy((Metadata)            value);
+        if (value instanceof ImageDescription)    return MI_ImageDescription   .castOrCopy((ImageDescription)    value);
+        if (value instanceof CoverageDescription) return MI_CoverageDescription.castOrCopy((CoverageDescription) value);
+        if (value instanceof Georectified)        return MI_Georectified       .castOrCopy((Georectified)        value);
+        if (value instanceof Georeferenceable)    return MI_Georeferenceable   .castOrCopy((Georeferenceable)    value);
+        if (value instanceof Band)                return MI_Band               .castOrCopy((Band)                value);
+        if (value instanceof ProcessStep)         return LE_ProcessStep        .castOrCopy((ProcessStep)         value);
+        if (value instanceof Source)              return LE_Source             .castOrCopy((Source)              value);
+        return null;
+    }
 }

Modified: sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ReferencingServices.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ReferencingServices.java?rev=1789729&r1=1789728&r2=1789729&view=diff
==============================================================================
--- sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ReferencingServices.java [UTF-8] (original)
+++ sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ReferencingServices.java [UTF-8] Fri Mar 31 18:49:16 2017
@@ -19,9 +19,12 @@ package org.apache.sis.internal.metadata
 import java.util.Map;
 import java.util.Collections;
 import java.util.Locale;
+import java.util.TimeZone;
+import java.text.Format;
 import javax.measure.Unit;
 import javax.measure.quantity.Length;
 import org.opengis.geometry.Envelope;
+import org.opengis.geometry.DirectPosition;
 import org.opengis.metadata.Identifier;
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.referencing.IdentifiedObject;
@@ -70,7 +73,7 @@ import org.apache.sis.util.Deprecable;
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
- * @version 0.7
+ * @version 0.8
  * @module
  */
 public class ReferencingServices extends OptionalDependency {
@@ -275,6 +278,20 @@ public class ReferencingServices extends
         throw moduleNotFound();
     }
 
+    /**
+     * Creates a two-dimensional geographic position associated to the default geographic CRS.
+     * Axis order is (longitude, latitude).
+     *
+     * @param  λ  the longitude value.
+     * @param  φ  the latitude value.
+     * @return the direct position for the given geographic coordinate.
+     *
+     * @since 0.8
+     */
+    public DirectPosition geographic(final double λ, final double φ) {
+        throw moduleNotFound();
+    }
+
 
 
 
@@ -503,6 +520,19 @@ public class ReferencingServices extends
     }
 
     /**
+     * Creates a format for {@link DirectPosition} instances.
+     *
+     * @param  locale    the locale for the new {@code Format}, or {@code null} for {@code Locale.ROOT}.
+     * @param  timezone  the timezone, or {@code null} for UTC.
+     * @return a {@link org.apache.sis.geometry.CoordinateFormat}.
+     *
+     * @since 0.8
+     */
+    public Format createCoordinateFormat(final Locale locale, final TimeZone timezone) {
+        throw moduleNotFound();
+    }
+
+    /**
      * Returns an axis direction from a pole along a meridian.
      * The given meridian is usually, but not necessarily, relative to the Greenwich meridian.
      *

Modified: sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ServicesForUtility.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ServicesForUtility.java?rev=1789729&r1=1789728&r2=1789729&view=diff
==============================================================================
--- sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ServicesForUtility.java [UTF-8] (original)
+++ sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ServicesForUtility.java [UTF-8] Fri Mar 31 18:49:16 2017
@@ -16,9 +16,11 @@
  */
 package org.apache.sis.internal.metadata;
 
+import java.text.Format;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Locale;
+import java.util.TimeZone;
 import javax.sql.DataSource;
 import org.opengis.metadata.Identifier;
 import org.opengis.metadata.citation.Role;
@@ -48,7 +50,7 @@ import static java.util.Collections.sing
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.6
- * @version 0.7
+ * @version 0.8
  * @module
  */
 public final class ServicesForUtility extends MetadataServices {
@@ -258,4 +260,18 @@ public final class ServicesForUtility ex
         }
         return ReferencingServices.getInstance().getInformation(key, locale);
     }
+
+    /**
+     * Creates a format for {@link org.opengis.geometry.DirectPosition} instances.
+     *
+     * @param  locale    the locale for the new {@code Format}, or {@code null} for {@code Locale.ROOT}.
+     * @param  timezone  the timezone, or {@code null} for UTC.
+     * @return a {@link org.apache.sis.geometry.CoordinateFormat}.
+     *
+     * @since 0.8
+     */
+    @Override
+    public Format createCoordinateFormat(final Locale locale, final TimeZone timezone) {
+        return ReferencingServices.getInstance().createCoordinateFormat(locale, timezone);
+    }
 }

Modified: sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/Initializer.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/Initializer.java?rev=1789729&r1=1789728&r2=1789729&view=diff
==============================================================================
--- sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/Initializer.java [UTF-8] (original)
+++ sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/Initializer.java [UTF-8] Fri Mar 31 18:49:16 2017
@@ -273,7 +273,7 @@ public abstract class Initializer {
                  */
                 path   = path.normalize();
                 create = !Files.exists(path);
-                source = forJavaDB(path.toString());
+                source = forJavaDB(path.toString().replace(path.getFileSystem().getSeparator(), "/"));
             } else if (home != null) {
                 final Path path = Paths.get(home);
                 create = !Files.exists(path.resolve(DATABASE)) && Files.isDirectory(path);

Modified: sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/ScriptRunner.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/ScriptRunner.java?rev=1789729&r1=1789728&r2=1789729&view=diff
==============================================================================
--- sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/ScriptRunner.java [UTF-8] (original)
+++ sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/ScriptRunner.java [UTF-8] Fri Mar 31 18:49:16 2017
@@ -242,6 +242,7 @@ public class ScriptRunner implements Aut
     /**
      * The regular expression to use for building {@link #statementsToSkip}.
      * At most one of {@code regexOfStmtToSkip} and {@code statementsToSkip} shall be non-null.
+     * Both fields may be null if there is no statement to skip.
      */
     private StringBuilder regexOfStmtToSkip;
 
@@ -658,13 +659,15 @@ parseLine:  while (pos < length) {
      * @return whether the given SQL statement is supported by the database engine.
      */
     protected boolean isSupported(final CharSequence sql) {
-        if (regexOfStmtToSkip == null) {
+        if (statementsToSkip != null) {
             return !statementsToSkip.reset(sql).matches();
-        } else {
+        } else if (regexOfStmtToSkip != null) {
             // We do not use Pattern.CASE_INSENTITIVE for performance reasons.
             statementsToSkip = Pattern.compile(regexOfStmtToSkip.toString(), Pattern.DOTALL).matcher(sql);
             regexOfStmtToSkip = null;
             return !statementsToSkip.matches();
+        } else {
+            return true;
         }
     }
 



Mime
View raw message