sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1785863 [4/4] - in /sis/branches/JDK7: ./ application/sis-console/src/main/java/org/apache/sis/console/ core/ core/sis-feature/src/main/java/org/apache/sis/feature/ core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ core/sis...
Date Tue, 07 Mar 2017 17:45:00 GMT
Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/ConventionalUnit.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/ConventionalUnit.java?rev=1785863&r1=1785862&r2=1785863&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/ConventionalUnit.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/ConventionalUnit.java [UTF-8] Tue Mar  7 17:44:59 2017
@@ -26,6 +26,8 @@ import javax.measure.IncommensurableExce
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.Characters;
+import org.apache.sis.util.ComparisonMode;
+import org.apache.sis.util.Utilities;
 import org.apache.sis.math.Fraction;
 import org.apache.sis.math.MathFunctions;
 import org.apache.sis.internal.util.Numerics;
@@ -439,19 +441,21 @@ final class ConventionalUnit<Q extends Q
     }
 
     /**
-     * Compares this unit with the given object for equality.
+     * Compares this unit with the given object for equality,
+     * optionally ignoring metadata and rounding errors.
      *
-     * @param  other  the other object to compares with this unit, or {@code null}.
-     * @return {@code true} if the given object is equals to this unit.
+     * @param  other  the other object to compare with this unit, or {@code null}.
+     * @return {@code true} if the given object is equal to this unit.
      */
     @Override
