sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1733195 - in /sis/branches/JDK8: application/sis-console/src/main/java/org/apache/sis/console/ application/sis-console/src/main/resources/META-INF/services/ application/sis-console/src/main/resources/org/apache/sis/console/ core/sis-refere...
Date Tue, 01 Mar 2016 23:58:44 GMT
Author: desruisseaux
Date: Tue Mar  1 23:58:43 2016
New Revision: 1733195

URL: http://svn.apache.org/viewvc?rev=1733195&view=rev
Log:
Renamed LicensedDataProvider as ResourcesDownloader because not all resources to download
will have a restrictive license.
Add localization for ResourcesDownloader and reduce the level of a log message which partially
redundant with other logs.
Edit javadoc.

Added:
    sis/branches/JDK8/application/sis-console/src/main/java/org/apache/sis/console/ResourcesDownloader.java
      - copied, changed from r1733194, sis/branches/JDK8/application/sis-console/src/main/java/org/apache/sis/console/LicensedDataProvider.java
    sis/branches/JDK8/application/sis-console/src/main/resources/org/apache/sis/console/Messages.properties
  (with props)
    sis/branches/JDK8/application/sis-console/src/main/resources/org/apache/sis/console/Messages_en.properties
  (with props)
    sis/branches/JDK8/application/sis-console/src/main/resources/org/apache/sis/console/Messages_fr.properties
  (with props)
Removed:
    sis/branches/JDK8/application/sis-console/src/main/java/org/apache/sis/console/LicensedDataProvider.java
Modified:
    sis/branches/JDK8/application/sis-console/src/main/java/org/apache/sis/console/Command.java
    sis/branches/JDK8/application/sis-console/src/main/java/org/apache/sis/console/CommandRunner.java
    sis/branches/JDK8/application/sis-console/src/main/resources/META-INF/services/org.apache.sis.setup.InstallationResources
    sis/branches/JDK8/application/sis-console/src/main/resources/org/apache/sis/console/IdentifierState_en.properties
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AuthorityFactories.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/InstallationScriptProvider.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/setup/InstallationResources.java

Modified: sis/branches/JDK8/application/sis-console/src/main/java/org/apache/sis/console/Command.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/application/sis-console/src/main/java/org/apache/sis/console/Command.java?rev=1733195&r1=1733194&r2=1733195&view=diff
==============================================================================
--- sis/branches/JDK8/application/sis-console/src/main/java/org/apache/sis/console/Command.java
[UTF-8] (original)
+++ sis/branches/JDK8/application/sis-console/src/main/java/org/apache/sis/console/Command.java
[UTF-8] Tue Mar  1 23:58:43 2016
@@ -168,6 +168,7 @@ public final class Command {
             }
         }
         this.commandName = commandName;
+        CommandRunner.instance = command;       // For ResourcesDownloader only.
     }
 
     /**

Modified: sis/branches/JDK8/application/sis-console/src/main/java/org/apache/sis/console/CommandRunner.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/application/sis-console/src/main/java/org/apache/sis/console/CommandRunner.java?rev=1733195&r1=1733194&r2=1733195&view=diff
==============================================================================
--- sis/branches/JDK8/application/sis-console/src/main/java/org/apache/sis/console/CommandRunner.java
[UTF-8] (original)
+++ sis/branches/JDK8/application/sis-console/src/main/java/org/apache/sis/console/CommandRunner.java
[UTF-8] Tue Mar  1 23:58:43 2016
@@ -51,6 +51,13 @@ abstract class CommandRunner {
     static final String TEST = "TEST";
 
     /**
+     * The instance, used by {@link ResourcesDownloader} only.
+     * We use this static field as a workaround for the fact that {@code ResourcesDownloader}
is not
+     * instantiated by us, so we can not pass the {@code CommandRunner} instance to its constructor.
+     */
+    static CommandRunner instance;
+
+    /**
      * The set of legal options for this command.
      *
      * @see #help(String)

Copied: sis/branches/JDK8/application/sis-console/src/main/java/org/apache/sis/console/ResourcesDownloader.java
(from r1733194, sis/branches/JDK8/application/sis-console/src/main/java/org/apache/sis/console/LicensedDataProvider.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/application/sis-console/src/main/java/org/apache/sis/console/ResourcesDownloader.java?p2=sis/branches/JDK8/application/sis-console/src/main/java/org/apache/sis/console/ResourcesDownloader.java&p1=sis/branches/JDK8/application/sis-console/src/main/java/org/apache/sis/console/LicensedDataProvider.java&r1=1733194&r2=1733195&rev=1733195&view=diff
==============================================================================
--- sis/branches/JDK8/application/sis-console/src/main/java/org/apache/sis/console/LicensedDataProvider.java
[UTF-8] (original)
+++ sis/branches/JDK8/application/sis-console/src/main/java/org/apache/sis/console/ResourcesDownloader.java
[UTF-8] Tue Mar  1 23:58:43 2016
@@ -16,24 +16,32 @@
  */
 package org.apache.sis.console;
 
