sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1764119 [3/11] - in /sis/trunk: ./ core/ core/sis-feature/src/main/java/org/apache/sis/feature/ core/sis-feature/src/main/java/org/apache/sis/feature/builder/ core/sis-feature/src/main/java/org/apache/sis/internal/feature/ core/sis-metadat...
Date Mon, 10 Oct 2016 15:24:06 GMT
Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/CommonAuthorityFactory.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/CommonAuthorityFactory.java?rev=1764119&r1=1764118&r2=1764119&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/CommonAuthorityFactory.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/CommonAuthorityFactory.java [UTF-8] Mon Oct 10 15:24:03 2016
@@ -46,6 +46,7 @@ import org.opengis.referencing.cs.AxisDi
 import org.opengis.referencing.datum.DatumFactory;
 import org.opengis.referencing.datum.EngineeringDatum;
 import org.apache.sis.internal.referencing.GeodeticObjectBuilder;
+import org.apache.sis.internal.referencing.Resources;
 import org.apache.sis.metadata.iso.citation.Citations;
 import org.apache.sis.internal.system.DefaultFactories;
 import org.apache.sis.internal.system.Loggers;
@@ -333,7 +334,7 @@ public class CommonAuthorityFactory exte
                     }
                 }
                 if (!isRecognized) {
-                    throw new NoSuchAuthorityCodeException(Errors.format(Errors.Keys.UnknownAuthority_1,
+                    throw new NoSuchAuthorityCodeException(Resources.format(Resources.Keys.UnknownAuthority_1,
                             CharSequences.trimWhitespaces(code, 0, s)), Constants.OGC, code);
                 }
             }
@@ -679,7 +680,7 @@ public class CommonAuthorityFactory exte
             s = String.valueOf(code);
         }
         if (message == null) {
-            message = Errors.format(Errors.Keys.NoSuchAuthorityCode_3, Constants.EPSG, Unit.class, s);
+            message = Resources.format(Resources.Keys.NoSuchAuthorityCode_3, Constants.EPSG, Unit.class, s);
         }
         throw new NoSuchAuthorityCodeException(message, Constants.EPSG, s);
     }
@@ -713,7 +714,7 @@ public class CommonAuthorityFactory exte
      * @return An exception initialized with an error message built from the specified informations.
      */
     private static NoSuchAuthorityCodeException noSuchAuthorityCode(String localCode, String code, Exception cause) {
-        return (NoSuchAuthorityCodeException) new NoSuchAuthorityCodeException(Errors.format(Errors.Keys.NoSuchAuthorityCode_3,
+        return (NoSuchAuthorityCodeException) new NoSuchAuthorityCodeException(Resources.format(Resources.Keys.NoSuchAuthorityCode_3,
                 Constants.OGC, CoordinateReferenceSystem.class, localCode),
                 Constants.OGC, localCode, code).initCause(cause);
     }

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java?rev=1764119&r1=1764118&r2=1764119&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java [UTF-8] Mon Oct 10 15:24:03 2016
@@ -52,12 +52,12 @@ import org.apache.sis.internal.util.Coll
 import org.apache.sis.internal.util.LazySet;
 import org.apache.sis.internal.util.LazySynchronizedIterator;
 import org.apache.sis.internal.util.SetOfUnknownSize;
+import org.apache.sis.internal.referencing.Resources;
 import org.apache.sis.util.ArraysExt;
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.logging.Logging;
 import org.apache.sis.util.resources.Errors;
-import org.apache.sis.util.resources.Messages;
 import org.apache.sis.util.iso.DefaultNameSpace;
 import org.apache.sis.util.collection.BackingStoreException;
 
@@ -705,7 +705,7 @@ public class MultiAuthoritiesFactory ext
             return factory;
         }
         final String authority = request.getAuthorityAndVersion().toString();
-        throw new NoSuchAuthorityFactoryException(Errors.format(Errors.Keys.UnknownAuthority_1, authority), authority);
+        throw new NoSuchAuthorityFactoryException(Resources.format(Resources.Keys.UnknownAuthority_1, authority), authority);
     }
 
     /**
@@ -737,7 +737,7 @@ public class MultiAuthoritiesFactory ext
         final DefinitionURI uri = DefinitionURI.parse(code);
         if (uri != null) {
             if (uri.authority == null) {
-                throw new NoSuchAuthorityCodeException(Errors.format(Errors.Keys.MissingAuthority_1, code), null, uri.code, code);
+                throw new NoSuchAuthorityCodeException(Resources.format(Resources.Keys.MissingAuthority_1, code), null, uri.code, code);
             }
             final Class<? extends T> type = proxy.type;
             authority  = uri.authority;
@@ -751,7 +751,7 @@ public class MultiAuthoritiesFactory ext
                 if (code == null) {
                     message = Errors.format(Errors.Keys.MissingComponentInElement_2, s, "code");
                 } else {
-                    message = Errors.format(Errors.Keys.CanNotCreateObjectAsInstanceOf_2, type,
+                    message = Resources.format(Resources.Keys.CanNotCreateObjectAsInstanceOf_2, type,
                             DefinitionURI.PREFIX + DefinitionURI.SEPARATOR + uri.type);
                 }
                 throw new NoSuchAuthorityCodeException(message, authority, code, s);
@@ -766,7 +766,7 @@ public class MultiAuthoritiesFactory ext
             int end = CharSequences.skipTrailingWhitespaces(code, 0, afterAuthority);
             int start = CharSequences.skipLeadingWhitespaces(code, 0, end);
             if (start >= end) {
-                throw new NoSuchAuthorityCodeException(Errors.format(Errors.Keys.MissingAuthority_1, code), null, code);
+                throw new NoSuchAuthorityCodeException(Resources.format(Resources.Keys.MissingAuthority_1, code), null, code);
             }
             authority = code.substring(start, end);
             /*
@@ -1455,8 +1455,8 @@ public class MultiAuthoritiesFactory ext
          * No coordinate operation because of mismatched factories. This is not illegal (the result is an empty set)
          * but it is worth to notify the user because this case has some chances to be an user error.
          */
-        final LogRecord record = Messages.getResources(null).getLogRecord(Level.WARNING,
-                Messages.Keys.MismatchedOperationFactories_2, sourceCRS, targetCRS);
+        final LogRecord record = Resources.forLocale(null).getLogRecord(Level.WARNING,
+                Resources.Keys.MismatchedOperationFactories_2, sourceCRS, targetCRS);
         record.setLoggerName(Loggers.CRS_FACTORY);
         Logging.log(MultiAuthoritiesFactory.class, "createFromCoordinateReferenceSystemCodes", record);
         return super.createFromCoordinateReferenceSystemCodes(sourceCRS, targetCRS);

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java?rev=1764119&r1=1764118&r2=1764119&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java [UTF-8] Mon Oct 10 15:24:03 2016
@@ -73,6 +73,7 @@ import org.apache.sis.internal.referenci
 import org.apache.sis.internal.referencing.EPSGParameterDomain;
 import org.apache.sis.internal.referencing.ReferencingUtilities;
 import org.apache.sis.internal.referencing.SignReversalComment;
+import org.apache.sis.internal.referencing.Resources;
 import org.apache.sis.internal.referencing.Formulas;
 import org.apache.sis.internal.system.Loggers;
 import org.apache.sis.internal.system.Semaphores;
@@ -101,7 +102,6 @@ import org.apache.sis.referencing.factor
 import org.apache.sis.util.iso.SimpleInternationalString;
 import org.apache.sis.util.iso.DefaultNameSpace;
 import org.apache.sis.util.resources.Vocabulary;
-import org.apache.sis.util.resources.Messages;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.logging.Logging;
 import org.apache.sis.util.ArgumentChecks;
