sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1769012 - in /sis/branches/JDK8/core: sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/ sis-referencing/src/main/java/org/apache/sis/referencing/factory/ sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/ ...
Date Wed, 09 Nov 2016 20:05:18 GMT
Author: desruisseaux
Date: Wed Nov  9 20:05:17 2016
New Revision: 1769012

URL: http://svn.apache.org/viewvc?rev=1769012&view=rev
Log:
Bug fix: some JDBC drivers do not represent boolean values by 0/1 or false/true, but f/t. We need to add this variant in the set of value that we can convert to boolean.
If the text value is not recognized, throw an exception instead of silently ignoring, so we can detect sooner next time that such problem occur.
Fix also a bug in the list of URLs returned by getAuthority() and add a log message given the URL of the database after the first connection.
This commit contains also opportunistic javadoc formatting.

Modified:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/Initializer.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/SQLUtilities.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGFactory.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGInstaller.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/InstallationScriptProvider.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/SQLTranslator.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.properties
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages_fr.properties

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/Initializer.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/Initializer.java?rev=1769012&r1=1769011&r2=1769012&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/Initializer.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/Initializer.java [UTF-8] Wed Nov  9 20:05:17 2016
@@ -19,6 +19,9 @@ package org.apache.sis.internal.metadata
 import java.util.Locale;
 import java.net.URL;
 import java.net.URLClassLoader;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.util.concurrent.Callable;
 import java.util.logging.Level;
 import java.util.logging.LogRecord;
@@ -27,6 +30,7 @@ import java.security.PrivilegedAction;
 import java.lang.reflect.Method;
 import javax.sql.DataSource;
 import java.sql.Connection;
+import java.sql.DatabaseMetaData;
 import java.sql.SQLException;
 import javax.naming.Context;
 import javax.naming.InitialContext;
@@ -44,11 +48,6 @@ import org.apache.sis.internal.system.Lo
 import org.apache.sis.util.resources.Messages;
 import org.apache.sis.util.logging.Logging;
 