+import java.util.Set;
+import java.util.Map;
+import java.util.HashMap;
 import java.util.Collections;
 import java.util.Locale;
-import java.util.Set;
+import java.util.ResourceBundle;
+import java.util.ServiceLoader;
+import java.net.URLClassLoader;
+import java.net.URL;
 import java.io.Console;
 import java.io.IOException;
 import java.io.BufferedReader;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ServiceLoader;
 import java.io.FileNotFoundException;
-import java.nio.file.AccessDeniedException;
 import java.sql.Connection;                             // For javadoc.
+import org.apache.sis.internal.system.DataDirectory;
 import org.apache.sis.util.resources.Errors;
+import org.apache.sis.internal.util.X364;
 import org.apache.sis.internal.util.Fallback;
 import org.apache.sis.setup.InstallationResources;
 
 import static org.apache.sis.internal.util.Constants.EPSG;
 
+// Branch-dependent imports
+import java.nio.file.AccessDeniedException;
+import java.nio.file.Path;
+
 
 /**
  * A provider for data licensed under different terms of use than the Apache license.
@@ -50,7 +58,7 @@ import static org.apache.sis.internal.ut
  * @module
  */
 @Fallback
-public class LicensedDataProvider extends InstallationResources {
+public class ResourcesDownloader extends InstallationResources {
     /**
      * Where to download the EPSG scripts after user has approved the terms of use.
      *
@@ -60,6 +68,12 @@ public class LicensedDataProvider extend
     private static final String DOWNLOAD_URL = "http://home.apache.org/~desruisseaux/Temporary/geotk-epsg-4.0-SNAPSHOT.jar";
 
     /**
+     * Estimation of the EPSG database size after installation, in mega-bytes.
+     * This is for information purpose only.
+     */
+    private static final int DATABASE_SIZE = 20;
+
+    /**
      * The console to use for printing EPSG terms of use and asking for agreement, or {@code
null} if none.
      */
     private final Console console;
@@ -70,11 +84,27 @@ public class LicensedDataProvider extend
     private final Locale locale;
 
     /**
+     * {@code true} if colors can be applied for ANSI X3.64 compliant terminal.
+     */
+    private final boolean colors;
+
+    /**
      * The provider to use for fetching the actual licensed data after we got user's agreement.
      */
     private InstallationResources provider;
 
     /**
+     * The target directory where to install the database.
+     */
+    private final Path directory;
+
+    /**
+     * The localized answers expected from the users. Keys are words like "Yes" or "No"
+     * and boolean values are the meaning of the keys.
+     */
+    private final Map<String,Boolean> answers = new HashMap<>();
+
+    /**
      * {@code true} if the user has accepted the EPSG terms of use, {@code false} if (s)he
refused,
      * or {@code null} if (s)he did not yet answered that question.
      */
@@ -83,14 +113,22 @@ public class LicensedDataProvider extend
     /**
      * Creates a new installation scripts provider.
      */
-    public LicensedDataProvider() {
-        console = System.console();
-        locale = Locale.getDefault();
+    public ResourcesDownloader() {
+        final CommandRunner command = CommandRunner.instance;
+        if (command != null) {
+            locale = command.locale;
+            colors = command.colors;
+        } else {
+            locale = Locale.getDefault();
+            colors = false;
+        }
+        console   = System.console();
+        directory = DataDirectory.DATABASES.getDirectory();
     }
 
     /**
      * Returns the name of the authority who provides data under non-Apache terms of use.
-     * If this {@code LicensedDataProvider} can not ask user's agreement because there is
+     * If this {@code ResourcesDownloader} can not ask user's agreement because there is
      * no {@link Console} attached to the current Java virtual machine, then this method
      * returns an empty set.
      *
@@ -98,7 +136,7 @@ public class LicensedDataProvider extend
      */
     @Override
     public Set<String> getAuthorities() {
-        return (console != null) ? Collections.singleton(EPSG) : Collections.emptySet();
+        return (console != null && directory != null) ? Collections.singleton(EPSG)
: Collections.emptySet();
     }
 
     /**
@@ -129,28 +167,51 @@ public class LicensedDataProvider extend
         if (!EPSG.equals(authority)) {
             throw new IllegalArgumentException(Errors.format(Errors.Keys.IllegalArgumentValue_2,
"authority", authority));
         }
+        final ResourceBundle resources = ResourceBundle.getBundle("org.apache.sis.console.Messages",
locale);
+        if (answers.isEmpty()) {
+            for (final String r : resources.getString("yes").split("\\|")) answers.put(r,
Boolean.TRUE);
+            for (final String r : resources.getString("no" ).split("\\|")) answers.put(r,
Boolean.FALSE);
+        }
+        final String textColor, infoColor, actionColor, resetColor;
+        if (colors) {
+            textColor   = X364.FOREGROUND_YELLOW .sequence();
+            infoColor   = X364.FOREGROUND_GRAY   .sequence();
+            actionColor = X364.FOREGROUND_GREEN  .sequence();
+            resetColor  = X364.FOREGROUND_DEFAULT.sequence();
+        } else {
+            textColor = infoColor = actionColor = resetColor = "";
+        }
+        /*
+         * Start the download if the user accepts. We need to begin the download in order
to get the
+         * license text bundled in the JAR file. We will not necessarily ask for user agreement
here.
+         */
         if (provider == null) {
             if (console == null) {
                 throw new IllegalStateException();
             }
-            console.format("%nInstallation of EPSG geodetic dataset is recommended for this
operation.%n");
-            if (!accept("Download and install now? (Yes/No) ")) {
+            console.format(resources.getString("install"), textColor, DATABASE_SIZE, infoColor,
directory, textColor, resetColor);
+            if (!accept(resources.getString("download"), textColor, resetColor)) {
                 console.format("%n");
                 throw new AccessDeniedException(null);
             }
-            console.format("Downloading...%n");
+            console.format(resources.getString("downloading"), actionColor, resetColor);
             provider = download();
         }
+        /*
+         * If there is a need to ask for user agreement and we didn't asked yet, ask now.
+         */
         if (requireAgreement && accepted == null) {
             final String license = getLicense(authority, locale, "text/plain");
-            if (license != null) {
+            if (license == null) {
+                accepted = Boolean.TRUE;
+            } else {
                 console.format("%n").writer().write(license);
+                console.format("%n");
+                accepted = accept(resources.getString("accept"), textColor, resetColor);
+                if (accepted) {
+                    console.format(resources.getString("installing"), actionColor, resetColor);
+                }
             }
-            accepted = accept("%nAccept License Agreement? (Yes/No) ");
-            if (accepted) {
-                console.format("Installing...");
-            }
-            console.format("%n");
         }
         if (accepted != null && !accepted) {
             throw new AccessDeniedException(null);
@@ -159,20 +220,18 @@ public class LicensedDataProvider extend
     }
 
     /**
-     * Asks the user to answer by "Yes" or "No".
+     * Asks the user to answer by "Yes" or "No". Callers is responsible for ensuring
+     * that the {@link #answers} map is non-empty before to invoke this method.
      *
      * @param prompt Message to show to the user.
      * @return The user's answer.
      */
-    private boolean accept(final String prompt) {
-        String line;
+    private boolean accept(final String prompt, final Object... arguments) {
+        Boolean answer;
         do {
-            line = console.readLine(prompt);
-            if (line.equalsIgnoreCase("n") || line.equalsIgnoreCase("no")) {
-                return false;
-            }
-        } while (!line.equalsIgnoreCase("y") && !line.equalsIgnoreCase("yes"));
-        return true;
+            answer = answers.get(console.readLine(prompt, arguments).toLowerCase(locale));
+        } while (answer == null);
+        return answer;
     }
 
     /**

Modified: sis/branches/JDK8/application/sis-console/src/main/resources/META-INF/services/org.apache.sis.setup.InstallationResources
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/application/sis-console/src/main/resources/META-INF/services/org.apache.sis.setup.InstallationResources?rev=1733195&r1=1733194&r2=1733195&view=diff
==============================================================================
--- sis/branches/JDK8/application/sis-console/src/main/resources/META-INF/services/org.apache.sis.setup.InstallationResources
[UTF-8] (original)
+++ sis/branches/JDK8/application/sis-console/src/main/resources/META-INF/services/org.apache.sis.setup.InstallationResources
[UTF-8] Tue Mar  1 23:58:43 2016
@@ -1,2 +1,2 @@
 # Licensed to the Apache Software Foundation (ASF) under one or more contributor license
agreements.
-org.apache.sis.console.LicensedDataProvider
+org.apache.sis.console.ResourcesDownloader

Modified: sis/branches/JDK8/application/sis-console/src/main/resources/org/apache/sis/console/IdentifierState_en.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/application/sis-console/src/main/resources/org/apache/sis/console/IdentifierState_en.properties?rev=1733195&r1=1733194&r2=1733195&view=diff
==============================================================================
--- sis/branches/JDK8/application/sis-console/src/main/resources/org/apache/sis/console/IdentifierState_en.properties
[ISO-8859-1] (original)
+++ sis/branches/JDK8/application/sis-console/src/main/resources/org/apache/sis/console/IdentifierState_en.properties
[ISO-8859-1] Tue Mar  1 23:58:43 2016
@@ -1 +1 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
agreements.
+# Inherit all resources from IdentifierState.properties

Added: sis/branches/JDK8/application/sis-console/src/main/resources/org/apache/sis/console/Messages.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/application/sis-console/src/main/resources/org/apache/sis/console/Messages.properties?rev=1733195&view=auto
==============================================================================
--- sis/branches/JDK8/application/sis-console/src/main/resources/org/apache/sis/console/Messages.properties
(added)
+++ sis/branches/JDK8/application/sis-console/src/main/resources/org/apache/sis/console/Messages.properties
[ISO-8859-1] Tue Mar  1 23:58:43 2016
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
agreements.
+
+install=%n%s\
+Installation of EPSG geodetic dataset is recommended for this operation.%n\
+This would use about %d Mb in the %s"%s"%s directory.%s%n
+
+download=%s\
+Download and install now? (Yes/No) %s
+
+downloading=%s\
+Downloading...%s%n
+
+installing=%s\
+Installing EPSG geodetic dataset...%s%n
+
+accept=%s\
+Accept those terms of use? (Yes/No) %s
+
+yes=yes|y
+no=no|n

Propchange: sis/branches/JDK8/application/sis-console/src/main/resources/org/apache/sis/console/Messages.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK8/application/sis-console/src/main/resources/org/apache/sis/console/Messages.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=ISO-8859-1

Added: sis/branches/JDK8/application/sis-console/src/main/resources/org/apache/sis/console/Messages_en.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/application/sis-console/src/main/resources/org/apache/sis/console/Messages_en.properties?rev=1733195&view=auto
==============================================================================
--- sis/branches/JDK8/application/sis-console/src/main/resources/org/apache/sis/console/Messages_en.properties
(added)
+++ sis/branches/JDK8/application/sis-console/src/main/resources/org/apache/sis/console/Messages_en.properties
[ISO-8859-1] Tue Mar  1 23:58:43 2016
@@ -0,0 +1 @@
+# Inherit all resources from Resources.properties

Propchange: sis/branches/JDK8/application/sis-console/src/main/resources/org/apache/sis/console/Messages_en.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK8/application/sis-console/src/main/resources/org/apache/sis/console/Messages_en.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=ISO-8859-1

Added: sis/branches/JDK8/application/sis-console/src/main/resources/org/apache/sis/console/Messages_fr.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/application/sis-console/src/main/resources/org/apache/sis/console/Messages_fr.properties?rev=1733195&view=auto
==============================================================================
--- sis/branches/JDK8/application/sis-console/src/main/resources/org/apache/sis/console/Messages_fr.properties
(added)
+++ sis/branches/JDK8/application/sis-console/src/main/resources/org/apache/sis/console/Messages_fr.properties
[ISO-8859-1] Tue Mar  1 23:58:43 2016
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
agreements.
+
+install=%n%s\
+L'installation de la base de donn\u00e9es g\u00e9od\u00e9sique EPSG est recommand\u00e9e
pour cette op\u00e9ration.%n\
+Elle n\u00e9cessite environ %d Mo dans le r\u00e9pertoire %s"%s"%s.%s%n
+
+download=%s\
+T\u00e9l\u00e9charger et installer maintenant? (Oui/Non) %s
+
+downloading=%s\
+T\u00e9l\u00e9chargement en cours...%s%n
+
+installing=%s\
+Installation de la base de donn\u00e9es g\u00e9od\u00e9sique EPSG...%s%n
+
+accept=%s\
+Acceptez-vous ces conditions d'utilisation? (Oui/Non) %s
+
+yes=oui|o|yes|y
+no=non|no|n

Propchange: sis/branches/JDK8/application/sis-console/src/main/resources/org/apache/sis/console/Messages_fr.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK8/application/sis-console/src/main/resources/org/apache/sis/console/Messages_fr.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=ISO-8859-1

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AuthorityFactories.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AuthorityFactories.java?rev=1733195&r1=1733194&r2=1733195&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AuthorityFactories.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AuthorityFactories.java
[UTF-8] Tue Mar  1 23:58:43 2016
@@ -110,7 +110,7 @@ final class AuthorityFactories<T extends
             if (factory == null) try {
                 factory = new EPSGFactory(null);
             } catch (FactoryException e) {
-                log(Level.CONFIG, e);
+                log(Level.CONFIG, e, false);
                 factory = EPSGFactoryFallback.INSTANCE;
             }
             EPSG[0] = factory;
@@ -137,7 +137,12 @@ final class AuthorityFactories<T extends
                 EPSG[0] = factory;
             }
         }
-        log(Level.WARNING, e);
+        /*
+         * We do not log at Level.WARNING because the UnavailableFactoryException message
is usually
+         * not very informative, and a more informative warning has already been logged by
EPSGFactory.
+         * However the stack trace may have some interest.
+         */
+        log(Level.FINE, e, true);
         return factory;
     }
 
@@ -161,9 +166,14 @@ final class AuthorityFactories<T extends
      * Logs the given exception at the given level. This method pretends that the logging
come from
      * {@link CRS#getAuthorityFactory(String)}, which is the public facade for {@link #EPSG()}.
      */
-    private static void log(final Level level, final Exception e) {
-        final LogRecord record = new LogRecord(level, e.getLocalizedMessage());
+    private static void log(final Level level, final Exception e, final boolean trace) {
+        String message = e.getLocalizedMessage();
+        if (message == null) {
+            message = e.toString();
+        }
+        final LogRecord record = new LogRecord(level, message);
         record.setLoggerName(Loggers.CRS_FACTORY);
+        if (trace) record.setThrown(e);
         Logging.log(CRS.class, "getAuthorityFactory", record);
     }
 

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=1733195&r1=1733194&r2=1733195&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] Tue Mar  1 23:58:43 2016
@@ -136,8 +136,8 @@ 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")
     public Set<String> getAuthorities() {
@@ -193,7 +193,7 @@ public abstract class InstallationScript
      * <div class="section">Default implementation</div>
      * The default implementation invokes {@link #openStream(String)} – except for {@link
#PREPARE} and {@link #FINISH}
      * in which case an Apache SIS build-in script is used – and wrap the result in a {@link
LineNumberReader}.
-     * The scripts are opened with ISO LATIN-1 encoding.
+     * 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

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/setup/InstallationResources.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/setup/InstallationResources.java?rev=1733195&r1=1733194&r2=1733195&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/setup/InstallationResources.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/setup/InstallationResources.java
[UTF-8] Tue Mar  1 23:58:43 2016
@@ -27,16 +27,15 @@ import java.io.BufferedReader;
  * {@code InstallationResources} can be used for downloading large files that may not be
of interest
  * to every users, or data that are subject to more restricting terms of use than the Apache
license.
  *
- * <div class="note"><b>Examples:</b>
- * the NADCON grid files provide <cite>datum shifts</cite> data for North America.
- * Since those files are in the public domain, they could be bundled in Apache SIS.
- * But the weight of those files (about 2.4 Mb) is unnecessary for users who do not live
in North America.
- *
- * <p>On the other hand, the <a href="http://www.epsg.org/">EPSG geodetic dataset</a>
is important for most users.
- * Codes like {@code "EPSG:4326"} became a <i>de-facto</i> standard in various
places like <cite>Web Map Services</cite>,
- * images encoded in GeoTIFF format, <i>etc</i>. But the <a href="http://www.epsg.org/TermsOfUse">EPSG
terms of use</a>
- * are more restrictive than the Apache license and require that we inform the users about
those conditions.</p>
- * </div>
+ * <div class="note"><b>Examples:</b><ul>
+ * <li>The NADCON grid files provide <cite>datum shifts</cite> data for
North America.
+ *     Since those files are in the public domain, they could be bundled in Apache SIS.
+ *     But the weight of those files (about 2.4 Mb) is unnecessary for users who do not live
in North America.</li>
+ * <li>On the other hand, the <a href="http://www.epsg.org/">EPSG geodetic dataset</a>
is important for most users.
+ *     Codes like {@code "EPSG:4326"} became a <i>de-facto</i> standard in various
places like <cite>Web Map Services</cite>,
+ *     images encoded in GeoTIFF format, <i>etc</i>. But the <a href="http://www.epsg.org/TermsOfUse">EPSG
terms of use</a>
+ *     are more restrictive than the Apache license and require that we inform the users
about those conditions.</li>
+ * </ul></div>
  *
  * Some classes that depend on installation resources are:
  * {@link org.apache.sis.referencing.factory.sql.EPSGFactory}.



Mime
View raw message