@@ -354,9 +354,9 @@ public class EPSGDataAccess extends Geod
      * by the {@link EPSGFactory#newDataAccess(Connection, SQLTranslator)} method of a corresponding custom
      * {@code EPSGFactory} subclass.</div>
      *
-     * @param owner       The {@code EPSGFactory} which is creating this Data Access Object (DAO).
-     * @param connection  The connection to the underlying EPSG database.
-     * @param translator  The translator from the SQL statements using MS-Access dialect
+     * @param owner       the {@code EPSGFactory} which is creating this Data Access Object (DAO).
+     * @param connection  the connection to the underlying EPSG database.
+     * @param translator  the translator from the SQL statements using MS-Access dialect
      *                    to SQL statements using the dialect of the actual database.
      *
      * @see EPSGFactory#newDataAccess(Connection, SQLTranslator)
@@ -375,7 +375,7 @@ public class EPSGDataAccess extends Geod
      * Returns the locale used by this factory for producing error messages.
      * This locale does not change the way data are read from the EPSG database.
      *
-     * @return The locale for error messages.
+     * @return the locale for error messages.
      */
     @Override
     public Locale getLocale() {
@@ -465,7 +465,7 @@ addURIs:    for (int i=0; ; i++) {
                     case 2: {
                         url = metadata.getURL();
                         function = OnLineFunction.valueOf(CONNECTION);
-                        description = Messages.formatInternational(Messages.Keys.DataBase_4,
+                        description = Resources.formatInternational(Resources.Keys.GeodeticDataBase_4,
                                 Constants.EPSG, version, metadata.getDatabaseProductName(),
                                 Version.valueOf(metadata.getDatabaseMajorVersion(),
                                                 metadata.getDatabaseMinorVersion()));
@@ -514,8 +514,8 @@ addURIs:    for (int i=0; ; i++) {
      * <p>An other point of view could be to said that the returned collection behaves as if the deprecated codes
      * were included in the set but invisible.</p>
      *
-     * @param  type The spatial reference objects type (may be {@code Object.class}).
-     * @return The set of authority codes for spatial reference objects of the given type (may be an empty set).
+     * @param  type  the spatial reference objects type (may be {@code Object.class}).
+     * @return the set of authority codes for spatial reference objects of the given type (may be an empty set).
      * @throws FactoryException if access to the underlying database failed.
      */
     @Override
@@ -598,7 +598,7 @@ addURIs:    for (int i=0; ; i++) {
      * Returns an empty set since this data access class expects no namespace.
      * Code shall be given to {@code createFoo(String)} methods directly, without {@code "EPSG:"} prefix.
      *
-     * @return Empty set.
+     * @return empty set.
      */
     @Override
     public Set<String> getCodeSpaces() {
@@ -609,8 +609,8 @@ addURIs:    for (int i=0; ; i++) {
      * Gets a description of the object corresponding to a code.
      * This method returns the object name in a lightweight manner, without creating the full {@link IdentifiedObject}.
      *
-     * @param  code Value allocated by authority.
-     * @return The object name, or {@code null} if the object corresponding to the specified {@code code} has no name.
+     * @param  code  value allocated by authority.
+     * @return the object name, or {@code null} if the object corresponding to the specified {@code code} has no name.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the query failed for some other reason.
      */
@@ -646,7 +646,7 @@ addURIs:    for (int i=0; ; i++) {
      * <div class="section">Default implementation</div>
      * The default implementation returns {@code true} if all characters are decimal digits 0 to 9.
      *
-     * @param  code  The code the inspect.
+     * @param  code  the code the inspect.
      * @return {@code true} if the code is probably a primary key.
      * @throws FactoryException if an unexpected error occurred while inspecting the code.
      */
@@ -670,11 +670,11 @@ addURIs:    for (int i=0; ; i++) {
      * <div class="note"><b>Note:</b>
      * this method could be seen as the converse of above {@link #getDescriptionText(String)} method.</div>
      *
-     * @param  table       The table where the code should appears, or {@code null} if none.
-     * @param  codeColumn  The column name for the codes, or {@code null} if none.
-     * @param  nameColumn  The column name for the names, or {@code null} if none.
-     * @param  codes       The codes or names to convert to primary keys, as an array of length 1 or 2.
-     * @return The numerical identifiers (i.e. the table primary key values).
+     * @param  table       the table where the code should appears, or {@code null} if none.
+     * @param  codeColumn  the column name for the codes, or {@code null} if none.
+     * @param  nameColumn  the column name for the names, or {@code null} if none.
+     * @param  codes       the codes or names to convert to primary keys, as an array of length 1 or 2.
+     * @return the numerical identifiers (i.e. the table primary key values).
      * @throws SQLException if an error occurred while querying the database.
      */
     private int[] toPrimaryKeys(final String table, final String codeColumn, final String nameColumn, final String... codes)
@@ -742,13 +742,13 @@ addURIs:    for (int i=0; ; i++) {
      * {@linkplain #isPrimaryKey primary key}, then this method assumes that the code is the object name
      * and will search for its primary key value.
      *
-     * @param  table       The table where the code should appears.
-     * @param  codeColumn  The column name for the codes, or {@code null} if none.
-     * @param  nameColumn  The column name for the names, or {@code null} if none.
-     * @param  sql         The SQL statement to use for creating the {@link PreparedStatement} object.
+     * @param  table       the table where the code should appears.
+     * @param  codeColumn  the column name for the codes, or {@code null} if none.
+     * @param  nameColumn  the column name for the names, or {@code null} if none.
+     * @param  sql         the SQL statement to use for creating the {@link PreparedStatement} object.
      *                     Will be used only if no prepared statement was already created for the given code.
-     * @param  codes       The codes of the object to create, as an array of length 1 or 2.
-     * @return The result of the query.
+     * @param  codes       the codes of the object to create, as an array of length 1 or 2.
+     * @return the result of the query.
      * @throws SQLException if an error occurred while querying the database.
      */
     private ResultSet executeQuery(final String table, final String codeColumn, final String nameColumn,
@@ -765,11 +765,11 @@ addURIs:    for (int i=0; ; i++) {
      * Creates a statement and executes for the given codes. The first code value is assigned to parameter #1,
      * the second code value (if any) is assigned to parameter #2, <i>etc</i>.
      *
-     * @param  table A key uniquely identifying the caller (e.g. {@code "Ellipsoid"} for {@link #createEllipsoid(String)}).
-     * @param  sql   The SQL statement to use for creating the {@link PreparedStatement} object.
-     *               Will be used only if no prepared statement was already created for the specified key.
-     * @param  codes The codes of the object to create, as an array of length 1 or 2.
-     * @return The result of the query.
+     * @param  table  a key uniquely identifying the caller (e.g. {@code "Ellipsoid"} for {@link #createEllipsoid(String)}).
+     * @param  sql    the SQL statement to use for creating the {@link PreparedStatement} object.
+     *                Will be used only if no prepared statement was already created for the specified key.
+     * @param  codes  the codes of the object to create, as an array of length 1 or 2.
+     * @return the result of the query.
      * @throws SQLException if an error occurred while querying the database.
      */
     private ResultSet executeQuery(final String table, final String sql, final int... codes) throws SQLException {
@@ -790,9 +790,9 @@ addURIs:    for (int i=0; ; i++) {
     /**
      * Gets the value from the specified {@link ResultSet}, or {@code null} if none.
      *
-     * @param  result       The result set to fetch value from.
-     * @param  columnIndex  The column index (1-based).
-     * @return The string at the specified column, or {@code null}.
+     * @param  result       the result set to fetch value from.
+     * @param  columnIndex  the column index (1-based).
+     * @return the string at the specified column, or {@code null}.
      * @throws SQLException if an error occurred while querying the database.
      */
     private static String getOptionalString(final ResultSet result, final int columnIndex) throws SQLException {
@@ -803,9 +803,9 @@ addURIs:    for (int i=0; ; i++) {
     /**
      * Gets the value from the specified {@link ResultSet}, or {@code NaN} if none.
      *
-     * @param  result       The result set to fetch value from.
-     * @param  columnIndex  The column index (1-based).
-     * @return The number at the specified column, or {@code NaN}.
+     * @param  result       the result set to fetch value from.
+     * @param  columnIndex  the column index (1-based).
+     * @return the number at the specified column, or {@code NaN}.
      * @throws SQLException if an error occurred while querying the database.
      */
     private static double getOptionalDouble(final ResultSet result, final int columnIndex) throws SQLException {
@@ -816,9 +816,9 @@ addURIs:    for (int i=0; ; i++) {
     /**
      * Gets the value from the specified {@link ResultSet}, or {@code null} if none.
      *
-     * @param  result       The result set to fetch value from.
-     * @param  columnIndex  The column index (1-based).
-     * @return The integer at the specified column, or {@code null}.
+     * @param  result       the result set to fetch value from.
+     * @param  columnIndex  the column index (1-based).
+     * @return the integer at the specified column, or {@code null}.
      * @throws SQLException if an error occurred while querying the database.
      */
     private static Integer getOptionalInteger(final ResultSet result, final int columnIndex) throws SQLException {
@@ -830,9 +830,9 @@ addURIs:    for (int i=0; ; i++) {
      * Gets the value from the specified {@link ResultSet}, or {@code false} if none.
      * The EPSG database stores boolean values as integers instead than using the SQL type.
      *
-     * @param  result       The result set to fetch value from.
-     * @param  columnIndex  The column index (1-based).
-     * @return The boolean at the specified column, or {@code null}.
+     * @param  result       the result set to fetch value from.
+     * @param  columnIndex  the column index (1-based).
+     * @return the boolean at the specified column, or {@code null}.
      * @throws SQLException if an error occurred while querying the database.
      */
     private boolean getOptionalBoolean(final ResultSet result, final int columnIndex) throws SQLException {
@@ -868,10 +868,10 @@ addURIs:    for (int i=0; ; i++) {
      * Gets the string from the specified {@link ResultSet}.
      * The string is required to be non-null. A null string will throw an exception.
      *
-     * @param  code         The identifier of the record where the string was found.
-     * @param  result       The result set to fetch value from.
-     * @param  columnIndex  The column index (1-based).
-     * @return The string at the specified column.
+     * @param  code         the identifier of the record where the string was found.
+     * @param  result       the result set to fetch value from.
+     * @param  columnIndex  the column index (1-based).
+     * @return the string at the specified column.
      * @throws SQLException if an error occurred while querying the database.
      * @throws FactoryDataException if a null value was found.
      */
@@ -889,10 +889,10 @@ addURIs:    for (int i=0; ; i++) {
      * Gets the value from the specified {@link ResultSet}.
      * The value is required to be non-null. A null value (i.e. blank) will throw an exception.
      *
-     * @param  code         The identifier of the record where the double was found.
-     * @param  result       The result set to fetch value from.
-     * @param  columnIndex  The column index (1-based).
-     * @return The double at the specified column.
+     * @param  code         the identifier of the record where the double was found.
+     * @param  result       the result set to fetch value from.
+     * @param  columnIndex  the column index (1-based).
+     * @return the double at the specified column.
      * @throws SQLException if an error occurred while querying the database.
      * @throws FactoryDataException if a null value was found.
      */
@@ -913,10 +913,10 @@ addURIs:    for (int i=0; ; i++) {
      * <p>We return the value as the {@code Integer} wrapper instead than the {@code int} primitive type
      * because the caller will often need that value as an object (for use as key in {@link HashMap}, etc.).</p>
      *
-     * @param  code         The identifier of the record where the integer was found.
-     * @param  result       The result set to fetch value from.
-     * @param  columnIndex  The column index (1-based).
-     * @return The integer at the specified column.
+     * @param  code         the identifier of the record where the integer was found.
+     * @param  result       the result set to fetch value from.
+     * @param  columnIndex  the column index (1-based).
+     * @return the integer at the specified column.
      * @throws SQLException if an error occurred while querying the database.
      * @throws FactoryDataException if a null value was found.
      */
@@ -938,9 +938,9 @@ addURIs:    for (int i=0; ; i++) {
      * This method is invoked in the loop for making sure that, if there is more than one record
      * (which should never happen), at least they have identical content.
      *
-     * @param  newValue  The newly constructed object.
-     * @param  oldValue  The object previously constructed, or {@code null} if none.
-     * @param  code The EPSG code (for formatting error message).
+     * @param  newValue  the newly constructed object.
+     * @param  oldValue  the object previously constructed, or {@code null} if none.
+     * @param  code      the EPSG code (for formatting error message).
      * @throws FactoryDataException if a duplication has been detected.
      */
     private <T> T ensureSingleton(final T newValue, final T oldValue, final Comparable<?> code) throws FactoryDataException {
@@ -968,7 +968,7 @@ addURIs:    for (int i=0; ; i++) {
      */
     private void ensureNoCycle(final Class<?> type, final Integer code) throws FactoryException {
         if (JDK8.putIfAbsent(safetyGuard, code, type) != null) {
-            throw new FactoryException(error().getString(Errors.Keys.RecursiveCreateCallForCode_2, type, code));
+            throw new FactoryException(resources().getString(Resources.Keys.RecursiveCreateCallForCode_2, type, code));
         }
     }
 
@@ -989,9 +989,9 @@ addURIs:    for (int i=0; ; i++) {
      * <p>The table name should be one of the values enumerated in the {@code epsg_table_name} type of the
      * {@code EPSG_Prepare.sql} file.</p>
      *
-     * @param  expected  The expected table name (e.g. {@code "Coordinate_Operation"}).
-     * @param  name      The actual table name.
-     * @return Whether the given {@code name} is considered to match the expected name.
+     * @param  expected  the expected table name (e.g. {@code "Coordinate_Operation"}).
+     * @param  name      the actual table name.
+     * @return whether the given {@code name} is considered to match the expected name.
      */
     static boolean tableMatches(final String expected, String name) {
         if (name == null) {
@@ -1006,10 +1006,9 @@ addURIs:    for (int i=0; ; i++) {
     /**
      * Logs a warning saying that the given code is deprecated and returns the code of the proposed replacement.
      *
-     * @param  table  The table of the deprecated code.
-     * @param  code   The deprecated code.
-     * @param  locale The locale for logging messages.
-     * @return The proposed replacement (may be the "(none)" text).
+     * @param  table   the table of the deprecated code.
+     * @param  code    the deprecated code.
+     * @return the proposed replacement (may be the "(none)" text).
      */
     private String getSupersession(final String table, final Integer code, final Locale locale) throws SQLException {
         String reason = null;
@@ -1044,7 +1043,7 @@ addURIs:    for (int i=0; ; i++) {
             }
         }
         if (!quiet) {
-            LogRecord record = Messages.getResources(locale).getLogRecord(Level.WARNING, Messages.Keys.DeprecatedCode_3,
+            LogRecord record = Resources.forLocale(locale).getLogRecord(Level.WARNING, Resources.Keys.DeprecatedCode_3,
                     Constants.EPSG + DefaultNameSpace.DEFAULT_SEPARATOR + code, replacedBy, reason);
             record.setLoggerName(Loggers.CRS_FACTORY);
             Logging.log(EPSGDataAccess.class, method, record);
@@ -1055,12 +1054,12 @@ addURIs:    for (int i=0; ; i++) {
     /**
      * Returns the name and aliases for the {@link IdentifiedObject} to construct.
      *
-     * @param  table       The table on which a query has been executed.
-     * @param  name        The name for the {@link IndentifiedObject} to construct.
-     * @param  code        The EPSG code of the object to construct.
-     * @param  remarks     Remarks as a {@link String} or {@link InternationalString}, or {@code null} if none.
+     * @param  table       the table on which a query has been executed.
+     * @param  name        the name for the {@link IndentifiedObject} to construct.
+     * @param  code        the EPSG code of the object to construct.
+     * @param  remarks     remarks as a {@link String} or {@link InternationalString}, or {@code null} if none.
      * @param  deprecated  {@code true} if the object to create is deprecated.
-     * @return The name together with a set of properties.
+     * @return the name together with a set of properties.
      */
     @SuppressWarnings("ReturnOfCollectionOrArrayField")
     private Map<String,Object> createProperties(final String table, String name, final Integer code,
@@ -1154,14 +1153,14 @@ addURIs:    for (int i=0; ; i++) {
     /**
      * Returns the name, aliases and domain of validity for the {@link IdentifiedObject} to construct.
      *
-     * @param  table      The table on which a query has been executed.
-     * @param  name       The name for the {@link IndentifiedObject} to construct.
-     * @param  code       The EPSG code of the object to construct.
-     * @param  domainCode The code for the domain of validity, or {@code null} if none.
-     * @param  scope      The scope, or {@code null} if none.
-     * @param  remarks    Remarks, or {@code null} if none.
-     * @param  deprecated {@code true} if the object to create is deprecated.
-     * @return The name together with a set of properties.
+     * @param  table       the table on which a query has been executed.
+     * @param  name        the name for the {@link IndentifiedObject} to construct.
+     * @param  code        the EPSG code of the object to construct.
+     * @param  domainCode  the code for the domain of validity, or {@code null} if none.
+     * @param  scope       the scope, or {@code null} if none.
+     * @param  remarks     remarks, or {@code null} if none.
+     * @param  deprecated  {@code true} if the object to create is deprecated.
+     * @return the name together with a set of properties.
      */
     private Map<String,Object> createProperties(final String table, final String name, final Integer code,
             final String domainCode, String scope, final String remarks, final boolean deprecated)
@@ -1198,8 +1197,8 @@ addURIs:    for (int i=0; ; i++) {
      * It is recommended to invoke the most specific {@code createFoo(String)} method when the desired type is known,
      * both for performance reason and for avoiding ambiguity.</p>
      *
-     * @param  code Value allocated by EPSG.
-     * @return The object for the given code.
+     * @param  code  value allocated by EPSG.
+     * @return the object for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -1300,8 +1299,8 @@ addURIs:    for (int i=0; ; i++) {
      *   <tr><td>5800</td> <td>Engineering</td>   <td>Astra Minas Grid</td></tr>
      * </table></div>
      *
-     * @param  code Value allocated by EPSG.
-     * @return The coordinate reference system for the given code.
+     * @param  code  value allocated by EPSG.
+     * @return the coordinate reference system for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      */
@@ -1579,8 +1578,8 @@ addURIs:    for (int i=0; ; i++) {
      *   <tr><td>9315</td> <td>Engineering</td> <td>Seismic bin grid datum</td></tr>
      * </table></div>
      *
-     * @param  code Value allocated by EPSG.
-     * @return The datum for the given code.
+     * @param  code  value allocated by EPSG.
+     * @return the datum for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      */
@@ -1666,7 +1665,7 @@ addURIs:    for (int i=0; ; i++) {
                     case "temporal": {
                         final Date originDate;
                         if (anchor == null || anchor.isEmpty()) {
-                            throw new FactoryDataException(error().getString(Errors.Keys.DatumOriginShallBeDate));
+                            throw new FactoryDataException(resources().getString(Resources.Keys.DatumOriginShallBeDate));
                         }
                         if (dateFormat == null) {
                             dateFormat = new StandardDateFormat();
@@ -1675,7 +1674,7 @@ addURIs:    for (int i=0; ; i++) {
                         try {
                             originDate = dateFormat.parse(anchor);
                         } catch (ParseException e) {
-                            throw new FactoryDataException(error().getString(Errors.Keys.DatumOriginShallBeDate), e);
+                            throw new FactoryDataException(resources().getString(Resources.Keys.DatumOriginShallBeDate), e);
                         }
                         datum = datumFactory.createTemporalDatum(properties, originDate);
                         break;
@@ -1717,8 +1716,8 @@ addURIs:    for (int i=0; ; i++) {
      * That legacy format had a {@code TOWGS84} element which needs the information provided by this method.
      * Note that {@code TOWGS84} is a deprecated element as of WKT 2 (ISO 19162).</p>
      *
-     * @param  meridian The source datum prime meridian, used for discarding any target datum using a different meridian.
-     * @param  code The EPSG code of the source {@link GeodeticDatum}.
+     * @param  meridian  the source datum prime meridian, used for discarding any target datum using a different meridian.
+     * @param  code      the EPSG code of the source {@link GeodeticDatum}.
      * @return an array of Bursa-Wolf parameters, or {@code null}.
      */
     private BursaWolfParameters[] createBursaWolfParameters(final PrimeMeridian meridian, final Integer code)
@@ -1839,8 +1838,8 @@ addURIs:    for (int i=0; ; i++) {
      *   <tr><td>7048</td> <td>GRS 1980 Authalic Sphere</td></tr>
      * </table></div>
      *
-     * @param  code Value allocated by EPSG.
-     * @return The ellipsoid for the given code.
+     * @param  code  value allocated by EPSG.
+     * @return the ellipsoid for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -1896,8 +1895,8 @@ addURIs:    for (int i=0; ; i++) {
                     if (!Double.isNaN(semiMinorAxis)) {
                         // Both 'inverseFlattening' and 'semiMinorAxis' are defined.
                         // Log a warning and create the ellipsoid using the inverse flattening.
-                        final LogRecord record = Messages.getResources(getLocale()).getLogRecord(Level.WARNING,
-                                Messages.Keys.AmbiguousEllipsoid_1, Constants.EPSG + DefaultNameSpace.DEFAULT_SEPARATOR + code);
+                        final LogRecord record = resources().getLogRecord(Level.WARNING,
+                                Resources.Keys.AmbiguousEllipsoid_1, Constants.EPSG + DefaultNameSpace.DEFAULT_SEPARATOR + code);
                         record.setLoggerName(Loggers.CRS_FACTORY);
                         Logging.log(EPSGDataAccess.class, "createEllipsoid", record);
                     }
@@ -1929,8 +1928,8 @@ addURIs:    for (int i=0; ; i++) {
      *   <tr><td>8906</td> <td>Rome</td></tr>
      * </table></div>
      *
-     * @param  code Value allocated by EPSG.
-     * @return The prime meridian for the given code.
+     * @param  code  value allocated by EPSG.
+     * @return the prime meridian for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -1986,8 +1985,8 @@ addURIs:    for (int i=0; ; i++) {
      *   <tr><td>3391</td> <td>World - between 80°S and 84°N</td></tr>
      * </table></div>
      *
-     * @param  code Value allocated by EPSG.
-     * @return The extent for the given code.
+     * @param  code  value allocated by EPSG.
+     * @return the extent for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -2069,8 +2068,8 @@ addURIs:    for (int i=0; ; i++) {
      *   <tr><td>6499</td> <td>Vertical CS</td>       <td>height (H)</td>                              <td>up</td>              <td>metre</td></tr>
      * </table></div>
      *
-     * @param  code Value allocated by EPSG.
-     * @return The coordinate system for the given code.
+     * @param  code  value allocated by EPSG.
+     * @return the coordinate system for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      */
@@ -2176,7 +2175,7 @@ addURIs:    for (int i=0; ; i++) {
                     }
                 }
                 if (cs == null) {
-                    throw new FactoryDataException(error().getString(Errors.Keys.UnexpectedDimensionForCS_1, type));
+                    throw new FactoryDataException(resources().getString(Resources.Keys.UnexpectedDimensionForCS_1, type));
                 }
                 returnValue = ensureSingleton(cs, returnValue, code);
             }
@@ -2192,8 +2191,8 @@ addURIs:    for (int i=0; ; i++) {
     /**
      * Returns the number of dimension for the specified Coordinate System, or {@code null} if not found.
      *
-     * @param  cs the EPSG code for the coordinate system.
-     * @return The number of dimensions, or {@code null} if not found.
+     * @param  cs  the EPSG code for the coordinate system.
+     * @return the number of dimensions, or {@code null} if not found.
      *
      * @see #getDimensionsForMethod(int)
      */
@@ -2267,8 +2266,8 @@ addURIs:    for (int i=0; ; i++) {
      *   <tr><td>2</td>    <td>Northing (N)</td>  <td>metre</td></tr>
      * </table></div>
      *
-     * @param  code Value allocated by EPSG.
-     * @return The axis for the given code.
+     * @param  code  value allocated by EPSG.
+     * @return the axis for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -2370,8 +2369,8 @@ addURIs:    for (int i=0; ; i++) {
      *   <tr><td>1029</td> <td>year</td></tr>
      * </table></div>
      *
-     * @param  code Value allocated by EPSG.
-     * @return The unit of measurement for the given code.
+     * @param  code  value allocated by EPSG.
+     * @return the unit of measurement for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      */
@@ -2441,8 +2440,8 @@ addURIs:    for (int i=0; ; i++) {
      *   <tr><td>8807</td> <td>False northing</td></tr>
      * </table></div>
      *
-     * @param  code Value allocated by EPSG.
-     * @return The parameter descriptor for the given code.
+     * @param  code  value allocated by EPSG.
+     * @return the parameter descriptor for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -2562,8 +2561,8 @@ next:               while (r.next()) {
     /**
      * Returns all parameter descriptors for the specified method.
      *
-     * @param  method The operation method code.
-     * @return The parameter descriptors.
+     * @param  method  the operation method code.
+     * @return the parameter descriptors.
      * @throws SQLException if a SQL statement failed.
      */
     private ParameterDescriptor<?>[] createParameterDescriptors(final Integer method) throws FactoryException, SQLException {
@@ -2584,9 +2583,9 @@ next:               while (r.next()) {
     /**
      * Sets the values of all parameters in the given group.
      *
-     * @param  method    The EPSG code for the operation method.
-     * @param  operation The EPSG code for the operation (conversion or transformation).
-     * @param  value     The parameter values to fill.
+     * @param  method     the EPSG code for the operation method.
+     * @param  operation  the EPSG code for the operation (conversion or transformation).
+     * @param  value      the parameter values to fill.
      * @throws SQLException if a SQL statement failed.
      */
     private void fillParameterValues(final Integer method, final Integer operation, final ParameterValueGroup parameters)
@@ -2674,8 +2673,8 @@ next:               while (r.next()) {
      *   <tr><td>9624</td> <td>Affine parametric transformation</td></tr>
      * </table></div>
      *
-     * @param  code Value allocated by EPSG.
-     * @return The operation method for the given code.
+     * @param  code  value allocated by EPSG.
+     * @return the operation method for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      */
@@ -2963,9 +2962,9 @@ next:               while (r.next()) {
      * Deprecated operations are not included in the set; if a deprecated operation is really wanted,
      * it can be fetched by an explicit call to {@link #createCoordinateOperation(String)}.</p>
      *
-     * @param  sourceCRS  Coded value of source coordinate reference system.
-     * @param  targetCRS  Coded value of target coordinate reference system.
-     * @return The operations from {@code sourceCRS} to {@code targetCRS}.
+     * @param  sourceCRS  coded value of source coordinate reference system.
+     * @param  targetCRS  coded value of target coordinate reference system.
+     * @return the operations from {@code sourceCRS} to {@code targetCRS}.
      * @throws NoSuchAuthorityCodeException if a specified code was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      */
@@ -3038,7 +3037,7 @@ next:               while (r.next()) {
      * The finder tries to fetch a fully {@linkplain AbstractIdentifiedObject identified object} from an incomplete one,
      * for example from an object without "{@code ID[…]}" or "{@code AUTHORITY[…]}" element in <cite>Well Known Text</cite>.
      *
-     * @return A finder to use for looking up unidentified objects.
+     * @return a finder to use for looking up unidentified objects.
      * @throws FactoryException if the finder can not be created.
      */
     @Override
@@ -3211,7 +3210,7 @@ next:               while (r.next()) {
      * Returns {@code true} if the {@link CoordinateOperation} for the specified code is a {@link Projection}.
      * The caller must have verified that the designed operation is a {@link Conversion} before to invoke this method.
      *
-     * @throws SQLException If an error occurred while querying the database.
+     * @throws SQLException if an error occurred while querying the database.
      */
     final boolean isProjection(final Integer code) throws SQLException {
         Boolean projection = isProjection.get(code);
@@ -3234,8 +3233,8 @@ next:               while (r.next()) {
      * for all operations using that method. The returned array has a length of 2 and is never null,
      * but some elements in that array may be null.
      *
-     * @param  method  The EPSG code of the operation method for which to get the dimensions.
-     * @return The dimensions in an array of length 2.
+     * @param  method  the EPSG code of the operation method for which to get the dimensions.
+     * @return the dimensions in an array of length 2.
      *
      * @see #getDimensionForCS(int)
      */
@@ -3306,9 +3305,9 @@ next:               while (r.next()) {
      * to preserve the old ordering of the supplied codes (since deprecated operations should already be last).
      * The ordering is performed in place.
      *
-     * @param table The table of the objects for which to check for supersession.
-     * @param codes The codes, usually as an array of {@link String}. If the array do not contains string objects,
-     *              then the {@link Object#toString()} method must return the code for each element.
+     * @param table  the table of the objects for which to check for supersession.
+     * @param codes  the codes, usually as an array of {@link String}. If the array do not contains string objects,
+     *               then the {@link Object#toString()} method must return the code for each element.
      * @return {@code true} if the array changed as a result of this method call.
      */
     final synchronized boolean sort(final String table, final Object[] codes) throws SQLException, FactoryException {
@@ -3355,12 +3354,12 @@ next:               while (r.next()) {
      * Creates an exception for an unknown authority code.
      * This convenience method is provided for implementation of {@code createFoo(String)} methods.
      *
-     * @param  type  The GeoAPI interface that was to be created (e.g. {@code CoordinateReferenceSystem.class}).
-     * @param  code  The unknown authority code.
-     * @return An exception initialized with an error message built from the specified informations.
+     * @param  type  the GeoAPI interface that was to be created (e.g. {@code CoordinateReferenceSystem.class}).
+     * @param  code  the unknown authority code.
+     * @return an exception initialized with an error message built from the specified informations.
      */
     private NoSuchAuthorityCodeException noSuchAuthorityCode(final Class<?> type, final String code) {
-        return new NoSuchAuthorityCodeException(error().getString(Errors.Keys.NoSuchAuthorityCode_3,
+        return new NoSuchAuthorityCodeException(resources().getString(Resources.Keys.NoSuchAuthorityCode_3,
                 Constants.EPSG, type, code), Constants.EPSG, code, code);
     }
 
@@ -3379,10 +3378,17 @@ next:               while (r.next()) {
     }
 
     /**
+     * Minor shortcut for fetching the resources specific to the {@code sis-referencing} module.
+     */
+    private Resources resources() {
+        return Resources.forLocale(getLocale());
+    }
+
+    /**
      * Logs a warning about an unexpected but non-fatal exception.
      *
-     * @param method    The source method.
-     * @param exception The exception to log.
+     * @param method     the source method.
+     * @param exception  the exception to log.
      */
     private static void unexpectedException(final String method, final Exception exception) {
         Logging.unexpectedException(Logging.getLogger(Loggers.CRS_FACTORY), EPSGDataAccess.class, method, exception);

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGFactory.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGFactory.java?rev=1764119&r1=1764118&r2=1764119&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGFactory.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGFactory.java [UTF-8] Mon Oct 10 15:24:03 2016
@@ -38,6 +38,7 @@ import org.opengis.referencing.operation
 import org.opengis.referencing.operation.CoordinateOperationAuthorityFactory;
 import org.opengis.referencing.operation.MathTransformFactory;
 import org.apache.sis.internal.metadata.sql.Initializer;
+import org.apache.sis.internal.referencing.Resources;
 import org.apache.sis.internal.system.DefaultFactories;
 import org.apache.sis.internal.util.Constants;
 import org.apache.sis.referencing.factory.ConcurrentAuthorityFactory;
@@ -46,7 +47,6 @@ import org.apache.sis.util.ArgumentCheck
 import org.apache.sis.util.Classes;
 import org.apache.sis.util.Exceptions;
 import org.apache.sis.util.Localized;
-import org.apache.sis.util.resources.Errors;
 
 
 /**
@@ -293,13 +293,13 @@ public class EPSGFactory extends Concurr
         if (message == null) {
             message = Classes.getShortClassName(e);
         }
-        return Errors.getResources(locale).getString(Errors.Keys.CanNotUseGeodeticParameters_2, Constants.EPSG, message);
+        return Resources.forLocale(locale).getString(Resources.Keys.CanNotUseGeodeticParameters_2, Constants.EPSG, message);
     }
 
     /**
      * Returns the namespace of EPSG codes.
      *
-     * @return The {@code "EPSG"} string in a singleton map.
+     * @return the {@code "EPSG"} string in a singleton map.
      */
     @Override
     public Set<String> getCodeSpaces() {
@@ -310,7 +310,7 @@ public class EPSGFactory extends Concurr
      * Returns the locale used by this factory for producing error messages.
      * This locale does not change the way data are read from the EPSG database.
      *
-     * @return The locale for error messages.
+     * @return the locale for error messages.
      */
     @Override
     public Locale getLocale() {
@@ -361,7 +361,7 @@ public class EPSGFactory extends Concurr
      * or add on the classpath a non-Apache bundle like {@code geotk-epsg.jar}.
      * See <a href="https://issues.apache.org/jira/browse/LEGAL-183">LEGAL-183</a> for more information.</p>
      *
-     * @param  connection Connection to the database where to create the EPSG schema.
+     * @param  connection  connection to the database where to create the EPSG schema.
      * @throws IOException if the SQL script can not be found or an I/O error occurred while reading them.
      * @throws SQLException if an error occurred while writing to the database.
      *
@@ -474,9 +474,9 @@ public class EPSGFactory extends Concurr
      * Subclasses can override this method with a similar code but with {@code new EPSGDataAccess(…)} replaced
      * by {@code new MyDataAccessSubclass(…)}.
      *
-     * @param  connection A connection to the EPSG database.
-     * @param  translator The translator from the SQL statements using MS-Access dialect to SQL statements
-     *                    using the dialect of the actual database.
+     * @param  connection  a connection to the EPSG database.
+     * @param  translator  the translator from the SQL statements using MS-Access dialect to SQL statements
+     *                     using the dialect of the actual database.
      * @return Data Access Object (DAO) to use in {@code createFoo(String)} methods.
      * @throws SQLException if a problem with the database has been detected.
      *
@@ -492,7 +492,7 @@ public class EPSGFactory extends Concurr
      * implementation always returns {@code false} if a set returned by {@link EPSGDataAccess#getAuthorityCodes(Class)}
      * is still in use.
      *
-     * @param factory The Data Access Object which is about to be closed.
+     * @param  factory  the Data Access Object which is about to be closed.
      * @return {@code true} if the given Data Access Object can be closed.
      */
     @Override

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/InstallationScriptProvider.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/InstallationScriptProvider.java?rev=1764119&r1=1764118&r2=1764119&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/InstallationScriptProvider.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/InstallationScriptProvider.java [UTF-8] Mon Oct 10 15:24:03 2016
@@ -33,6 +33,7 @@ import org.apache.sis.util.resources.Err
 import org.apache.sis.util.logging.Logging;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.setup.InstallationResources;
+import org.apache.sis.internal.referencing.Resources;
 import org.apache.sis.internal.system.DataDirectory;
 import org.apache.sis.internal.system.Loggers;
 import org.apache.sis.internal.util.CollectionsExt;
@@ -213,7 +214,7 @@ public abstract class InstallationScript
         verifyAuthority(authority);
         ArgumentChecks.ensureValidIndex(resources.length, resource);
         if (!Constants.EPSG.equals(authority)) {
-            throw new IllegalStateException(Errors.format(Errors.Keys.UnknownAuthority_1, authority));
+            throw new IllegalStateException(Resources.format(Resources.Keys.UnknownAuthority_1, authority));
         }
         String name = resources[resource];
         final Charset charset;

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java?rev=1764119&r1=1764118&r2=1764119&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java [UTF-8] Mon Oct 10 15:24:03 2016
@@ -45,7 +45,6 @@ import org.apache.sis.io.wkt.Formattable
 import org.apache.sis.util.iso.Types;
 import org.apache.sis.util.Classes;
 import org.apache.sis.util.ComparisonMode;
-import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.collection.Containers;
 import org.apache.sis.util.UnsupportedImplementationException;
 import org.apache.sis.util.logging.Logging;
@@ -56,6 +55,7 @@ import org.apache.sis.referencing.operat
 import org.apache.sis.referencing.operation.transform.PassThroughTransform;
 import org.apache.sis.internal.referencing.PositionalAccuracyConstant;
 import org.apache.sis.internal.referencing.ReferencingUtilities;
+import org.apache.sis.internal.referencing.Resources;
 import org.apache.sis.internal.referencing.WKTUtilities;
 import org.apache.sis.internal.metadata.WKTKeywords;
 import org.apache.sis.internal.metadata.MetadataUtilities;
@@ -360,14 +360,14 @@ check:      for (int isTarget=0; ; isTar
                     if (actual == expected || actual < interpDim) {
                         // This check is not strictly necessary as the next check below would catch the error,
                         // but we provide here a hopefully more helpful error message for a common mistake.
-                        throw new IllegalArgumentException(Errors.getResources(properties)
-                                .getString(Errors.Keys.MissingInterpolationOrdinates));
+                        throw new IllegalArgumentException(Resources.forProperties(properties)
+                                .getString(Resources.Keys.MissingInterpolationOrdinates));
                     }
                     expected += interpDim;
                 }
                 if (crs != null && actual != expected) {
-                    throw new IllegalArgumentException(Errors.getResources(properties).getString(
-                            Errors.Keys.MismatchedTransformDimension_3, isTarget, expected, actual));
+                    throw new IllegalArgumentException(Resources.forProperties(properties).getString(
+                            Resources.Keys.MismatchedTransformDimension_3, isTarget, expected, actual));
                 }
             }
         }

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractSingleOperation.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractSingleOperation.java?rev=1764119&r1=1764118&r2=1764119&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractSingleOperation.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractSingleOperation.java [UTF-8] Mon Oct 10 15:24:03 2016
@@ -44,6 +44,7 @@ import org.apache.sis.referencing.operat
 import org.apache.sis.internal.jaxb.referencing.CC_OperationParameterGroup;
 import org.apache.sis.internal.jaxb.referencing.CC_OperationMethod;
 import org.apache.sis.internal.jaxb.Context;
+import org.apache.sis.internal.referencing.Resources;
 import org.apache.sis.internal.referencing.ReferencingUtilities;
 import org.apache.sis.internal.metadata.ReferencingServices;
 import org.apache.sis.internal.metadata.MetadataUtilities;
@@ -241,8 +242,8 @@ class AbstractSingleOperation extends Ab
          * has special handling for this operation (a TensorParameters dedicated class, etc.)
          */
         if (!IdentifiedObjects.isHeuristicMatchForName(method, Constants.AFFINE)) {
-            throw new IllegalArgumentException(Errors.getResources(properties).getString(
-                    Errors.Keys.MismatchedTransformDimension_3, isTarget, expected, actual));
+            throw new IllegalArgumentException(Resources.forProperties(properties).getString(
+                    Resources.Keys.MismatchedTransformDimension_3, isTarget, expected, actual));
         }
     }
 

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationFinder.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationFinder.java?rev=1764119&r1=1764118&r2=1764119&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationFinder.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationFinder.java [UTF-8] Mon Oct 10 15:24:03 2016
@@ -41,6 +41,7 @@ import org.apache.sis.internal.referenci
 import org.apache.sis.internal.referencing.provider.GeographicToGeocentric;
 import org.apache.sis.internal.referencing.provider.GeocentricToGeographic;
 import org.apache.sis.internal.referencing.provider.GeocentricAffine;
+import org.apache.sis.internal.referencing.Resources;
 import org.apache.sis.internal.util.Constants;
 import org.apache.sis.measure.Units;
 import org.apache.sis.metadata.iso.citation.Citations;
@@ -56,7 +57,6 @@ import org.apache.sis.referencing.datum.
 import org.apache.sis.referencing.operation.matrix.Matrices;
 import org.apache.sis.referencing.operation.transform.DefaultMathTransformFactory;
 import org.apache.sis.util.ArgumentChecks;
-import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.resources.Vocabulary;
 
 import static org.apache.sis.util.Utilities.equalsIgnoreMetadata;
@@ -200,7 +200,7 @@ public class CoordinateOperationFinder e
             return createFromAffineTransform(AXIS_CHANGES, sourceCRS, targetCRS,
                     CoordinateSystems.swapAndScaleAxes(sourceCRS.getCoordinateSystem(), targetCRS.getCoordinateSystem()));
         } catch (IllegalArgumentException | ConversionException e) {
-            throw new FactoryException(Errors.format(Errors.Keys.CanNotInstantiate_1, new CRSPair(sourceCRS, targetCRS)), e);
+            throw new FactoryException(Resources.format(Resources.Keys.CanNotInstantiateGeodeticObject_1, new CRSPair(sourceCRS, targetCRS)), e);
         }
         /*
          * If this method is invoked recursively, verify if the requested operation is already in the cache.
@@ -215,7 +215,7 @@ public class CoordinateOperationFinder e
             if (op != null) return op;
         }
         if (previousSearches.put(key, Boolean.TRUE) != null) {
-            throw new FactoryException(Errors.format(Errors.Keys.RecursiveCreateCallForCode_2, CoordinateOperation.class, key));
+            throw new FactoryException(Resources.format(Resources.Keys.RecursiveCreateCallForCode_2, CoordinateOperation.class, key));
         }
         /*
          * If the user did not specified an area of interest, use the domain of validity of the CRS.
@@ -1060,7 +1060,7 @@ public class CoordinateOperationFinder e
      * @return A default error message.
      */
     private static String notFoundMessage(final IdentifiedObject source, final IdentifiedObject target) {
-        return Errors.format(Errors.Keys.CoordinateOperationNotFound_2, CRSPair.label(source), CRSPair.label(target));
+        return Resources.format(Resources.Keys.CoordinateOperationNotFound_2, CRSPair.label(source), CRSPair.label(target));
     }
 
     /**
@@ -1071,6 +1071,6 @@ public class CoordinateOperationFinder e
      * @return A default error message.
      */
     private static String canNotInvert(final GeneralDerivedCRS crs) {
-        return Errors.format(Errors.Keys.NonInvertibleOperation_1, crs.getConversionFromBase().getName().getCode());
+        return Resources.format(Resources.Keys.NonInvertibleOperation_1, crs.getConversionFromBase().getName().getCode());
     }
 }

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java?rev=1764119&r1=1764118&r2=1764119&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java [UTF-8] Mon Oct 10 15:24:03 2016
@@ -61,6 +61,7 @@ import org.apache.sis.internal.referenci
 import org.apache.sis.internal.referencing.PositionalAccuracyConstant;
 import org.apache.sis.internal.referencing.ReferencingUtilities;
 import org.apache.sis.internal.referencing.provider.Affine;
+import org.apache.sis.internal.referencing.Resources;
 import org.apache.sis.internal.metadata.ReferencingServices;
 import org.apache.sis.internal.system.Loggers;
 import org.apache.sis.internal.util.Citations;
@@ -73,7 +74,6 @@ import org.apache.sis.util.logging.Loggi
 import org.apache.sis.util.collection.Containers;
 import org.apache.sis.util.collection.BackingStoreException;
 import org.apache.sis.util.resources.Vocabulary;
-import org.apache.sis.util.resources.Errors;
 
 // Branch-dependent imports
 import java.util.Objects;
@@ -336,7 +336,7 @@ class CoordinateOperationRegistry {
                     return operation;
                 }
             } catch (IllegalArgumentException | ConversionException e) {
-                String message = Errors.format(Errors.Keys.CanNotInstantiate_1, new CRSPair(sourceCRS, targetCRS));
+                String message = Resources.format(Resources.Keys.CanNotInstantiateGeodeticObject_1, new CRSPair(sourceCRS, targetCRS));
                 String details = e.getLocalizedMessage();
                 if (details != null) {
                     message = message + ' ' + details;

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java?rev=1764119&r1=1764118&r2=1764119&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java [UTF-8] Mon Oct 10 15:24:03 2016
@@ -35,6 +35,7 @@ import org.apache.sis.referencing.cs.Coo
 import org.apache.sis.referencing.operation.transform.DefaultMathTransformFactory;
 import org.apache.sis.referencing.operation.matrix.Matrices;
 import org.apache.sis.internal.referencing.ReferencingUtilities;
+import org.apache.sis.internal.referencing.Resources;
 import org.apache.sis.parameter.Parameters;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.ArgumentChecks;
@@ -209,8 +210,8 @@ public class DefaultConversion extends A
             this.transform = transform;
             checkDimensions(method, 0, transform, properties);
         } else if (parameters == null) {
-            throw new IllegalArgumentException(Errors.getResources(properties)
-                    .getString(Errors.Keys.UnspecifiedParameterValues));
+            throw new IllegalArgumentException(Resources.forProperties(properties)
+                    .getString(Resources.Keys.UnspecifiedParameterValues));
         }
         if (parameters != null) {
             this.parameters = Parameters.unmodifiable(parameters);
@@ -245,7 +246,7 @@ public class DefaultConversion extends A
              * thanks to the 'sourceCRS' argument, we can complete the parameters.
              */
             if (parameters == null) {
-                throw new IllegalArgumentException(Errors.format(Errors.Keys.UnspecifiedParameterValues));
+                throw new IllegalArgumentException(Resources.format(Resources.Keys.UnspecifiedParameterValues));
             }
             if (factory instanceof DefaultMathTransformFactory) {
                 /*
@@ -446,8 +447,8 @@ public class DefaultConversion extends A
         if ((expected instanceof SingleCRS) && (actual instanceof SingleCRS)) {
             final Datum datum = ((SingleCRS) expected).getDatum();
             if (datum != null && !Utilities.equalsIgnoreMetadata(datum, ((SingleCRS) actual).getDatum())) {
-                throw new MismatchedDatumException(Errors.format(
-                        Errors.Keys.IncompatibleDatum_2, datum.getName(), param));
+                throw new MismatchedDatumException(Resources.format(
+                        Resources.Keys.IncompatibleDatum_2, datum.getName(), param));
             }
         }
     }

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java?rev=1764119&r1=1764118&r2=1764119&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java [UTF-8] Mon Oct 10 15:24:03 2016
@@ -34,6 +34,7 @@ import org.opengis.referencing.crs.Singl
 import org.opengis.referencing.crs.CRSFactory;
 import org.opengis.referencing.cs.CSFactory;
 import org.opengis.referencing.datum.Datum;
+import org.apache.sis.internal.referencing.Resources;
 import org.apache.sis.internal.referencing.MergedProperties;
 import org.apache.sis.internal.metadata.ReferencingServices;
 import org.apache.sis.internal.system.DefaultFactories;
@@ -280,8 +281,8 @@ public class DefaultCoordinateOperationF
         if (method != null) {
             return method;
         }
-        throw new NoSuchIdentifierException(Errors.getResources(defaultProperties)
-                .getString(Errors.Keys.NoSuchOperationMethod_1, name), name);
+        throw new NoSuchIdentifierException(Resources.forProperties(defaultProperties)
+                .getString(Resources.Keys.NoSuchOperationMethod_1, name), name);
     }
 
     /**
@@ -598,7 +599,7 @@ next:   for (int i=components.size(); --
             op = new AbstractSingleOperation(properties, sourceCRS, targetCRS, interpolationCRS, method, transform);
         }
         if (!baseType.isInstance(op)) {
-            throw new FactoryException(Errors.format(Errors.Keys.CanNotCreateObjectAsInstanceOf_2, baseType, op.getName()));
+            throw new FactoryException(Resources.format(Resources.Keys.CanNotCreateObjectAsInstanceOf_2, baseType, op.getName()));
         }
         return pool.unique(op);
     }

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultOperationMethod.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultOperationMethod.java?rev=1764119&r1=1764118&r2=1764119&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultOperationMethod.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultOperationMethod.java [UTF-8] Mon Oct 10 15:24:03 2016
@@ -48,6 +48,7 @@ import org.apache.sis.internal.metadata.
 import org.apache.sis.internal.jaxb.gco.StringAdapter;
 import org.apache.sis.internal.jaxb.referencing.CC_OperationMethod;
 import org.apache.sis.internal.referencing.NilReferencingObject;
+import org.apache.sis.internal.referencing.Resources;
 import org.apache.sis.internal.metadata.MetadataUtilities;
 import org.apache.sis.parameter.DefaultParameterDescriptorGroup;
 import org.apache.sis.parameter.Parameterized;
@@ -408,7 +409,7 @@ public class DefaultOperationMethod exte
         ensurePositive("sourceDimensions", sourceDimensions);
         ensurePositive("targetDimensions", targetDimensions);
         if (!sourceValids || !targetValids) {
-            throw new IllegalArgumentException(Errors.format(Errors.Keys.IllegalOperationDimension_3,
+            throw new IllegalArgumentException(Resources.format(Resources.Keys.IllegalOperationDimension_3,
                     method.getName().getCode(), sourceDimensions, targetDimensions));
         }
         return new DefaultOperationMethod(method, sourceDimensions, targetDimensions);

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/AffineTransforms2D.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/AffineTransforms2D.java?rev=1764119&r1=1764118&r2=1764119&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/AffineTransforms2D.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/AffineTransforms2D.java [UTF-8] Mon Oct 10 15:24:03 2016
@@ -25,9 +25,9 @@ import java.awt.geom.RectangularShape;
 import java.awt.geom.AffineTransform;
 import java.awt.geom.NoninvertibleTransformException;
 import org.opengis.referencing.operation.Matrix;
+import org.apache.sis.internal.referencing.Resources;
 import org.apache.sis.util.Static;
 import org.apache.sis.util.ArgumentChecks;
-import org.apache.sis.util.resources.Errors;
 
 import static java.lang.Math.*;
 import static java.awt.geom.AffineTransform.*;
@@ -67,7 +67,7 @@ public final class AffineTransforms2D ex
         }
         MatrixSIS.ensureSizeMatch(3, 3, matrix);
         if (!Matrices.isAffine(matrix)) {
-            throw new IllegalStateException(Errors.format(Errors.Keys.NotAnAffineTransform));
+            throw new IllegalStateException(Resources.format(Resources.Keys.NotAnAffineTransform));
         }
         return new AffineTransform(matrix.getElement(0,0), matrix.getElement(1,0),
                                    matrix.getElement(0,1), matrix.getElement(1,1),

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java?rev=1764119&r1=1764118&r2=1764119&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java [UTF-8] Mon Oct 10 15:24:03 2016
@@ -31,6 +31,7 @@ import org.apache.sis.util.resources.Err
 import org.apache.sis.internal.util.Numerics;
 import org.apache.sis.internal.util.DoubleDouble;
 import org.apache.sis.internal.metadata.AxisDirections;
+import org.apache.sis.internal.referencing.Resources;
 import org.apache.sis.internal.referencing.ExtendedPrecisionMatrix;
 
 // Branch-dependent imports
@@ -255,8 +256,8 @@ public final class Matrices extends Stat
                 final AxisDirection srcDir = srcAxes[srcIndex];
                 if (search.equals(AxisDirections.absolute(srcDir))) {
                     if (hasFound) {
-                        throw new IllegalArgumentException(Errors.format(
-                                Errors.Keys.ColinearAxisDirections_2, srcDir, dstDir));
+                        throw new IllegalArgumentException(Resources.format(
+                                Resources.Keys.ColinearAxisDirections_2, srcDir, dstDir));
                     }
                     hasFound = true;
                     /*
@@ -279,8 +280,8 @@ public final class Matrices extends Stat
                 }
             }
             if (!hasFound) {
-                throw new IllegalArgumentException(Errors.format(
-                        Errors.Keys.CanNotMapAxisToDirection_2, "srcAxes", dstAxes[dstIndex]));
+                throw new IllegalArgumentException(Resources.format(
+                        Resources.Keys.CanNotMapAxisToDirection_1, dstAxes[dstIndex]));
             }
         }
         matrix.setElement(dstAxes.length, srcAxes.length, 1);

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/NonSquareMatrix.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/NonSquareMatrix.java?rev=1764119&r1=1764118&r2=1764119&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/NonSquareMatrix.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/NonSquareMatrix.java [UTF-8] Mon Oct 10 15:24:03 2016
@@ -17,7 +17,7 @@
 package org.apache.sis.referencing.operation.matrix;
 
 import org.opengis.referencing.operation.Matrix;
-import org.apache.sis.util.resources.Errors;
+import org.apache.sis.internal.referencing.Resources;
 
 
 /**
@@ -333,7 +333,7 @@ next:   do {
      * Returns the exception for a non-invertible transform.
      */
     private NoninvertibleMatrixException nonInvertible() {
-        return new NoninvertibleMatrixException(Errors.format(Errors.Keys.NonInvertibleMatrix_2, numRow, numCol));
+        return new NoninvertibleMatrixException(Resources.format(Resources.Keys.NonInvertibleMatrix_2, numRow, numCol));
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Solver.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Solver.java?rev=1764119&r1=1764118&r2=1764119&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Solver.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Solver.java [UTF-8] Mon Oct 10 15:24:03 2016
@@ -17,8 +17,8 @@
 package org.apache.sis.referencing.operation.matrix;
 
 import org.opengis.referencing.operation.Matrix;
+import org.apache.sis.internal.referencing.Resources;
 import org.apache.sis.internal.util.DoubleDouble;
-import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.ArraysExt;
 
 
@@ -118,7 +118,7 @@ final class Solver implements Matrix {
         final int size = X.getNumRow();
         final int numCol = X.getNumCol();
         if (numCol != size) {
-            throw new NoninvertibleMatrixException(Errors.format(Errors.Keys.NonInvertibleMatrix_2, size, numCol));
+            throw new NoninvertibleMatrixException(Resources.format(Resources.Keys.NonInvertibleMatrix_2, size, numCol));
         }
         return solve(X, IDENTITY, null, size, size, noChange);
     }
@@ -135,7 +135,7 @@ final class Solver implements Matrix {
         final int size   = X.getNumRow();
         final int numCol = X.getNumCol();
         if (numCol != size) {
-            throw new NoninvertibleMatrixException(Errors.format(Errors.Keys.NonInvertibleMatrix_2, size, numCol));
+            throw new NoninvertibleMatrixException(Resources.format(Resources.Keys.NonInvertibleMatrix_2, size, numCol));
         }
         final int innerSize = Y.getNumCol();
         GeneralMatrix.ensureNumRowMatch(size, Y.getNumRow(), innerSize);
@@ -405,7 +405,7 @@ searchNaN:  for (int flatIndex = (size -
         for (int j=0; j<size; j++) {
             rat.setFrom(LU, j*size + j, errorLU);
             if (rat.isZero()) {
-                throw new NoninvertibleMatrixException(Errors.format(Errors.Keys.SingularMatrix));
+                throw new NoninvertibleMatrixException(Resources.format(Resources.Keys.SingularMatrix));
             }
         }
         /*

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/AlbersEqualArea.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/AlbersEqualArea.java?rev=1764119&r1=1764118&r2=1764119&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/AlbersEqualArea.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/AlbersEqualArea.java [UTF-8] Mon Oct 10 15:24:03 2016
@@ -24,11 +24,11 @@ import org.opengis.referencing.operation
 import org.opengis.referencing.operation.Matrix;
 import org.opengis.referencing.operation.OperationMethod;
 import org.apache.sis.internal.referencing.Formulas;
+import org.apache.sis.internal.referencing.Resources;
 import org.apache.sis.internal.util.DoubleDouble;
 import org.apache.sis.measure.Latitude;
 import org.apache.sis.parameter.Parameters;
 import org.apache.sis.util.Workaround;
-import org.apache.sis.util.resources.Errors;
 import org.apache.sis.referencing.operation.matrix.Matrix2;
 import org.apache.sis.referencing.operation.matrix.MatrixSIS;
 import org.apache.sis.referencing.operation.transform.ContextualParameters;
@@ -113,7 +113,7 @@ public class AlbersEqualArea extends Equ
         double φ1 = initializer.getAndStore(STANDARD_PARALLEL_1, φ0);
         double φ2 = initializer.getAndStore(STANDARD_PARALLEL_2, φ1);
         if (abs(φ1 + φ2) < Formulas.ANGULAR_TOLERANCE) {
-            throw new IllegalArgumentException(Errors.format(Errors.Keys.LatitudesAreOpposite_2,
+            throw new IllegalArgumentException(Resources.format(Resources.Keys.LatitudesAreOpposite_2,
                     new Latitude(φ1), new Latitude(φ2)));
         }
         final boolean secant = (abs(φ1 - φ2) >= Formulas.ANGULAR_TOLERANCE);

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ConformalProjection.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ConformalProjection.java?rev=1764119&r1=1764118&r2=1764119&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ConformalProjection.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ConformalProjection.java [UTF-8] Mon Oct 10 15:24:03 2016
@@ -18,7 +18,7 @@ package org.apache.sis.referencing.opera
 
 import java.io.IOException;
 import java.io.ObjectInputStream;
-import org.apache.sis.util.resources.Errors;
+import org.apache.sis.internal.referencing.Resources;
 
 import static java.lang.Math.*;
 
@@ -147,7 +147,7 @@ abstract class ConformalProjection exten
      * <p>It is sub-classes responsibility to invoke {@code super.computeCoefficients()} in their
      * constructor when ready, or to compute the coefficients themselves.</p>
      *
-     * @param initializer The initializer for computing map projection internal parameters.
+     * @param  initializer  the initializer for computing map projection internal parameters.
      */
     ConformalProjection(final Initializer initializer) {
         super(initializer);
@@ -227,8 +227,8 @@ abstract class ConformalProjection exten
      * for the same precision, but this precision is achieved "only" for relatively small eccentricity like
      * the Earth's one. See the {@code MercatorMethodComparison} class in the test package for more discussion.
      *
-     * @param  expOfSouthing The <em>reciprocal</em> of the value returned by {@link #expOfNorthing}.
-     * @return The latitude in radians.
+     * @param  expOfSouthing  the <em>reciprocal</em> of the value returned by {@link #expOfNorthing}.
+     * @return the latitude in radians.
      * @throws ProjectionException if the iteration does not converge.
      *
      * @see #expOfNorthing(double, double)
@@ -289,7 +289,7 @@ abstract class ConformalProjection exten
                 return φ;
             }
         }
-        throw new ProjectionException(Errors.Keys.NoConvergence);
+        throw new ProjectionException(Resources.format(Resources.Keys.NoConvergence));
     }
 
     /**
@@ -343,8 +343,8 @@ abstract class ConformalProjection exten
      *   <li>Reciprocal of (15-9) in the <cite>Lambert Conformal Conic projection</cite> chapter.</li>
      * </ul>
      *
-     * @param  φ     The latitude in radians.
-     * @param  ℯsinφ The sine of the φ argument multiplied by {@link #eccentricity}.
+     * @param  φ      the latitude in radians.
+     * @param  ℯsinφ  the sine of the φ argument multiplied by {@link #eccentricity}.
      * @return {@code Math.exp} of the Mercator projection of the given latitude.
      *
      * @see #φ(double)
@@ -368,9 +368,9 @@ abstract class ConformalProjection exten
      * <p>In order to get the derivative of the {@link #expOfNorthing(double, double)} function, call can multiply
      * the returned value by by {@code expOfNorthing}.</p>
      *
-     * @param  sinφ the sine of latitude.
-     * @param  cosφ The cosine of latitude.
-     * @return The partial derivative of a Mercator projection at the given latitude.
+     * @param  sinφ  the sine of latitude.
+     * @param  cosφ  the cosine of latitude.
+     * @return the partial derivative of a Mercator projection at the given latitude.
      *
      * @see #expOfNorthing(double, double)
      * @see #φ(double)

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/EqualAreaProjection.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/EqualAreaProjection.java?rev=1764119&r1=1764118&r2=1764119&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/EqualAreaProjection.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/EqualAreaProjection.java [UTF-8] Mon Oct 10 15:24:03 2016
@@ -18,7 +18,7 @@ package org.apache.sis.referencing.opera
 
 import java.io.IOException;
 import java.io.ObjectInputStream;
-import org.apache.sis.util.resources.Errors;
+import org.apache.sis.internal.referencing.Resources;
 
 import static java.lang.Math.*;
 import static org.apache.sis.math.MathFunctions.atanh;
@@ -88,7 +88,7 @@ abstract class EqualAreaProjection exten
     /**
      * Creates a new normalized projection from the parameters computed by the given initializer.
      *
-     * @param initializer The initializer for computing map projection internal parameters.
+     * @param  initializer  the initializer for computing map projection internal parameters.
      */
     EqualAreaProjection(final Initializer initializer) {
         super(initializer);
@@ -152,7 +152,7 @@ abstract class EqualAreaProjection exten
      *
      * In the spherical case, <var>q</var> = 2⋅sinφ.
      *
-     * @param  sinφ sine of the latitude <var>q</var> is calculated for.
+     * @param  sinφ  the sine of the latitude <var>q</var> is calculated for.
      * @return <var>q</var> from Snyder equation (3-12).
      */
     final double qm(final double sinφ) {
@@ -168,7 +168,7 @@ abstract class EqualAreaProjection exten
      * It is caller responsibility to ensure that this method is not invoked in the spherical case, since
      * this implementation does not work in such case.
      *
-     * @param  sinφ sine of the latitude <var>q</var> is calculated for.
+     * @param  sinφ  the sine of the latitude <var>q</var> is calculated for.
      * @return <var>q</var> from Snyder equation (3-12).
      */
     final double qm_ellipsoid(final double sinφ) {
@@ -192,12 +192,12 @@ abstract class EqualAreaProjection exten
 
     /**
      * Computes the latitude using equation 3-18 from Synder, followed by iterative resolution of Synder 3-16.
-     * If theory, the series expansion given by equation 3-18 (φ ≈ c₂⋅sin(2β) + c₄⋅sin(4β) + c₈⋅sin(8β)) should
+     * In theory, the series expansion given by equation 3-18 (φ ≈ c₂⋅sin(2β) + c₄⋅sin(4β) + c₈⋅sin(8β)) should
      * be used in replacement of the iterative method. However in practice the series expansion seems to not
      * have a sufficient amount of terms for achieving the centimetric precision, so we "finish" it by the
      * iterative method. The series expansion is nevertheless useful for reducing the number of iterations.
      *
-     * @param  y in the cylindrical case, this is northing on the normalized ellipsoid.
+     * @param  y  in the cylindrical case, this is northing on the normalized ellipsoid.
      * @return the latitude in radians.
      */
     final double φ(final double y) throws ProjectionException {
@@ -275,7 +275,7 @@ abstract class EqualAreaProjection exten
             return Double.NaN;                      // Value "after" the pole.
         }
         // Value should have converged but did not.
-        throw new ProjectionException(Errors.format(Errors.Keys.NoConvergence));
+        throw new ProjectionException(Resources.format(Resources.Keys.NoConvergence));
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConicConformal.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConicConformal.java?rev=1764119&r1=1764118&r2=1764119&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConicConformal.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConicConformal.java [UTF-8] Mon Oct 10 15:24:03 2016
@@ -34,8 +34,8 @@ import org.apache.sis.internal.referenci
 import org.apache.sis.internal.referencing.provider.LambertConformalBelgium;
 import org.apache.sis.internal.referencing.provider.LambertConformalMichigan;
 import org.apache.sis.internal.referencing.Formulas;
+import org.apache.sis.internal.referencing.Resources;
 import org.apache.sis.internal.util.DoubleDouble;
-import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.Workaround;
 
 import static java.lang.Math.*;
@@ -227,7 +227,7 @@ public class LambertConicConformal exten
              * in this class break down with indetermination like 0 × ∞.
              * The caller should use the Mercator projection instead for such cases.
              */
-            throw new IllegalArgumentException(Errors.format(Errors.Keys.LatitudesAreOpposite_2,
+            throw new IllegalArgumentException(Resources.format(Resources.Keys.LatitudesAreOpposite_2,
                     new Latitude(φ1), new Latitude(φ2)));
         }
         /*




Mime
View raw message