sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1727629 - in /sis/branches/JDK8/core: sis-metadata/src/main/java/org/apache/sis/internal/metadata/ sis-referencing/src/main/java/org/apache/sis/internal/referencing/ sis-referencing/src/main/java/org/apache/sis/referencing/ sis-referencing...
Date Fri, 29 Jan 2016 20:00:28 GMT
Author: desruisseaux
Date: Fri Jan 29 20:00:27 2016
New Revision: 1727629

URL: http://svn.apache.org/viewvc?rev=1727629&view=rev
Log:
Report version of EPSG database in the "about" command.

Modified:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ReferencingServices.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ServicesForUtility.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ServicesForMetadata.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/EPSGFactoryFallback.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/IdentifiedObjects.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/DataDirectory.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/MetadataServices.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/setup/About.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ReferencingServices.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ReferencingServices.java?rev=1727629&r1=1727628&r2=1727629&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ReferencingServices.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ReferencingServices.java
[UTF-8] Fri Jan 29 20:00:27 2016
@@ -18,6 +18,7 @@ package org.apache.sis.internal.metadata
 
 import java.util.Map;
 import java.util.Collections;
+import java.util.Locale;
 import javax.measure.unit.Unit;
 import javax.measure.quantity.Length;
 import org.opengis.geometry.Envelope;
@@ -570,4 +571,23 @@ public class ReferencingServices extends
         }
         return fallback;
     }
+
+    /**
+     * Returns information about the Apache SIS configuration to be reported in {@link org.apache.sis.setup.About}.
+     * This method is invoked only for aspects that depends on other modules than {@code
sis-utility}.
+     *
+     * <p>Current keys are:</p>
+     * <ul>
+     *   <li>{@code "EPSG"}: version of EPSG database.</li>
+     * </ul>
+     *
+     * @param  key A key identifying the information to return.
+     * @param  locale Language to use if possible.
+     * @return The information, or {@code null} if none.
+     *
+     * @see org.apache.sis.internal.util.MetadataServices#getInformation(String)
+     */
+    public String getInformation(String key, Locale locale) {
+        return null;
+    }
 }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ServicesForUtility.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ServicesForUtility.java?rev=1727629&r1=1727628&r2=1727629&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ServicesForUtility.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ServicesForUtility.java
[UTF-8] Fri Jan 29 20:00:27 2016
@@ -18,6 +18,7 @@ package org.apache.sis.internal.metadata
 
 import java.util.Arrays;
 import java.util.Collection;
+import java.util.Locale;
 import org.opengis.metadata.Identifier;
 import org.opengis.metadata.citation.Role;
 import org.opengis.metadata.citation.Citation;
@@ -207,4 +208,17 @@ public final class ServicesForUtility ex
         c.freeze();
         return c;
     }
+
+    /**
+     * Returns information about the Apache SIS configuration.
+     * See super-class for a list of keys.
+     *
+     * @param  key A key identifying the information to return.
+     * @param  locale Language to use if possible.
+     * @return The information, or {@code null} if none.
+     */
+    @Override
+    public String getInformation(final String key, final Locale locale) {
+        return ReferencingServices.getInstance().getInformation(key, locale);
+    }
 }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ServicesForMetadata.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ServicesForMetadata.java?rev=1727629&r1=1727628&r2=1727629&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ServicesForMetadata.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ServicesForMetadata.java
[UTF-8] Fri Jan 29 20:00:27 2016
@@ -19,10 +19,12 @@ package org.apache.sis.internal.referenc
 import java.util.Map;
 import java.util.Iterator;
 import java.util.Collection;
+import java.util.Locale;
 import javax.measure.unit.Unit;
 import javax.measure.quantity.Length;
 
 import org.opengis.util.FactoryException;
+import org.opengis.util.InternationalString;
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.ParameterValueGroup;
 import org.opengis.referencing.IdentifiedObject;
@@ -45,6 +47,9 @@ import org.opengis.referencing.operation
 import org.opengis.referencing.operation.SingleOperation;
 import org.opengis.referencing.operation.CoordinateOperation;
 import org.opengis.referencing.operation.CoordinateOperationFactory;
+import org.opengis.metadata.citation.Citation;
+import org.opengis.metadata.citation.OnLineFunction;
+import org.opengis.metadata.citation.OnlineResource;
 import org.opengis.metadata.extent.GeographicBoundingBox;
 import org.opengis.metadata.extent.GeographicExtent;
 import org.opengis.metadata.extent.VerticalExtent;
