sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1686268 [4/4] - in /sis/branches/JDK7: ./ core/sis-feature/src/main/java/org/apache/sis/feature/ core/sis-feature/src/test/java/org/apache/sis/feature/ core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ core/sis-metadata/src...
Date Thu, 18 Jun 2015 16:49:27 GMT
Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/Characters.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/Characters.java?rev=1686268&r1=1686267&r2=1686268&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/Characters.java [UTF-8]
(original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/Characters.java [UTF-8]
Thu Jun 18 16:49:25 2015
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.util;
 
+import org.opengis.metadata.citation.Citation;  // For javadoc.
 import org.apache.sis.util.resources.Errors;
 
 
@@ -263,6 +264,21 @@ public final class Characters extends St
      * in this class. Then, Unicode characters can be tested for inclusion in the subset
by
      * calling the {@link #contains(int)} method.</p>
      *
+     * <div class="section">Relationship with international standards</div>
+     * ISO 19162:2015 §B.5.2 recommends to ignore spaces, case and the following characters
when comparing two
+     * {@linkplain org.apache.sis.referencing.AbstractIdentifiedObject#getName() identified
object names}:
+     * “{@code _}” (underscore), “{@code -}” (minus sign), “{@code /}” (solidus),
+     * “{@code (}” (left parenthesis) and “{@code )}” (right parenthesis).
+     * The same specification also limits the set of valid characters in a name to the following
(§6.3.1):
+     *
+     * <blockquote>{@code A-Z a-z 0-9 _ [ ] ( ) { } < = > . , : ; + - (space)
% & ' " * ^ / \ ? | °}</blockquote>
+     * <div class="note"><b>Note:</b> SIS does not enforce this restriction
in its programmatic API,
+     * but may perform some character substitutions at <cite>Well Known Text</cite>
(WKT) formatting time.</div>
+     *
+     * If we take only the characters in the above list which are valid in a {@linkplain
#UNICODE_IDENTIFIER
+     * Unicode identifier} and remove the characters that ISO 19162 recommends to ignore,
the only characters
+     * left are {@linkplain #LETTERS_AND_DIGITS letters and digits}.
+     *
      * @author  Martin Desruisseaux (Geomatys)
      * @since   0.3
      * @version 0.3
@@ -270,6 +286,7 @@ public final class Characters extends St
      *
      * @see java.lang.Character.Subset
      * @see Character#getType(int)
+     * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#139">WKT
2 specification</a>
      */
     public static class Filter extends Character.Subset {
         /*
@@ -281,12 +298,23 @@ public final class Characters extends St
         /**
          * The subset of all characters for which {@link Character#isLetterOrDigit(int)}
          * returns {@code true}. This subset includes the following general categories:
+         *
+         * <blockquote>
          * {@link Character#LOWERCASE_LETTER},
          * {@link Character#UPPERCASE_LETTER     UPPERCASE_LETTER},
          * {@link Character#TITLECASE_LETTER     TITLECASE_LETTER},
          * {@link Character#MODIFIER_LETTER      MODIFIER_LETTER},
          * {@link Character#OTHER_LETTER         OTHER_LETTER} and
          * {@link Character#DECIMAL_DIGIT_NUMBER DECIMAL_DIGIT_NUMBER}.
+         * </blockquote>
+         *
+         * SIS uses this filter when comparing two
+         * {@linkplain org.apache.sis.referencing.AbstractIdentifiedObject#getName() identified
object names}.
+         * See the <cite>Relationship with international standards</cite> section
in this class javadoc
+         * for more information.
+         *
+         * @see org.apache.sis.referencing.AbstractIdentifiedObject#isHeuristicMatchForName(String)
+         * @see org.apache.sis.metadata.iso.citation.Citations#identifierMatches(Citation,
String)
          */
         public static final Filter LETTERS_AND_DIGITS = new LettersAndDigits();
 
@@ -295,10 +323,13 @@ public final class Characters extends St
          * returns {@code true}, excluding {@linkplain Character#isIdentifierIgnorable(int)
ignorable} characters.
          * This subset includes all the {@link #LETTERS_AND_DIGITS} categories with the addition
of the following
          * ones:
+         *
+         * <blockquote>
          * {@link Character#LETTER_NUMBER},
          * {@link Character#CONNECTOR_PUNCTUATION CONNECTOR_PUNCTUATION},
          * {@link Character#NON_SPACING_MARK NON_SPACING_MARK} and
          * {@link Character#COMBINING_SPACING_MARK COMBINING_SPACING_MARK}.
+         * </blockquote>
          */
         public static final Filter UNICODE_IDENTIFIER = new UnicodeIdentifier();
 

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=1686268&r1=1686267&r2=1686268&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] Thu Jun 18 16:49:25 2015
@@ -921,9 +921,9 @@ public final class Errors extends Indexe
         public static final short UnknownFormatFor_1 = 115;
 
         /**
-         * Keyword “{1}” in element “{0}” is unknown.
+         * Keyword “{0}” is unknown.
          */
-        public static final short UnknownKeywordInElement_2 = 192;
+        public static final short UnknownKeyword_1 = 192;
 
         /**
          * Option “{0}” is not recognized.

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=1686268&r1=1686267&r2=1686268&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] Thu Jun 18 16:49:25 2015
@@ -195,7 +195,7 @@ UnknownAxisDirection_1            = Axis
 UnknownCommand_1                  = Command \u201c{0}\u201d is not recognized.
 UnknownEnumValue_2                = \u201c{1}\u201d is not a known or supported value for
the \u2018{0}\u2019 enumeration.
 UnknownFormatFor_1                = Format of \u201c{0}\u201d is not recognized.
-UnknownKeywordInElement_2         = Keyword \u201c{1}\u201d in element \u201c{0}\u201d is
unknown.
+UnknownKeyword_1                  = Keyword \u201c{0}\u201d is unknown.
 UnknownOption_1                   = Option \u201c{0}\u201d is not recognized.
 UnknownType_1                     = Type \u2018{0}\u2019 is unknown in this context.
 UnknownTypeForProperty_1          = Type of the \u201c{0}\u201d property is unknown.

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=1686268&r1=1686267&r2=1686268&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] Thu Jun 18 16:49:25 2015
@@ -14,6 +14,13 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+
+#
+# Punctuation rules in French (source: http://unicode.org/udhr/n/notes_fra.html)
+#
+#   U+202F NARROW NO-BREAK SPACE  before  ; ! and ?
+#   U+00A0 NO-BREAK SPACE         before  :
+#
 AbstractType_1                    = Le type \u2018{0}\u2019 est abstrait.
 AmbiguousName_3                   = Le nom \u00ab\u202f{2}\u202f\u00bb est ambigu\u00eb car
il peut \u00eatre interpr\u00e9t\u00e9 comme \u00ab\u202f{0}\u202f\u00bb ou \u00ab\u202f{1}\u202f\u00bb.
 CanNotAddToExclusiveSet_2         = Aucun \u00e9l\u00e9ment ne peut \u00eatre ajout\u00e9
\u00e0 cet ensemble car les propri\u00e9t\u00e9s \u2018{0}\u2019 et \u2018{1}\u2019 sont mutuellement
exclusives.
@@ -184,7 +191,7 @@ UnknownAxisDirection_1            = La d
 UnknownCommand_1                  = La commande \u00ab\u202f{0}\u202f\u00bb n\u2019est pas
reconnue.
 UnknownEnumValue_2                = \u00ab\u202f{1}\u202f\u00bb n\u2019est pas une valeur
connue ou support\u00e9e pour l\u2019\u00e9num\u00e9ration \u2018{0}\u2019.
 UnknownFormatFor_1                = Le format de \u00ab\u202f{0}\u202f\u00bb n\u2019est pas
reconnu.
-UnknownKeywordInElement_2         = Le mot-cl\u00e9 \u00ab\u202f{1}\u202f\u00bb dans l\u2019\u00e9l\u00e9ment
\u00ab\u202f{0}\u202f\u00bb n\u2019est pas reconnu.
+UnknownKeyword_1                  = Le mot-cl\u00e9 \u00ab\u202f{0}\u202f\u00bb n\u2019est
pas reconnu.
 UnknownOption_1                   = L\u2019option \u00ab\u202f{0}\u202f\u00bb n\u2019est
pas reconnue.
 UnknownType_1                     = Le type \u2018{0}\u2019 n\u2019est pas reconnu dans ce
contexte.
 UnknownTypeForProperty_1          = Le type de la propri\u00e9t\u00e9 \u00ab\u202f{0}\u202f\u00bb
est inconnu.

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.java?rev=1686268&r1=1686267&r2=1686268&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.java
[UTF-8] Thu Jun 18 16:49:25 2015
@@ -93,6 +93,11 @@ public final class Messages extends Inde
         public static final short IgnoredPropertyAssociatedTo_1 = 7;
 
         /**
+         * {0,choice,0#Formatting|1#Parsing} of “{1}” done, but some elements were ignored.
+         */
+        public static final short IncompleteFormattingOrParsing_2 = 14;
+
+        /**
          * Text were discarded for some locales.
          */
         public static final short LocalesDiscarded = 3;
@@ -120,6 +125,11 @@ public final class Messages extends Inde
         public static final short PropertyHiddenBy_2 = 4;
 
         /**
+         * The text contains unknown elements:
+         */
+        public static final short UnknownElementsInText = 13;
+
+        /**
          * Can not parse “{1}” as an instance of ‘{0}’. The value is stored as plain
text instead, but
          * will be ignored by some processing.
          */

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.properties?rev=1686268&r1=1686267&r2=1686268&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.properties
[ISO-8859-1] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.properties
[ISO-8859-1] Thu Jun 18 16:49:25 2015
@@ -21,9 +21,11 @@ ConstantProjParameterValue_1    = This p
 DiscardedExclusiveProperty_2    = Property \u201c{0}\u201d has been discarded in favor of
\u201c{1}\u201d, because those two properties are mutually exclusive.
 IgnoredPropertiesAfterFirst_1   = Ignored properties after the first occurrence of \u2018{0}\u2019.
 IgnoredPropertyAssociatedTo_1   = Ignored property associated to \u2018{0}\u2019.
+IncompleteFormattingOrParsing_2 = {0,choice,0#Formatting|1#Parsing} of \u201c{1}\u201d done,
but some elements were ignored.
 LocalesDiscarded                = Text were discarded for some locales.
 OptionalModuleNotFound_1        = Optional module \u201c{0}\u201d requested but not found.
 PropertyHiddenBy_2              = Property \u201c{0}\u201d is hidden by \u201c{1}\u201d.
 MismatchedEllipsoidAxisLength_3 = The \u201c{1}\u201d parameter could have been omitted.
But it has been given a value of {2} which does not match the definition of the \u201c{0}\u201d
ellipsoid.
 NotFormalProjectionParameter_1  = This parameter borrowed from the \u201c{0}\u201d projection
is not formally a parameter of this projection.
+UnknownElementsInText           = The text contains unknown elements:
 UnparsableValueStoredAsText_2   = Can not parse \u201c{1}\u201d as an instance of \u2018{0}\u2019.
The value is stored as plain text instead, but will be ignored by some processing.

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages_fr.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages_fr.properties?rev=1686268&r1=1686267&r2=1686268&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages_fr.properties
[ISO-8859-1] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages_fr.properties
[ISO-8859-1] Thu Jun 18 16:49:25 2015
@@ -14,6 +14,13 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+
+#
+# Punctuation rules in French (source: http://unicode.org/udhr/n/notes_fra.html)
+#
+#   U+202F NARROW NO-BREAK SPACE  before  ; ! and ?
+#   U+00A0 NO-BREAK SPACE         before  :
+#
 AlreadyRegistered_2             = Le {0} \u00ab\u202f{1}\u202f\u00bb est d\u00e9j\u00e0 inscrit
dans le registre. La seconde instance sera ignor\u00e9e.
 ChangedContainerCapacity_2      = Changement de la capacit\u00e9 du conteneur de {0} vers
{1} \u00e9l\u00e9ments.
 ConformanceMeansDatumShift      = Ce r\u00e9sultat indique si un changement de r\u00e9f\u00e9rentiel
a \u00e9t\u00e9 appliqu\u00e9.
@@ -21,9 +28,11 @@ ConstantProjParameterValue_1    = Ce par
 DiscardedExclusiveProperty_2    = La propri\u00e9t\u00e9 \u00ab\u202f{0}\u202f\u00bb a \u00e9t\u00e9
\u00e9cart\u00e9e en faveur de \u00ab\u202f{1}\u202f\u00bb, parce que ces deux propri\u00e9t\u00e9s
sont mutuellement exclusives.
 IgnoredPropertiesAfterFirst_1   = Des propri\u00e9t\u00e9s ont \u00e9t\u00e9 ignor\u00e9es
apr\u00e8s la premi\u00e8re occurrence de \u2018{0}\u2019.
 IgnoredPropertyAssociatedTo_1   = Une propri\u00e9t\u00e9 associ\u00e9e \u00e0 \u2018{0}\u2019
a \u00e9t\u00e9 ignor\u00e9e.
+IncompleteFormattingOrParsing_2 = {0,choice,0#L\u2019\u00e9criture|1#La lecture} de \u00ab\u202f{1}\u202f\u00bb
a \u00e9t\u00e9 faite, mais en ignorant certains \u00e9l\u00e9ments.
 LocalesDiscarded                = Des textes ont \u00e9t\u00e9 ignor\u00e9s pour certaines
langues.
 OptionalModuleNotFound_1        = Le module optionnel \u00ab\u202f{0}\u202f\u00bb a \u00e9t\u00e9
demand\u00e9 mais n\u2019a pas \u00e9t\u00e9 trouv\u00e9.
 PropertyHiddenBy_2              = La propri\u00e9t\u00e9 \u00ab\u202f{0}\u202f\u00bb est
masqu\u00e9e par \u00ab\u202f{1}\u202f\u00bb.
 MismatchedEllipsoidAxisLength_3 = Le param\u00e8tre \u00ab\u202f{1}\u202f\u00bb aurait pu
\u00eatre omis. Mais il lui a \u00e9t\u00e9 donn\u00e9 la valeur {2} qui ne correspond pas
\u00e0 la d\u00e9finition de l\u2019ellipso\u00efde \u00ab\u202f{0}\u202f\u00bb.
 NotFormalProjectionParameter_1  = Ce param\u00e8tre emprunt\u00e9 \u00e0 la projection \u00ab\u202f{0}\u202f\u00bb
n\u2019est pas formellement un param\u00e8tre de cette projection.
+UnknownElementsInText           = Le texte contient des \u00e9l\u00e9ments inconnus\u00a0:
 UnparsableValueStoredAsText_2   = La valeur \u00ab\u202f{1}\u202f\u00bb ne peut pas \u00eatre
interpr\u00e9t\u00e9e comme une instance de \u2018{0}\u2019. Elle est donc m\u00e9moris\u00e9e
sous sa forme textuelle, mais sera ignor\u00e9e par certains traitements.

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=1686268&r1=1686267&r2=1686268&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] Thu Jun 18 16:49:25 2015
@@ -211,6 +211,11 @@ public final class Vocabulary extends In
         public static final short Implementation = 21;
 
         /**
+         *  in 
+         */
+        public static final short InBetweenWords = 87;
+
+        /**
          * Index
          */
         public static final short Index = 22;
@@ -351,6 +356,11 @@ public final class Vocabulary extends In
         public static final short Paths = 46;
 
         /**
+         * “{0}”
+         */
+        public static final short Quoted_1 = 86;
+
+        /**
          * Root
          */
         public static final short Root = 47;

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=1686268&r1=1686267&r2=1686268&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] Thu Jun 18 16:49:25 2015
@@ -45,6 +45,7 @@ EllipsoidalHeight       = Ellipsoidal he
 Height                  = Height
 Identifier              = Identifier
 Implementation          = Implementation
+InBetweenWords          = \u2002in\u2002
 Index                   = Index
 JavaExtensions          = Java extensions
 JavaHome                = Java home directory
@@ -73,6 +74,7 @@ Options                 = Options
 Others                  = Others
 OtherSurface            = Other surface
 Paths                   = Paths
+Quoted_1                = \u201c{0}\u201d
 Root                    = Root
 RootMeanSquare          = Root Mean Square
 Scale                   = Scale

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=1686268&r1=1686267&r2=1686268&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] Thu Jun 18 16:49:25 2015
@@ -14,6 +14,13 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+
+#
+# Punctuation rules in French (source: http://unicode.org/udhr/n/notes_fra.html)
+#
+#   U+202F NARROW NO-BREAK SPACE  before  ; ! and ?
+#   U+00A0 NO-BREAK SPACE         before  :
+#
 Aliases                 = Alias
 Angle                   = Angle
 AngularDegrees          = Degr\u00e9s
@@ -45,6 +52,7 @@ EllipsoidalHeight       = Hauteur ellips
 Height                  = Hauteur
 Identifier              = Identifiant
 Implementation          = Impl\u00e9mentation
+InBetweenWords          = \u2002dans\u2002
 Index                   = Index
 JavaExtensions          = Extensions du Java
 JavaHome                = R\u00e9pertoire du Java
@@ -73,6 +81,7 @@ Options                 = Options
 Others                  = Autres
 OtherSurface            = Autre surface
 Paths                   = Chemins
+Quoted_1                = \u00ab\u202f{0}\u202f\u00bb
 Root                    = Racine
 RootMeanSquare          = Moyenne quadratique
 Scale                   = \u00c9chelle

Modified: sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/MetadataReader.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/MetadataReader.java?rev=1686268&r1=1686267&r2=1686268&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/MetadataReader.java
[UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/MetadataReader.java
[UTF-8] Thu Jun 18 16:49:25 2015
@@ -749,7 +749,7 @@ final class MetadataReader {
             if (extent == null) {
                 extent = new DefaultExtent();
             }
-            extent.setGeographicElements(singleton(new DefaultGeographicDescription(null,
identifier)));
+            extent.setGeographicElements(singleton(new DefaultGeographicDescription(identifier)));
         }
         return extent;
     }



Mime
View raw message