Modified: sis/branches/JDK9/core/sis-feature/src/main/java/org/apache/sis/feature/StringJoinOperation.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-feature/src/main/java/org/apache/sis/feature/StringJoinOperation.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-feature/src/main/java/org/apache/sis/feature/StringJoinOperation.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-feature/src/main/java/org/apache/sis/feature/StringJoinOperation.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -375,7 +375,7 @@ final class StringJoinOperation extends /* * Empty strings are considered as null values for consistency with StringJoinOperation.format(…). * If we have more values than expected, continue the parsing but without storing the values. - * The intend is to get the correct count of values for error reporting. + * The intent is to get the correct count of values for error reporting. */ if (!element.isEmpty() && count < values.length) try { values[count] = converters[count].apply(element);
Modified: sis/branches/JDK9/core/sis-feature/src/main/java/org/apache/sis/feature/Validator.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-feature/src/main/java/org/apache/sis/feature/Validator.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-feature/src/main/java/org/apache/sis/feature/Validator.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-feature/src/main/java/org/apache/sis/feature/Validator.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -75,7 +75,7 @@ final class Validator { * a new {@link DefaultDomainConsistency} instance with the measure identification set to the property name. * * <div class="note"><b>Note:</b> - * setting {@code measureIdentification} to the property name may look like a departure from ISO intend, + * setting {@code measureIdentification} to the property name may look like a departure from ISO intent, * since the former should be an identification of the <em>quality measurement</em> rather then the measure itself. * (setting {@code measureDescription} to {@code type.getDescription()} would probably be wrong for that reason). * However {@code measureIdentification} is only an identifier, not a full description of the quality measurement Modified: sis/branches/JDK9/core/sis-feature/src/main/java/org/apache/sis/feature/builder/OperationWrapper.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-feature/src/main/java/org/apache/sis/feature/builder/OperationWrapper.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-feature/src/main/java/org/apache/sis/feature/builder/OperationWrapper.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-feature/src/main/java/org/apache/sis/feature/builder/OperationWrapper.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -67,11 +67,11 @@ final class OperationWrapper extends Pro /** * Do not allow modifications. */ - @Override public TypeBuilder setName (GenericName name) {throw readOnly();} - @Override public TypeBuilder setDefinition (CharSequence definition) {throw readOnly();} - @Override public TypeBuilder setDesignation(CharSequence designation) {throw readOnly();} - @Override public TypeBuilder setDescription(CharSequence description) {throw readOnly();} - @Override public TypeBuilder setDeprecated (boolean deprecated) {throw readOnly();} + @Override public PropertyTypeBuilder setName (GenericName name) {throw readOnly();} + @Override public PropertyTypeBuilder setDefinition (CharSequence definition) {throw readOnly();} + @Override public PropertyTypeBuilder setDesignation(CharSequence designation) {throw readOnly();} + @Override public PropertyTypeBuilder setDescription(CharSequence description) {throw readOnly();} + @Override public PropertyTypeBuilder setDeprecated (boolean deprecated) {throw readOnly();} /** * Returns the exception to be thrown for read-only wrapper. Modified: sis/branches/JDK9/core/sis-feature/src/main/java/org/apache/sis/feature/builder/PropertyTypeBuilder.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-feature/src/main/java/org/apache/sis/feature/builder/PropertyTypeBuilder.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-feature/src/main/java/org/apache/sis/feature/builder/PropertyTypeBuilder.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-feature/src/main/java/org/apache/sis/feature/builder/PropertyTypeBuilder.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -41,7 +41,7 @@ import org.opengis.feature.FeatureAssoci * * @author Johann Sorel (Geomatys) * @author Martin Desruisseaux (Geomatys) - * @version 0.8 + * @version 1.0 * @since 0.8 * @module */ @@ -105,6 +105,42 @@ public abstract class PropertyTypeBuilde } /** + * Sets the {@code PropertyType} name as a generic name. + * See {@linkplain TypeBuilder#setName(GenericName) the parent class} for more information. + * + * @return {@code this} for allowing method calls chaining. + */ + @Override + public PropertyTypeBuilder setName(final GenericName name) { + super.setName(name); + return this; + } + + /** + * Sets the {@code PropertyType} name as a simple string (local name). + * See {@linkplain TypeBuilder#setName(CharSequence) the parent class} for more information. + * + * @return {@code this} for allowing method calls chaining. + */ + @Override + public PropertyTypeBuilder setName(final CharSequence localPart) { + super.setName(localPart); + return this; + } + + /** + * Sets the {@code PropertyType} name as a string in the given scope. + * See {@linkplain TypeBuilder#setName(CharSequence...) the parent class} for more information. + * + * @return {@code this} for allowing method calls chaining. + */ + @Override + public PropertyTypeBuilder setName(final CharSequence... components) { + super.setName(components); + return this; + } + + /** * Returns the minimum number of property values. * The returned value is greater than or equal to zero. * @@ -177,6 +213,42 @@ public abstract class PropertyTypeBuilde return this; } + /** + * {@inheritDoc} + */ + @Override + public PropertyTypeBuilder setDefinition(final CharSequence definition) { + super.setDefinition(definition); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public PropertyTypeBuilder setDesignation(final CharSequence designation) { + super.setDesignation(designation); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public PropertyTypeBuilder setDescription(final CharSequence description) { + super.setDescription(description); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public PropertyTypeBuilder setDeprecated(final boolean deprecated) { + super.setDeprecated(deprecated); + return this; + } + /** * Returns {@code true} if {@link AttributeRole#IDENTIFIER_COMPONENT} has been associated to this property. */ Modified: sis/branches/JDK9/core/sis-feature/src/main/java/org/apache/sis/internal/feature/DateList.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-feature/src/main/java/org/apache/sis/internal/feature/DateList.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-feature/src/main/java/org/apache/sis/internal/feature/DateList.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-feature/src/main/java/org/apache/sis/internal/feature/DateList.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -16,13 +16,11 @@ */ package org.apache.sis.internal.feature; +import java.time.Instant; import java.util.AbstractList; import org.apache.sis.math.Vector; import org.apache.sis.util.collection.CheckedContainer; -// Branch-dependent imports -import java.time.Instant; - /** * Unmodifiable lists of instants. Modified: sis/branches/JDK9/core/sis-feature/src/main/java/org/apache/sis/internal/feature/MovingFeature.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-feature/src/main/java/org/apache/sis/internal/feature/MovingFeature.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-feature/src/main/java/org/apache/sis/internal/feature/MovingFeature.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-feature/src/main/java/org/apache/sis/internal/feature/MovingFeature.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -22,7 +22,9 @@ import java.util.Date; import java.util.Objects; import java.util.logging.Level; import java.util.logging.LogRecord; +import java.util.function.Consumer; import java.lang.reflect.Array; +import java.time.Instant; import org.opengis.util.LocalName; import org.apache.sis.math.Vector; import org.apache.sis.util.iso.Names; @@ -31,8 +33,6 @@ import org.apache.sis.util.CorruptedObje import org.apache.sis.internal.util.UnmodifiableArrayList; // Branch-dependent imports -import java.time.Instant; -import java.util.function.Consumer; import org.opengis.feature.Attribute; import org.opengis.feature.AttributeType; import org.opengis.feature.Feature; Modified: sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/Merger.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/Merger.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/Merger.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/Merger.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -223,7 +223,7 @@ distribute: while (it.ha case MERGE: { /* * If enabled, copy(…, true) call verified that the merge can be done, including - * by recursive checks in all children. The intend is to have a "all or nothing" + * by recursive checks in all children. The intent is to have a "all or nothing" * behavior, before the copy(…, false) call below starts to modify the values. */ if (!copy(value, (ModifiableMetadata) element, false)) break; 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=1825252&r1=1825251&r2=1825252&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] Sat Feb 24 15:44:08 2018 @@ -171,7 +171,7 @@ public class ReferencingServices extends if (c == null) { /* * Double-checked locking: okay since Java 5 provided that the 'instance' field is volatile. - * In the particular case of this class, the intend is to ensure that SystemListener.add(…) + * In the particular case of this class, the intent is to ensure that SystemListener.add(…) * is invoked only once. */ c = getInstance(ReferencingServices.class, Modules.METADATA, "sis-referencing", Modified: sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/SensorType.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/SensorType.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/SensorType.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/SensorType.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -86,7 +86,7 @@ public final class SensorType extends Co } /** - * Returns the axis direction that matches the given string, or returns a + * Returns the sensor type that matches the given string, or returns a * new one if none match it. More specifically, this methods returns the first instance for * which <code>{@linkplain #name() name()}.{@linkplain String#equals equals}(code)</code> * returns {@code true}. If no existing instance is found, then a new one is created for 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=1825252&r1=1825251&r2=1825252&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] Sat Feb 24 15:44:08 2018 @@ -267,7 +267,7 @@ public abstract class Initializer { final LogRecord record = Messages.getResources(null).getLogRecord( Level.CONFIG, Messages.Keys.JNDINotSpecified_1, JNDI); record.setLoggerName(Loggers.SQL); - Logging.log(Initializer.class, "getDataSource", record); + Logging.log(null, null, record); // Let Logging.log(…) infers the public caller. } /* * At this point we determined that there is no JNDI context or no object binded to "jdbc/SpatialMetadata". @@ -286,7 +286,7 @@ public abstract class Initializer { if (home != null) try { /* * If a "derby.system.home" property is set, we may be able to get a shorter path by making it - * relative to Derby home. The intend is to have a nicer URL like "jdbc:derby:SpatialMetadata" + * relative to Derby home. The intent is to have a nicer URL like "jdbc:derby:SpatialMetadata" * instead than "jdbc:derby:/a/long/path/to/SIS/Data/Databases/SpatialMetadata". In addition * to making loggings and EPSGDataAccess.getAuthority() output nicer, it also reduces the risk * of encoding issues if the path contains spaces or non-ASCII characters. Modified: sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/SQLBuilder.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/SQLBuilder.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/SQLBuilder.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/SQLBuilder.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -214,7 +214,7 @@ public class SQLBuilder { * Appends a string as an escaped {@code LIKE} argument. * This method does not put any {@code '} character, and does not accept null argument. * - * <p>This method does not double the simple quotes of the given string on intend, because + * <p>This method does not double the simple quotes of the given string on intent, because * it may be used in a {@code PreparedStatement}. If the simple quotes need to be doubled, * then {@link #doubleQuotes(Object)} should be invoked explicitly.</p> * @@ -274,7 +274,7 @@ public class SQLBuilder { * REFERENCES "schema"."target" (primaryKey) ON UPDATE CASCADE ON DELETE RESTRICT * } * - * Note that the primary key is <strong>not</strong> quoted on intend. + * Note that the primary key is <strong>not</strong> quoted on intent. * If quoted are desired, then they must be added explicitly before to call this method. * * @param schema the schema for both tables. 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=1825252&r1=1825251&r2=1825252&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] Sat Feb 24 15:44:08 2018 @@ -21,6 +21,7 @@ import java.util.HashMap; import java.util.Locale; import java.util.regex.Pattern; import java.util.regex.Matcher; +import java.util.function.BiFunction; import java.io.EOFException; import java.io.IOException; import java.io.BufferedReader; @@ -36,9 +37,6 @@ import org.apache.sis.util.ArgumentCheck import org.apache.sis.util.CharSequences; import org.apache.sis.util.resources.Errors; -// Branch-specific imports -import java.util.function.BiFunction; - /** * Run SQL scripts. The script is expected to use a standardized syntax, where the {@value #QUOTE} character Modified: sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -419,7 +419,7 @@ public class Formatter implements Locali /** * Returns a mapper between Java character sequences and the characters to write in WKT. - * The intend is to specify how to write characters that are not allowed in WKT strings + * The intent is to specify how to write characters that are not allowed in WKT strings * according ISO 19162 specification. Return values can be: * * <ul> @@ -1164,7 +1164,7 @@ public class Formatter implements Locali } else { /* * The 2 below is for using two less fraction digits than the expected number accuracy. - * The intend is to give to DecimalFormat a chance to hide rounding errors, keeping in + * The intent is to give to DecimalFormat a chance to hide rounding errors, keeping in * mind that the number value is not necessarily the original one (we may have applied * a unit conversion). In the case of WGS84 semi-major axis in metres, we still have a * maximum of 8 fraction digits, which is more than enough. Modified: sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/WKTFormat.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/WKTFormat.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/WKTFormat.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/WKTFormat.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -312,7 +312,7 @@ public class WKTFormat extends CompoundF /** * Returns a mapper between Java character sequences and the characters to write in WKT. - * The intend is to specify how to write characters that are not allowed in WKT strings + * The intent is to specify how to write characters that are not allowed in WKT strings * according ISO 19162 specification. Return values can be: * * <ul> Modified: sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/AbstractMetadata.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/AbstractMetadata.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/AbstractMetadata.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/AbstractMetadata.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -130,7 +130,7 @@ public abstract class AbstractMetadata i * returned by {@link MetadataStandard#asValueMap(Object, Class, KeyNamePolicy, ValueExistencePolicy)}. * Subclasses that override this method should usually not invoke {@code super.isEmpty()}, * because the Java reflection will discover and process the properties defined in the - * subclasses - which is usually not the intend when overriding a method. + * subclasses - which is usually not the intent when overriding a method. * * @return {@code true} if this metadata is empty. * @@ -140,7 +140,7 @@ public abstract class AbstractMetadata i public boolean isEmpty() { /* * The NULL_COLLECTION semaphore prevents creation of new empty collections by getter methods - * (a consequence of lazy instantiation). The intend is to avoid creation of unnecessary objects + * (a consequence of lazy instantiation). The intent is to avoid creation of unnecessary objects * for all unused properties. Users should not see behavioral difference, except if they override * some getters with an implementation invoking other getters. However in such cases, users would * have been exposed to null values at XML marshalling time anyway. @@ -196,7 +196,7 @@ public abstract class AbstractMetadata i * property associated to the given key is a {@link java.util.Collection} but the given value is a single * element (not a collection), then the given value is {@linkplain java.util.Collection#add(Object) added} * to the existing collection. In other words, the returned map behaves as a <cite>multi-values map</cite> - * for the properties that allow multiple values. If the intend is to unconditionally discard all previous + * for the properties that allow multiple values. If the intent is to unconditionally discard all previous * values, then make sure that the given value is a collection when the associated metadata property expects * such collection. * Modified: sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -801,7 +801,7 @@ public class MetadataStandard implements * property associated to the given key is a {@link java.util.Collection} but the given value is a single * element (not a collection), then the given value is {@linkplain java.util.Collection#add(Object) added} * to the existing collection. In other words, the returned map behaves as a <cite>multi-values map</cite> - * for the properties that allow multiple values. If the intend is to unconditionally discard all previous + * for the properties that allow multiple values. If the intent is to unconditionally discard all previous * values, then make sure that the given value is a collection when the associated metadata property expects * such collection. * @@ -835,23 +835,6 @@ public class MetadataStandard implements } /** - * @deprecated Replaced by {@link #asValueMap(Object, Class, KeyNamePolicy, ValueExistencePolicy)} - * (i.e. a {@code Class} argument has been inserted after the metadata value). - * - * @param metadata the metadata object to view as a map. - * @param keyPolicy determines the string representation of map keys. - * @param valuePolicy whether the entries having null value or empty collection shall be included in the map. - * @return a map view over the metadata object. - * @throws ClassCastException if the metadata object does not implement a metadata interface of the expected package. - */ - @Deprecated - public Map<String,Object> asValueMap(final Object metadata, final KeyNamePolicy keyPolicy, - final ValueExistencePolicy valuePolicy) throws ClassCastException - { - return asValueMap(metadata, null, keyPolicy, valuePolicy); - } - - /** * Returns the specified metadata object as a tree table. * The tree table is backed by the metadata object using Java reflection, so changes in the * underlying metadata object are immediately reflected in the tree table and conversely. @@ -933,20 +916,6 @@ public class MetadataStandard implements } /** - * @deprecated Replaced by {@link #asTreeTable(Object, Class, ValueExistencePolicy)} - * (i.e. a {@code Class} argument has been inserted after the metadata value). - * - * @param metadata the metadata object to view as a tree table. - * @param valuePolicy whether the property having null value or empty collection shall be included in the tree. - * @return a tree table representation of the specified metadata. - * @throws ClassCastException if the metadata object does not implement a metadata interface of the expected package. - */ - @Deprecated - public TreeTable asTreeTable(final Object metadata, final ValueExistencePolicy valuePolicy) throws ClassCastException { - return asTreeTable(metadata, null, valuePolicy); - } - - /** * Replaces every properties in the specified metadata by their * {@linkplain ModifiableMetadata#unmodifiable() unmodifiable variant}. * @@ -1016,7 +985,7 @@ public class MetadataStandard implements if (inProgress.add(pair)) { /* * The NULL_COLLECTION semaphore prevents creation of new empty collections by getter methods - * (a consequence of lazy instantiation). The intend is to avoid creation of unnecessary objects + * (a consequence of lazy instantiation). The intent is to avoid creation of unnecessary objects * for all unused properties. Users should not see behavioral difference, except if they override * some getters with an implementation invoking other getters. However in such cases, users would * have been exposed to null values at XML marshalling time anyway. Modified: sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -219,7 +219,7 @@ public abstract class ModifiableMetadata ModifiableMetadata success = null; /* * The NULL_COLLECTION semaphore prevents creation of new empty collections by getter methods - * (a consequence of lazy instantiation). The intend is to avoid creation of unnecessary objects + * (a consequence of lazy instantiation). The intent is to avoid creation of unnecessary objects * for all unused properties. Users should not see behavioral difference, except if they override * some getters with an implementation invoking other getters. However in such cases, users would * have been exposed to null values at XML marshalling time anyway. Modified: sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -349,7 +349,7 @@ class PropertyAccessor { /* * Get the type of elements returned by the getter. We perform this step last because * the search for a setter above may have replaced the getter declared in the interface - * by the getter declared in the implementation with a covariant return type. Our intend + * by the getter declared in the implementation with a covariant return type. Our intent * is to get a type which can be accepted by the setter. */ Class<?> elementType = getter.getReturnType(); Modified: sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNodeChildren.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNodeChildren.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNodeChildren.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNodeChildren.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -142,7 +142,7 @@ final class TreeNodeChildren extends Abs this.children = new TreeNode[accessor.count()]; /* * Search for something that looks like the main property, to be associated with the parent node - * instead than provided as a child. The intend is to have more compact and easy to read trees. + * instead than provided as a child. The intent is to have more compact and easy to read trees. * That property shall be a singleton for a simple value (not another metadata object). */ if (parent.table.valuePolicy == ValueExistencePolicy.COMPACT) { Modified: sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeTableView.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeTableView.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeTableView.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeTableView.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -144,7 +144,7 @@ final class TreeTableView implements Tre } /* * The NULL_COLLECTION semaphore prevents creation of new empty collections by getter methods - * (a consequence of lazy instantiation). The intend is to avoid creation of unnecessary objects + * (a consequence of lazy instantiation). The intent is to avoid creation of unnecessary objects * for all unused properties. Users should not see behavioral difference, except if they override * some getters with an implementation invoking other getters. However in such cases, users would * have been exposed to null values at XML marshalling time anyway. Modified: sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -374,7 +374,7 @@ public class DefaultMetadata extends ISO * the deprecated getter methods invoke only the non-deprecated getter replacement, and the deprecated * setter methods invoke only the non-deprecated setter replacement (unless the invoked methods are final). * This means that if a deprecated setter methods need the old value, it will read the field directly. - * The intend is to avoid surprising code paths for user who override some methods. + * The intent is to avoid surprising code paths for user who override some methods. */ /** Modified: sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -491,7 +491,7 @@ public class ImmutableIdentifier extends /* * The code, codeSpace, authority and version local variables in this method usually have the exact same * value than the fields of the same name in this class. But we get those values by invoking the public - * methods in order to give to users a chance to override those properties. The intend is also to use a + * methods in order to give to users a chance to override those properties. The intent is also to use a * consistent approach for all 'formatTo' implementations, since some other classes have no choice other * than using the public methods. */ Modified: sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -305,7 +305,7 @@ public final class Citations extends Sta /** * The authority for identifiers of objects defined by the - * <a href="http://www.unidata.ucar.edu/software/netcdf-java">NetCDF</a> specification. + * <a href="http://www.unidata.ucar.edu/software/thredds/current/netcdf-java/">NetCDF</a> specification. * The {@linkplain IdentifierSpace#getName() name} of this identifier space is fixed to {@code "NetCDF"}. * This citation is used as the authority for some map projection method and parameter names * as used in netCDF files. Modified: sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultFormat.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultFormat.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultFormat.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultFormat.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -17,7 +17,6 @@ package org.apache.sis.metadata.iso.distribution; import java.util.Collection; -import java.util.Collections; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; @@ -30,7 +29,6 @@ import org.apache.sis.internal.metadata. import org.apache.sis.internal.metadata.LegacyPropertyAdapter; import org.apache.sis.metadata.iso.citation.DefaultCitation; import org.apache.sis.metadata.iso.ISOMetadata; -import org.apache.sis.util.iso.Types; // Branch-dependent imports import java.util.function.BiConsumer; @@ -132,27 +130,6 @@ public class DefaultFormat extends ISOMe } /** - * Creates a format initialized to the given name and version. - * The given name should be a short name or abbreviation, for example "JPEG" or "GeoTIFF". - * - * @param name the abbreviated name of the data transfer format, or {@code null}. - * @param version the version of the format (date, number, <i>etc.</i>), or {@code null}. - * - * @deprecated This constructor had a straightforward meaning in ISO 19115:2003, but became confusing - * with the ISO 19115:2014 update because of differences in the {@code Format} model. - * Consider using {@link org.apache.sis.metadata.sql.MetadataSource#lookup(Class, String)} instead. - */ - @Deprecated - public DefaultFormat(CharSequence name, final CharSequence version) { - final DefaultCitation citation = new DefaultCitation(); - if (name != null) { - citation.setAlternateTitles(Collections.singleton(Types.toInternationalString(name))); - } - citation.setEdition(Types.toInternationalString(version)); - formatSpecificationCitation = citation; - } - - /** * Constructs a new instance initialized with the values from the specified metadata object. * This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the * given object are not recursively copied. Modified: sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/Extents.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/Extents.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/Extents.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/Extents.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -62,11 +62,11 @@ import org.opengis.geometry.Geometry; * This class provides methods for: * * <ul> - * <li>{@link #getGeographicBoundingBox(Extent)}, {@link #getVerticalRange(Extent)} - * and {@link #getDate(Extent, double)} - * for fetching geographic or temporal components in a convenient form.</li> - * <li>Methods for computing {@linkplain #intersection intersection} of bounding boxes - * and {@linkplain #area area} estimations.</li> + * <li>{@linkplain #getGeographicBoundingBox Fetching geographic}, + * {@linkplain #getVerticalRange vertical} or + * {@linkplain #getDate temporal components} in a convenient form.</li> + * <li>Computing {@linkplain #intersection intersection} of bounding boxes</li> + * <li>Computing {@linkplain #area area} estimations.</li> * </ul> * * @author Martin Desruisseaux (Geomatys) Modified: sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -199,7 +199,7 @@ public class DefaultAggregateInformation } /* * If there is more than one value, replace only the first one and keep all other ones unchanged. - * The intend is to be consistent with the getter method, which returns the first element. + * The intent is to be consistent with the getter method, which returns the first element. */ final ArrayList<Identifier> identifiers = new ArrayList<>(name.getIdentifiers()); if (identifiers.isEmpty()) { Modified: sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/Dispatcher.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/Dispatcher.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/Dispatcher.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/Dispatcher.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -86,7 +86,7 @@ final class Dispatcher implements Invoca /** * The metadata instance where to store the property (column) values, or {@code null} if not yet created. * For ISO 19115, this is an instance of one of the classes defined in {@link org.apache.sis.metadata.iso} - * package or sub-packages. The intend is not only to cache the property values, but also to leverage + * package or sub-packages. The intent is not only to cache the property values, but also to leverage * implementations that compute automatically some property values from other properties. * The main usage is computing the value of a deprecated property from the values of non-deprecated ones, * e.g. for transition from ISO 19115:2003 to ISO 19115:2014. @@ -208,7 +208,7 @@ final class Dispatcher implements Invoca final long nullBit = 1L << info.asIndexMap(source.standard).get(method.getName()); // Okay even if overflow. /* * The NULL_COLLECTION semaphore prevents creation of new empty collections by getter methods - * (a consequence of lazy instantiation). The intend is to avoid creation of unnecessary objects + * (a consequence of lazy instantiation). The intent is to avoid creation of unnecessary objects * for all unused properties. Users should not see behavioral difference. */ if ((nullValues & nullBit) == 0) { Modified: sis/branches/JDK9/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/WKTKeywordsTest.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/WKTKeywordsTest.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/WKTKeywordsTest.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/WKTKeywordsTest.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -35,7 +35,7 @@ import static org.junit.Assert.*; public final strictfp class WKTKeywordsTest extends TestCase { /** * Ensures that all constants are equal to the name of the field that declare it. - * The intend is to avoid misleading constant names when reading code. + * The intent is to avoid misleading constant names when reading code. * * <p>This test is not strictly necessary. We are just checking an arbitrary convention here, not a requirement. * If a developer change the constant values without changing the constant names (for example in order to use the Modified: sis/branches/JDK9/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataStandardTest.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataStandardTest.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataStandardTest.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataStandardTest.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -249,7 +249,7 @@ public final strictfp class MetadataStan } /** - * Tests the {@link MetadataStandard#asValueMap(Object, KeyNamePolicy, ValueExistencePolicy)} implementation. + * Tests the {@link MetadataStandard#asValueMap(Object, Class, KeyNamePolicy, ValueExistencePolicy)} implementation. * This test duplicates {@link ValueMapTest}, but is done here again as an integration test and because many * {@code MetadataStandard} methods depend on it ({@code equals}, {@code hashCode}, {@code prune}, <i>etc.</i>). */ Modified: sis/branches/JDK9/core/sis-metadata/src/test/java/org/apache/sis/metadata/ValueMapTest.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-metadata/src/test/java/org/apache/sis/metadata/ValueMapTest.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-metadata/src/test/java/org/apache/sis/metadata/ValueMapTest.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-metadata/src/test/java/org/apache/sis/metadata/ValueMapTest.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -42,7 +42,7 @@ import static org.apache.sis.test.TestUt /** * Tests the {@link ValueMap} class on instances created by - * {@link MetadataStandard#asValueMap(Object, KeyNamePolicy, ValueExistencePolicy)}. + * {@link MetadataStandard#asValueMap(Object, Class, KeyNamePolicy, ValueExistencePolicy)}. * Unless otherwise specified, all tests use the {@link MetadataStandard#ISO_19115} constant. * * @author Martin Desruisseaux (Geomatys) Modified: sis/branches/JDK9/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/APIVerifier.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/APIVerifier.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/APIVerifier.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/APIVerifier.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -41,7 +41,7 @@ import static org.junit.Assert.*; * Verifies the API changes caused by the ISO 19115:2003 to ISO 19115:2014 upgrade. * This class compares the presence of {@link Deprecated} and {@link UML} annotations against the content of an * {@linkplain #listAPIChanges(File, File, File, Appendable) automatically generated} {@code api-changes.properties} file. - * The intend is to ensure that we did not forgot an annotation or put the wrong one. + * The intent is to ensure that we did not forgot an annotation or put the wrong one. * * <p>The content of the {@code api-changes.properties} files is typically empty on Apache SIS * branches that use a snapshot version of GeoAPI, thus making this test a no-op. However the Modified: sis/branches/JDK9/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/GeohashReferenceSystem.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/GeohashReferenceSystem.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/GeohashReferenceSystem.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/GeohashReferenceSystem.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -43,6 +43,11 @@ import org.opengis.referencing.gazetteer /** * Geographic coordinates represented as <cite>geohashes</cite> strings. + * Geohash is a simple encoding of geographic coordinates into a short string of letters and digits. + * Longer strings are more accurate, however the accuracy is not uniformly distributed between latitude + * and longitude, and removing digits decreases accuracy faster when the point is located close to the + * equator than close to a pole. For a system having more uniform accuracy, see the + * {@linkplain MilitaryGridReferenceSystem Military Grid Reference System} (MGRS). * * @author Chris Mattmann (JPL) * @author Martin Desruisseaux (Geomatys) Modified: sis/branches/JDK9/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -21,6 +21,11 @@ import java.util.Map; import java.util.IdentityHashMap; import java.util.ConcurrentModificationException; import java.util.Iterator; +import java.util.Spliterator; +import java.util.Spliterators; +import java.util.stream.Stream; +import java.util.function.Consumer; +import java.util.stream.StreamSupport; import java.awt.geom.Rectangle2D; import javax.xml.bind.annotation.XmlTransient; import org.opengis.util.FactoryException; @@ -66,11 +71,6 @@ import org.apache.sis.measure.Longitude; import org.apache.sis.measure.Latitude; // Branch-dependent imports -import java.util.Spliterator; -import java.util.Spliterators; -import java.util.stream.Stream; -import java.util.function.Consumer; -import java.util.stream.StreamSupport; import org.opengis.metadata.citation.Party; import org.opengis.referencing.gazetteer.Location; import org.opengis.referencing.gazetteer.LocationType; @@ -1063,7 +1063,7 @@ public class MilitaryGridReferenceSystem xEnd = (((int) Math.ceil(bounds.getMaxX() / step))) * step; // Exclusive yEnd = (((int) Math.ceil(bounds.getMaxY() / step))) * step; /* - * Determine if we should iterate on rows upward or downward. The intend is to iterate from equator to pole + * Determine if we should iterate on rows upward or downward. The intent is to iterate from equator to pole * in UTM zones, or from projection center to projection border in UPS cases. Those directions enable some * optimizations. */ Modified: sis/branches/JDK9/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/ModifiableLocationType.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/ModifiableLocationType.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/ModifiableLocationType.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/ModifiableLocationType.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -21,6 +21,7 @@ import java.util.Collection; import java.util.Collections; import java.util.LinkedHashMap; import java.util.ConcurrentModificationException; +import java.util.function.Function; import org.opengis.util.InternationalString; import org.opengis.metadata.extent.GeographicExtent; import org.apache.sis.metadata.iso.extent.DefaultGeographicDescription; @@ -32,7 +33,6 @@ import org.apache.sis.util.ArgumentCheck import org.apache.sis.util.iso.Types; // Branch-dependent imports -import java.util.function.Function; import org.opengis.metadata.citation.Party; import org.opengis.referencing.gazetteer.ReferenceSystemUsingIdentifiers; @@ -115,7 +115,7 @@ import org.opengis.referencing.gazetteer * @since 0.8 * @module */ -public class ModifiableLocationType extends AbstractLocationType { // Not Serializable on intend. +public class ModifiableLocationType extends AbstractLocationType { // Not Serializable on intent. /** * Name of the location type. */ Modified: sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/geometry/CoordinateFormat.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/geometry/CoordinateFormat.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/geometry/CoordinateFormat.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/geometry/CoordinateFormat.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -29,6 +29,7 @@ import java.util.Date; import java.util.Locale; import java.util.TimeZone; import java.io.IOException; +import java.io.UncheckedIOException; import javax.measure.Unit; import javax.measure.UnitConverter; import javax.measure.quantity.Time; @@ -52,9 +53,6 @@ import org.apache.sis.measure.Units; import org.apache.sis.referencing.CRS; import org.apache.sis.io.CompoundFormat; -// Branch-dependent imports -import java.io.UncheckedIOException; - /** * Formats spatiotemporal coordinates using number, angle and date formats inferred from the coordinate system. Modified: sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_GeneralOperationParameter.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_GeneralOperationParameter.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_GeneralOperationParameter.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_GeneralOperationParameter.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -445,7 +445,7 @@ public final class CC_GeneralOperationPa /** * Given an {@link Identifier} or {@link GenericName} instance, returns that instance as a {@link NamedIdentifier} - * implementation. The intend is to allow {@code Object.equals(Object)} and hash code to correctly recognize two + * implementation. The intent is to allow {@code Object.equals(Object)} and hash code to correctly recognize two * name or identifier as equal even if they are of different implementations. * * <p>Note that {@link NamedIdentifier} is the type of unmarshalled names, aliases and identifiers. Modified: sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/GeodeticObjectBuilder.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/GeodeticObjectBuilder.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/GeodeticObjectBuilder.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/GeodeticObjectBuilder.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -252,7 +252,7 @@ public class GeodeticObjectBuilder exten * @return {@code this}, for method calls chaining. * @throws FactoryException if the operation method for the Transverse Mercator projection can not be obtained. * - * @see CommonCRS#UTM(double, double) + * @see CommonCRS#universal(double, double) */ public GeodeticObjectBuilder setTransverseMercator(TransverseMercator.Zoner zoner, double latitude, double longitude) throws FactoryException Modified: sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ReferencingUtilities.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ReferencingUtilities.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ReferencingUtilities.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ReferencingUtilities.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -203,7 +203,7 @@ public final class ReferencingUtilities * use an instance of {@link GeographicCRS}. Otherwise (i.e. if the two first dimensions are not geographic), * returns {@code null}. * - * <p>This method excludes geocentric CRS on intend. Some callers needs this exclusion as a way to identify + * <p>This method excludes geocentric CRS on intent. Some callers needs this exclusion as a way to identify * which CRS in a Geographic/Geocentric conversion is the geographic one. An other point of view is to said * that if this method returns a non-null value, then the coordinates are expected to be either two-dimensional * or three-dimensional with an ellipsoidal height.</p> @@ -285,7 +285,7 @@ public final class ReferencingUtilities * * <ul> * <li>If the character is {@code '('} and the content until the closing {@code ')'} is a valid - * Unicode identifier, then that part is included. The intend is to keep the prime meridian + * Unicode identifier, then that part is included. The intent is to keep the prime meridian * name in names like <cite>"NTF (Paris)"</cite>.</li> * </ul> * Modified: sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/WKTUtilities.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/WKTUtilities.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/WKTUtilities.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/WKTUtilities.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -19,9 +19,11 @@ package org.apache.sis.internal.referenc import javax.measure.Unit; import javax.measure.Quantity; import javax.measure.quantity.Angle; +import org.opengis.metadata.Identifier; import org.opengis.parameter.ParameterValue; import org.opengis.parameter.ParameterValueGroup; import org.opengis.parameter.GeneralParameterValue; +import org.opengis.parameter.GeneralParameterDescriptor; import org.opengis.referencing.IdentifiedObject; import org.opengis.referencing.crs.CoordinateReferenceSystem; import org.opengis.referencing.cs.CoordinateSystem; @@ -46,6 +48,7 @@ import org.apache.sis.measure.Units; import org.apache.sis.util.Static; import org.apache.sis.util.CharSequences; import org.apache.sis.util.resources.Vocabulary; +import org.apache.sis.internal.util.Constants; /** @@ -246,6 +249,32 @@ public final class WKTUtilities extends } /** + * Returns {@code true} if the given parameter is defined in the EPSG code space. We handle EPSG + * parameters in a special way because Apache SIS uses the EPSG geodetic dataset as the primary + * source of coordinate operation definitions. + * + * <p>We intentionally don't define {@code isEPSG(OperationMethod)} method because the operation + * method may be the inverse of an EPSG method (for example "Inverse of Mercator (variant A)") + * which would not be recognized. Instead, {@code isEPSG(method.getParameters())} should work.</p> + * + * @param descriptor the parameter or group of parameters to inspect. + * @param ifUndefined the value to return if the code space is undefined. + * @return whether the given parameter is an EPSG parameter. + */ + public static boolean isEPSG(final GeneralParameterDescriptor descriptor, final boolean ifUndefined) { + if (descriptor != null) { + final Identifier id = descriptor.getName(); + if (id != null) { + final String cs = id.getCodeSpace(); + if (cs != null) { + return Constants.EPSG.equalsIgnoreCase(cs); + } + } + } + return ifUndefined; + } + + /** * Returns the WKT type of the given interface. * * For {@link CoordinateSystem} base type, the returned value shall be one of Modified: sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/j2d/LinearTransform2D.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/j2d/LinearTransform2D.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/j2d/LinearTransform2D.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/j2d/LinearTransform2D.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -23,7 +23,7 @@ import org.apache.sis.referencing.operat /** * A two dimensional, linear transform. - * The intend of this interface is to resolve type conflict in the {@link #inverse()} method. + * The intent of this interface is to resolve type conflict in the {@link #inverse()} method. * * @author Martin Desruisseaux (Geomatys) * @version 0.7 @@ -35,6 +35,7 @@ public interface LinearTransform2D exten * Returns the inverse transform, which shall be linear and two-dimensional. * * @return the inverse transform. + * @throws NoninvertibleTransformException if the transform can not be inverted. */ @Override LinearTransform2D inverse() throws NoninvertibleTransformException; Modified: sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/FranceGeocentricInterpolation.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/FranceGeocentricInterpolation.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/FranceGeocentricInterpolation.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/FranceGeocentricInterpolation.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -234,7 +234,7 @@ public class FranceGeocentricInterpolati * @param semiMajor the descriptor for locating the semi-major axis parameter. * @param semiMinor the descriptor for locating the semi-minor axis parameter. * @param candidate an ellipsoid to return if the axis lengths match the lengths found in the parameters, - * or {@code null} if none. The intend is to use the pre-defined "GRS 1980" ellipsoid if + * or {@code null} if none. The intent is to use the pre-defined "GRS 1980" ellipsoid if * we can, because that ellipsoid is defined by inverse flattening factor instead than by * semi-minor axis length. * @return a temporary ellipsoid encapsulating the axis lengths found in the parameters. Modified: sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Molodensky.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Molodensky.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Molodensky.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Molodensky.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -19,6 +19,7 @@ package org.apache.sis.internal.referenc import java.util.Map; import java.util.Collections; import javax.xml.bind.annotation.XmlTransient; +import javax.measure.Unit; import org.opengis.util.FactoryException; import org.opengis.parameter.ParameterValueGroup; import org.opengis.parameter.ParameterDescriptor; @@ -34,9 +35,11 @@ import org.apache.sis.referencing.datum. import org.apache.sis.referencing.operation.transform.MolodenskyTransform; import org.apache.sis.internal.referencing.NilReferencingObject; import org.apache.sis.internal.referencing.Formulas; +import org.apache.sis.internal.system.Loggers; import org.apache.sis.internal.util.Constants; import org.apache.sis.measure.Units; import org.apache.sis.util.resources.Errors; +import org.apache.sis.util.logging.Logging; import org.apache.sis.util.Debug; @@ -226,6 +229,7 @@ public final class Molodensky extends Ge final Ellipsoid target = new Ellipsoid(name, ta, tb, -Δa, -Δf); source.other = target; target.other = source; + source.computeDifferences(values); return MolodenskyTransform.createGeodeticTransformation(factory, source, sourceDimensions >= 3, target, targetDimensions >= 3, @@ -252,13 +256,13 @@ public final class Molodensky extends Ge /** * A temporary ellipsoid used only for passing arguments to the {@link MolodenskyTransform} constructor. - * The intend is to use the Δa and Δf values explicitely specified in the EPSG parameters if available, + * The intent is to use the Δa and Δf values explicitely specified in the EPSG parameters if available, * or to compute them only if no Δa or Δf values where specified. */ @SuppressWarnings("serial") private static final class Ellipsoid extends DefaultEllipsoid { /** The EPSG parameter values, or NaN if unspecified. */ - private final double Δa, Δf; + private double Δa, Δf; /** The ellipsoid for which Δa and Δf are valid. */ Ellipsoid other; @@ -270,6 +274,45 @@ public final class Molodensky extends Ge this.Δf = Δf; } + /** + * Computes Δa and Δf now if not already done and tries to store the result in the given parameters. + * The parameters are set in order to complete them when the user specified the OGC parameters (axis + * lengths) and not the EPSG ones (axis and flattening differences). + */ + void computeDifferences(final Parameters values) { + if (Double.isNaN(Δa)) { + Δa = super.semiMajorAxisDifference(other); + setIfPresent(values, AXIS_LENGTH_DIFFERENCE, Δa, getAxisUnit()); + } + if (Double.isNaN(Δf)) { + Δf = super.flatteningDifference(other); + setIfPresent(values, FLATTENING_DIFFERENCE, Δf, Units.UNITY); + } + } + + /** + * Tries to set the given parameter values. This method should be invoked only when completing parameters + * without explicit values. This approach complete the work done in {@code DefaultMathTransformFactory}, + * which already completed the {@code src_semi_major}, {@code src_semi_minor}, {@code tgt_semi_major} and + * {@code tgt_semi_minor} parameters. + * + * @param values the group in which to set the parameter values. + * @param parameter descriptor of the parameter to set. + * @param value the new value. + * @param unit unit of measurement for the new value. + */ + private static void setIfPresent(final Parameters values, final ParameterDescriptor<Double> parameter, + final double value, final Unit<?> unit) + { + try { + values.getOrCreate(parameter).setValue(value, unit); + } catch (ParameterNotFoundException | InvalidParameterValueException e) { + // Nonn-fatal since this attempt was only for information purpose. + Logging.recoverableException(Logging.getLogger(Loggers.COORDINATE_OPERATION), + Molodensky.class, "createMathTransform", e); + } + } + /** Returns Δa as specified in the parameters if possible, or compute it otherwise. */ @Override public double semiMajorAxisDifference(final org.opengis.referencing.datum.Ellipsoid target) { return (target == other && !Double.isNaN(Δa)) ? Δa : super.semiMajorAxisDifference(target); Modified: sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ZonedTransverseMercator.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ZonedTransverseMercator.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ZonedTransverseMercator.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ZonedTransverseMercator.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -100,6 +100,17 @@ public final class ZonedTransverseMercat } /** + * Notifies {@code DefaultMathTransformFactory} that this projection requires + * values for the {@code "semi_major"} and {@code "semi_minor"} parameters. + * + * @return 1, meaning that the operation requires a source ellipsoid. + */ + @Override + public final int getEllipsoidsMask() { + return 1; + } + + /** * Creates a map projection from the specified group of parameter values. * * @param factory the factory to use for creating and concatenating the (de)normalization transforms. Modified: sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionDescriptor.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionDescriptor.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionDescriptor.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionDescriptor.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -48,7 +48,7 @@ import org.apache.sis.util.Workaround; * @author Martin Desruisseaux (Geomatys) * @version 0.6 * - * @see <a href="http://www.unidata.ucar.edu/software/netcdf-java/reference/StandardCoordinateTransforms.html">NetCDF projection parameters</a> + * @see <a href="http://www.unidata.ucar.edu/software/thredds/current/netcdf-java/reference/StandardCoordinateTransforms.html">NetCDF projection parameters</a> * * @since 0.6 * @module Modified: sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -710,7 +710,7 @@ public class ParameterFormat extends Tab } /* * Format the value followed by the unit of measure, or followed by spaces if there is no unit - * for this value. The intend is the right align the numerical value rather than the numerical + * for this value. The intent is the right align the numerical value rather than the numerical * + unit tupple. */ final Format format = getFormat(value.getClass()); @@ -767,7 +767,7 @@ public class ParameterFormat extends Tab } /** - * Configures the number pattern to use for the given value. The main intend of this method is to ensure that + * Configures the number pattern to use for the given value. The main intent of this method is to ensure that * the map projection scale factor (a value close to 1) is formatted with a sufficient number of fraction digits. * A common default NumberFormat precision is 3 digits, which is not sufficient. For example the scale factor of * Transverse Mercator projections is 0.9996 (4 digits), and the scale factor of "NTF (Paris) / Lambert zone II" Modified: sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterValueList.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterValueList.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterValueList.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterValueList.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -193,7 +193,7 @@ final class ParameterValueList extends A /* * If we had an uninitialized parameter (a parameter created by the DefaultParameterValueGroup constructor * and never been queried or set by the user), then the given parameter will replace the uninitialized. - * The intend is to allow users to set its own parameters by a call to group.values().addAll(myParam). + * The intent is to allow users to set its own parameters by a call to group.values().addAll(myParam). * Otherwise the given parameter will be added, in which case we need to check the cardinality. */ final Identifier name = desc.getName(); Modified: sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/AuthorityFactories.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/AuthorityFactories.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/AuthorityFactories.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/AuthorityFactories.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -194,8 +194,10 @@ final class AuthorityFactories<T extends message = e.toString(); } final LogRecord record = new LogRecord(isWarning ? Level.WARNING : Level.CONFIG, message); + if (isWarning && !(e instanceof UnavailableFactoryException)) { + record.setThrown(e); + } record.setLoggerName(Loggers.CRS_FACTORY); - if (isWarning) record.setThrown(e); Logging.log(CRS.class, "getAuthorityFactory", record); } Modified: sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -973,24 +973,6 @@ public enum CommonCRS { */ /** - * Returns a Universal Transverse Mercator (UTM) projection for the zone containing the given point. - * There is a total of 120 UTM zones, with 60 zones in the North hemisphere and 60 zones in the South hemisphere. - * - * @param latitude a latitude in the desired UTM projection zone. - * @param longitude a longitude in the desired UTM projection zone. - * @return a Universal Transverse Mercator projection for the zone containing the given point. - * - * @since 0.7 - * - * @deprecated Generalized by {@link #universal(double, double)}, - * which can also return a UPS projection when appropriate. - */ - @Deprecated - public ProjectedCRS UTM(final double latitude, final double longitude) { - return universal(Math.signum(latitude), longitude); - } - - /** * Returns a Universal Transverse Mercator (UTM) or a Universal Polar Stereographic (UPS) projection * for the zone containing the given point. * There is a total of 120 UTM zones, with 60 zones in the North hemisphere and 60 zones in the South hemisphere. Modified: sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultProjectedCRS.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultProjectedCRS.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultProjectedCRS.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultProjectedCRS.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -474,7 +474,7 @@ public class DefaultProjectedCRS extends * May happen if the 'conversionFromBase' parameter group does not provide values * for "semi_major" or "semi_minor" axis length. This should not happen with SIS * implementation, but may happen with user-defined map projection implementations. - * Since the intend of this check was to skip those parameters anyway, it is okay + * Since the intent of this check was to skip those parameters anyway, it is okay * for the purpose of WKT formatting if there is no parameter for axis lengths. */ Logging.recoverableException(Logging.getLogger(Loggers.WKT), DefaultProjectedCRS.class, "formatTo", e); Modified: sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -28,6 +28,7 @@ import java.util.IdentityHashMap; import java.util.concurrent.Callable; import java.util.concurrent.TimeUnit; import java.util.logging.LogRecord; +import java.util.logging.Level; import java.lang.ref.WeakReference; import java.lang.ref.PhantomReference; import java.io.PrintWriter; @@ -50,6 +51,7 @@ import org.apache.sis.util.Disposable; import org.apache.sis.util.ArgumentChecks; import org.apache.sis.util.logging.Logging; import org.apache.sis.util.collection.Cache; +import org.apache.sis.internal.simple.SimpleCitation; import org.apache.sis.internal.system.ReferenceQueueConsumer; import org.apache.sis.internal.system.DelayedExecutor; import org.apache.sis.internal.system.DelayedRunnable; @@ -111,6 +113,12 @@ public abstract class ConcurrentAuthorit private static final long DURATION_FOR_LOGGING = 10_000_000L; // 10 milliseconds. /** + * Sentinel value when {@link #authority} can not be determined because the data access object + * can not be constructed. + */ + private static final Citation UNAVAILABLE = new SimpleCitation("unavailable"); + + /** * The authority, cached after first requested. */ private transient volatile Citation authority; @@ -700,7 +708,7 @@ public abstract class ConcurrentAuthorit @Override public Citation getAuthority() { Citation c = authority; - if (c == null) try { + if (c == null || c == UNAVAILABLE) try { final DAO factory = getDataAccess(); try { /* @@ -712,8 +720,19 @@ public abstract class ConcurrentAuthorit release("getAuthority", Citation.class, null); } } catch (FactoryException e) { - Logging.unexpectedException(Logging.getLogger(Loggers.CRS_FACTORY), - ConcurrentAuthorityFactory.class, "getAuthority", e); + authority = UNAVAILABLE; + /* + * Use the warning level only on the first failure, then the fine level on all subsequent failures. + * Do not log the stack trace if we failed because of UnavailableFactoryException since it may be + * normal (the EPSG geodetic dataset is optional, even if strongly recommended). + */ + final LogRecord record = new LogRecord(c == null ? Level.WARNING : Level.FINE, e.getLocalizedMessage()); + if (!(e instanceof UnavailableFactoryException)) { + record.setThrown(e); + } + record.setLoggerName(Loggers.CRS_FACTORY); + Logging.log(ConcurrentAuthorityFactory.class, "getAuthority", record); + c = null; } return c; } @@ -776,7 +795,7 @@ public abstract class ConcurrentAuthorit /** * Returns {@code true} if the Data Access Object (DAO) does not provide a {@code create} method for the - * given type of object. The intend is to decide if the caller should delegate to the DAO or delegate to + * given type of object. The intent is to decide if the caller should delegate to the DAO or delegate to * a more generic method of this class (e.g. {@code createCoordinateReferenceSystem(String)} instead of * {@code createGeographicCRS(String)}) in order to give to {@code ConcurrentAuthorityFactory} a chance * to reuse a value presents in the cache. @@ -1790,7 +1809,7 @@ public abstract class ConcurrentAuthorit final GeodeticAuthorityFactory delegate = ((ConcurrentAuthorityFactory<?>) factory).getDataAccess(); /* * Set 'acquireCount' only after we succeed in fetching the factory, and before any operation on it. - * The intend is to get ConcurrentAuthorityFactory.release() invoked if and only if the getDataAccess() + * The intent is to get ConcurrentAuthorityFactory.release() invoked if and only if the getDataAccess() * method succeed, no matter what happen after this point. */ acquireCount = 1; Modified: sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/IdentifiedObjectSet.java URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/IdentifiedObjectSet.java?rev=1825252&r1=1825251&r2=1825252&view=diff ============================================================================== --- sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/IdentifiedObjectSet.java [UTF-8] (original) +++ sis/branches/JDK9/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/IdentifiedObjectSet.java [UTF-8] Sat Feb 24 15:44:08 2018 @@ -75,7 +75,7 @@ import org.apache.sis.util.Classes; * <div class="section">Thread safety</div> * This class is thread-safe is the underlying {@linkplain #factory} is also thread-safe. * However, implementors are encouraged to wrap in {@linkplain java.util.Collections#unmodifiableSet unmodifiable set} - * if they intend to cache {@code IdentifiedObjectSet} instances. + * if they intent to cache {@code IdentifiedObjectSet} instances. * * @author Martin Desruisseaux (IRD, Geomatys) * @version 0.7
