Author: desruisseaux Date: Thu Oct 13 13:50:40 2016 New Revision: 1764677 URL: http://svn.apache.org/viewvc?rev=1764677&view=rev Log: Merge from JDK8 branch the replacement of JSR-275 dependency by JSR-363. Tests are temporarily disabled.
Added: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/UnitFormat.java - copied, changed from r1764673, sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/UnitFormat.java Modified: sis/branches/JDK7/ (props changed) sis/branches/JDK7/application/sis-console/src/main/java/org/apache/sis/console/TransformCommand.java sis/branches/JDK7/core/pom.xml sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AttributeTypeBuilder.java sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ServiceParameter.java sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/AxisDirections.java sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/NameMeaning.java sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ReferencingServices.java sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/TransformationAccuracy.java sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/VerticalDatumTypes.java sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/AbstractParser.java sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Convention.java sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/ElementKind.java sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/GeodeticObjectParser.java sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/MathTransformParser.java sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/VerticalInfo.java sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/WKTFormat.java sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultBand.java sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultSampleDimension.java sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultMedium.java sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/Extents.java sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultQuantitativeResult.java sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/io/wkt/FormatterTest.java sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableFormatTest.java sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/ExtentsTest.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractEnvelope.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_OperationMethod.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_OperationParameter.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/SecondDefiningParameter.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/EPSGParameterDomain.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/GeodeticObjectBuilder.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Legacy.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/PositionalAccuracyConstant.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ReferencingUtilities.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ServicesForMetadata.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AbstractProvider.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/DatumShiftGridCompressed.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/DatumShiftGridFile.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/FranceGeocentricInterpolation.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeocentricAffine.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeocentricAffineBetweenGeographic.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeographicOffsets.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeographicToGeocentric.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalMichigan.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MapProjection.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Molodensky.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/NADCON.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/NTv2.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicNorth.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicSouth.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercator.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValueGroup.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionParameters.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterTableRow.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameters.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/UnmodifiableParameterValue.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/Verifier.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/package-info.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/IdentifiedObjects.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/StandardDefinitions.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeodeticCRS.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultProjectedCRS.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultTemporalCRS.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AxesConvention.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AxisFilter.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/CoordinateSystems.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultAffineCS.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCylindricalCS.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCS.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultLinearCS.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultPolarCS.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultSphericalCS.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultTimeCS.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultVerticalCS.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DirectionAlongMeridian.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/Normalizer.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/package-info.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DatumShiftGrid.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/Sphere.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/package-info.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/AuthorityFactoryProxy.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/CommonAuthorityFactory.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticAuthorityFactory.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticObjectFactory.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/BursaWolfInfo.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/TableInfo.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationFinder.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/InverseOperationMethod.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/MathTransformContext.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ContextualParameter.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CoordinateSystemTransform.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DatumShiftTransform.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/EllipsoidToCentricTransform.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedGeocentricTransform.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedMolodenskyTransform.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedTransform.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedTransform2D.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MathTransformProvider.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MolodenskyFormula.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MolodenskyTransform.java sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/package-info.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/jaxb/referencing/CC_OperationParameterGroupTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/jaxb/referencing/SecondDefiningParameterTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/metadata/AxisDirectionsTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/ReferencingUtilitiesTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/GeographicOffsetsTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/LongitudeRotationTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/NADCONTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/NTv2Test.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/PoleRotationMock.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/SeismicBinGridMock.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/TopocentricConversionMock.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/io/wkt/GeodeticObjectParserTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/io/wkt/WKTFormatTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterDescriptorTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterBuilderTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterFormatTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterMarshallingTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParametersTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticObjectVerifier.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultDerivedCRSTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultGeocentricCRSTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultGeographicCRSTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/HardCodedCRS.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/AbstractCSTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/CoordinateSystemsTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCartesianCSTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCompoundCSTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxisTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCylindricalCSTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCSTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultPolarCSTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedAxes.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedCS.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/NormalizerTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultEllipsoidTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultGeodeticDatumTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultPrimeMeridianTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/GeodeticDatumMock.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/HardCodedDatum.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/PrimeMeridianMock.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/AuthorityFactoryMock.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/CommonAuthorityFactoryTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GeodeticObjectFactoryTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactoryTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGFactoryTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/CoordinateOperationFinderTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/CoordinateOperationRegistryTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultConversionTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactoryTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/SingleOperationMarshallingTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ObliqueStereographicTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CoordinateSystemTransformTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/EllipsoidToCentricTransformTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/TransformSeparatorTest.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/ReferencingAssert.java sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/integration/MetadataTest.java sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/StringConverter.java sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Distance.java sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Measure.java sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/UnitAdapter.java sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/Measure.java sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/MeasureList.java sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/util/PatchedUnitFormat.java sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/util/XPaths.java sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/io/CompoundFormat.java sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/MeasurementRange.java sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/Range.java sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/RangeFormat.java sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/SexagesimalConverter.java sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/UnitsMap.java sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/package-info.java sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/Static.java sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/package-info.java sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/xml/ValueConverter.java sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/converter/StringConverterTest.java sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/jaxb/gml/MeasureTest.java sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/measure/MeasurementRangeTest.java sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/measure/RangeFormatTest.java sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/measure/SexagesimalConverterTest.java sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/measure/UnitsTest.java sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/mock/CoordinateSystemAxisMock.java sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/mock/VerticalCRSMock.java sis/branches/JDK7/ide-project/NetBeans/nbproject/project.properties sis/branches/JDK7/pom.xml sis/branches/JDK7/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/LandsatReader.java sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/Decoder.java sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/ChannelDecoder.java sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/MetadataReader.java sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/Store.java sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/TimeEncoding.java sis/branches/JDK7/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/wkt/StoreTest.java Propchange: sis/branches/JDK7/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Oct 13 13:50:40 2016 @@ -1,4 +1,4 @@ /sis/branches/Android:1430670-1480699 /sis/branches/JDK6:1394913-1508480 -/sis/branches/JDK8:1584960-1763833 +/sis/branches/JDK8:1584960-1764673 /sis/trunk:1394364-1508466,1519089-1519674 Modified: sis/branches/JDK7/application/sis-console/src/main/java/org/apache/sis/console/TransformCommand.java URL: http://svn.apache.org/viewvc/sis/branches/JDK7/application/sis-console/src/main/java/org/apache/sis/console/TransformCommand.java?rev=1764677&r1=1764676&r2=1764677&view=diff ============================================================================== --- sis/branches/JDK7/application/sis-console/src/main/java/org/apache/sis/console/TransformCommand.java [UTF-8] (original) +++ sis/branches/JDK7/application/sis-console/src/main/java/org/apache/sis/console/TransformCommand.java [UTF-8] Thu Oct 13 13:50:40 2016 @@ -26,10 +26,8 @@ import java.io.FileInputStream; import java.io.LineNumberReader; import java.io.InputStreamReader; import java.text.NumberFormat; -import javax.measure.unit.Unit; -import javax.measure.unit.NonSI; -import javax.measure.unit.SI; -import javax.measure.converter.ConversionException; +import javax.measure.Unit; +import javax.measure.IncommensurableException; import org.opengis.metadata.Metadata; import org.opengis.metadata.extent.Extent; import org.opengis.metadata.extent.GeographicBoundingBox; @@ -489,9 +487,9 @@ final class TransformCommand extends Met /** * Computes the suggested precision for printing values in the given units. * - * @throws ConversionException should never happen. + * @throws IncommensurableException should never happen. */ - private void computeNumFractionDigits(final CoordinateSystem cs) throws ConversionException { + private void computeNumFractionDigits(final CoordinateSystem cs) throws IncommensurableException { final int dimension = cs.getDimension(); numFractionDigits = new int[dimension]; thresholdForScientificNotation = new double[dimension]; @@ -501,10 +499,10 @@ final class TransformCommand extends Met double precision; if (Units.isLinear(unit)) { precision = Formulas.LINEAR_TOLERANCE; - source = SI.METRE; + source = Units.METRE; } else if (Units.isAngular(unit)) { precision = Formulas.ANGULAR_TOLERANCE; - source = NonSI.DEGREE_ANGLE; + source = Units.DEGREE; } else { precision = 0.001; source = unit; Modified: sis/branches/JDK7/core/pom.xml URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/pom.xml?rev=1764677&r1=1764676&r2=1764677&view=diff ============================================================================== --- sis/branches/JDK7/core/pom.xml (original) +++ sis/branches/JDK7/core/pom.xml Thu Oct 13 13:50:40 2016 @@ -166,6 +166,14 @@ =========================================================== --> <dependencies> <dependency> + <groupId>javax.measure</groupId> + <artifactId>unit-api</artifactId> + </dependency> + <dependency> + <groupId>tec.units</groupId> + <artifactId>unit-ri</artifactId> + </dependency> + <dependency> <groupId>org.opengis</groupId> <artifactId>geoapi-pending</artifactId> </dependency> Modified: sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AttributeTypeBuilder.java URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AttributeTypeBuilder.java?rev=1764677&r1=1764676&r2=1764677&view=diff ============================================================================== --- sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AttributeTypeBuilder.java [UTF-8] (original) +++ sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AttributeTypeBuilder.java [UTF-8] Thu Oct 13 13:50:40 2016 @@ -448,7 +448,7 @@ public final class AttributeTypeBuilder< * * <p>Usage example:</p> * {@preformat java - * attribute.addCharacteristic(Unit.class).setName("Unit of measurement").setDefaultValue(SI.CELSIUS); + * attribute.addCharacteristic(Unit.class).setName("Unit of measurement").setDefaultValue(Units.CELSIUS); * } * * The default characteristic name is the name of the given type, but callers should invoke one Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ServiceParameter.java URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ServiceParameter.java?rev=1764677&r1=1764676&r2=1764677&view=diff ============================================================================== --- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ServiceParameter.java [UTF-8] (original) +++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ServiceParameter.java [UTF-8] Thu Oct 13 13:50:40 2016 @@ -21,7 +21,7 @@ import javax.xml.bind.annotation.XmlType import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.measure.unit.Unit; +import javax.measure.Unit; import org.opengis.util.TypeName; import org.opengis.util.MemberName; import org.opengis.util.GenericName; Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/AxisDirections.java URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/AxisDirections.java?rev=1764677&r1=1764676&r2=1764677&view=diff ============================================================================== --- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/AxisDirections.java [UTF-8] (original) +++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/AxisDirections.java [UTF-8] Thu Oct 13 13:50:40 2016 @@ -18,7 +18,7 @@ package org.apache.sis.internal.metadata import java.util.Map; import java.util.HashMap; -import javax.measure.unit.Unit; +import javax.measure.Unit; import javax.measure.quantity.Angle; import org.opengis.annotation.UML; import org.opengis.referencing.cs.AxisDirection; Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/NameMeaning.java URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/NameMeaning.java?rev=1764677&r1=1764676&r2=1764677&view=diff ============================================================================== --- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/NameMeaning.java [UTF-8] (original) +++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/NameMeaning.java [UTF-8] Thu Oct 13 13:50:40 2016 @@ -19,7 +19,7 @@ package org.apache.sis.internal.metadata import java.util.Map; import java.util.HashMap; import java.util.Locale; -import javax.measure.unit.Unit; +import javax.measure.Unit; import org.opengis.parameter.*; import org.opengis.referencing.*; import org.opengis.referencing.cs.*; Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ReferencingServices.java URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ReferencingServices.java?rev=1764677&r1=1764676&r2=1764677&view=diff ============================================================================== --- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ReferencingServices.java [UTF-8] (original) +++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ReferencingServices.java [UTF-8] Thu Oct 13 13:50:40 2016 @@ -19,7 +19,7 @@ package org.apache.sis.internal.metadata import java.util.Map; import java.util.Collections; import java.util.Locale; -import javax.measure.unit.Unit; +import javax.measure.Unit; import javax.measure.quantity.Length; import org.opengis.geometry.Envelope; import org.opengis.metadata.Identifier; Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/TransformationAccuracy.java URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/TransformationAccuracy.java?rev=1764677&r1=1764676&r2=1764677&view=diff ============================================================================== --- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/TransformationAccuracy.java [UTF-8] (original) +++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/TransformationAccuracy.java [UTF-8] Thu Oct 13 13:50:40 2016 @@ -17,11 +17,11 @@ package org.apache.sis.internal.metadata; import java.util.Collections; -import javax.measure.unit.SI; import org.opengis.util.RecordType; import org.opengis.util.InternationalString; import org.opengis.metadata.quality.PositionalAccuracy; import org.opengis.metadata.quality.EvaluationMethodType; +import org.apache.sis.measure.Units; import org.apache.sis.metadata.iso.quality.DefaultQuantitativeResult; import org.apache.sis.metadata.iso.quality.DefaultAbsoluteExternalPositionalAccuracy; import org.apache.sis.util.collection.WeakValueHashMap; @@ -35,7 +35,7 @@ import org.apache.sis.util.Static; * * @author Martin Desruisseaux (Geomatys) * @since 0.7 - * @version 0.7 + * @version 0.8 * @module */ public final class TransformationAccuracy extends Static { @@ -78,7 +78,7 @@ public final class TransformationAccurac final DefaultQuantitativeResult result = new DefaultQuantitativeResult(); result.setValues(Collections.singletonList(record)); - result.setValueUnit(SI.METRE); // In metres by definition in the EPSG database. + result.setValueUnit(Units.METRE); // In metres by definition in the EPSG database. result.setValueType(TYPE); final DefaultAbsoluteExternalPositionalAccuracy element = Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/VerticalDatumTypes.java URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/VerticalDatumTypes.java?rev=1764677&r1=1764676&r2=1764677&view=diff ============================================================================== --- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/VerticalDatumTypes.java [UTF-8] (original) +++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/VerticalDatumTypes.java [UTF-8] Thu Oct 13 13:50:40 2016 @@ -17,7 +17,7 @@ package org.apache.sis.internal.metadata; import java.util.Collection; -import javax.measure.unit.Unit; +import javax.measure.Unit; import org.opengis.util.CodeList; import org.opengis.util.GenericName; import org.opengis.referencing.datum.VerticalDatumType; Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/AbstractParser.java URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/AbstractParser.java?rev=1764677&r1=1764676&r2=1764677&view=diff ============================================================================== --- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/AbstractParser.java [UTF-8] (original) +++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/AbstractParser.java [UTF-8] Thu Oct 13 13:50:40 2016 @@ -29,14 +29,15 @@ import java.text.ParseException; import java.util.logging.Level; import java.util.logging.Logger; import java.util.logging.LogRecord; -import javax.measure.unit.Unit; -import javax.measure.unit.UnitFormat; +import javax.measure.Unit; +import javax.measure.format.ParserException; import org.opengis.util.FactoryException; import org.opengis.util.InternationalString; import org.apache.sis.internal.system.Loggers; import org.apache.sis.internal.util.LocalizedParseException; import org.apache.sis.internal.util.StandardDateFormat; import org.apache.sis.measure.Units; +import org.apache.sis.measure.UnitFormat; import org.apache.sis.util.ArgumentChecks; import org.apache.sis.util.CharSequences; import org.apache.sis.util.logging.Logging; @@ -58,7 +59,7 @@ import static org.apache.sis.util.Argume * @author Rémi Eve (IRD) * @author Martin Desruisseaux (IRD, Geomatys) * @since 0.6 - * @version 0.7 + * @version 0.8 * @module */ abstract class AbstractParser implements Parser { @@ -332,26 +333,15 @@ abstract class AbstractParser implements /** * Parses the given unit symbol. */ - final Unit<?> parseUnit(final String text) throws ParseException, IllegalArgumentException { + final Unit<?> parseUnit(final String text) throws ParseException, ParserException { if (unitFormat == null) { - if (symbols.getLocale() == Locale.ROOT) { - return Units.valueOf(text); // Most common case, avoid the convolved code below. - } - unitFormat = UnitFormat.getInstance(symbols.getLocale()); - } - /* - * This convolved code tries to workaround JSR-275 limitations. - */ - try { - return (Unit<?>) unitFormat.parseObject(text); - } catch (ParseException e) { - try { - return Units.valueOf(text); - } catch (IllegalArgumentException e2) { - e.addSuppressed(e2); - throw e; + final Locale locale = symbols.getLocale(); + if (locale == Locale.ROOT) { + return Units.valueOf(text); // Most common case. } + unitFormat = UnitFormat.getInstance(locale); } + return unitFormat.parse(text); } /** Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Convention.java URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Convention.java?rev=1764677&r1=1764676&r2=1764677&view=diff ============================================================================== --- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Convention.java [UTF-8] (original) +++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Convention.java [UTF-8] Thu Oct 13 13:50:40 2016 @@ -84,7 +84,7 @@ public enum Convention { * <li>{@code Axis} element omits the {@code Order} sub-element.</li> * <li>{@code Unit} elements are less verbose:<ul> * <li>{@code Ellipsoid} and {@code VerticalExtent} elements omit the {@code LengthUnit} sub-element - * if that unit is {@link javax.measure.unit.SI#METRE}.</li> + * if that unit is {@link org.apache.sis.measure.Units#METRE}.</li> * <li>{@code Parameter} elements omit the {@code LengthUnit} sub-element * if that unit is the same than the unit of the {@code ProjectedCRS} axes.</li> * <li>{@code Parameter} and {@code PrimeMeridian} elements omit the {@code AngleUnit} sub-element Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/ElementKind.java URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/ElementKind.java?rev=1764677&r1=1764676&r2=1764677&view=diff ============================================================================== --- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/ElementKind.java [UTF-8] (original) +++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/ElementKind.java [UTF-8] Thu Oct 13 13:50:40 2016 @@ -16,7 +16,7 @@ */ package org.apache.sis.io.wkt; -import javax.measure.unit.Unit; +import javax.measure.Unit; import org.opengis.util.CodeList; import org.opengis.metadata.Identifier; import org.opengis.metadata.citation.Citation; @@ -59,7 +59,7 @@ public enum ElementKind { INTEGER, /** - * {@linkplain javax.measure.unit.Unit Units of measurement}, + * {@linkplain javax.measure.Unit Units of measurement}, * often represented by {@code UNIT[…]} elements. */ UNIT, Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java?rev=1764677&r1=1764676&r2=1764677&view=diff ============================================================================== --- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java [UTF-8] (original) +++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java [UTF-8] Thu Oct 13 13:50:40 2016 @@ -31,10 +31,8 @@ import java.text.NumberFormat; import java.text.FieldPosition; import java.lang.reflect.Array; import java.math.RoundingMode; -import javax.measure.unit.SI; -import javax.measure.unit.Unit; -import javax.measure.unit.UnitFormat; -import javax.measure.quantity.Quantity; +import javax.measure.Unit; +import javax.measure.Quantity; import org.opengis.util.InternationalString; import org.opengis.metadata.Identifier; @@ -77,6 +75,7 @@ import org.apache.sis.internal.util.Stan import org.apache.sis.internal.simple.SimpleExtent; import org.apache.sis.internal.metadata.WKTKeywords; import org.apache.sis.internal.metadata.ReferencingServices; +import org.apache.sis.measure.UnitFormat; import org.apache.sis.measure.Range; import org.apache.sis.measure.MeasurementRange; import org.apache.sis.metadata.iso.ImmutableIdentifier; @@ -229,7 +228,7 @@ public class Formatter implements Locali /** * The object to use for formatting unit symbols. */ - private final PatchedUnitFormat unitFormat; + private final UnitFormat unitFormat; /** * Dummy field position. @@ -328,10 +327,10 @@ public class Formatter implements Locali /** * Creates a new formatter instance with the specified convention, symbols and indentation. * - * @param convention The convention to use. - * @param symbols The symbols. - * @param indentation The amount of spaces to use in indentation for WKT formatting, - * or {@link WKTFormat#SINGLE_LINE} for formatting the whole WKT on a single line. + * @param convention the convention to use. + * @param symbols the symbols. + * @param indentation the amount of spaces to use in indentation for WKT formatting, + * or {@link WKTFormat#SINGLE_LINE} for formatting the whole WKT on a single line. */ public Formatter(final Convention convention, final Symbols symbols, final int indentation) { ArgumentChecks.ensureNonNull("convention", convention); @@ -345,7 +344,7 @@ public class Formatter implements Locali this.indentation = (byte) indentation; this.numberFormat = symbols.createNumberFormat(); this.dateFormat = new StandardDateFormat(symbols.getLocale()); - this.unitFormat = new PatchedUnitFormat(UnitFormat.getInstance(symbols.getLocale())); + this.unitFormat = UnitFormat.getInstance(symbols.getLocale()); this.buffer = new StringBuffer(); } @@ -362,9 +361,9 @@ public class Formatter implements Locali this.symbols = symbols; this.lineSeparator = this.symbols.lineSeparator(); this.indentation = WKTFormat.DEFAULT_INDENTATION; - this.numberFormat = numberFormat; // No clone needed. - this.dateFormat = dateFormat; // No clone needed. - this.unitFormat = new PatchedUnitFormat(unitFormat); + this.numberFormat = numberFormat; // No clone needed. + this.dateFormat = dateFormat; + this.unitFormat = unitFormat; // Do not set the buffer. It will be set by WKTFormat.format(…). } @@ -380,13 +379,13 @@ public class Formatter implements Locali * Sets the convention, authority, colors and indentation to use for formatting WKT elements. * This method does not validate the argument — validation must be done by the caller. * - * @param convention The convention, or {@code null} for the default value. - * @param authority The authority, or {@code null} for inferring it from the convention. - * @param colors The syntax coloring, or {@code null} if none. - * @param toUpperCase Whether keywords shall be converted to upper cases. - * @param longKeywords {@code -1} for short keywords, {@code +1} for long keywords or 0 for the default. - * @param indentation The amount of spaces to use in indentation for WKT formatting, - * or {@link WKTFormat#SINGLE_LINE}. + * @param convention the convention, or {@code null} for the default value. + * @param authority the authority, or {@code null} for inferring it from the convention. + * @param colors the syntax coloring, or {@code null} if none. + * @param toUpperCase whether keywords shall be converted to upper cases. + * @param longKeywords {@code -1} for short keywords, {@code +1} for long keywords or 0 for the default. + * @param indentation the amount of spaces to use in indentation for WKT formatting, + * or {@link WKTFormat#SINGLE_LINE}. */ final void configure(Convention convention, final Citation authority, final Colors colors, final byte toUpperCase, final byte longKeywords, final byte indentation) @@ -398,13 +397,13 @@ public class Formatter implements Locali this.longKeywords = longKeywords; this.indentation = indentation; this.transliterator = (convention == Convention.INTERNAL) ? Transliterator.IDENTITY : Transliterator.DEFAULT; - unitFormat.isLocaleUS = convention.usesCommonUnits; + unitFormat.setLocale(convention.usesCommonUnits ? Locale.US : Locale.ROOT); } /** * Returns the convention to use for formatting the WKT. The default is {@link Convention#WKT2}. * - * @return The convention (never {@code null}). + * @return the convention (never {@code null}). * * @see WKTFormat#setConvention(Convention) * @see FormattableObject#toString(Convention) @@ -425,7 +424,7 @@ public class Formatter implements Locali * <li>Any other user-supplied mapping.</li> * </ul> * - * @return The mapper between Java character sequences and the characters to write in WKT. + * @return the mapper between Java character sequences and the characters to write in WKT. * * @see WKTFormat#setTransliterator(Transliterator) * @@ -446,7 +445,7 @@ public class Formatter implements Locali * However if the preferred authority is OGC, then the formatted datum name will rather look like * <cite>"WGS84"</cite> (the exact string depends on the object aliases).</div> * - * @return The authority for projection and parameter names. + * @return the authority for projection and parameter names. * * @see WKTFormat#getNameAuthority() * @see org.apache.sis.referencing.IdentifiedObjects#getName(IdentifiedObject, Citation) @@ -459,7 +458,7 @@ public class Formatter implements Locali * Returns the locale to use for localizing {@link InternationalString} instances. * This is <em>not</em> the locale for formatting dates and numbers. * - * @return The locale to use for localizing international strings. + * @return the locale to use for localizing international strings. */ @Override public final Locale getLocale() { @@ -520,7 +519,7 @@ public class Formatter implements Locali * the indentation by the amount of spaces specified at construction time, * and a value of {@code -1} reduces it by the same amount. * - * @param amount +1 for increasing the indentation, or -1 for decreasing it, or 0 for no-op. + * @param amount +1 for increasing the indentation, or -1 for decreasing it, or 0 for no-op. */ public void indent(final int amount) { margin = Math.max(0, margin + indentation*amount); @@ -531,9 +530,9 @@ public class Formatter implements Locali * This method can be used by {@link FormattableObject#formatTo(Formatter)} * implementations for choosing the return value. * - * @param shortKeyword The keyword to return if the style is {@link KeywordStyle#SHORT}. - * @param longKeyword The keyword to return if the style is {@link KeywordStyle#LONG}. - * @return The short or long keyword depending on the keyword style setting. + * @param shortKeyword the keyword to return if the style is {@link KeywordStyle#SHORT}. + * @param longKeyword the keyword to return if the style is {@link KeywordStyle#LONG}. + * @return the short or long keyword depending on the keyword style setting. * * @see WKTFormat#setKeywordStyle(KeywordStyle) * @@ -566,8 +565,8 @@ public class Formatter implements Locali /** * Appends a separator if needed, then opens a new element. * - * @param newLine {@code true} for invoking {@link #newLine()} first. - * @param keyword The element keyword (e.g. {@code "DATUM"}, {@code "AXIS"}, <i>etc</i>). + * @param newLine {@code true} for invoking {@link #newLine()} first. + * @param keyword the element keyword (e.g. {@code "DATUM"}, {@code "AXIS"}, <i>etc</i>). */ private void openElement(final boolean newLine, String keyword) { if (newLine && buffer.length() != elementStart) { @@ -584,7 +583,7 @@ public class Formatter implements Locali /** * Closes the element opened by {@link #openElement(boolean, String)}. * - * @param newLine {@code true} for invoking {@link #newLine()} last. + * @param newLine {@code true} for invoking {@link #newLine()} last. */ private void closeElement(final boolean newLine) { buffer.appendCodePoint(symbols.getClosingBracket(0)); @@ -616,7 +615,7 @@ public class Formatter implements Locali * <tr><td>{@code Remarks[…]}</td> <td></td> <td>{@link ReferenceSystem}, {@link CoordinateOperation}</td></tr> * </table></blockquote> * - * @param object The formattable object to append to the WKT, or {@code null} if none. + * @param object the formattable object to append to the WKT, or {@code null} if none. */ public void append(final FormattableObject object) { if (object == null) { @@ -847,8 +846,8 @@ public class Formatter implements Locali * This is because {@code GeographicBoundingBox} does not specify the datum, so this box * is an approximative information only. * - * @param bbox The geographic bounding box to append to the WKT, or {@code null}. - * @param fractionDigits The number of fraction digits to use. The recommended value is 2. + * @param bbox the geographic bounding box to append to the WKT, or {@code null}. + * @param fractionDigits the number of fraction digits to use. The recommended value is 2. */ public void append(final GeographicBoundingBox bbox, final int fractionDigits) { if (bbox != null) { @@ -886,7 +885,7 @@ public class Formatter implements Locali final double min = range.getMinDouble(); final double max = range.getMaxDouble(); int minimumFractionDigits = Math.max(0, DecimalFunctions.fractionDigitsForDelta(max - min, false)); - int maximumFractionDigits = minimumFractionDigits + 2; // Arbitrarily allow 2 more digits. + int maximumFractionDigits = minimumFractionDigits + 2; // Arbitrarily allow 2 more digits. if (maximumFractionDigits > VERTICAL_ACCURACY) { maximumFractionDigits = VERTICAL_ACCURACY; minimumFractionDigits = 0; @@ -898,8 +897,8 @@ public class Formatter implements Locali numberFormat.setRoundingMode(RoundingMode.FLOOR); appendPreset(min); numberFormat.setRoundingMode(RoundingMode.CEILING); appendPreset(max); final Unit<?> unit = range.unit(); - if (!convention.isSimplified() || !SI.METRE.equals(unit)) { - append(unit); // Unit are optional if they are metres. + if (!convention.isSimplified() || !Units.METRE.equals(unit)) { + append(unit); // Unit are optional if they are metres. } resetColor(); closeElement(true); @@ -933,7 +932,7 @@ public class Formatter implements Locali /** * Appends the given math transform, typically (but not necessarily) in a {@code PARAM_MT[…]} element. * - * @param transform The transform object to append to the WKT, or {@code null} if none. + * @param transform the transform object to append to the WKT, or {@code null} if none. */ public void append(final MathTransform transform) { if (transform != null) { @@ -963,10 +962,10 @@ public class Formatter implements Locali * </ul> * </div> * - * @param keyword The {@linkplain KeywordCase#CAMEL_CASE camel-case} keyword. - * Example: {@code "Scope"}, {@code "Area"} or {@code "Remarks"}. - * @param text The text, or {@code null} if none. - * @param type The key of the colors to apply if syntax coloring is enabled. + * @param keyword the {@linkplain KeywordCase#CAMEL_CASE camel-case} keyword. + * Example: {@code "Scope"}, {@code "Area"} or {@code "Remarks"}. + * @param text the text, or {@code null} if none. + * @param type the key of the colors to apply if syntax coloring is enabled. */ private void appendOnNewLine(final String keyword, final InternationalString text, final ElementKind type) { ArgumentChecks.ensureNonNull("keyword", keyword); @@ -984,8 +983,8 @@ public class Formatter implements Locali * Appends a character string between quotes. * The {@linkplain Symbols#getSeparator() element separator} will be written before the text if needed. * - * @param text The string to format to the WKT, or {@code null} if none. - * @param type The key of the colors to apply if syntax coloring is enabled, or {@code null} if none. + * @param text the string to format to the WKT, or {@code null} if none. + * @param type the key of the colors to apply if syntax coloring is enabled, or {@code null} if none. */ public void append(final String text, final ElementKind type) { if (text != null) { @@ -1076,7 +1075,7 @@ public class Formatter implements Locali * (for example {@code "northEast"}). * For the WKT 1 format, this method uses the programmatic name instead (for example {@code "NORTH_EAST"}).</p> * - * @param code The code list to append to the WKT, or {@code null} if none. + * @param code the code list to append to the WKT, or {@code null} if none. */ public void append(final ControlledVocabulary code) { if (code != null) { @@ -1097,7 +1096,7 @@ public class Formatter implements Locali * Appends a date. * The {@linkplain Symbols#getSeparator() element separator} will be written before the date if needed. * - * @param date The date to append to the WKT, or {@code null} if none. + * @param date the date to append to the WKT, or {@code null} if none. */ public void append(final Date date) { if (date != null) { @@ -1110,7 +1109,7 @@ public class Formatter implements Locali * Appends a boolean value. * The {@linkplain Symbols#getSeparator() element separator} will be written before the boolean if needed. * - * @param value The boolean to append to the WKT. + * @param value the boolean to append to the WKT. */ public void append(final boolean value) { appendSeparator(); @@ -1121,7 +1120,7 @@ public class Formatter implements Locali * Appends an integer value. * The {@linkplain Symbols#getSeparator() element separator} will be written before the number if needed. * - * @param number The integer to append to the WKT. + * @param number the integer to append to the WKT. */ public void append(final long number) { appendSeparator(); @@ -1139,7 +1138,7 @@ public class Formatter implements Locali * Appends an floating point value. * The {@linkplain Symbols#getSeparator() element separator} will be written before the number if needed. * - * @param number The floating point value to append to the WKT. + * @param number the floating point value to append to the WKT. */ public void append(final double number) { appendSeparator(); @@ -1221,9 +1220,9 @@ public class Formatter implements Locali * {@linkplain Convention#WKT2 WKT 2 convention}. * * <div class="note"><b>Example:</b> - * {@code append(SI.KILOMETRE)} will append "{@code LengthUnit["km", 1000]}" to the WKT.</div> + * {@code append(Units.KILOMETRE)} will append "{@code LengthUnit["km", 1000]}" to the WKT.</div> * - * @param unit The unit to append to the WKT, or {@code null} if none. + * @param unit the unit to append to the WKT, or {@code null} if none. * * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#35">WKT 2 specification §7.4</a> */ @@ -1231,15 +1230,15 @@ public class Formatter implements Locali if (unit != null) { final boolean isSimplified = (longKeywords == 0) ? convention.isSimplified() : (longKeywords < 0); final boolean isWKT1 = convention.majorVersion() == 1; - final Unit<?> base = unit.toSI(); + final Unit<?> base = unit.getSystemUnit(); final String keyword; - if (base.equals(SI.METRE)) { + if (base.equals(Units.METRE)) { keyword = isSimplified ? WKTKeywords.Unit : WKTKeywords.LengthUnit; - } else if (base.equals(SI.RADIAN)) { + } else if (base.equals(Units.RADIAN)) { keyword = isSimplified ? WKTKeywords.Unit : WKTKeywords.AngleUnit; - } else if (base.equals(Unit.ONE)) { + } else if (base.equals(Units.ONE)) { keyword = isSimplified ? WKTKeywords.Unit : WKTKeywords.ScaleUnit; - } else if (base.equals(SI.SECOND)) { + } else if (base.equals(Units.SECOND)) { keyword = WKTKeywords.TimeUnit; // "Unit" alone is not allowed for time units according ISO 19162. } else { keyword = WKTKeywords.ParametricUnit; @@ -1294,7 +1293,7 @@ public class Formatter implements Locali * <li>Otherwise the given value is appended as a quoted text with its {@code toString()} representation.</li> * </ul> * - * @param value The value to append to the WKT, or {@code null}. + * @param value the value to append to the WKT, or {@code null}. */ public void appendAny(final Object value) { if (value == null) { @@ -1383,8 +1382,8 @@ public class Formatter implements Locali * This method is useful for {@code FormattableObject} which are wrapper around another object. * It allows to delegate the WKT formatting to the wrapped object. * - * @param other The object to format with this formatter. - * @return The value returned by {@link FormattableObject#formatTo(Formatter)}. + * @param other the object to format with this formatter. + * @return the value returned by {@link FormattableObject#formatTo(Formatter)}. * * @since 0.5 */ @@ -1401,8 +1400,8 @@ public class Formatter implements Locali * Returns the enclosing WKT element, or {@code null} if element being formatted is the root. * This method can be invoked by child elements having some aspects that depend on the enclosing element. * - * @param depth 1 for the immediate parent, 2 for the parent of the parent, <i>etc.</i> - * @return The parent element at the given depth, or {@code null}. + * @param depth 1 for the immediate parent, 2 for the parent of the parent, <i>etc.</i> + * @return the parent element at the given depth, or {@code null}. */ public FormattableObject getEnclosingElement(int depth) { ArgumentChecks.ensurePositive("depth", depth); @@ -1419,8 +1418,8 @@ public class Formatter implements Locali * The main purpose of this method is to allow {@code AXIS[…]} elements to determine if they should * inherit the unit specified by the enclosing CRS, or if they should specify their unit explicitly.</div> * - * @param depth 1 for the immediate parent, 2 for the parent of the parent, <i>etc.</i> - * @return Whether the parent element at the given depth has invoked {@code addContextualUnit(…)} at least once. + * @param depth 1 for the immediate parent, 2 for the parent of the parent, <i>etc.</i> + * @return whether the parent element at the given depth has invoked {@code addContextualUnit(…)} at least once. */ public boolean hasContextualUnit(final int depth) { ArgumentChecks.ensurePositive("depth", depth); @@ -1438,17 +1437,17 @@ public class Formatter implements Locali * If the WKT conventions are {@code WKT1_COMMON_UNITS}, then this method ignores the given unit * and returns {@code null}. See {@link Convention#WKT1_COMMON_UNITS} javadoc for more information. * - * @param <Q> The unit quantity. - * @param unit The contextual unit to add, or {@code null} if none. - * @return The previous contextual unit for quantity {@code Q}, or {@code null} if none. + * @param <Q> the unit quantity. + * @param unit the contextual unit to add, or {@code null} if none. + * @return the previous contextual unit for quantity {@code Q}, or {@code null} if none. */ @SuppressWarnings("unchecked") - public <Q extends Quantity> Unit<Q> addContextualUnit(final Unit<Q> unit) { + public <Q extends Quantity<Q>> Unit<Q> addContextualUnit(final Unit<Q> unit) { if (unit == null || convention.usesCommonUnits) { return null; } hasContextualUnit |= 1; - return (Unit<Q>) units.put(unit.toSI(), unit); + return (Unit<Q>) units.put(unit.getSystemUnit(), unit); } /** @@ -1461,15 +1460,15 @@ public class Formatter implements Locali * formatter.restoreContextualUnit(unit, previous); * } * - * @param unit The value given in argument to {@code addContextualUnit(unit)} (can be {@code null}). - * @param previous The value returned by {@code addContextualUnit(unit)} (can be {@code null}). + * @param unit the value given in argument to {@code addContextualUnit(unit)} (can be {@code null}). + * @param previous the value returned by {@code addContextualUnit(unit)} (can be {@code null}). * @throws IllegalStateException if this method has not been invoked in the pattern documented above. * * @since 0.6 */ public void restoreContextualUnit(final Unit<?> unit, final Unit<?> previous) { if (previous == null) { - if (unit != null && units.remove(unit.toSI()) != unit) { + if (unit != null && units.remove(unit.getSystemUnit()) != unit) { /* * The unit that we removed was not the expected one. Probably the user has invoked * addContextualUnit(…) again without a matching call to restoreContextualUnit(…). @@ -1481,7 +1480,7 @@ public class Formatter implements Locali } } hasContextualUnit &= ~1; - } else if (units.put(previous.toSI(), previous) != unit) { + } else if (units.put(previous.getSystemUnit(), previous) != unit) { /* * The unit that we replaced was not the expected one. Probably the user has invoked * addContextualUnit(…) again without a matching call to restoreContextualUnit(…). @@ -1498,15 +1497,15 @@ public class Formatter implements Locali * This method searches for a unit specified by {@link #addContextualUnit(Unit)} * which {@linkplain Unit#isCompatible(Unit) is compatible} with the given unit. * - * @param <Q> The quantity of the unit. - * @param unit The unit to replace by the contextual unit, or {@code null}. - * @return A contextual unit compatible with the given unit, or {@code unit} + * @param <Q> the quantity of the unit. + * @param unit the unit to replace by the contextual unit, or {@code null}. + * @return a contextual unit compatible with the given unit, or {@code unit} * (which may be null) if no contextual unit has been found. */ - public <Q extends Quantity> Unit<Q> toContextualUnit(final Unit<Q> unit) { + public <Q extends Quantity<Q>> Unit<Q> toContextualUnit(final Unit<Q> unit) { if (unit != null) { @SuppressWarnings("unchecked") - final Unit<Q> candidate = (Unit<Q>) units.get(unit.toSI()); + final Unit<Q> candidate = (Unit<Q>) units.get(unit.getSystemUnit()); if (candidate != null) { return candidate; } @@ -1548,8 +1547,8 @@ public class Formatter implements Locali * to format is more complex than what the WKT specification allows. * Applications can test {@link #isInvalidWKT()} later for checking WKT validity. * - * @param unformattable The object that can not be formatted, - * @param cause The cause for the failure to format, or {@code null} if the cause is not an exception. + * @param unformattable the object that can not be formatted, + * @param cause the cause for the failure to format, or {@code null} if the cause is not an exception. */ public void setInvalidWKT(final IdentifiedObject unformattable, final Exception cause) { ArgumentChecks.ensureNonNull("unformattable", unformattable); @@ -1566,8 +1565,8 @@ public class Formatter implements Locali * This method can be used as an alternative to {@link #setInvalidWKT(IdentifiedObject, Exception)} when the * problematic object is not an instance of {@code IdentifiedObject}. * - * @param unformattable The class of the object that can not be formatted, - * @param cause The cause for the failure to format, or {@code null} if the cause is not an exception. + * @param unformattable the class of the object that can not be formatted, + * @param cause the cause for the failure to format, or {@code null} if the cause is not an exception. */ public void setInvalidWKT(final Class<?> unformattable, final Exception cause) { ArgumentChecks.ensureNonNull("unformattable", unformattable); @@ -1643,7 +1642,7 @@ public class Formatter implements Locali /** * Returns the WKT formatted by this object. * - * @return The WKT formatted by this formatter. + * @return the WKT formatted by this formatter. */ public String toWKT() { return buffer.toString(); @@ -1652,7 +1651,7 @@ public class Formatter implements Locali /** * Returns a string representation of this formatter for debugging purpose. * - * @return A string representation of this formatter. + * @return a string representation of this formatter. */ @Debug @Override