sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1684826 - in /sis/branches/JDK8/core: sis-metadata/src/main/java/org/apache/sis/io/wkt/ sis-referencing/src/main/java/org/apache/sis/referencing/ sis-utility/src/main/java/org/apache/sis/util/
Date Thu, 11 Jun 2015 08:19:49 GMT
Author: desruisseaux
Date: Thu Jun 11 08:19:49 2015
New Revision: 1684826

URL: http://svn.apache.org/r1684826
Log:
WKT: document relationship between AbstractIdentifiedObject.isHeuristicMatchForName(String)
and section B.5.2 of OGC-12-063r5.

Modified:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/GeodeticObjectParser.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/Characters.java

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/GeodeticObjectParser.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/GeodeticObjectParser.java?rev=1684826&r1=1684825&r2=1684826&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/GeodeticObjectParser.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/GeodeticObjectParser.java
[UTF-8] Thu Jun 11 08:19:49 2015
@@ -411,6 +411,7 @@ final class GeodeticObjectParser extends
              * Example: TIMEEXTENT[2013-01-01, 2013-12-31]
              *
              * TODO: syntax like TIMEEXTENT[“Jurassic”, “Quaternary”] is not yet
supported.
+             * See https://issues.apache.org/jira/browse/SIS-163
              */
             while ((element = parent.pullOptionalElement(WKTKeywords.TimeExtent, null)) !=
null) {
                 final Date startTime = element.pullDate("startTime");

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java?rev=1684826&r1=1684825&r2=1684826&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
[UTF-8] Thu Jun 11 08:19:49 2015
@@ -779,7 +779,9 @@ public class AbstractIdentifiedObject ex
      * </ul>
      *
      * <div class="section">Future evolutions</div>
-     * This method implements heuristic rules learned from experience while trying to provide
inter-operability
+     * This method implements recommendations from the
+     * <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#139">§B.5.2
of WKT 2 specification</a>,
+     * together with heuristic rules learned from experience while trying to provide inter-operability
      * with different data producers. Those rules may be adjusted in any future SIS version
according experience
      * gained while working with more data producers.
      *
@@ -787,6 +789,7 @@ public class AbstractIdentifiedObject ex
      * @return {@code true} if the primary name of at least one alias matches the specified
{@code name}.
      *
      * @see IdentifiedObjects#isHeuristicMatchForName(IdentifiedObject, String)
+     * @see org.apache.sis.util.Characters.Filter#LETTERS_AND_DIGITS
      */
     public boolean isHeuristicMatchForName(final String name) {
         return NameToIdentifier.isHeuristicMatchForName(this.name, alias, name);

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/Characters.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/Characters.java?rev=1684826&r1=1684825&r2=1684826&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/Characters.java [UTF-8]
(original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/Characters.java [UTF-8]
Thu Jun 11 08:19:49 2015
@@ -263,6 +263,20 @@ 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}:
+     * “_” (underscore), “-” (minus sign), “/” (solidus), “(” (left parenthesis)
and “)” (right parenthesis).
+     * The same specification also limits the set of valid characters in a name to the following
(§6.3.1):
+     *
+     * <blockquote>{@literal 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 +284,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 {
         /*
@@ -287,6 +302,13 @@ public final class Characters extends St
          * {@link Character#MODIFIER_LETTER      MODIFIER_LETTER},
          * {@link Character#OTHER_LETTER         OTHER_LETTER} and
          * {@link Character#DECIMAL_DIGIT_NUMBER DECIMAL_DIGIT_NUMBER}.
+         *
+         * <p>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.</p>
+         *
+         * @see org.apache.sis.referencing.AbstractIdentifiedObject#isHeuristicMatchForName(String)
          */
         public static final Filter LETTERS_AND_DIGITS = new LettersAndDigits();
 



Mime
View raw message