@@ -76,8 +81,11 @@ import org.apache.sis.internal.metadata.
 import org.apache.sis.internal.metadata.ReferencingServices;
 import org.apache.sis.internal.referencing.provider.Affine;
 import org.apache.sis.internal.system.DefaultFactories;
+import org.apache.sis.internal.util.Constants;
 import org.apache.sis.util.collection.Containers;
+import org.apache.sis.util.resources.Vocabulary;
 import org.apache.sis.util.resources.Errors;
+import org.apache.sis.util.Exceptions;
 import org.apache.sis.util.Utilities;
 
 
@@ -86,11 +94,16 @@ import org.apache.sis.util.Utilities;
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.5
- * @version 0.6
+ * @version 0.7
  * @module
  */
 public final class ServicesForMetadata extends ReferencingServices {
     /**
+     * Name of an {@link OnLineFunction} code list value, used for transferring information
about the EPSG database.
+     */
+    public static final String CONNECTION = "CONNECTION";
+
+    /**
      * Creates a new instance. This constructor is invoked by reflection only.
      */
     public ServicesForMetadata() {
@@ -650,4 +663,45 @@ public final class ServicesForMetadata e
     public boolean isHeuristicMatchForName(final IdentifiedObject object, final String name)
{
         return IdentifiedObjects.isHeuristicMatchForName(object, name);
     }
+
+    /**
+     * Returns information about the Apache SIS configuration.
+     * See super-class for a list of keys.
+     *
+     * @param  key A key identifying the information to return.
+     * @param  locale Language to use if possible.
+     * @return The information, or {@code null} if none.
+     */
+    @Override
+    public String getInformation(final String key, final Locale locale) {
+        switch (key) {
+            /*
+             * Get the version of the EPSG database and the version of the database software.
+             * This operation can be relatively costly as it may open a JDBC connection.
+             */
+            case Constants.EPSG: {
+                final Citation authority;
+                try {
+                    authority = CRS.getAuthorityFactory(Constants.EPSG).getAuthority();
+                } catch (FactoryException e) {
+                    final String msg = Exceptions.getLocalizedMessage(e, locale);
+                    return (msg != null) ? msg : e.toString();
+                }
+                if (authority != null) {
+                    final OnLineFunction f = OnLineFunction.valueOf(CONNECTION);
+                    for (final OnlineResource res : authority.getOnlineResources()) {
+                        if (f.equals(res.getFunction())) {
+                            final InternationalString i18n = res.getDescription();
+                            if (i18n != null) return i18n.toString(locale);
+                        }
+                    }
+                    final InternationalString i18n = authority.getTitle();
+                    if (i18n != null) return i18n.toString(locale);
+                }
+                return Vocabulary.getResources(locale).getString(Vocabulary.Keys.Untitled);
+            }
+            // More cases may be added in future SIS versions.
+        }
+        return super.getInformation(key, locale);
+    }
 }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/EPSGFactoryFallback.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/EPSGFactoryFallback.java?rev=1727629&r1=1727628&r2=1727629&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/EPSGFactoryFallback.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/EPSGFactoryFallback.java
[UTF-8] Fri Jan 29 20:00:27 2016
@@ -16,8 +16,10 @@
  */
 package org.apache.sis.referencing;
 
+import java.util.Collections;
 import java.util.Set;
 import java.util.LinkedHashSet;
+import java.util.Locale;
 import org.opengis.referencing.IdentifiedObject;
 import org.opengis.referencing.NoSuchAuthorityCodeException;
 import org.opengis.referencing.crs.GeocentricCRS;
@@ -28,9 +30,11 @@ import org.opengis.referencing.crs.CRSAu
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
 import org.opengis.metadata.citation.Citation;
 import org.apache.sis.metadata.iso.citation.Citations;
+import org.apache.sis.metadata.iso.citation.DefaultCitation;
 import org.apache.sis.referencing.factory.GeodeticAuthorityFactory;
 import org.apache.sis.internal.referencing.provider.TransverseMercator;
 import org.apache.sis.internal.util.Constants;
+import org.apache.sis.util.iso.SimpleInternationalString;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.Debug;
 
@@ -66,17 +70,38 @@ final class EPSGFactoryFallback extends
     static final CRSAuthorityFactory INSTANCE = new EPSGFactoryFallback();
 
     /**
+     * The authority, created when first needed.
+     */
+    private Citation authority;
+
+    /**
      * Constructor for the singleton instance.
      */
     private EPSGFactoryFallback() {
     }
 
     /**
-     * Returns the EPSG authority.
+     * Returns the EPSG authority with only a modification in the title of emphasing that
this is a subset
+     * of EPSG dataset.
+     */
+    @Override
+    public synchronized Citation getAuthority() {
+        if (authority == null) {
+            final DefaultCitation c = new DefaultCitation(Citations.EPSG);
+            c.setTitle(new SimpleInternationalString("Subset of " + c.getTitle().toString(Locale.ENGLISH)));
+            authority = c;
+        }
+        return authority;
+    }
+
+    /**
+     * Returns the namespace of EPSG codes.
+     *
+     * @return The {@code "EPSG"} string in a singleton map.
      */
     @Override
-    public Citation getAuthority() {
-        return Citations.EPSG;
+    public Set<String> getCodeSpaces() {
+        return Collections.singleton(Constants.EPSG);
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/IdentifiedObjects.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/IdentifiedObjects.java?rev=1727629&r1=1727628&r2=1727629&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/IdentifiedObjects.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/IdentifiedObjects.java
[UTF-8] Fri Jan 29 20:00:27 2016
@@ -623,7 +623,11 @@ public final class IdentifiedObjects ext
         if (identifier == null) {
             return null;
         }
-        return NameMeaning.toURN(type, identifier.getCodeSpace(), identifier.getVersion(),
identifier.getCode());
+        String cs = identifier.getCodeSpace();
+        if (cs == null || cs.isEmpty()) {
+            cs = org.apache.sis.internal.util.Citations.getIdentifier(identifier.getAuthority(),
true);
+        }
+        return NameMeaning.toURN(type, cs, identifier.getVersion(), identifier.getCode());
     }
 
     /**

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=1727629&r1=1727628&r2=1727629&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] Fri Jan 29 20:00:27 2016
@@ -109,6 +109,8 @@ import org.apache.sis.util.collection.Co
 import org.apache.sis.measure.MeasurementRange;
 import org.apache.sis.measure.Units;
 
+import static org.apache.sis.internal.referencing.ServicesForMetadata.CONNECTION;
+
 
 /**
  * <cite>Data Access Object</cite> (DAO) creating geodetic objects from a JDBC
connection to an EPSG database.
@@ -404,7 +406,7 @@ addURIs:    for (int i=0; ; i++) {
                     case 1: url = "http://www.epsg.org/"; function = OnLineFunction.DOWNLOAD;
break;
                     case 2: {
                         url = metadata.getURL();
-                        function = OnLineFunction.valueOf("CONNECTION");
+                        function = OnLineFunction.valueOf(CONNECTION);
                         description = Messages.formatInternational(Messages.Keys.DataBase_4,
                                 Constants.EPSG, version, metadata.getDatabaseProductName(),
                                 Version.valueOf(metadata.getDatabaseMajorVersion(),

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/DataDirectory.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/DataDirectory.java?rev=1727629&r1=1727628&r2=1727629&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/DataDirectory.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/DataDirectory.java
[UTF-8] Fri Jan 29 20:00:27 2016
@@ -114,7 +114,7 @@ public enum DataDirectory {
     public static synchronized Path getRootDirectory() {
         if (rootDirectory == null) try {
             final String dir = System.getenv(ENV);
-            if (dir == null) {
+            if (dir == null || dir.isEmpty()) {
                 warning("getRootDirectory", null, Messages.Keys.DataDirectoryNotSpecified_1,
ENV);
             } else try {
                 final Path path = Paths.get(dir);

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/MetadataServices.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/MetadataServices.java?rev=1727629&r1=1727628&r2=1727629&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/MetadataServices.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/MetadataServices.java
[UTF-8] Fri Jan 29 20:00:27 2016
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.internal.util;
 
+import java.util.Locale;
 import org.opengis.metadata.citation.Citation;
 import org.apache.sis.internal.simple.CitationConstant;
 import org.apache.sis.internal.system.Modules;
@@ -111,4 +112,23 @@ public class MetadataServices extends Op
     public Citation createCitation(final String key) {
         return null;
     }
+
+    /**
+     * Returns information about the Apache SIS configuration to be reported in {@link org.apache.sis.setup.About}.
+     * This method is invoked only for aspects that depends on other modules than {@code
sis-utility}.
+     *
+     * <p>Current keys are:</p>
+     * <ul>
+     *   <li>{@code "EPSG"}: version of EPSG database.</li>
+     * </ul>
+     *
+     * @param  key A key identifying the information to return.
+     * @param  locale Language to use if possible.
+     * @return The information, or {@code null} if none.
+     *
+     * @see org.apache.sis.internal.metadata.ReferencingServices#getInformation(String)
+     */
+    public String getInformation(String key, Locale locale) {
+        return null;
+    }
 }

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/setup/About.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/setup/About.java?rev=1727629&r1=1727628&r2=1727629&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/setup/About.java [UTF-8]
(original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/setup/About.java [UTF-8]
Fri Jan 29 20:00:27 2016
@@ -48,6 +48,8 @@ import org.apache.sis.util.resources.Voc
 import org.apache.sis.util.collection.TreeTable;
 import org.apache.sis.util.collection.TreeTables;
 import org.apache.sis.util.collection.DefaultTreeTable;
+import org.apache.sis.internal.util.MetadataServices;
+import org.apache.sis.internal.util.Constants;
 import org.apache.sis.internal.system.Loggers;
 import org.apache.sis.internal.system.Modules;
 import org.apache.sis.internal.system.Shutdown;
@@ -233,6 +235,13 @@ fill:   for (int i=0; ; i++) {
                     break;
                 }
                 case 4: {
+                    if (sections.contains(VERSIONS)) {
+                        nameKey = Vocabulary.Keys.GeodeticDataset;
+                        value = MetadataServices.getInstance().getInformation(Constants.EPSG,
locale);
+                    }
+                    break;
+                }
+                case 5: {
                     newSection = LOCALIZATION;
                     if (sections.contains(LOCALIZATION)) {
                         final Locale current = Locale.getDefault();
@@ -247,7 +256,7 @@ fill:   for (int i=0; ; i++) {
                     }
                     break;
                 }
-                case 5: {
+                case 6: {
                     if (sections.contains(LOCALIZATION)) {
                         final TimeZone current = TimeZone.getDefault();
                         if (current != null) {
@@ -268,7 +277,7 @@ fill:   for (int i=0; ; i++) {
                     }
                     break;
                 }
-                case 6: {
+                case 7: {
                     if (sections.contains(LOCALIZATION)) {
                         nameKey = Vocabulary.Keys.CurrentDateTime;
                         final DateFormat df = DateFormat.getDateTimeInstance(DateFormat.LONG,
DateFormat.LONG, formatLocale);
@@ -279,7 +288,7 @@ fill:   for (int i=0; ; i++) {
                     }
                     break;
                 }
-                case 7: {
+                case 8: {
                     if (sections.contains(LOCALIZATION)) {
                         final Charset current = Charset.defaultCharset();
                         if (current != null) {
@@ -299,7 +308,7 @@ fill:   for (int i=0; ; i++) {
                     }
                     break;
                 }
-                case 8: {
+                case 9: {
                     newSection = LOGGING;
                     if (sections.contains(LOGGING)) {
                         nameKey = Vocabulary.Keys.Implementation;
@@ -308,7 +317,7 @@ fill:   for (int i=0; ; i++) {
                     }
                     break;
                 }
-                case 9: {
+                case 10: {
                     if (sections.contains(LOGGING)) {
                         nameKey = Vocabulary.Keys.Level;
                         final Level level = Logging.getLogger("").getLevel();   // Root logger
level.
@@ -325,7 +334,7 @@ fill:   for (int i=0; ; i++) {
                     }
                     break;
                 }
-                case 10: {
+                case 11: {
                     newSection = PATHS;
                     if (sections.contains(PATHS)) {
                         nameKey = Vocabulary.Keys.UserHome;
@@ -333,14 +342,14 @@ fill:   for (int i=0; ; i++) {
                     }
                     break;
                 }
-                case 11: {
+                case 12: {
                     if (sections.contains(PATHS)) {
                         nameKey = Vocabulary.Keys.CurrentDirectory;
                         value = getProperty("user.dir");
                     }
                     break;
                 }
-                case 12: {
+                case 13: {
                     if (sections.contains(PATHS)) {
                         nameKey = Vocabulary.Keys.DataDirectory;
                         value = System.getenv(DataDirectory.ENV);
@@ -357,21 +366,21 @@ fill:   for (int i=0; ; i++) {
                     }
                     break;
                 }
-                case 13: {
+                case 14: {
                     if (sections.contains(PATHS)) {
                         nameKey = Vocabulary.Keys.TemporaryFiles;
                         value = getProperty("java.io.tmpdir");
                     }
                     break;
                 }
-                case 14: {
+                case 15: {
                     if (sections.contains(PATHS)) {
                         nameKey = Vocabulary.Keys.JavaHome;
                         value = javaHome = getProperty("java.home");
                     }
                     break;
                 }
-                case 15: {
+                case 16: {
                     newSection = LIBRARIES;
                     if (sections.contains(LIBRARIES)) {
                         nameKey = Vocabulary.Keys.JavaExtensions;
@@ -379,7 +388,7 @@ fill:   for (int i=0; ; i++) {
                     }
                     break;
                 }
-                case 16: {
+                case 17: {
                     if (sections.contains(LIBRARIES)) {
                         nameKey = Vocabulary.Keys.Classpath;
                         value = classpath(getProperty("java.class.path"), false);
@@ -546,7 +555,7 @@ pathTree:   for (int j=0; ; j++) {
         for (final Map.Entry<File,CharSequence> entry : files.entrySet()) {
             CharSequence title = entry.getValue();
             if (title != null) {
-                continue; // This file has already been processed by a recursive method invocation.
+                continue;               // This file has already been processed by a recursive
method invocation.
             }
             final File file = entry.getKey();
             if (file.isFile() && file.canRead()) {
@@ -570,7 +579,7 @@ pathTree:   for (int j=0; ; j++) {
                             if (classpath(attributes.getValue(Attributes.Name.CLASS_PATH),
                                     file.getParentFile(), false, files))
                             {
-                                break; // Necessary for avoiding ConcurrentModificationException.
+                                break;          // Necessary for avoiding ConcurrentModificationException.
                             }
                         }
                     }
@@ -607,7 +616,7 @@ pathTree:   for (int j=0; ; j++) {
             if (s1 >= 0) {
                 final int s0 = CharSequences.lastIndexOf(name, File.separatorChar, 0, s1)
+ 1;
                 final StringBuilder buffer = new StringBuilder(s2 - s0).append(name, s0,
s2);
-                buffer.setCharAt(s1-s0, '-');
+                buffer.setCharAt(s1 - s0, '-');
                 if (CharSequences.regionMatches(name, s2+1, buffer)) {
                     buffer.setLength(0);
                     node.setValue(NAME, buffer.append(name, 0, s0).append("(…)").append(name,
s2, length));

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java?rev=1727629&r1=1727628&r2=1727629&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java
[UTF-8] Fri Jan 29 20:00:27 2016
@@ -206,6 +206,11 @@ public final class Vocabulary extends In
         public static final short EllipsoidalHeight = 18;
 
         /**
+         * Geodetic dataset
+         */
+        public static final short GeodeticDataset = 95;
+
+        /**
          * Height
          */
         public static final short Height = 69;

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties?rev=1727629&r1=1727628&r2=1727629&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties
[ISO-8859-1] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties
[ISO-8859-1] Fri Jan 29 20:00:27 2016
@@ -44,6 +44,7 @@ DittoMark               = \u2033
 DublinJulian            = Dublin Julian
 Ellipsoid               = Ellipsoid
 EllipsoidalHeight       = Ellipsoidal height
+GeodeticDataset         = Geodetic dataset
 Height                  = Height
 Identifier              = Identifier
 Implementation          = Implementation

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties?rev=1727629&r1=1727628&r2=1727629&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties
[ISO-8859-1] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties
[ISO-8859-1] Fri Jan 29 20:00:27 2016
@@ -51,6 +51,7 @@ DittoMark               = \u2033
 DublinJulian            = Julien Dublin
 Ellipsoid               = Ellipso\u00efde
 EllipsoidalHeight       = Hauteur ellipso\u00efdale
+GeodeticDataset         = Base de donn\u00e9es g\u00e9od\u00e9sique
 Height                  = Hauteur
 Identifier              = Identifiant
 Implementation          = Impl\u00e9mentation



Mime
View raw message