-    public boolean equals(final Object other) {
+    public boolean equals(final Object other, final ComparisonMode mode) {
         if (other == this) {
             return true;
         }
-        if (super.equals(other)) {
+        if (super.equals(other, mode)) {
             final ConventionalUnit<?> that = (ConventionalUnit<?>) other;
-            return target.equals(that.target) && toTarget.equals(that.toTarget);
+            return Utilities.deepEquals(target,   that.target,   mode) &&
+                   Utilities.deepEquals(toTarget, that.toTarget, mode);
         }
         return false;
     }

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/LinearConverter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/LinearConverter.java?rev=1785863&r1=1785862&r2=1785863&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/LinearConverter.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/LinearConverter.java [UTF-8] Tue Mar  7 17:44:59 2017
@@ -25,6 +25,8 @@ import javax.measure.UnitConverter;
 import org.apache.sis.util.Debug;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.StringBuilders;
+import org.apache.sis.util.ComparisonMode;
+import org.apache.sis.util.LenientComparable;
 import org.apache.sis.math.DecimalFunctions;
 import org.apache.sis.math.MathFunctions;
 import org.apache.sis.math.Fraction;
@@ -49,7 +51,7 @@ import org.apache.sis.internal.util.Nume
  * @version 0.8
  * @module
  */
-final class LinearConverter extends AbstractConverter {
+final class LinearConverter extends AbstractConverter implements LenientComparable {
     /**
      * For cross-version compatibility.
      */
@@ -450,6 +452,18 @@ final class LinearConverter extends Abst
     }
 
     /**
+     * Compares this converter with the given object for equality, optionally ignoring rounding errors.
+     */
+    @Override
+    public boolean equals(final Object other, final ComparisonMode mode) {
+        if (mode.isApproximative()) {
+            return (other instanceof LinearConverter) && equivalent((LinearConverter) other);
+        } else {
+            return equals(other);
+        }
+    }
+
+    /**
      * Returns {@code true} if the given converter perform the same conversion than this converter,
      * except for rounding errors.
      */

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/SystemUnit.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/SystemUnit.java?rev=1785863&r1=1785862&r2=1785863&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/SystemUnit.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/SystemUnit.java [UTF-8] Tue Mar  7 17:44:59 2017
@@ -28,6 +28,7 @@ import javax.measure.UnconvertibleExcept
 import javax.measure.IncommensurableException;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.ObjectConverters;
+import org.apache.sis.util.ComparisonMode;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.internal.converter.SurjectiveConverter;
 import org.apache.sis.math.Fraction;
@@ -482,17 +483,18 @@ final class SystemUnit<Q extends Quantit
     }
 
     /**
-     * Compares this unit with the given object for equality.
+     * Compares this unit with the given object for equality,
+     * optionally ignoring metadata and rounding errors.
      *
-     * @param  other  the other object to compares with this unit, or {@code null}.
-     * @return {@code true} if the given object is equals to this unit.
+     * @param  other  the other object to compare with this unit, or {@code null}.
+     * @return {@code true} if the given object is equal to this unit.
      */
     @Override
-    public boolean equals(final Object other) {
+    public boolean equals(final Object other, final ComparisonMode mode) {
         if (other == this) {
             return true;
         }
-        if (super.equals(other)) {
+        if (super.equals(other, mode)) {
             final SystemUnit<?> that = (SystemUnit<?>) other;
             return Objects.equals(quantity, that.quantity) && dimension.equals(that.dimension);
         }

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/StringBuilders.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/StringBuilders.java?rev=1785863&r1=1785862&r2=1785863&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/StringBuilders.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/StringBuilders.java [UTF-8] Tue Mar  7 17:44:59 2017
@@ -161,6 +161,72 @@ public final class StringBuilders extend
     }
 
     /**
+     * Inserts the given character <var>n</var> time at the given position.
+     * This method does nothing if the given {@code count} is zero.
+     *
+     * @param  buffer  the buffer where to insert the character.
+     * @param  offset  position where to insert the characters.
+     * @param  c       the character to repeat.
+     * @param  count   number of time to repeat the given character.
+     * @throws NullPointerException if the given buffer is null.
+     * @throws IndexOutOfBoundsException if the given index is invalid.
+     * @throws IllegalArgumentException if the given count is negative.
+     *
+     * @since 0.8
+     */
+    public static void repeat(final StringBuilder buffer, final int offset, final char c, final int count) {
+        ArgumentChecks.ensureNonNull("buffer", buffer);
+        switch (count) {
+            case 0:  break;
+            case 1:  buffer.insert(offset, c); break;
+            default: {
+                ArgumentChecks.ensurePositive("count", count);
+                final CharSequence r;
+                switch (c) {
+                    case ' ': r = CharSequences.spaces(count); break;
+                    case '0': r = Repeat.ZERO; break;
+                    default:  r = new Repeat(c, count); break;
+                }
+                buffer.insert(offset, r, 0, count);
+                break;
+            }
+        }
+    }
+
+    /**
+     * A sequence of a constant character. This implementation does not perform any argument
+     * check since it is for {@link StringBuilder#append(CharSequence, int, int)} usage only.
+     * The intend is to allow {@code StringBuilder} to append the characters in one operation
+     * instead than looping on {@link StringBuilder#insert(int, char)} (which would require
+     * memory move on each call).
+     */
+    private static final class Repeat implements CharSequence {
+        /** An infinite sequence of {@code '0'} character. */
+        static final Repeat ZERO = new Repeat('0', Integer.MAX_VALUE);
+
+        /** The character to repeat. */
+        private final char c;
+
+        /** Number of times the character is repeated. */
+        private final int n;
+
+        /** Creates a new sequence of constant character. */
+        Repeat(final char c, final int n) {
+            this.c = c;
+            this.n = n;
+        }
+
+        /** Returns the number of times the character is repeated. */
+        @Override public int length() {return n;}
+
+        /** Returns the constant character, regardless the index. */
+        @Override public char charAt(int i) {return c;}
+
+        /** Returns a sequence of the same constant character but different length. */
+        @Override public CharSequence subSequence(int start, int end) {return new Repeat(c, end - start);}
+    }
+
+    /**
      * Trims the fractional part of the given formatted number, provided that it doesn't change
      * the value. This method assumes that the number is formatted in the US locale, typically
      * by the {@link Double#toString(double)} method.
@@ -183,11 +249,9 @@ public final class StringBuilders extend
     public static void trimFractionalPart(final StringBuilder buffer) {
         ArgumentChecks.ensureNonNull ("buffer", buffer);
         for (int i=buffer.length(); i > 0;) {
-            final int c = buffer.codePointBefore(i);
-            i -= charCount(c);
-            switch (c) {
+            switch (buffer.charAt(--i)) {               // No need to use Unicode code points here.
                 case '0': continue;
-                case '.': buffer.setLength(i); // Fall through
+                case '.': buffer.setLength(i);          // Fall through
                 default : return;
             }
         }

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java?rev=1785863&r1=1785862&r2=1785863&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java [UTF-8] Tue Mar  7 17:44:59 2017
@@ -106,6 +106,11 @@ public final class Errors extends Indexe
         public static final short CanNotConvertValue_2 = 8;
 
         /**
+         * Can not copy “{0}”.
+         */
+        public static final short CanNotCopy_1 = 169;
+
+        /**
          * Can not open “{0}”.
          */
         public static final short CanNotOpen_1 = 9;
@@ -865,6 +870,16 @@ public final class Errors extends Indexe
         public static final short UnspecifiedFormatForClass_1 = 158;
 
         /**
+         * The “{0}” argument value is unsupported.
+         */
+        public static final short UnsupportedArgumentValue_1 = 170;
+
+        /**
+         * The “{0}” datum is not supported by this operation.
+         */
+        public static final short UnsupportedDatum_1 = 168;
+
+        /**
          * Version {1} of {0} format is not supported.
          */
         public static final short UnsupportedFormatVersion_2 = 159;
@@ -886,7 +901,7 @@ public final class Errors extends Indexe
         public static final short UnsupportedOperation_1 = 162;
 
         /**
-         * The ‘{0}’ type is unsupported.
+         * The ‘{0}’ type is not supported in this context.
          */
         public static final short UnsupportedType_1 = 163;
 

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties?rev=1785863&r1=1785862&r2=1785863&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties [ISO-8859-1] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties [ISO-8859-1] Tue Mar  7 17:44:59 2017
@@ -32,6 +32,7 @@ CanNotConnectTo_1                 = Can
 CanNotConvertFromType_2           = Can not convert from type \u2018{0}\u2019 to type \u2018{1}\u2019.
 CanNotConvertValue_2              = Can not convert value \u201c{0}\u201d to type \u2018{1}\u2019.
 CanNotCompute_1                   = Can not compute \u201c{0}\u201d.
+CanNotCopy_1                      = Can not copy \u201c{0}\u201d.
 CanNotOpen_1                      = Can not open \u201c{0}\u201d.
 CanNotParseFile_2                 = Can not parse \u201c{1}\u201d as a file in the {0} format.
 CanNotRead_1                      = Can not read \u201c{0}\u201d.
@@ -188,7 +189,9 @@ UnsupportedFormatVersion_2        = Vers
 UnsupportedImplementation_1       = Can not handle this instance of \u2018{0}\u2019 because arbitrary implementations are not yet supported.
 UnsupportedInterpolation_1        = The \u201c{0}\u201d interpolation is unsupported.
 UnsupportedOperation_1            = The \u2018{0}\u2019 operation is unsupported.
-UnsupportedType_1                 = The \u2018{0}\u2019 type is unsupported.
+UnsupportedArgumentValue_1        = The \u201c{0}\u201d argument value is unsupported.
+UnsupportedDatum_1                = The \u201c{0}\u201d datum is not supported by this operation.
+UnsupportedType_1                 = The \u2018{0}\u2019 type is not supported in this context.
 ValueAlreadyDefined_1             = A value is already defined for \u201c{0}\u201d.
 ValueNotGreaterThanZero_2         = Value \u2018{0}\u2019 = {1} is invalid. Expected a number greater than 0.
 ValueOutOfRange_4                 = Value \u2018{0}\u2019 = {3} is invalid. Expected a value in the [{1} \u2026 {2}] range.

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties?rev=1785863&r1=1785862&r2=1785863&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties [ISO-8859-1] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties [ISO-8859-1] Tue Mar  7 17:44:59 2017
@@ -29,6 +29,7 @@ CanNotConnectTo_1                 = Ne p
 CanNotConvertFromType_2           = Ne peut pas convertir du type \u2018{0}\u2019 vers le type \u2018{1}\u2019.
 CanNotConvertValue_2              = La valeur \u00ab\u202f{0}\u202f\u00bb ne peut pas \u00eatre convertie vers le type \u2018{1}\u2019.
 CanNotCompute_1                   = Ne peut pas calculer \u00ab\u202f{0}\u202f\u00bb.
+CanNotCopy_1                      = Ne peut pas copier \u00ab\u202f{0}\u202f\u00bb.
 CanNotOpen_1                      = Ne peut pas ouvrir \u00ab\u202f{0}\u202f\u00bb.
 CanNotParseFile_2                 = Ne peut pas lire \u00ab\u202f{1}\u202f\u00bb comme un fichier au format {0}.
 CanNotRead_1                      = Ne peut pas lire \u00ab\u202f{0}\u202f\u00bb.
@@ -184,7 +185,9 @@ UnsupportedFormatVersion_2        = La v
 UnsupportedImplementation_1       = Cette instance de \u2018{0}\u2019 ne peut pas \u00eatre g\u00e9r\u00e9e parce que les impl\u00e9mentations arbitraires ne sont pas encore support\u00e9es.
 UnsupportedInterpolation_1        = L\u2019interpolation \u201c{0}\u201d n\u2019est pas support\u00e9e.
 UnsupportedOperation_1            = L\u2019op\u00e9ration \u2018{0}\u2019 n\u2019est pas support\u00e9e.
-UnsupportedType_1                 = Le type \u2018{0}\u2019 n\u2019est pas support\u00e9.
+UnsupportedArgumentValue_1        = La valeur d\u2019argument \u00ab\u202f{0}\u202f\u00bb n\u2019est pas support\u00e9e.
+UnsupportedDatum_1                = Le r\u00e9f\u00e9rentiel \u00ab\u202f{0}\u202f\u00bb n\u2019est pas support\u00e9 par cette op\u00e9ration.
+UnsupportedType_1                 = Le type \u2018{0}\u2019 n\u2019est pas support\u00e9 dans ce contexte.
 ValueAlreadyDefined_1             = Une valeur est d\u00e9j\u00e0 d\u00e9finie pour \u00ab\u202f{0}\u202f\u00bb.
 ValueNotGreaterThanZero_2         = La valeur \u2018{0}\u2019 = {1} n\u2019est pas valide. On attendait un nombre positif non-nul.
 ValueOutOfRange_4                 = La valeur \u2018{0}\u2019 = {3} est invalide. Une valeur dans la plage [{1} \u2026 {2}] \u00e9tait attendue.

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java?rev=1785863&r1=1785862&r2=1785863&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java [UTF-8] Tue Mar  7 17:44:59 2017
@@ -452,6 +452,25 @@ public class IndexedResourceBundle exten
     }
 
     /**
+     * Writes the localized string identified by the given key followed by a colon.
+     * The way to write the colon depends on the language.
+     *
+     * @param  key         the key for the desired string.
+     * @param  toAppendTo  where to write the localized string followed by a colon.
+     * @throws IOException if an error occurred while writing to the given destination.
+     *
+     * @since 0.8
+     */
+    public final void appendLabel(final short key, final Appendable toAppendTo) throws IOException {
+        toAppendTo.append(getString(key));
+        if (Locale.FRENCH.getLanguage().equals(getLocale().getLanguage())) {
+            toAppendTo.append("\u00A0:");
+        } else {
+            toAppendTo.append(':');
+        }
+    }
+
+    /**
      * Gets a string for the given key and appends "…" to it.
      * This method is typically used for creating menu items.
      *
@@ -471,7 +490,10 @@ public class IndexedResourceBundle exten
      * @param  key  the key for the desired string.
      * @return the string for the given key.
      * @throws MissingResourceException if no object for the given key can be found.
+     *
+     * @deprecated Replaced by {@link #appendLabel(short, Appendable)}.
      */
+    @Deprecated
     public final String getLabel(final short key) throws MissingResourceException {
         String label = getString(key);
         if (Locale.FRENCH.getLanguage().equals(getLocale().getLanguage())) {

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java?rev=1785863&r1=1785862&r2=1785863&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java [UTF-8] Tue Mar  7 17:44:59 2017
@@ -62,11 +62,21 @@ public final class Vocabulary extends In
         public static final short Accuracy = 1;
 
         /**
+         * Administrator
+         */
+        public static final short Administrator = 130;
+
+        /**
          * Aliases
          */
         public static final short Aliases = 2;
 
         /**
+         * Alternative identifiers
+         */
+        public static final short AlternativeIdentifiers = 131;
+
+        /**
          * Angle
          */
         public static final short Angle = 3;
@@ -127,6 +137,11 @@ public final class Vocabulary extends In
         public static final short Classpath = 14;
 
         /**
+         * Code
+         */
+        public static final short Code = 128;
+
+        /**
          * {0} code
          */
         public static final short Code_1 = 15;
@@ -147,6 +162,16 @@ public final class Vocabulary extends In
         public static final short Container = 18;
 
         /**
+         * Coordinate
+         */
+        public static final short Coordinate = 129;
+
+        /**
+         * Coordinate reference system
+         */
+        public static final short CoordinateRefSys = 132;
+
+        /**
          * Correlation
          */
         public static final short Correlation = 19;
@@ -252,6 +277,11 @@ public final class Vocabulary extends In
         public static final short DublinJulian = 38;
 
         /**
+         * East bound
+         */
+        public static final short EastBound = 133;
+
+        /**
          * Ellipsoid
          */
         public static final short Ellipsoid = 39;
@@ -267,6 +297,11 @@ public final class Vocabulary extends In
         public static final short EllipsoidalHeight = 41;
 
         /**
+         * End date
+         */
+        public static final short EndDate = 134;
+
+        /**
          * {0} entr{0,choice,0#y|2#ies}
          */
         public static final short EntryCount_1 = 121;
@@ -292,6 +327,11 @@ public final class Vocabulary extends In
         public static final short GeodeticDataset = 45;
 
         /**
+         * Geographic identifier
+         */
+        public static final short GeographicIdentifier = 135;
+
+        /**
          * Height
          */
         public static final short Height = 46;
@@ -382,6 +422,11 @@ public final class Vocabulary extends In
         public static final short Localization = 63;
 
         /**
+         * Location type
+         */
+        public static final short LocationType = 136;
+
+        /**
          * Logging
          */
         public static final short Logging = 64;
@@ -397,6 +442,11 @@ public final class Vocabulary extends In
         public static final short Mandatory = 66;
 
         /**
+         * Mapping
+         */
+        public static final short Mapping = 127;
+
+        /**
          * Maximum value
          */
         public static final short MaximumValue = 67;
@@ -432,6 +482,11 @@ public final class Vocabulary extends In
         public static final short None = 73;
 
         /**
+         * North bound
+         */
+        public static final short NorthBound = 137;
+
+        /**
          * Note
          */
         public static final short Note = 74;
@@ -527,6 +582,11 @@ public final class Vocabulary extends In
         public static final short RemoteConfiguration = 89;
 
         /**
+         * Representative value
+         */
+        public static final short RepresentativeValue = 141;
+
+        /**
          * Root
          */
         public static final short Root = 90;
@@ -552,11 +612,21 @@ public final class Vocabulary extends In
         public static final short Source = 93;
 
         /**
+         * South bound
+         */
+        public static final short SouthBound = 138;
+
+        /**
          * Standard deviation
          */
         public static final short StandardDeviation = 94;
 
         /**
+         * Start date
+         */
+        public static final short StartDate = 139;
+
+        /**
          * Subset of {0}
          */
         public static final short SubsetOf_1 = 95;
@@ -677,6 +747,11 @@ public final class Vocabulary extends In
         public static final short Warnings = 117;
 
         /**
+         * West bound
+         */
+        public static final short WestBound = 140;
+
+        /**
          * World
          */
         public static final short World = 118;

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties?rev=1785863&r1=1785862&r2=1785863&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties [ISO-8859-1] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties [ISO-8859-1] Tue Mar  7 17:44:59 2017
@@ -15,7 +15,9 @@
 # limitations under the License.
 #
 Accuracy                = Accuracy
+Administrator           = Administrator
 Aliases                 = Aliases
+AlternativeIdentifiers  = Alternative identifiers
 Angle                   = Angle
 AngularDegrees          = Degrees
 AngularMinutes          = Minutes
@@ -28,10 +30,13 @@ CausedBy_1              = Caused by {0}
 CharacterEncoding       = Character encoding
 Characteristics         = Characteristics
 Classpath               = Classpath
+Code                    = Code
 Code_1                  = {0} code
 Commands                = Commands
 ConstantPressureSurface = Constant pressure surface
 Container               = Container
+Coordinate              = Coordinate
+CoordinateRefSys        = Coordinate reference system
 Correlation             = Correlation
 CurrentDateTime         = Current date and time
 CurrentDirectory        = Current directory
@@ -53,14 +58,17 @@ Directory               = Directory
 DittoMark               = \u2033
 Domain                  = Domain
 DublinJulian            = Dublin Julian
+EastBound               = East bound
 Ellipsoid               = Ellipsoid
 EllipsoidChange         = Ellipsoid change
 EllipsoidalHeight       = Ellipsoidal height
+EndDate                 = End date
 EntryCount_1            = {0} entr{0,choice,0#y|2#ies}
 Geocentric              = Geocentric
 GeocentricRadius        = Geocentric radius
 GeocentricConversion    = Geocentric conversion
 GeodeticDataset         = Geodetic dataset
+GeographicIdentifier    = Geographic identifier
 Height                  = Height
 Identifier              = Identifier
 Implementation          = Implementation
@@ -80,8 +88,10 @@ Libraries               = Libraries
 LocalConfiguration      = Local configuration
 Locale                  = Locale
 Localization            = Localization
+LocationType            = Location type
 Logging                 = Logging
 Mandatory               = Mandatory
+Mapping                 = Mapping
 MaximumValue            = Maximum value
 MeanValue               = Mean value
 MinimumValue            = Minimum value
@@ -90,6 +100,7 @@ ModifiedJulian          = Modified Julia
 Name                    = Name
 None                    = None
 Note                    = Note
+NorthBound              = North bound
 NumberOfValues          = Number of values
 NumberOfNaN             = Number of \u2018NaN\u2019
 Obligation              = Obligation
@@ -108,12 +119,15 @@ Quoted_1                = \u201c{0}\u201
 Read                    = Read
 Remarks                 = Remarks
 RemoteConfiguration     = Remote configuration
+RepresentativeValue     = Representative value
 Root                    = Root
 RootMeanSquare          = Root Mean Square
 Scale                   = Scale
 SlashSeparatedList_2    = {0}/{1}
 Source                  = Source
+SouthBound              = South bound
 StandardDeviation       = Standard deviation
+StartDate               = Start date
 SubsetOf_1              = Subset of {0}
 SupersededBy_1          = Superseded by {0}.
 TemporaryFiles          = Temporary files
@@ -138,5 +152,6 @@ Version_2               = {0} version {1
 Versions                = Versions
 Vertical                = Vertical
 Warnings                = Warnings
+WestBound               = West bound
 World                   = World
 Write                   = Write

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties?rev=1785863&r1=1785862&r2=1785863&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties [ISO-8859-1] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties [ISO-8859-1] Tue Mar  7 17:44:59 2017
@@ -22,7 +22,9 @@
 #   U+00A0 NO-BREAK SPACE         before  :
 #
 Accuracy                = Pr\u00e9cision
+Administrator           = Administrateur
 Aliases                 = Alias
+AlternativeIdentifiers  = Identifiants alternatifs
 Angle                   = Angle
 AngularDegrees          = Degr\u00e9s
 AngularMinutes          = Minutes
@@ -35,10 +37,13 @@ CausedBy_1              = Caus\u00e9e pa
 CharacterEncoding       = Encodage des caract\u00e8res
 Characteristics         = Caract\u00e9ristiques
 Classpath               = Chemin de classes
+Code                    = Code
 Code_1                  = Code {0}
 Commands                = Commandes
 ConstantPressureSurface = Surface \u00e0 pression constante
 Container               = Conteneur
+Coordinate              = Coordonn\u00e9e
+CoordinateRefSys        = Syst\u00e8me de r\u00e9f\u00e9rence des coordonn\u00e9es
 Correlation             = Corr\u00e9lation
 CurrentDateTime         = Date et heure courantes
 CurrentDirectory        = R\u00e9pertoire courant
@@ -60,14 +65,17 @@ Directory               = R\u00e9pertoir
 DittoMark               = \u2033
 Domain                  = Domaine
 DublinJulian            = Julien Dublin
+EastBound               = Limite est
 Ellipsoid               = Ellipso\u00efde
 EllipsoidChange         = Changement d\u2019ellipso\u00efde
 EllipsoidalHeight       = Hauteur ellipso\u00efdale
 EntryCount_1            = {0} entr\u00e9e{0,choice,0#|2#s}
+EndDate                 = Date de fin
 Geocentric              = G\u00e9ocentrique
 GeocentricRadius        = Rayon g\u00e9ocentrique
 GeocentricConversion    = Conversion g\u00e9ocentrique
 GeodeticDataset         = Base de donn\u00e9es g\u00e9od\u00e9sique
+GeographicIdentifier    = Identifiant g\u00e9ographique
 Height                  = Hauteur
 Identifier              = Identifiant
 Implementation          = Impl\u00e9mentation
@@ -87,8 +95,10 @@ Libraries               = Biblioth\u00e8
 LocalConfiguration      = Configuration locale
 Locale                  = Locale
 Localization            = R\u00e9gionalisation
+LocationType            = Type de location
 Logging                 = Journalisation
 Mandatory               = Requis
+Mapping                 = Cartographie
 MaximumValue            = Valeur maximale
 MeanValue               = Valeur moyenne
 MinimumValue            = Valeur minimale
@@ -97,6 +107,7 @@ ModifiedJulian          = Julien modifi\
 Name                    = Nom
 None                    = Aucun
 Note                    = Note
+NorthBound              = Limite nord
 NumberOfValues          = Nombre de valeurs
 NumberOfNaN             = Nombre de \u2018NaN\u2019
 Obligation              = Obligation
@@ -115,12 +126,15 @@ Quoted_1                = \u00ab\u202f{0
 Read                    = Lecture
 Remarks                 = Remarques
 RemoteConfiguration     = Configuration distante
+RepresentativeValue     = Valeur repr\u00e9sentative
 Root                    = Racine
 RootMeanSquare          = Moyenne quadratique
 Scale                   = \u00c9chelle
 SlashSeparatedList_2    = {0}/{1}
 Source                  = Source
+SouthBound              = Limite sud
 StandardDeviation       = \u00c9cart type
+StartDate               = Date de d\u00e9part
 SubsetOf_1              = Sous-ensemble de {0}
 SupersededBy_1          = Remplac\u00e9 par {0}.
 TemporaryFiles          = Fichiers temporaires
@@ -145,5 +159,6 @@ Version_2               = {0} version {1
 Versions                = Versions
 Vertical                = Vertical
 Warnings                = Avertissements
+WestBound               = Limite ouest
 World                   = Monde
 Write                   = \u00c9criture

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/xml/XML.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/xml/XML.java?rev=1785863&r1=1785862&r2=1785863&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/xml/XML.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/xml/XML.java [UTF-8] Tue Mar  7 17:44:59 2017
@@ -37,7 +37,9 @@ import javax.xml.bind.JAXBException;
 import javax.xml.transform.Source;
 import javax.xml.transform.Result;
 import javax.xml.transform.stax.StAXSource;
+import javax.xml.transform.stax.StAXResult;
 import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
 import org.apache.sis.util.Static;
 import org.apache.sis.util.Version;
 import org.apache.sis.util.Workaround;
@@ -453,7 +455,21 @@ public final class XML extends Static {
                 marshaller.setProperty(entry.getKey(), entry.getValue());
             }
         }
-        marshaller.marshal(object, output);
+        /*
+         * STAX results are not handled by JAXB as of JDK 8. We have to handle those cases ourselves.
+         * This workaround should be removed if a future JDK version handles those cases.
+         */
+        if (output instanceof StAXResult) {
+            @Workaround(library = "JDK", version = "1.8")
+            final XMLStreamWriter writer = ((StAXResult) output).getXMLStreamWriter();
+            if (writer != null) {
+                marshaller.marshal(object, writer);
+            } else {
+                marshaller.marshal(object, ((StAXResult) output).getXMLEventWriter());
+            }
+        } else {
+            marshaller.marshal(object, output);
+        }
         pool.recycle(marshaller);
     }
 

Modified: sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/measure/AngleFormatTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/measure/AngleFormatTest.java?rev=1785863&r1=1785862&r2=1785863&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/measure/AngleFormatTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/measure/AngleFormatTest.java [UTF-8] Tue Mar  7 17:44:59 2017
@@ -17,6 +17,7 @@
 package org.apache.sis.measure;
 
 import java.util.Locale;
+import java.math.RoundingMode;
 import java.text.FieldPosition;
 import java.text.AttributedCharacterIterator;
 import java.text.ParseException;
@@ -34,7 +35,7 @@ import static org.apache.sis.test.TestUt
  *
  * @author  Martin Desruisseaux (MPO, IRD, Geomatys)
  * @since   0.3
- * @version 0.4
+ * @version 0.8
  * @module
  */
 @DependsOn({
@@ -223,6 +224,30 @@ public final strictfp class AngleFormatT
     }
 
     /**
+     * Tests formatting the same value with different rounding modes.
+     *
+     * @since 0.8
+     */
+    @Test
+    @DependsOnMethod("testDegreeMinutesSeconds")
+    public void testRoundingMode() {
+        final AngleFormat f = new AngleFormat("DD°MM′SS″", Locale.CANADA);
+        Angle angle = new Angle(12.515625);
+        f.setRoundingMode(RoundingMode.DOWN);      assertEquals("12°30′56″", f.format(angle));
+        f.setRoundingMode(RoundingMode.UP);        assertEquals("12°30′57″", f.format(angle));
+        f.setRoundingMode(RoundingMode.FLOOR);     assertEquals("12°30′56″", f.format(angle));
+        f.setRoundingMode(RoundingMode.CEILING);   assertEquals("12°30′57″", f.format(angle));
+        f.setRoundingMode(RoundingMode.HALF_EVEN); assertEquals("12°30′56″", f.format(angle));
+
+        angle = new Angle(-12.515625);
+        f.setRoundingMode(RoundingMode.DOWN);      assertEquals("-12°30′56″", f.format(angle));
+        f.setRoundingMode(RoundingMode.UP);        assertEquals("-12°30′57″", f.format(angle));
+        f.setRoundingMode(RoundingMode.FLOOR);     assertEquals("-12°30′57″", f.format(angle));
+        f.setRoundingMode(RoundingMode.CEILING);   assertEquals("-12°30′56″", f.format(angle));
+        f.setRoundingMode(RoundingMode.HALF_EVEN); assertEquals("-12°30′56″", f.format(angle));
+    }
+
+    /**
      * Tests with optional digits.
      */
     @Test

Modified: sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/util/StringBuildersTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/util/StringBuildersTest.java?rev=1785863&r1=1785862&r2=1785863&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/util/StringBuildersTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/util/StringBuildersTest.java [UTF-8] Tue Mar  7 17:44:59 2017
@@ -80,6 +80,26 @@ public final strictfp class StringBuilde
     }
 
     /**
+     * Tests the {@link StringBuilders#repeat(StringBuilder, int, char, int)} method.
+     *
+     * @since 0.8
+     */
+    @Test
+    public void testRepeat() {
+        final StringBuilder buffer = new StringBuilder("AB12");
+        repeat(buffer, 2, 'C', 0);
+        assertEquals("AB12", buffer.toString());
+        repeat(buffer, 2, 'C', 1);
+        assertEquals("ABC12", buffer.toString());
+        repeat(buffer, 3, '0', 4);
+        assertEquals("ABC000012", buffer.toString());
+        repeat(buffer, 6, ' ', 2);
+        assertEquals("ABC000  012", buffer.toString());
+        repeat(buffer, 6, '.', 3);
+        assertEquals("ABC000...  012", buffer.toString());
+    }
+
+    /**
      * Tests the {@link StringBuilders#trimFractionalPart(StringBuilder)} method.
      */
     @Test

Modified: sis/branches/JDK7/ide-project/NetBeans/build.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/ide-project/NetBeans/build.xml?rev=1785863&r1=1785862&r2=1785863&view=diff
==============================================================================
--- sis/branches/JDK7/ide-project/NetBeans/build.xml (original)
+++ sis/branches/JDK7/ide-project/NetBeans/build.xml Tue Mar  7 17:44:59 2017
@@ -39,6 +39,9 @@
       <fileset dir="${project.root}/core/sis-referencing/target/generated-resources">
         <include name="**/*.utf"/>
       </fileset>
+      <fileset dir="${project.root}/core/sis-referencing-by-identifiers/target/generated-resources">
+        <include name="**/*.utf"/>
+      </fileset>
       <fileset dir="${project.root}/core/sis-feature/target/generated-resources">
         <include name="**/*.utf"/>
       </fileset>

Modified: sis/branches/JDK7/ide-project/NetBeans/nbproject/build-impl.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/ide-project/NetBeans/nbproject/build-impl.xml?rev=1785863&r1=1785862&r2=1785863&view=diff
==============================================================================
--- sis/branches/JDK7/ide-project/NetBeans/nbproject/build-impl.xml (original)
+++ sis/branches/JDK7/ide-project/NetBeans/nbproject/build-impl.xml Tue Mar  7 17:44:59 2017
@@ -132,6 +132,7 @@ is divided into following sections:
                 <available file="${test.storage.dir}"/>
                 <available file="${test.feature.dir}"/>
                 <available file="${test.referencing.dir}"/>
+                <available file="${test.ref-by-id.dir}"/>
                 <available file="${test.metadata.dir}"/>
                 <available file="${test.utility.dir}"/>
                 <available file="${test.fra-profile.dir}"/>
@@ -150,6 +151,7 @@ is divided into following sections:
                 <available file="${src.storage.dir}"/>
                 <available file="${src.feature.dir}"/>
                 <available file="${src.referencing.dir}"/>
+                <available file="${src.ref-by-id.dir}"/>
                 <available file="${src.metadata.dir}"/>
                 <available file="${src.utility.dir}"/>
                 <available file="${src.fra-profile.dir}"/>
@@ -266,6 +268,7 @@ is divided into following sections:
         <fail unless="src.storage.dir">Must set src.storage.dir</fail>
         <fail unless="src.feature.dir">Must set src.feature.dir</fail>
         <fail unless="src.referencing.dir">Must set src.referencing.dir</fail>
+        <fail unless="src.ref-by-id.dir">Must set src.ref-by-id.dir</fail>
         <fail unless="src.metadata.dir">Must set src.metadata.dir</fail>
         <fail unless="src.utility.dir">Must set src.utility.dir</fail>
         <fail unless="src.fra-profile.dir">Must set src.fra-profile.dir</fail>
@@ -279,6 +282,7 @@ is divided into following sections:
         <fail unless="test.storage.dir">Must set test.storage.dir</fail>
         <fail unless="test.feature.dir">Must set test.feature.dir</fail>
         <fail unless="test.referencing.dir">Must set test.referencing.dir</fail>
+        <fail unless="test.ref-by-id.dir">Must set test.ref-by-id.dir</fail>
         <fail unless="test.metadata.dir">Must set test.metadata.dir</fail>
         <fail unless="test.utility.dir">Must set test.utility.dir</fail>
         <fail unless="test.fra-profile.dir">Must set test.fra-profile.dir</fail>
@@ -302,7 +306,7 @@ is divided into following sections:
     </target>
     <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${src.local-src.dir}:${src.webapp.dir}:${src.console.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}" name="srcdir"/>
+            <attribute default="${src.local-src.dir}:${src.webapp.dir}:${src.console.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}" name="srcdir"/>
             <attribute default="${build.classes.dir}" name="destdir"/>
             <attribute default="${javac.classpath}" name="classpath"/>
             <attribute default="${javac.processorpath}" name="processorpath"/>
@@ -343,7 +347,7 @@ is divided into following sections:
     </target>
     <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${src.local-src.dir}:${src.webapp.dir}:${src.console.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}" name="srcdir"/>
+            <attribute default="${src.local-src.dir}:${src.webapp.dir}:${src.console.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}" name="srcdir"/>
             <attribute default="${build.classes.dir}" name="destdir"/>
             <attribute default="${javac.classpath}" name="classpath"/>
             <attribute default="${javac.processorpath}" name="processorpath"/>
@@ -376,7 +380,7 @@ is divided into following sections:
     </target>
     <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
         <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${src.local-src.dir}:${src.webapp.dir}:${src.console.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}" name="srcdir"/>
+            <attribute default="${src.local-src.dir}:${src.webapp.dir}:${src.console.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}" name="srcdir"/>
             <attribute default="${build.classes.dir}" name="destdir"/>
             <attribute default="${javac.classpath}" name="classpath"/>
             <sequential>
@@ -493,6 +497,9 @@ is divided into following sections:
                         <fileset dir="${test.referencing.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
                             <filename name="@{testincludes}"/>
                         </fileset>
+                        <fileset dir="${test.ref-by-id.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
+                            <filename name="@{testincludes}"/>
+                        </fileset>
                         <fileset dir="${test.metadata.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
                             <filename name="@{testincludes}"/>
                         </fileset>
@@ -561,6 +568,9 @@ is divided into following sections:
                     <fileset dir="${test.referencing.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
                         <filename name="@{testincludes}"/>
                     </fileset>
+                    <fileset dir="${test.ref-by-id.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
+                        <filename name="@{testincludes}"/>
+                    </fileset>
                     <fileset dir="${test.metadata.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
                         <filename name="@{testincludes}"/>
                     </fileset>
@@ -709,6 +719,9 @@ is divided into following sections:
                         <fileset dir="${test.referencing.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
                             <filename name="@{testincludes}"/>
                         </fileset>
+                        <fileset dir="${test.ref-by-id.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
+                            <filename name="@{testincludes}"/>
+                        </fileset>
                         <fileset dir="${test.metadata.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
                             <filename name="@{testincludes}"/>
                         </fileset>
@@ -1090,7 +1103,7 @@ is divided into following sections:
                 <include name="*"/>
             </dirset>
         </pathconvert>
-        <j2seproject3:depend srcdir="${src.local-src.dir}:${src.webapp.dir}:${src.console.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}:${build.generated.subdirs}"/>
+        <j2seproject3:depend srcdir="${src.local-src.dir}:${src.webapp.dir}:${src.console.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}:${build.generated.subdirs}"/>
     </target>
     <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
         <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
@@ -1106,6 +1119,7 @@ is divided into following sections:
             <fileset dir="${src.storage.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${src.feature.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${src.referencing.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+            <fileset dir="${src.ref-by-id.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${src.metadata.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${src.utility.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${src.fra-profile.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
@@ -1129,7 +1143,7 @@ is divided into following sections:
     <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
         <j2seproject3:force-recompile/>
-        <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.local-src.dir}:${src.webapp.dir}:${src.console.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}"/>
+        <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.local-src.dir}:${src.webapp.dir}:${src.console.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}"/>
     </target>
     <target name="-post-compile-single">
         <!-- Empty placeholder for easier customization. -->
@@ -1428,6 +1442,9 @@ is divided into following sections:
             <fileset dir="${src.referencing.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
                 <filename name="**/*.java"/>
             </fileset>
+            <fileset dir="${src.ref-by-id.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
+                <filename name="**/*.java"/>
+            </fileset>
             <fileset dir="${src.metadata.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
                 <filename name="**/*.java"/>
             </fileset>
@@ -1477,6 +1494,9 @@ is divided into following sections:
             <fileset dir="${src.referencing.dir}" excludes="${excludes}" includes="${includes}">
                 <filename name="**/doc-files/**"/>
             </fileset>
+            <fileset dir="${src.ref-by-id.dir}" excludes="${excludes}" includes="${includes}">
+                <filename name="**/doc-files/**"/>
+            </fileset>
             <fileset dir="${src.metadata.dir}" excludes="${excludes}" includes="${includes}">
                 <filename name="**/doc-files/**"/>
             </fileset>
@@ -1508,10 +1528,10 @@ is divided into following sections:
         <!-- You can override this target in the ../build.xml file. -->
     </target>
     <target if="do.depend.true" name="-compile-test-depend">
-        <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.webapp.dir}:${test.console.dir}:${test.earth-obs.dir}:${test.geotiff.dir}:${test.netcdf.dir}:${test.shapefile.dir}:${test.xmlstore.dir}:${test.storage.dir}:${test.feature.dir}:${test.referencing.dir}:${test.metadata.dir}:${test.utility.dir}:${test.fra-profile.dir}"/>
+        <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.webapp.dir}:${test.console.dir}:${test.earth-obs.dir}:${test.geotiff.dir}:${test.netcdf.dir}:${test.shapefile.dir}:${test.xmlstore.dir}:${test.storage.dir}:${test.feature.dir}:${test.referencing.dir}:${test.ref-by-id.dir}:${test.metadata.dir}:${test.utility.dir}:${test.fra-profile.dir}"/>
     </target>
     <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
-        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.webapp.dir}:${test.console.dir}:${test.earth-obs.dir}:${test.geotiff.dir}:${test.netcdf.dir}:${test.shapefile.dir}:${test.xmlstore.dir}:${test.storage.dir}:${test.feature.dir}:${test.referencing.dir}:${test.metadata.dir}:${test.utility.dir}:${test.fra-profile.dir}"/>
+        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.webapp.dir}:${test.console.dir}:${test.earth-obs.dir}:${test.geotiff.dir}:${test.netcdf.dir}:${test.shapefile.dir}:${test.xmlstore.dir}:${test.storage.dir}:${test.feature.dir}:${test.referencing.dir}:${test.ref-by-id.dir}:${test.metadata.dir}:${test.utility.dir}:${test.fra-profile.dir}"/>
         <copy todir="${build.test.classes.dir}">
             <fileset dir="${test.webapp.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.console.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
@@ -1523,6 +1543,7 @@ is divided into following sections:
             <fileset dir="${test.storage.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.feature.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.referencing.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+            <fileset dir="${test.ref-by-id.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.metadata.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.utility.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.fra-profile.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
@@ -1540,7 +1561,7 @@ is divided into following sections:
     <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
         <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
-        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.webapp.dir}:${test.console.dir}:${test.earth-obs.dir}:${test.geotiff.dir}:${test.netcdf.dir}:${test.shapefile.dir}:${test.xmlstore.dir}:${test.storage.dir}:${test.feature.dir}:${test.referencing.dir}:${test.metadata.dir}:${test.utility.dir}:${test.fra-profile.dir}" srcdir="${test.webapp.dir}:${test.console.dir}:${test.earth-obs.dir}:${test.geotiff.dir}:${test.netcdf.dir}:${test.shapefile.dir}:${test.xmlstore.dir}:${test.storage.dir}:${test.feature.dir}:${test.referencing.dir}:${test.metadata.dir}:${test.utility.dir}:${test.fra-profile.dir}"/>
+        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.webapp.dir}:${test.console.dir}:${test.earth-obs.dir}:${test.geotiff.dir}:${test.netcdf.dir}:${test.shapefile.dir}:${test.xmlstore.dir}:${test.storage.dir}:${test.feature.dir}:${test.referencing.dir}:${test.ref-by-id.dir}:${test.metadata.dir}:${test.utility.dir}:${test.fra-profile.dir}" srcdir="${test.webapp.dir}:${test.console.dir}:${test.earth-obs.dir}:${test.geotiff.dir}:${test.netcdf.dir}:${test.shapefile.dir}:${test.xmlstore.dir}:${test.storage.dir}:${test.feature.dir}:${test.referencing.dir}:${test.ref-by-id.dir}:${test.metadata.dir}:${test.utility.dir}:${test.fra-profile.dir}"/>
         <copy todir="${build.test.classes.dir}">
             <fileset dir="${test.webapp.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.console.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
@@ -1552,6 +1573,7 @@ is divided into following sections:
             <fileset dir="${test.storage.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.feature.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.referencing.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+            <fileset dir="${test.ref-by-id.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.metadata.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.utility.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.fra-profile.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>

Modified: sis/branches/JDK7/ide-project/NetBeans/nbproject/genfiles.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/ide-project/NetBeans/nbproject/genfiles.properties?rev=1785863&r1=1785862&r2=1785863&view=diff
==============================================================================
--- sis/branches/JDK7/ide-project/NetBeans/nbproject/genfiles.properties [ISO-8859-1] (original)
+++ sis/branches/JDK7/ide-project/NetBeans/nbproject/genfiles.properties [ISO-8859-1] Tue Mar  7 17:44:59 2017
@@ -3,6 +3,6 @@
 build.xml.data.CRC32=58e6b21c
 build.xml.script.CRC32=462eaba0
 build.xml.stylesheet.CRC32=28e38971@1.53.1.46
-nbproject/build-impl.xml.data.CRC32=5ca8f670
-nbproject/build-impl.xml.script.CRC32=52d7cdf7
+nbproject/build-impl.xml.data.CRC32=0c9ec53c
+nbproject/build-impl.xml.script.CRC32=4fad40a6
 nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48

Modified: sis/branches/JDK7/ide-project/NetBeans/nbproject/project.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/ide-project/NetBeans/nbproject/project.properties?rev=1785863&r1=1785862&r2=1785863&view=diff
==============================================================================
--- sis/branches/JDK7/ide-project/NetBeans/nbproject/project.properties [ISO-8859-1] (original)
+++ sis/branches/JDK7/ide-project/NetBeans/nbproject/project.properties [ISO-8859-1] Tue Mar  7 17:44:59 2017
@@ -66,6 +66,8 @@ src.feature.dir      = ${project.root}/c
 test.feature.dir     = ${project.root}/core/sis-feature/src/test/java
 src.referencing.dir  = ${project.root}/core/sis-referencing/src/main/java
 test.referencing.dir = ${project.root}/core/sis-referencing/src/test/java
+src.ref-by-id.dir    = ${project.root}/core/sis-referencing-by-identifiers/src/main/java
+test.ref-by-id.dir   = ${project.root}/core/sis-referencing-by-identifiers/src/test/java
 src.metadata.dir     = ${project.root}/core/sis-metadata/src/main/java
 test.metadata.dir    = ${project.root}/core/sis-metadata/src/test/java
 src.utility.dir      = ${project.root}/core/sis-utility/src/main/java

Modified: sis/branches/JDK7/ide-project/NetBeans/nbproject/project.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/ide-project/NetBeans/nbproject/project.xml?rev=1785863&r1=1785862&r2=1785863&view=diff
==============================================================================
--- sis/branches/JDK7/ide-project/NetBeans/nbproject/project.xml (original)
+++ sis/branches/JDK7/ide-project/NetBeans/nbproject/project.xml Tue Mar  7 17:44:59 2017
@@ -34,6 +34,7 @@
                 <root id="src.storage.dir" name="Storage"/>
                 <root id="src.feature.dir" name="Feature"/>
                 <root id="src.referencing.dir" name="Referencing"/>
+                <root id="src.ref-by-id.dir" name="Referencing by identifiers"/>
                 <root id="src.metadata.dir" name="Metadata"/>
                 <root id="src.utility.dir" name="Utility"/>
                 <root id="src.fra-profile.dir" name="French profile"/>
@@ -49,6 +50,7 @@
                 <root id="test.storage.dir" name="Test Storage"/>
                 <root id="test.feature.dir" name="Test Feature"/>
                 <root id="test.referencing.dir" name="Test Referencing"/>
+                <root id="test.ref-by-id.dir" name="Test Referencing by identifiers"/>
                 <root id="test.metadata.dir" name="Test Metadata"/>
                 <root id="test.utility.dir" name="Test Utility"/>
                 <root id="test.fra-profile.dir" name="Test French profile"/>

Modified: sis/branches/JDK7/src/main/javadoc/stylesheet.css
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/src/main/javadoc/stylesheet.css?rev=1785863&r1=1785862&r2=1785863&view=diff
==============================================================================
--- sis/branches/JDK7/src/main/javadoc/stylesheet.css (original)
+++ sis/branches/JDK7/src/main/javadoc/stylesheet.css Tue Mar  7 17:44:59 2017
@@ -168,7 +168,7 @@ div.description div.section {
 
 /*
  * Bullet and ordered lists. Put some space before and after the list.
- * Listes of the "verbose" class also have some space betweem items.
+ * Lists of the "verbose" class also have some space betweem items.
  */
 div.block ul,
 div.block ol {

Modified: sis/branches/JDK7/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/LandsatReader.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/LandsatReader.java?rev=1785863&r1=1785862&r2=1785863&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/LandsatReader.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/LandsatReader.java [UTF-8] Tue Mar  7 17:44:59 2017
@@ -904,7 +904,7 @@ final class LandsatReader {
          */
         if (datum != null) {
             if (utmZone > 0) {
-                metadata.add(datum.UTM(1, TransverseMercator.Zoner.UTM.centralMeridian(utmZone)));
+                metadata.add(datum.universal(1, TransverseMercator.Zoner.UTM.centralMeridian(utmZone)));
             }
             if (projection != null) {
                 final double sp = projection.parameter(Constants.STANDARD_PARALLEL_1).doubleValue();

Modified: sis/branches/JDK7/storage/sis-earth-observation/src/test/java/org/apache/sis/storage/earthobservation/LandsatReaderTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-earth-observation/src/test/java/org/apache/sis/storage/earthobservation/LandsatReaderTest.java?rev=1785863&r1=1785862&r2=1785863&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-earth-observation/src/test/java/org/apache/sis/storage/earthobservation/LandsatReaderTest.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-earth-observation/src/test/java/org/apache/sis/storage/earthobservation/LandsatReaderTest.java [UTF-8] Tue Mar  7 17:44:59 2017
@@ -295,27 +295,27 @@ public class LandsatReaderTest extends T
                 + "  │   └─Code…………………………………………………………………………………………… LandsatTest\n"
                 + "  ├─Metadata standard (1 of 2)\n"
                 + "  │   ├─Title………………………………………………………………………………………… Geographic Information — Metadata Part 1: Fundamentals\n"
-                + "  │   ├─Cited responsible party\n"
-                + "  │   │   ├─Party\n"
-                + "  │   │   │   └─Name……………………………………………………………………… International Organization for Standardization\n"
-                + "  │   │   └─Role………………………………………………………………………………… Principal investigator\n"
                 + "  │   ├─Edition…………………………………………………………………………………… ISO 19115-1:2014(E)\n"
                 + "  │   ├─Identifier\n"
                 + "  │   │   ├─Code………………………………………………………………………………… 19115-1\n"
                 + "  │   │   ├─Code space………………………………………………………………… ISO\n"
                 + "  │   │   └─Version………………………………………………………………………… 2014(E)\n"
+                + "  │   ├─Cited responsible party\n"
+                + "  │   │   ├─Party\n"
+                + "  │   │   │   └─Name……………………………………………………………………… International Organization for Standardization\n"
+                + "  │   │   └─Role………………………………………………………………………………… Principal investigator\n"
                 + "  │   └─Presentation form………………………………………………………… Document digital\n"
                 + "  └─Metadata standard (2 of 2)\n"
                 + "      ├─Title………………………………………………………………………………………… Geographic Information — Metadata Part 2: Extensions for imagery and gridded data\n"
-                + "      ├─Cited responsible party\n"
-                + "      │   ├─Party\n"
-                + "      │   │   └─Name……………………………………………………………………… International Organization for Standardization\n"
-                + "      │   └─Role………………………………………………………………………………… Principal investigator\n"
                 + "      ├─Edition…………………………………………………………………………………… ISO 19115-2:2009(E)\n"
                 + "      ├─Identifier\n"
                 + "      │   ├─Code………………………………………………………………………………… 19115-2\n"
                 + "      │   ├─Code space………………………………………………………………… ISO\n"
                 + "      │   └─Version………………………………………………………………………… 2009(E)\n"
+                + "      ├─Cited responsible party\n"
+                + "      │   ├─Party\n"
+                + "      │   │   └─Name……………………………………………………………………… International Organization for Standardization\n"
+                + "      │   └─Role………………………………………………………………………………… Principal investigator\n"
                 + "      └─Presentation form………………………………………………………… Document digital\n", text);
     }
 }

Modified: sis/branches/JDK7/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/GeoTiffStore.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/GeoTiffStore.java?rev=1785863&r1=1785862&r2=1785863&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/GeoTiffStore.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/GeoTiffStore.java [UTF-8] Tue Mar  7 17:44:59 2017
@@ -43,6 +43,7 @@ import org.apache.sis.util.resources.Err
  *
  * @author  Rémi Maréchal (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
+ * @author  Thi Phuong Hao Nguyen (VNSC)
  * @since   0.8
  * @version 0.8
  * @module

Modified: sis/branches/JDK7/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/ImageFileDirectory.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/ImageFileDirectory.java?rev=1785863&r1=1785862&r2=1785863&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/ImageFileDirectory.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/ImageFileDirectory.java [UTF-8] Tue Mar  7 17:44:59 2017
@@ -44,6 +44,7 @@ import org.apache.sis.measure.Units;
  * @author  Rémi Marechal (Geomatys)
  * @author  Alexis Manin (Geomatys)
  * @author  Johann Sorel (Geomatys)
+ * @author  Thi Phuong Hao Nguyen (VNSC)
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.8
  * @version 0.8

Modified: sis/branches/JDK7/storage/sis-netcdf/src/test/java/org/apache/sis/storage/netcdf/MetadataReaderTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-netcdf/src/test/java/org/apache/sis/storage/netcdf/MetadataReaderTest.java?rev=1785863&r1=1785862&r2=1785863&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-netcdf/src/test/java/org/apache/sis/storage/netcdf/MetadataReaderTest.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-netcdf/src/test/java/org/apache/sis/storage/netcdf/MetadataReaderTest.java [UTF-8] Tue Mar  7 17:44:59 2017
@@ -158,27 +158,27 @@ public final strictfp class MetadataRead
             "  │   └─Code…………………………………………………………………………………………… NCEP/SST/Global_5x2p5deg/SST_Global_5x2p5deg_20050922_0000.nc\n" +
             "  ├─Metadata standard (1 of 2)\n" +
             "  │   ├─Title………………………………………………………………………………………… Geographic Information — Metadata Part 1: Fundamentals\n" +
-            "  │   ├─Cited responsible party\n" +
-            "  │   │   ├─Party\n" +
-            "  │   │   │   └─Name……………………………………………………………………… International Organization for Standardization\n" +
-            "  │   │   └─Role………………………………………………………………………………… Principal investigator\n" +
             "  │   ├─Edition…………………………………………………………………………………… ISO 19115-1:2014(E)\n" +
             "  │   ├─Identifier\n" +
             "  │   │   ├─Code………………………………………………………………………………… 19115-1\n" +
             "  │   │   ├─Code space………………………………………………………………… ISO\n" +
             "  │   │   └─Version………………………………………………………………………… 2014(E)\n" +
+            "  │   ├─Cited responsible party\n" +
+            "  │   │   ├─Party\n" +
+            "  │   │   │   └─Name……………………………………………………………………… International Organization for Standardization\n" +
+            "  │   │   └─Role………………………………………………………………………………… Principal investigator\n" +
             "  │   └─Presentation form………………………………………………………… Document digital\n" +
             "  └─Metadata standard (2 of 2)\n" +
             "      ├─Title………………………………………………………………………………………… Geographic Information — Metadata Part 2: Extensions for imagery and gridded data\n" +
-            "      ├─Cited responsible party\n" +
-            "      │   ├─Party\n" +
-            "      │   │   └─Name……………………………………………………………………… International Organization for Standardization\n" +
-            "      │   └─Role………………………………………………………………………………… Principal investigator\n" +
             "      ├─Edition…………………………………………………………………………………… ISO 19115-2:2009(E)\n" +
             "      ├─Identifier\n" +
             "      │   ├─Code………………………………………………………………………………… 19115-2\n" +
             "      │   ├─Code space………………………………………………………………… ISO\n" +
             "      │   └─Version………………………………………………………………………… 2009(E)\n" +
+            "      ├─Cited responsible party\n" +
+            "      │   ├─Party\n" +
+            "      │   │   └─Name……………………………………………………………………… International Organization for Standardization\n" +
+            "      │   └─Role………………………………………………………………………………… Principal investigator\n" +
             "      └─Presentation form………………………………………………………… Document digital\n", text);
     }
 }

Modified: sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/index/GeoHashCoder.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/index/GeoHashCoder.java?rev=1785863&r1=1785862&r2=1785863&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/index/GeoHashCoder.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/index/GeoHashCoder.java [UTF-8] Tue Mar  7 17:44:59 2017
@@ -19,7 +19,9 @@ package org.apache.sis.index;
 import java.io.Serializable;
 import java.text.ParseException;
 import org.opengis.geometry.DirectPosition;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
 import org.apache.sis.geometry.DirectPosition2D;
+import org.apache.sis.referencing.CommonCRS;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.resources.Errors;
 
@@ -32,7 +34,7 @@ import org.apache.sis.util.resources.Err
  *
  * @author  Chris Mattmann (JPL)
  * @since   0.1
- * @version 0.3
+ * @version 0.8
  * @module
  *
  * @see <a href="http://en.wikipedia.org/wiki/Geohash">Wikipedia: Geohash</a>
@@ -124,11 +126,18 @@ public class GeoHashCoder implements Ser
     private transient char[] buffer;
 
     /**
+     * The coordinate reference system to assign to the decoded direct positions,
+     * or {@code null} if none.
+     */
+    private final CoordinateReferenceSystem crs;
+
+    /**
      * Creates a new geohash coder/decoder initialized to the default precision for {@link Format#BASE32}.
      */
     public GeoHashCoder() {
         format = Format.BASE32;
         precision = 12;
+        crs = CommonCRS.defaultGeographic();
     }
 
     /**
@@ -164,7 +173,7 @@ public class GeoHashCoder implements Ser
     /**
      * Sets the length of geohashes strings to be encoded by the {@link #encode(DirectPosition)} method.
      *
-     * @param  precision  he new length of geohashes strings.
+     * @param  precision  the new length of geohashes strings.
      */
     public void setPrecision(final int precision) {
         ArgumentChecks.ensureBetween("precision", 1, 255, precision);
@@ -250,7 +259,7 @@ public class GeoHashCoder implements Ser
     /**
      * Decodes the given geohash into a longitude and a latitude.
      *
-     * @param geohash Geohash string to decode.
+     * @param  geohash  geohash string to decode.
      * @return a new position with the longitude at ordinate 0 and latitude at ordinate 1.
      * @throws ParseException if an error occurred while parsing the given string.
      */
@@ -307,7 +316,7 @@ public class GeoHashCoder implements Ser
                 isEven = !isEven;
             } while ((mask >>>= 1) != 0);
         }
-        return new DirectPosition2D((xmin + xmax) / 2,
-                                    (ymin + ymax) / 2);
+        return new DirectPosition2D(crs, (xmin + xmax) / 2,
+                                         (ymin + ymax) / 2);
     }
 }



Mime
View raw message