-// Branch-dependent imports
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-
 
 /**
  * Manages the unique {@link DataSource} instance to the {@code $SIS_DATA/Databases/SpatialMetadata} database.
@@ -99,6 +98,12 @@ public abstract class Initializer {
     private static DataSource source;
 
     /**
+     * {@code true} if {@link #connected(DatabaseMetaData)} has been invoked at least once.
+     * This is reset to {@code false} if the {@link #source} is changed.
+     */
+    private static boolean connected;
+
+    /**
      * For subclasses only.
      */
     protected Initializer() {
@@ -107,7 +112,7 @@ public abstract class Initializer {
     /**
      * Invoked for populating an initially empty database.
      *
-     * @param connection Connection to the empty database.
+     * @param  connection  connection to the empty database.
      * @throws SQLException if an error occurred while populating the database.
      */
     protected abstract void createSchema(Connection connection) throws SQLException;
@@ -163,13 +168,14 @@ public abstract class Initializer {
          * This method clears the {@link Initializer#source}, unregisters this listener
          * and notifies other SIS modules.
          *
-         * @param event Ignored. May be null.
+         * @param  event  ignored. Can be null.
          */
         @Override
         public void objectChanged(NamingEvent event) {
             try {
                 synchronized (Initializer.class) {
                     source = null;
+                    connected = false;
                     Shutdown.unregister(this);
                     context.removeNamingListener(this);
                 }
@@ -213,7 +219,7 @@ public abstract class Initializer {
      *   <li>Otherwise (no JNDI, no environment variable, no Derby property set), {@code null}.</li>
      * </ol>
      *
-     * @return The data source for the {@code $SIS_DATA/Databases/SpatialMetadata} or equivalent database, or {@code null} if none.
+     * @return the data source for the {@code $SIS_DATA/Databases/SpatialMetadata} or equivalent database, or {@code null} if none.
      * @throws javax.naming.NamingException     if an error occurred while fetching the data source from a JNDI context.
      * @throws java.net.MalformedURLException   if an error occurred while converting the {@code derby.jar} file to URL.
      * @throws java.lang.ClassNotFoundException if {@code derby.jar} has not been found on the JDK installation directory.
@@ -315,11 +321,34 @@ public abstract class Initializer {
     }
 
     /**
+     * Prepares a log record saying that a connection to the spatial metadata database has been created.
+     * This method can be invoked after {@link DataSource#getConnection()}. When invoked for the first time,
+     * the record level is set to {@link Level#CONFIG}. On next calls, the level become {@link Level#FINE}.
+     *
+     * @param  metadata  the value of {@code DataSource.getConnection().getMetaData()} or equivalent.
+     * @return the record to log. Caller should set the source class name and source method name.
+     * @throws SQLException if an error occurred while fetching the database URL.
+     *
+     * @since 0.8
+     */
+    public static LogRecord connected(final DatabaseMetaData metadata) throws SQLException {
+        final Level level;
+        synchronized (Initializer.class) {
+            level = connected ? Level.FINE : Level.CONFIG;
+            connected = true;
+        }
+        final LogRecord record = Messages.getResources(null).getLogRecord(level,
+                Messages.Keys.ConnectedToGeospatialDatabase_1, SQLUtilities.getSimplifiedURL(metadata));
+        record.setLoggerName(Loggers.SYSTEM);
+        return record;
+    }
+
+    /**
      * Returns a message for unspecified data source. The message will depend on whether a JNDI context exists or not.
      * This message can be used for constructing an exception when {@link #getDataSource()} returned {@code null}.
      *
-     * @param locale The locale for the message to produce, or {@code null} for the default one.
-     * @return Message for unspecified data source.
+     * @param  locale  the locale for the message to produce, or {@code null} for the default one.
+     * @return message for unspecified data source.
      */
     public static String unspecified(final Locale locale) {
         final short key;
@@ -344,8 +373,8 @@ public abstract class Initializer {
      *
      * <p>It is caller's responsibility to shutdown the Derby database after usage.</p>
      *
-     * @param  path  Relative or absolute path to the database.
-     * @return The data source.
+     * @param  path  relative or absolute path to the database.
+     * @return the data source.
      * @throws Exception if the data source can not be created.
      */
     static DataSource forJavaDB(final String path) throws Exception {
@@ -398,6 +427,7 @@ public abstract class Initializer {
         final DataSource ds = source;
         if (ds != null) {                       // Should never be null, but let be safe.
             source = null;                      // Clear now in case of failure in remaining code.
+            connected = false;
             ds.getClass().getMethod("setShutdownDatabase", String.class).invoke(ds, "shutdown");
             try {
                 ds.getConnection().close();     // Does the actual shutdown.
@@ -416,7 +446,7 @@ public abstract class Initializer {
     /**
      * Returns {@code true} if the given exception is the one that we expect in successful shutdown of a Derby database.
      *
-     * @param e The exception thrown by Derby.
+     * @param  e  the exception thrown by Derby.
      * @return {@code true} if the exception indicates a successful shutdown.
      */
     static boolean isSuccessfulShutdown(final SQLException e) {

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/SQLUtilities.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/SQLUtilities.java?rev=1769012&r1=1769011&r2=1769012&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/SQLUtilities.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/SQLUtilities.java [UTF-8] Wed Nov  9 20:05:17 2016
@@ -17,11 +17,13 @@
 package org.apache.sis.internal.metadata.sql;
 
 import java.sql.SQLException;
+import java.sql.SQLDataException;
 import java.sql.DatabaseMetaData;
 import org.apache.sis.util.Static;
 import org.apache.sis.util.Characters;
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.util.Workaround;
+import org.apache.sis.util.resources.Errors;
 
 
 /**
@@ -33,7 +35,7 @@ import org.apache.sis.util.Workaround;
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.7
- * @version 0.7
+ * @version 0.8
  * @module
  */
 public final class SQLUtilities extends Static {
@@ -47,8 +49,8 @@ public final class SQLUtilities extends
      * Returns a simplified form of the URL (truncated before the first {@code ?} or {@code ;} character),
      * for logging or informative purpose only.
      *
-     * @param  metadata The metadata of the database.
-     * @return A simplified version of database URL.
+     * @param  metadata  the metadata of the database.
+     * @return a simplified version of database URL.
      * @throws SQLException if an error occurred while fetching the URL.
      */
     public static String getSimplifiedURL(final DatabaseMetaData metadata) throws SQLException {
@@ -59,14 +61,46 @@ public final class SQLUtilities extends
     }
 
     /**
+     * Converts the given string to a boolean value, or returns {@code null} if the value is unrecognized.
+     * This method recognizes "true", "false", "yes", "no", "t", "f", 0 and 1 (case insensitive).
+     *
+     * @param  text  the characters to convert to a boolean value, or {@code null}.
+     * @return the given characters as a boolean value, or {@code null} if the given text was null or empty.
+     * @throws SQLDataException if the given text is non-null and non-empty but not recognized.
+     *
+     * @since 0.8
+     */
+    public static Boolean toBoolean(final String text) throws SQLException {
+        if (text == null) {
+            return null;
+        }
+        switch (text.length()) {
+            case 0: return null;
+            case 1: {
+                switch (text.charAt(0)) {
+                    case '0': case 'n': case 'N': case 'f': case 'F': return Boolean.FALSE;
+                    case '1': case 'y': case 'Y': case 't': case 'T': return Boolean.TRUE;
+                }
+                break;
+            }
+            default: {
+                if (text.equalsIgnoreCase("true")  || text.equalsIgnoreCase("yes")) return Boolean.TRUE;
+                if (text.equalsIgnoreCase("false") || text.equalsIgnoreCase("no"))  return Boolean.FALSE;
+                break;
+            }
+        }
+        throw new SQLDataException(Errors.format(Errors.Keys.CanNotConvertValue_2, text, Boolean.class));
+    }
+
+    /**
      * Returns a string like the given string but with all characters that are not letter or digit
      * replaced by the wildcard % character.
      *
      * <p>This method avoid to put a % symbol as the first character, since it prevent some databases
      * to use their index.</p>
      *
-     * @param identifier The identifier to get as a SQL LIKE pattern.
-     * @return The given identifier as a SQL LIKE pattern.
+     * @param  identifier the identifier to get as a SQL LIKE pattern.
+     * @return the given identifier as a SQL LIKE pattern.
      */
     public static String toLikePattern(final String identifier) {
         boolean isLetterOrDigit = false;
@@ -100,8 +134,8 @@ public final class SQLUtilities extends
      *
      * which returns "NTF (Paris) / Lambert zone I" as expected but also zones II and III.
      *
-     * @param  expected The string to search.
-     * @param  actual The string found in the database.
+     * @param  expected  the string to search.
+     * @param  actual    the string found in the database.
      * @return {@code true} if the given string can be accepted.
      */
     @Workaround(library = "Derby", version = "10.11")

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java?rev=1769012&r1=1769011&r2=1769012&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java [UTF-8] Wed Nov  9 20:05:17 2016
@@ -423,9 +423,9 @@ public abstract class ConcurrentAuthorit
      *
      * <p>All arguments given to this method are for logging purpose only.</p>
      *
-     * @param caller The caller method, or {@code null} for {@code "create" + type.getSimpleName()}.
-     * @param type   The type of the created object, or {@code null} for performing no logging.
-     * @param code   The code of the created object, or {@code null} if none.
+     * @param  caller  the caller method, or {@code null} for {@code "create" + type.getSimpleName()}.
+     * @param  type    the type of the created object, or {@code null} for performing no logging.
+     * @param  code    the code of the created object, or {@code null} if none.
      */
     private void release(String caller, final Class<?> type, final String code) {
         final DataAccessRef<DAO> usage = currentDAO.get();  // A null value here would be an error in our algorithm.
@@ -620,8 +620,8 @@ public abstract class ConcurrentAuthorit
      * logging the problem. {@code ConcurrentAuthorityFactory} should be able to continue its work normally since the
      * factory that we failed to close will not be used anymore.
      *
-     * @param method     The name of the method to report as the source of the problem.
-     * @param exception  The exception that occurred while closing a Data Access Object.
+     * @param  method     the name of the method to report as the source of the problem.
+     * @param  exception  the exception that occurred while closing a Data Access Object.
      */
     static void unexpectedException(final String method, final Exception exception) {
         Logging.unexpectedException(Logging.getLogger(Loggers.CRS_FACTORY),
@@ -648,7 +648,7 @@ public abstract class ConcurrentAuthorit
      * This delay is measured from the last time the Data Access Object has been used by a {@code createFoo(String)} method.
      *
      * @param unit The desired unit of measurement for the timeout.
-     * @return The current timeout in the given unit of measurement.
+     * @return the current timeout in the given unit of measurement.
      */
     public long getTimeout(final TimeUnit unit) {
         synchronized (availableDAOs) {
@@ -661,8 +661,8 @@ public abstract class ConcurrentAuthorit
      * If a new Data Access Object is needed after the disposal of the last one, then the {@link #newDataAccess()}
      * method will be invoked again.
      *
-     * @param delay The delay of inactivity before to close a Data Access Object.
-     * @param unit  The unit of measurement of the given delay.
+     * @param  delay  the delay of inactivity before to close a Data Access Object.
+     * @param  unit   the unit of measurement of the given delay.
      */
     public void setTimeout(long delay, final TimeUnit unit) {
         ArgumentChecks.ensureStrictlyPositive("delay", delay);
@@ -690,7 +690,7 @@ public abstract class ConcurrentAuthorit
      * If this method can not get a Data Access Object (for example because no database connection is available),
      * then this method returns {@code null}.
      *
-     * @return The organization responsible for definition of the database, or {@code null} if unavailable.
+     * @return the organization responsible for definition of the database, or {@code null} if unavailable.
      */
     @Override
     public Citation getAuthority() {
@@ -720,8 +720,8 @@ public abstract class ConcurrentAuthorit
      *   <li>release the Data Access Object.</li>
      * </ol>
      *
-     * @param  type The spatial reference objects type (e.g. {@code ProjectedCRS.class}).
-     * @return The set of authority codes for spatial reference objects of the given type.
+     * @param  type  the spatial reference objects type (e.g. {@code ProjectedCRS.class}).
+     * @return the set of authority codes for spatial reference objects of the given type.
      *         If this factory does not contains any object of the given type, then this method returns an empty set.
      * @throws FactoryException if access to the underlying database failed.
      */
@@ -749,8 +749,8 @@ public abstract class ConcurrentAuthorit
      *   <li>release the Data Access Object.</li>
      * </ol>
      *
-     * @param  code Value allocated by authority.
-     * @return A description of the object, or {@code null} if the object
+     * @param  code  value allocated by authority.
+     * @return a description of the object, or {@code null} if the object
      *         corresponding to the specified {@code code} has no description.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the query failed for some other reason.
@@ -794,8 +794,8 @@ public abstract class ConcurrentAuthorit
      * It is okay to return internal codes completely different than the given codes,
      * provided that the Data Access Objects will understand those internal codes.
      *
-     * @param  code The code to normalize.
-     * @return The normalized code.
+     * @param  code  the code to normalize.
+     * @return the normalized code.
      * @throws FactoryException if an error occurred while normalizing the given code.
      */
     protected String normalizeCode(String code) throws FactoryException {
@@ -817,7 +817,7 @@ public abstract class ConcurrentAuthorit
      *   </li>
      * </ul>
      *
-     * @return The object for the given code.
+     * @return the object for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -837,7 +837,7 @@ public abstract class ConcurrentAuthorit
      *       {@link #createObject(String)} method cached a value before to try that method.</li>
      * </ul>
      *
-     * @return The coordinate reference system for the given code.
+     * @return the coordinate reference system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -860,7 +860,7 @@ public abstract class ConcurrentAuthorit
      *       {@link #createCoordinateReferenceSystem(String)} method cached a value before to try that method.</li>
      * </ul>
      *
-     * @return The coordinate reference system for the given code.
+     * @return the coordinate reference system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -883,7 +883,7 @@ public abstract class ConcurrentAuthorit
      *       {@link #createCoordinateReferenceSystem(String)} method cached a value before to try that method.</li>
      * </ul>
      *
-     * @return The coordinate reference system for the given code.
+     * @return the coordinate reference system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -906,7 +906,7 @@ public abstract class ConcurrentAuthorit
      *       {@link #createCoordinateReferenceSystem(String)} method cached a value before to try that method.</li>
      * </ul>
      *
-     * @return The coordinate reference system for the given code.
+     * @return the coordinate reference system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -929,7 +929,7 @@ public abstract class ConcurrentAuthorit
      *       {@link #createCoordinateReferenceSystem(String)} method cached a value before to try that method.</li>
      * </ul>
      *
-     * @return The coordinate reference system for the given code.
+     * @return the coordinate reference system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -952,7 +952,7 @@ public abstract class ConcurrentAuthorit
      *       {@link #createCoordinateReferenceSystem(String)} method cached a value before to try that method.</li>
      * </ul>
      *
-     * @return The coordinate reference system for the given code.
+     * @return the coordinate reference system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -975,7 +975,7 @@ public abstract class ConcurrentAuthorit
      *       {@link #createCoordinateReferenceSystem(String)} method cached a value before to try that method.</li>
      * </ul>
      *
-     * @return The coordinate reference system for the given code.
+     * @return the coordinate reference system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -998,7 +998,7 @@ public abstract class ConcurrentAuthorit
      *       {@link #createCoordinateReferenceSystem(String)} method cached a value before to try that method.</li>
      * </ul>
      *
-     * @return The coordinate reference system for the given code.
+     * @return the coordinate reference system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1021,7 +1021,7 @@ public abstract class ConcurrentAuthorit
      *       {@link #createCoordinateReferenceSystem(String)} method cached a value before to try that method.</li>
      * </ul>
      *
-     * @return The coordinate reference system for the given code.
+     * @return the coordinate reference system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1044,7 +1044,7 @@ public abstract class ConcurrentAuthorit
      *       {@link #createCoordinateReferenceSystem(String)} method cached a value before to try that method.</li>
      * </ul>
      *
-     * @return The coordinate reference system for the given code.
+     * @return the coordinate reference system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1067,7 +1067,7 @@ public abstract class ConcurrentAuthorit
      *       {@link #createObject(String)} method cached a value before to try that method.</li>
      * </ul>
      *
-     * @return The datum for the given code.
+     * @return the datum for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1090,7 +1090,7 @@ public abstract class ConcurrentAuthorit
      *       {@link #createDatum(String)} method cached a value before to try that method.</li>
      * </ul>
      *
-     * @return The datum for the given code.
+     * @return the datum for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1113,7 +1113,7 @@ public abstract class ConcurrentAuthorit
      *       {@link #createDatum(String)} method cached a value before to try that method.</li>
      * </ul>
      *
-     * @return The datum for the given code.
+     * @return the datum for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1136,7 +1136,7 @@ public abstract class ConcurrentAuthorit
      *       {@link #createDatum(String)} method cached a value before to try that method.</li>
      * </ul>
      *
-     * @return The datum for the given code.
+     * @return the datum for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1159,7 +1159,7 @@ public abstract class ConcurrentAuthorit
      *       {@link #createDatum(String)} method cached a value before to try that method.</li>
      * </ul>
      *
-     * @return The datum for the given code.
+     * @return the datum for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1182,7 +1182,7 @@ public abstract class ConcurrentAuthorit
      *       {@link #createDatum(String)} method cached a value before to try that method.</li>
      * </ul>
      *
-     * @return The datum for the given code.
+     * @return the datum for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1205,7 +1205,7 @@ public abstract class ConcurrentAuthorit
      *       {@link #createObject(String)} method cached a value before to try that method.</li>
      * </ul>
      *
-     * @return The ellipsoid for the given code.
+     * @return the ellipsoid for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1228,7 +1228,7 @@ public abstract class ConcurrentAuthorit
      *       {@link #createObject(String)} method cached a value before to try that method.</li>
      * </ul>
      *
-     * @return The prime meridian for the given code.
+     * @return the prime meridian for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1250,7 +1250,7 @@ public abstract class ConcurrentAuthorit
      *       method in the parent class.</li>
      * </ul>
      *
-     * @return The extent for the given code.
+     * @return the extent for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1273,7 +1273,7 @@ public abstract class ConcurrentAuthorit
      *       {@link #createObject(String)} method cached a value before to try that method.</li>
      * </ul>
      *
-     * @return The coordinate system for the given code.
+     * @return the coordinate system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1296,7 +1296,7 @@ public abstract class ConcurrentAuthorit
      *       {@link #createCoordinateSystem(String)} method cached a value before to try that method.</li>
      * </ul>
      *
-     * @return The coordinate system for the given code.
+     * @return the coordinate system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1319,7 +1319,7 @@ public abstract class ConcurrentAuthorit
      *       {@link #createCoordinateSystem(String)} method cached a value before to try that method.</li>
      * </ul>
      *
-     * @return The coordinate system for the given code.
+     * @return the coordinate system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1342,7 +1342,7 @@ public abstract class ConcurrentAuthorit
      *       {@link #createCoordinateSystem(String)} method cached a value before to try that method.</li>
      * </ul>
      *
-     * @return The coordinate system for the given code.
+     * @return the coordinate system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1365,7 +1365,7 @@ public abstract class ConcurrentAuthorit
      *       {@link #createCoordinateSystem(String)} method cached a value before to try that method.</li>
      * </ul>
      *
-     * @return The coordinate system for the given code.
+     * @return the coordinate system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1388,7 +1388,7 @@ public abstract class ConcurrentAuthorit
      *       {@link #createCoordinateSystem(String)} method cached a value before to try that method.</li>
      * </ul>
      *
-     * @return The coordinate system for the given code.
+     * @return the coordinate system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1412,7 +1412,7 @@ public abstract class ConcurrentAuthorit
      *       {@link #createCoordinateSystem(String)} method cached a value before to try that method.</li>
      * </ul>
      *
-     * @return The coordinate system for the given code.
+     * @return the coordinate system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1436,7 +1436,7 @@ public abstract class ConcurrentAuthorit
      *       {@link #createCoordinateSystem(String)} method cached a value before to try that method.</li>
      * </ul>
      *
-     * @return The coordinate system for the given code.
+     * @return the coordinate system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1459,7 +1459,7 @@ public abstract class ConcurrentAuthorit
      *       {@link #createObject(String)} method cached a value before to try that method.</li>
      * </ul>
      *
-     * @return The axis for the given code.
+     * @return the axis for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1481,7 +1481,7 @@ public abstract class ConcurrentAuthorit
      *       method in the parent class.</li>
      * </ul>
      *
-     * @return The unit of measurement for the given code.
+     * @return the unit of measurement for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1504,7 +1504,7 @@ public abstract class ConcurrentAuthorit
      *       {@link #createObject(String)} method cached a value before to try that method.</li>
      * </ul>
      *
-     * @return The parameter descriptor for the given code.
+     * @return the parameter descriptor for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1527,7 +1527,7 @@ public abstract class ConcurrentAuthorit
      *       {@link #createObject(String)} method cached a value before to try that method.</li>
      * </ul>
      *
-     * @return The operation method for the given code.
+     * @return the operation method for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1550,7 +1550,7 @@ public abstract class ConcurrentAuthorit
      *       {@link #createObject(String)} method cached a value before to try that method.</li>
      * </ul>
      *
-     * @return The operation for the given code.
+     * @return the operation for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1631,7 +1631,7 @@ public abstract class ConcurrentAuthorit
      * @param  <T>   The type of the object to be returned.
      * @param  proxy The proxy to use for creating the object.
      * @param  code  The code of the object to create.
-     * @return The object extracted from the cache or created.
+     * @return the object extracted from the cache or created.
      * @throws FactoryException If an error occurred while creating the object.
      */
     private <T> T create(final AuthorityFactoryProxy<T> proxy, final String code) throws FactoryException {
@@ -1677,7 +1677,7 @@ public abstract class ConcurrentAuthorit
      *   </li>
      * </ul>
      *
-     * @return The operations from {@code sourceCRS} to {@code targetCRS}.
+     * @return the operations from {@code sourceCRS} to {@code targetCRS}.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1712,7 +1712,7 @@ public abstract class ConcurrentAuthorit
      * Returns a finder which can be used for looking up unidentified objects.
      * The default implementation delegates lookup to the underlying Data Access Object and caches the result.
      *
-     * @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
@@ -2077,7 +2077,7 @@ public abstract class ConcurrentAuthorit
      * Returns a string representation of this factory for debugging purpose only.
      * The string returned by this method may change in any future SIS version.
      *
-     * @return A string representation for debugging purpose.
+     * @return a string representation for debugging purpose.
      */
     @Debug
     @Override

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java?rev=1769012&r1=1769011&r2=1769012&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java [UTF-8] Wed Nov  9 20:05:17 2016
@@ -461,7 +461,7 @@ addURIs:    for (int i=0; ; i++) {
                     case 0: url = "http://epsg-registry.org/"; function = OnLineFunction.SEARCH; break;
                     case 1: url = "http://www.epsg.org/"; function = OnLineFunction.DOWNLOAD; break;
                     case 2: {
-                        url = metadata.getURL();
+                        url = SQLUtilities.getSimplifiedURL(metadata);
                         function = OnLineFunction.valueOf(CONNECTION);
                         description = Resources.formatInternational(Resources.Keys.GeodeticDataBase_4,
                                 Constants.EPSG, version, metadata.getDatabaseProductName(),
@@ -473,7 +473,7 @@ addURIs:    for (int i=0; ; i++) {
                 }
                 final DefaultOnlineResource r = new DefaultOnlineResource();
                 try {
-                    r.setLinkage(new URI(SQLUtilities.getSimplifiedURL(metadata)));
+                    r.setLinkage(new URI(url));
                 } catch (URISyntaxException exception) {
                     unexpectedException("getAuthority", exception);
                 }
@@ -2520,13 +2520,15 @@ next:               while (r.next()) {
                         " WHERE (PARAMETER_CODE = ?)", epsg))
                 {
                     if (r.next()) {
-                        final String v = r.getString(1);
-                        if (v != null && !r.next()) {
-                            if (v.equalsIgnoreCase("true") || v.equalsIgnoreCase("yes") || v.equals("1")) {
-                                isReversible = SignReversalComment.OPPOSITE;
-                            } else if (v.equalsIgnoreCase("false") || v.equalsIgnoreCase("no") || v.equals("0")) {
-                                isReversible = SignReversalComment.SAME;
-                            }
+                        Boolean b;
+                        if (translator.useBoolean()) {
+                            b = r.getBoolean(1);
+                            if (r.wasNull()) b = null;
+                        } else {
+                            b = SQLUtilities.toBoolean(r.getString(1));
+                        }
+                        if (b != null) {
+                            isReversible = b ? SignReversalComment.OPPOSITE : SignReversalComment.SAME;
                         }
                     }
                 }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGFactory.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGFactory.java?rev=1769012&r1=1769011&r2=1769012&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGFactory.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGFactory.java [UTF-8] Wed Nov  9 20:05:17 2016
@@ -43,6 +43,7 @@ import org.apache.sis.internal.system.De
 import org.apache.sis.internal.util.Constants;
 import org.apache.sis.referencing.factory.ConcurrentAuthorityFactory;
 import org.apache.sis.referencing.factory.UnavailableFactoryException;
+import org.apache.sis.util.logging.Logging;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.Classes;
 import org.apache.sis.util.Exceptions;
@@ -74,7 +75,7 @@ import org.apache.sis.util.Localized;
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.7
- * @version 0.7
+ * @version 0.8
  * @module
  *
  * @see EPSGDataAccess
@@ -239,8 +240,8 @@ public class EPSGFactory extends Concurr
      *       {@linkplain Locale#getDefault(Locale.Category) display locale}.</li>
      * </ul>
      *
-     * @param  properties The data source, authority factories and other configuration properties,
-     *                    or {@code null} for the default values.
+     * @param  properties  the data source, authority factories and other configuration properties,
+     *                     or {@code null} for the default values.
      * @throws ClassCastException if a property value is not of the expected class.
      * @throws IllegalArgumentException if a property value is invalid.
      * @throws FactoryException if an error occurred while creating the EPSG factory.
@@ -426,6 +427,7 @@ public class EPSGFactory extends Concurr
         Connection connection = null;
         try {
             connection = dataSource.getConnection();
+            Logging.log(EPSGFactory.class, "newDataAccess", Initializer.connected(connection.getMetaData()));
             SQLTranslator tr = translator;
             if (tr == null) {
                 synchronized (this) {

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGInstaller.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGInstaller.java?rev=1769012&r1=1769011&r2=1769012&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGInstaller.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGInstaller.java [UTF-8] Wed Nov  9 20:05:17 2016
@@ -82,7 +82,7 @@ final class EPSGInstaller extends Script
      * Creates a new runner which will execute the statements using the given connection.
      * The encoding is {@code "ISO-8859-1"}, which is the encoding used for the files provided by EPSG.
      *
-     * @param connection The connection to the database.
+     * @param  connection  the connection to the database.
      * @throws SQLException if an error occurred while executing a SQL statement.
      */
     public EPSGInstaller(final Connection connection) throws SQLException {
@@ -111,7 +111,7 @@ final class EPSGInstaller extends Script
      *
      * <p>This method should be invoked only once. It does nothing if the database does not supports schema.</p>
      *
-     * @param schema The schema (usually {@code "epsg"}).
+     * @param  schema  the schema (usually {@code "epsg"}).
      * @throws SQLException if the schema can not be created.
      * @throws IOException if an I/O operation was required and failed.
      */
@@ -180,9 +180,9 @@ final class EPSGInstaller extends Script
      * same than "information is an empty string". This replacement is okay in this particular case
      * since there is no field in the EPSG database for which we really want an empty string.
      *
-     * @param sql   The whole SQL statement.
-     * @param lower Index of the first character of the text in {@code sql}.
-     * @param upper Index after the last character of the text in {@code sql}.
+     * @param sql    the whole SQL statement.
+     * @param lower  index of the first character of the text in {@code sql}.
+     * @param upper  index after the last character of the text in {@code sql}.
      */
     @Override
     protected void editText(final StringBuilder sql, final int lower, final int upper) {
@@ -206,7 +206,7 @@ final class EPSGInstaller extends Script
      * Modifies the SQL statement before to execute it, or omit unsupported statements.
      *
      * @throws SQLException if an error occurred while executing the SQL statement.
-     * @throws IOException if an I/O operation was required and failed.
+     * @throws IOException  if an I/O operation was required and failed.
      */
     @Override
     protected int execute(final StringBuilder sql) throws SQLException, IOException {
@@ -239,8 +239,8 @@ final class EPSGInstaller extends Script
     /**
      * Processes to the creation of the EPSG database using the SQL scripts from the given provider.
      *
-     * @param  scriptProvider User-provided scripts, or {@code null} for automatic lookup.
-     * @throws IOException if an error occurred while reading an input.
+     * @param  scriptProvider  user-provided scripts, or {@code null} for automatic lookup.
+     * @throws IOException  if an error occurred while reading an input.
      * @throws SQLException if an error occurred while executing a SQL statement.
      */
     public void run(InstallationResources scriptProvider, final Locale locale) throws SQLException, IOException {

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/InstallationScriptProvider.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/InstallationScriptProvider.java?rev=1769012&r1=1769011&r2=1769012&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/InstallationScriptProvider.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/InstallationScriptProvider.java [UTF-8] Wed Nov  9 20:05:17 2016
@@ -29,6 +29,10 @@ import java.io.InputStreamReader;
 import java.io.IOException;
 import java.io.FileNotFoundException;
 import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.DirectoryStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.logging.Logging;
 import org.apache.sis.util.ArgumentChecks;
@@ -39,12 +43,6 @@ import org.apache.sis.internal.system.Lo
 import org.apache.sis.internal.util.CollectionsExt;
 import org.apache.sis.internal.util.Constants;
 
-// Branch-dependent imports
-import java.nio.charset.StandardCharsets;
-import java.nio.file.DirectoryStream;
-import java.nio.file.Files;
-import java.nio.file.Path;
-
 
 /**
  * Provides SQL scripts needed for creating a local copy of a dataset. This class allows Apache SIS users
@@ -118,8 +116,8 @@ public abstract class InstallationScript
      *   </tr>
      * </table>
      *
-     * @param authority The authority (typically {@code "EPSG"}), or {@code null} if not available.
-     * @param resources Names of the SQL scripts to read.
+     * @param  authority  the authority (typically {@code "EPSG"}), or {@code null} if not available.
+     * @param  resources  names of the SQL scripts to read.
      *
      * @see #getResourceNames(String)
      * @see #openStream(String)
@@ -142,7 +140,7 @@ public abstract class InstallationScript
      * if that authority was {@code null}. An empty set means that the provider does not have all
      * needed resources or does not have permission to distribute the installation scripts.
      *
-     * @return Identifiers of SQL scripts that this instance can distribute.
+     * @return identifiers of SQL scripts that this instance can distribute.
      */
     @Override
     @SuppressWarnings("ReturnOfCollectionOrArrayField")
@@ -164,8 +162,8 @@ public abstract class InstallationScript
      * This is a copy of the array of names given to the constructor.
      * Those names are often filenames, but not necessarily (they may be just labels).
      *
-     * @param  authority The value given at construction time (e.g. {@code "EPSG"}).
-     * @return The names of all SQL scripts to execute.
+     * @param  authority  the value given at construction time (e.g. {@code "EPSG"}).
+     * @return the names of all SQL scripts to execute.
      * @throws IllegalArgumentException if the given {@code authority} argument is not the expected value.
      * @throws IOException if fetching the script names required an I/O operation and that operation failed.
      */
@@ -201,10 +199,10 @@ public abstract class InstallationScript
      * in which case an Apache SIS build-in script is used – and wrap the result in a {@link LineNumberReader}.
      * The file encoding is ISO LATIN-1 (the encoding used in the scripts distributed by EPSG).
      *
-     * @param  authority The value given at construction time (e.g. {@code "EPSG"}).
-     * @param  resource Index of the SQL script to read, from 0 inclusive to
+     * @param  authority  the value given at construction time (e.g. {@code "EPSG"}).
+     * @param  resource   index of the SQL script to read, from 0 inclusive to
      *         <code>{@linkplain #getResourceNames getResourceNames}(authority).length</code> exclusive.
-     * @return A reader for the content of SQL script to execute.
+     * @return a reader for the content of SQL script to execute.
      * @throws IllegalArgumentException if the given {@code authority} argument is not the expected value.
      * @throws IndexOutOfBoundsException if the given {@code resource} argument is out of bounds.
      * @throws IOException if an error occurred while creating the reader.
@@ -261,8 +259,8 @@ public abstract class InstallationScript
      * }
      * </div>
      *
-     * @param  name Name of the script file to open. Can be {@code null} if the resource is not found.
-     * @return An input stream opened of the given script file.
+     * @param  name  name of the script file to open. Can be {@code null} if the resource is not found.
+     * @return an input stream opened of the given script file.
      * @throws IOException if an error occurred while opening the file.
      */
     protected abstract InputStream openStream(final String name) throws IOException;
@@ -368,7 +366,7 @@ public abstract class InstallationScript
         /**
          * Returns {@code null} since the user is presumed to have downloaded the files himself.
          *
-         * @return The terms of use in plain text or HTML, or {@code null} if the license is presumed already accepted.
+         * @return the terms of use in plain text or HTML, or {@code null} if the license is presumed already accepted.
          */
         @Override
         public String getLicense(String authority, Locale locale, String mimeType) {
@@ -378,8 +376,8 @@ public abstract class InstallationScript
         /**
          * Opens the input stream for the SQL script of the given name.
          *
-         * @param  name Name of the script file to open.
-         * @return An input stream opened of the given script file, or {@code null} if the resource was not found.
+         * @param  name  name of the script file to open.
+         * @return an input stream opened of the given script file, or {@code null} if the resource was not found.
          * @throws IOException if an error occurred while opening the file.
          */
         @Override

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/SQLTranslator.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/SQLTranslator.java?rev=1769012&r1=1769011&r2=1769012&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/SQLTranslator.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/SQLTranslator.java [UTF-8] Wed Nov  9 20:05:17 2016
@@ -219,9 +219,9 @@ public class SQLTranslator implements Fu
      * An empty string ({@code ""}) means to search for tables without catalog or schema.
      * A {@code null} value means that the catalog or schema should not be used to narrow the search.</p>
      *
-     * @param  md      Information about the database.
-     * @param  catalog The catalog where to look for EPSG schema, or {@code null} if any.
-     * @param  schema  The schema where to look for EPSG tables, or {@code null} if any.
+     * @param  md       information about the database.
+     * @param  catalog  the catalog where to look for EPSG schema, or {@code null} if any.
+     * @param  schema   the schema where to look for EPSG tables, or {@code null} if any.
      * @throws SQLException if an error occurred while querying the database metadata.
      */
     public SQLTranslator(final DatabaseMetaData md, final String catalog, final String schema) throws SQLException {
@@ -313,7 +313,7 @@ public class SQLTranslator implements Fu
      * Note that this method may still return {@code null} if the EPSG tables were not found or if the database
      * does not {@linkplain DatabaseMetaData#supportsCatalogsInDataManipulation() supports catalogs}.
      *
-     * @return The catalog that contains the EPSG schema, or {@code null}.
+     * @return the catalog that contains the EPSG schema, or {@code null}.
      */
     public String getCatalog() {
         return catalog;
@@ -325,7 +325,7 @@ public class SQLTranslator implements Fu
      * Note that this method may still return {@code null} if the EPSG tables were not found or if the database
      * does not {@linkplain DatabaseMetaData#supportsSchemasInDataManipulation() supports schemas}.
      *
-     * @return The schema that contains the EPSG tables, or {@code null}.
+     * @return the schema that contains the EPSG tables, or {@code null}.
      */
     public String getSchema() {
         return schema;
@@ -365,8 +365,8 @@ public class SQLTranslator implements Fu
      * Adapts the given SQL statement from the original MS-Access dialect to the dialect of the target database.
      * Table and column names may also be replaced.
      *
-     * @param  sql The statement in MS-Access dialect.
-     * @return The SQL statement adapted to the dialect of the target database.
+     * @param  sql  the statement in MS-Access dialect.
+     * @return the SQL statement adapted to the dialect of the target database.
      */
     @Override
     public String apply(final String sql) {

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java?rev=1769012&r1=1769011&r2=1769012&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java [UTF-8] Wed Nov  9 20:05:17 2016
@@ -97,8 +97,8 @@ class ConcatenatedTransform extends Abst
      * To create a concatenated transform, use the {@link #create(MathTransform, MathTransform)}
      * factory method instead.
      *
-     * @param transform1 The first math transform.
-     * @param transform2 The second math transform.
+     * @param  transform1  the first math transform.
+     * @param  transform2  the second math transform.
      */
     @SuppressWarnings("OverridableMethodCallDuringObjectConstruction")
     protected ConcatenatedTransform(final MathTransform transform1,
@@ -146,10 +146,10 @@ class ConcatenatedTransform extends Abst
      * The "non-direct" versions use an intermediate buffer when performing transformations; they are slower
      * and consume more memory. They are used only as a fallback when a "direct" version can not be created.</div>
      *
-     * @param tr1 The first math transform.
-     * @param tr2 The second math transform.
-     * @param factory The factory which is (indirectly) invoking this method, or {@code null} if none.
-     * @return The concatenated transform.
+     * @param  tr1      the first math transform.
+     * @param  tr2      the second math transform.
+     * @param  factory  the factory which is (indirectly) invoking this method, or {@code null} if none.
+     * @return the concatenated transform.
      *
      * @see MathTransforms#concatenate(MathTransform, MathTransform)
      */
@@ -185,7 +185,7 @@ class ConcatenatedTransform extends Abst
          *       already computed. The map would be local to a "create" method execution.
          */
         int stepCount = getStepCount(tr1) + getStepCount(tr2);
-        boolean tryAgain = true; // Really 'true' because we want at least 2 iterations.
+        boolean tryAgain = true;                                // Really 'true' because we want at least 2 iterations.
         for (int k=0; ; k++) {
             MathTransform c1 = tr1;
             MathTransform c2 = tr2;
@@ -259,7 +259,7 @@ class ConcatenatedTransform extends Abst
      * into a single one. If no optimized cases has been found, returns {@code null}. In the later
      * case, the caller will need to create a more heavy {@link ConcatenatedTransform} instance.
      *
-     * @param factory The factory which is (indirectly) invoking this method, or {@code null} if none.
+     * @param  factory  the factory which is (indirectly) invoking this method, or {@code null} if none.
      */
     private static MathTransform createOptimized(final MathTransform tr1, final MathTransform tr2,
             final MathTransformFactory factory) throws FactoryException
@@ -397,7 +397,7 @@ class ConcatenatedTransform extends Abst
      * Nested concatenated transforms (if any) are explored recursively in order to
      * get the count of single (non-nested) transforms.
      *
-     * @return The number of single transform steps.
+     * @return the number of single transform steps.
      */
     private int getStepCount() {
         return getStepCount(transform1) + getStepCount(transform2);
@@ -422,7 +422,7 @@ class ConcatenatedTransform extends Abst
      * Returns all concatenated transforms. The returned list contains only <cite>single</cite> transforms,
      * i.e. all nested concatenated transforms (if any) have been flattened.
      *
-     * @return All single math transforms performed by this concatenated transform.
+     * @return all single math transforms performed by this concatenated transform.
      *
      * @see MathTransforms#getSteps(MathTransform)
      */
@@ -491,7 +491,7 @@ class ConcatenatedTransform extends Abst
     /**
      * Adds all concatenated transforms in the given list.
      *
-     * @param transforms The list where to add concatenated transforms.
+     * @param  transforms  the list where to add concatenated transforms.
      */
     private void getSteps(final List<? super MathTransform> transforms) {
         if (transform1 instanceof ConcatenatedTransform) {
@@ -525,7 +525,7 @@ class ConcatenatedTransform extends Abst
      * {@code GeneralDerivedCRS} specify the axis swapping and unit conversions.
      * This special case is internal to SIS implementation and should be unknown to users.</p>
      *
-     * @return The parameterizable transform step, or {@code null} if none.
+     * @return the parameterizable transform step, or {@code null} if none.
      */
     private Parameterized getParameterised() {
         Parameterized param = null;
@@ -582,7 +582,7 @@ class ConcatenatedTransform extends Abst
     /**
      * Transforms the specified {@code ptSrc} and stores the result in {@code ptDst}.
      *
-     * @throws TransformException If {@link #transform1} or {@link #transform2} failed.
+     * @throws TransformException if {@link #transform1} or {@link #transform2} failed.
      */
     @Override
     public DirectPosition transform(final DirectPosition ptSrc, final DirectPosition ptDst)
@@ -599,7 +599,7 @@ class ConcatenatedTransform extends Abst
      * Transforms a single coordinate in a list of ordinal values,
      * and optionally returns the derivative at that location.
      *
-     * @throws TransformException If {@link #transform1} or {@link #transform2} failed.
+     * @throws TransformException if {@link #transform1} or {@link #transform2} failed.
      */
     @Override
     public Matrix transform(final double[] srcPts, final int srcOff,
@@ -635,7 +635,7 @@ class ConcatenatedTransform extends Abst
      * {@link #transform2}. The transformations are performed without intermediate buffer
      * if it can be avoided.
      *
-     * @throws TransformException If {@link #transform1} or {@link #transform2} failed.
+     * @throws TransformException if {@link #transform1} or {@link #transform2} failed.
      */
     @Override
     public void transform(final double[] srcPts, int srcOff,
@@ -718,7 +718,7 @@ class ConcatenatedTransform extends Abst
      * {@link #transform2}. An intermediate buffer of type {@code double[]} for intermediate
      * results is used for reducing rounding errors.
      *
-     * @throws TransformException If {@link #transform1} or {@link #transform2} failed.
+     * @throws TransformException if {@link #transform1} or {@link #transform2} failed.
      */
     @Override
     public void transform(final float[] srcPts, int srcOff,
@@ -780,7 +780,7 @@ class ConcatenatedTransform extends Abst
      * {@link #transform2}. An intermediate buffer of type {@code double[]} for intermediate
      * results is used for reducing rounding errors.
      *
-     * @throws TransformException If {@link #transform1} or {@link #transform2} failed.
+     * @throws TransformException if {@link #transform1} or {@link #transform2} failed.
      */
     @Override
     public void transform(final double[] srcPts, int srcOff,
@@ -822,7 +822,7 @@ class ConcatenatedTransform extends Abst
      * {@link #transform2}. The transformations are performed without intermediate buffer
      * if it can be avoided.
      *
-     * @throws TransformException If {@link #transform1} or {@link #transform2} failed.
+     * @throws TransformException if {@link #transform1} or {@link #transform2} failed.
      */
     @Override
     public void transform(final float [] srcPts, int srcOff,
@@ -882,8 +882,8 @@ class ConcatenatedTransform extends Abst
     /**
      * Gets the derivative of this transform at a point.
      *
-     * @param  point The coordinate point where to evaluate the derivative.
-     * @return The derivative at the specified point (never {@code null}).
+     * @param  point  the coordinate point where to evaluate the derivative.
+     * @return the derivative at the specified point (never {@code null}).
      * @throws TransformException if the derivative can't be evaluated at the specified point.
      */
     @Override
@@ -964,7 +964,7 @@ class ConcatenatedTransform extends Abst
         for (final Object step : transforms) {
             formatter.newLine();
             if (step instanceof FormattableObject) {
-                formatter.append((FormattableObject) step); // May not implement MathTransform.
+                formatter.append((FormattableObject) step);         // May not implement MathTransform.
             } else if (step instanceof MathTransform) {
                 formatter.append((MathTransform) step);
             } else {

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java?rev=1769012&r1=1769011&r2=1769012&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java [UTF-8] Wed Nov  9 20:05:17 2016
@@ -124,7 +124,7 @@ public final class Logging extends Stati
      * Factory changes will take effect only if this method is invoked before the initialization
      * of such classes.
      *
-     * @param factory The new logger factory, or {@code null} if none.
+     * @param  factory  the new logger factory, or {@code null} if none.
      */
     @Configuration
     public static void setLoggerFactory(final LoggerFactory<?> factory) {
@@ -148,8 +148,8 @@ public final class Logging extends Stati
      * Only if no factory was found or if the factory choose to not redirect the loggings, then this
      * method delegate to <code>{@linkplain Logger#getLogger(String) Logger.getLogger}(name)</code>.
      *
-     * @param  name The logger name.
-     * @return A logger for the specified name.
+     * @param  name  the logger name.
+     * @return a logger for the specified name.
      */
     public static Logger getLogger(final String name) {
         final LoggerFactory<?> factory = Logging.factory;
@@ -166,8 +166,8 @@ public final class Logging extends Stati
      * Returns a logger for the specified class. This convenience method invokes
      * {@link #getLogger(String)} with the package name as the logger name.
      *
-     * @param  classe The class for which to obtain a logger.
-     * @return A logger for the specified class.
+     * @param  classe  the class for which to obtain a logger.
+     * @return a logger for the specified class.
      */
     static Logger getLogger(Class<?> classe) {
         Class<?> outer;
@@ -200,9 +200,9 @@ public final class Logging extends Stati
      *   <li>{@linkplain Logger#log(LogRecord) Log} the modified record.</li>
      * </ul>
      *
-     * @param classe The class for which to obtain a logger.
-     * @param method The name of the method which is logging a record.
-     * @param record The record to log.
+     * @param  classe  the class for which to obtain a logger.
+     * @param  method  the name of the method which is logging a record.
+     * @param  record  the record to log.
      */
     public static void log(final Class<?> classe, final String method, final LogRecord record) {
         record.setSourceClassName(classe.getCanonicalName());
@@ -244,10 +244,10 @@ public final class Logging extends Stati
      * trace element where the fully qualified class name starts with {@code "org.apache.sis.image"} or
      * {@code "org.apache.sis.image.io"}, but not {@code "org.apache.sis.imageio"}.</div>
      *
-     * @param logger  Where to log the error, or {@code null} for inferring a default value from other arguments.
-     * @param classe  The class where the error occurred, or {@code null} for inferring a default value from other arguments.
-     * @param method  The method where the error occurred, or {@code null} for inferring a default value from other arguments.
-     * @param error   The error, or {@code null} if none.
+     * @param  logger  where to log the error, or {@code null} for inferring a default value from other arguments.
+     * @param  classe  the class where the error occurred, or {@code null} for inferring a default value from other arguments.
+     * @param  method  the method where the error occurred, or {@code null} for inferring a default value from other arguments.
+     * @param  error   the error, or {@code null} if none.
      * @return {@code true} if the error has been logged, or {@code false} if the given {@code error}
      *         was null or if the logger does not log anything at {@link Level#WARNING}.
      *
@@ -264,11 +264,11 @@ public final class Logging extends Stati
     /**
      * Implementation of {@link #unexpectedException(Logger, Class, String, Throwable)}.
      *
-     * @param logger  Where to log the error, or {@code null} for inferring a default value from other arguments.
-     * @param classe  The fully qualified class name where the error occurred, or {@code null} for inferring a default value from other arguments.
-     * @param method  The method where the error occurred, or {@code null} for inferring a default value from other arguments.
-     * @param error   The error, or {@code null} if none.
-     * @param level   The logging level.
+     * @param  logger  where to log the error, or {@code null} for inferring a default value from other arguments.
+     * @param  classe  the fully qualified class name where the error occurred, or {@code null} for inferring a default value from other arguments.
+     * @param  method  the method where the error occurred, or {@code null} for inferring a default value from other arguments.
+     * @param  error   the error, or {@code null} if none.
+     * @param  level   the logging level.
      * @return {@code true} if the error has been logged, or {@code false} if the given {@code error}
      *         was null or if the logger does not log anything at the specified level.
      */
@@ -396,10 +396,10 @@ public final class Logging extends Stati
      * {@code jre/lib/logging.properties} file is illegal, then {@link MonolineFormatter} will log
      * this problem and use a default time pattern.</div>
      *
-     * @param logger  Where to log the error, or {@code null} for inferring a default value from other arguments.
-     * @param classe  The class where the error occurred, or {@code null} for inferring a default value from other arguments.
-     * @param method  The method name where the error occurred, or {@code null} for inferring a default value from other arguments.
-     * @param error   The error, or {@code null} if none.
+     * @param  logger  where to log the error, or {@code null} for inferring a default value from other arguments.
+     * @param  classe  the class where the error occurred, or {@code null} for inferring a default value from other arguments.
+     * @param  method  the method name where the error occurred, or {@code null} for inferring a default value from other arguments.
+     * @param  error   the error, or {@code null} if none.
      * @return {@code true} if the error has been logged, or {@code false} if the given {@code error}
      *         was null or if the logger does not log anything at {@link Level#CONFIG}.
      *
@@ -415,10 +415,10 @@ public final class Logging extends Stati
      * {@link #unexpectedException(Logger,Class,String,Throwable) unexpectedException(…)}
      * except that it does not log the stack trace and uses a lower logging level.
      *
-     * @param logger  Where to log the error, or {@code null} for inferring a default value from other arguments.
-     * @param classe  The class where the error occurred, or {@code null} for inferring a default value from other arguments.
-     * @param method  The method name where the error occurred, or {@code null} for inferring a default value from other arguments.
-     * @param error   The error, or {@code null} if none.
+     * @param  logger  where to log the error, or {@code null} for inferring a default value from other arguments.
+     * @param  classe  the class where the error occurred, or {@code null} for inferring a default value from other arguments.
+     * @param  method  the method name where the error occurred, or {@code null} for inferring a default value from other arguments.
+     * @param  error   the error, or {@code null} if none.
      * @return {@code true} if the error has been logged, or {@code false} if the given {@code error}
      *         was null or if the logger does not log anything at {@link Level#FINE}.
      *
@@ -437,10 +437,10 @@ public final class Logging extends Stati
      * {@link #unexpectedException(Logger,Class,String,Throwable) unexpectedException}
      * except that it logs the message at the {@link Level#SEVERE SEVERE} level.
      *
-     * @param logger  Where to log the error, or {@code null} for inferring a default value from other arguments.
-     * @param classe  The class where the error occurred, or {@code null} for inferring a default value from other arguments.
-     * @param method  The method name where the error occurred, or {@code null} for inferring a default value from other arguments.
-     * @param error   The error, or {@code null} if none.
+     * @param  logger  where to log the error, or {@code null} for inferring a default value from other arguments.
+     * @param  classe  the class where the error occurred, or {@code null} for inferring a default value from other arguments.
+     * @param  method  the method name where the error occurred, or {@code null} for inferring a default value from other arguments.
+     * @param  error   the error, or {@code null} if none.
      * @return {@code true} if the error has been logged, or {@code false} if the given {@code error}
      *         was null or if the logger does not log anything at {@link Level#SEVERE}.
      *

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.java?rev=1769012&r1=1769011&r2=1769012&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.java [UTF-8] Wed Nov  9 20:05:17 2016
@@ -81,6 +81,11 @@ public final class Messages extends Inde
         public static final short ConfigurationOf_3 = 4;
 
         /**
+         * Connected to geospatial database on “{0}”.
+         */
+        public static final short ConnectedToGeospatialDatabase_1 = 30;
+
+        /**
          * Created an instance of ‘{0}’ from the “{1}” identifier in {2} seconds.
          */
         public static final short CreateDurationFromIdentifier_3 = 5;

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.properties?rev=1769012&r1=1769011&r2=1769012&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.properties [ISO-8859-1] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.properties [ISO-8859-1] Wed Nov  9 20:05:17 2016
@@ -19,6 +19,7 @@ CanNotCreateSchema_1             = Can n
 # In following message, the first characters of parameter {2} should be a line separator ("\r", "\n" or "\r\n").
 CanNotInstantiateForIdentifier_3 = Can not instantiate the object of type \u2018{0}\u2019 identified by \u201c{1}\u201d. Reason is:{2}
 ChangedContainerCapacity_2       = Changed the container capacity from {0} to {1} elements.
+ConnectedToGeospatialDatabase_1  = Connected to geospatial database on \u201c{0}\u201d.
 ConfigurationOf_3                = Configuration of \u201c{0}\u201d received on {1} in {2} seconds.
 CreatedNamedObject_2             = Created an instance of \u2018{0}\u2019 named \u201c{1}\u201d.
 CreatedIdentifiedObject_3        = Created an instance of \u2018{0}\u2019 named \u201c{1}\u201d with the \u201c{2}\u201d identifier.

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages_fr.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages_fr.properties?rev=1769012&r1=1769011&r2=1769012&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages_fr.properties [ISO-8859-1] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages_fr.properties [ISO-8859-1] Wed Nov  9 20:05:17 2016
@@ -26,6 +26,7 @@ CanNotCreateSchema_1             = Ne pe
 # In following message, the first characters of parameter {2} should be a line separator ("\r", "\n" or "\r\n").
 CanNotInstantiateForIdentifier_3 = Ne peut pas cr\u00e9er l\u2019objet de type \u2018{0}\u2019 identifi\u00e9 par \u00ab\u202f{1}\u202f\u00bb. La raison est\u00a0:{2}
 ChangedContainerCapacity_2       = Changement de la capacit\u00e9 du conteneur de {0} vers {1} \u00e9l\u00e9ments.
+ConnectedToGeospatialDatabase_1  = Connect\u00e9 \u00e0 la base de donn\u00e9es g\u00e9ospatiales sur \u00ab\u202f{0}\u202f\u00bb.
 ConfigurationOf_3                = Configuration de \u00ab\u202f{0}\u202f\u00bb re\u00e7ue le {1} en {2} secondes.
 CreatedNamedObject_2             = Cr\u00e9ation d\u2019une instance de \u2018{0}\u2019 nomm\u00e9e \u00ab\u202f{1}\u202f\u00bb.
 CreatedIdentifiedObject_3        = Cr\u00e9ation d\u2019une instance de \u2018{0}\u2019 nomm\u00e9e \u00ab\u202f{1}\u202f\u00bb avec l\u2019identifiant \u00ab\u202f{2}\u202f\u00bb.



Mime
View raw message