sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1814802 - in /sis/branches/JDK8/application/sis-openoffice: ./ src/main/java/org/apache/sis/openoffice/ src/main/unopkg/ src/main/unopkg/org/apache/sis/openoffice/ src/test/java/org/apache/sis/openoffice/
Date Thu, 09 Nov 2017 23:02:12 GMT
Author: desruisseaux
Date: Thu Nov  9 23:02:11 2017
New Revision: 1814802

URL: http://svn.apache.org/viewvc?rev=1814802&view=rev
Log:
Add functions for CRS scope and domain of validity.

Modified:
    sis/branches/JDK8/application/sis-openoffice/pom.xml
    sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/AnglePattern.java
    sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/CacheKey.java
    sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/CalcAddins.java
    sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/ReferencingFunctions.java
    sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/Registration.java
    sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/XReferencing.idl
    sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/XReferencing.java
    sis/branches/JDK8/application/sis-openoffice/src/main/unopkg/Referencing.xcu
    sis/branches/JDK8/application/sis-openoffice/src/main/unopkg/org/apache/sis/openoffice/XReferencing.class
    sis/branches/JDK8/application/sis-openoffice/src/main/unopkg/sis.rdb
    sis/branches/JDK8/application/sis-openoffice/src/test/java/org/apache/sis/openoffice/ReferencingFunctionsTest.java

Modified: sis/branches/JDK8/application/sis-openoffice/pom.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/application/sis-openoffice/pom.xml?rev=1814802&r1=1814801&r2=1814802&view=diff
==============================================================================
--- sis/branches/JDK8/application/sis-openoffice/pom.xml (original)
+++ sis/branches/JDK8/application/sis-openoffice/pom.xml Thu Nov  9 23:02:11 2017
@@ -133,6 +133,21 @@
     </dependency>
   </dependencies>
 
+  <!-- Because the EPSG database is not free, require the user to ask it explicitely.
-->
+  <profiles>
+    <profile>
+      <id>non-free</id>
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.sis.non-free</groupId>
+          <artifactId>sis-embedded-data</artifactId>
+          <version>0.8-SNAPSHOT</version>
+          <scope>runtime</scope>
+        </dependency>
+      </dependencies>
+    </profile>
+  </profiles>
+
 
   <!-- ===========================================================
            Build Configuration

Modified: sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/AnglePattern.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/AnglePattern.java?rev=1814802&r1=1814801&r2=1814802&view=diff
==============================================================================
--- sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/AnglePattern.java
[UTF-8] (original)
+++ sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/AnglePattern.java
[UTF-8] Thu Nov  9 23:02:11 2017
@@ -65,7 +65,7 @@ final class AnglePattern {
     /**
      * Converts the given argument to a pattern valid for {@link AngleFormat}.
      *
-     * @param  patternOrVoid the optional pattern argument from the OpenOffice formula.
+     * @param  patternOrVoid  the optional pattern argument from the OpenOffice formula.
      * @throws IllegalArgumentException if {@code patternOrVoid} is not a string value or
void.
      */
     AnglePattern(final Object patternOrVoid) throws IllegalArgumentException {
@@ -90,7 +90,7 @@ final class AnglePattern {
      * Returns the angle format to use for this pattern. The formatter is cached on the assumption
      * that the same pattern will be used for formatting more than once.
      *
-     * @param  locale the locale.
+     * @param  locale  the locale.
      * @return the angle format for this pattern and the given locale.
      */
     private AngleFormat getAngleFormat(final Locale locale) {

Modified: sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/CacheKey.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/CacheKey.java?rev=1814802&r1=1814801&r2=1814802&view=diff
==============================================================================
--- sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/CacheKey.java
[UTF-8] (original)
+++ sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/CacheKey.java
[UTF-8] Thu Nov  9 23:02:11 2017
@@ -17,10 +17,8 @@
 package org.apache.sis.openoffice;
 
 import java.util.Arrays;
-import org.apache.sis.util.collection.Cache;
-
-// Branch-dependent imports
 import java.util.Objects;
+import org.apache.sis.util.collection.Cache;
 
 
 /**

Modified: sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/CalcAddins.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/CalcAddins.java?rev=1814802&r1=1814801&r2=1814802&view=diff
==============================================================================
--- sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/CalcAddins.java
[UTF-8] (original)
+++ sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/CalcAddins.java
[UTF-8] Thu Nov  9 23:02:11 2017
@@ -30,6 +30,7 @@ import com.sun.star.lib.uno.helper.WeakB
 import org.apache.sis.util.Classes;
 import org.apache.sis.util.Exceptions;
 import org.apache.sis.util.logging.Logging;
+import org.apache.sis.util.resources.Vocabulary;
 
 
 /**
@@ -148,10 +149,9 @@ public abstract class CalcAddins extends
      * The string to returns when a formula does not have any value to return.
      *
      * @return the string with a message for missing values.
-     * @todo localize.
      */
-    static String noResultString() {
-        return "(none)";
+    final String noResultString() {
+        return Vocabulary.getResources(getJavaLocale()).getString(Vocabulary.Keys.Unknown);
     }
 
     /**

Modified: sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/ReferencingFunctions.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/ReferencingFunctions.java?rev=1814802&r1=1814801&r2=1814802&view=diff
==============================================================================
--- sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/ReferencingFunctions.java
[UTF-8] (original)
+++ sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/ReferencingFunctions.java
[UTF-8] Thu Nov  9 23:02:11 2017
@@ -183,6 +183,89 @@ public class ReferencingFunctions extend
     }
 
     /**
+     * Returns the identified object scope from an authority code.
+     *
+     * @param  codeOrPath  the code allocated by an authority, or the path to a file.
+     * @return the object scope.
+     */
+    @Override
+    public String getScope(final String codeOrPath) {
+        final Object value;
+        try {
+            final IdentifiedObject object = getIdentifiedObject(codeOrPath, null);
+            value = IdentifiedObjects.getProperties(object).get(ReferenceSystem.SCOPE_KEY);
+        } catch (Exception exception) {
+            return getLocalizedMessage(exception);
+        }
+        return (value instanceof InternationalString)
+               ? ((InternationalString) value).toString(getJavaLocale()) : noResultString();
+    }
+
+    /**
+     * Returns the domain of validity from an authority code.
+     *
+     * @param  codeOrPath  the code allocated by an authority, or the path to a file.
+     * @return the domain of validity.
+     */
+    @Override
+    public String getDomainOfValidity(final String codeOrPath) {
+        final Object domain;
+        try {
+            final IdentifiedObject object = getIdentifiedObject(codeOrPath, null);
+            domain = IdentifiedObjects.getProperties(object).get(ReferenceSystem.DOMAIN_OF_VALIDITY_KEY);
+        } catch (Exception exception) {
+            return getLocalizedMessage(exception);
+        }
+        if (domain instanceof Extent) {
+            final InternationalString description = ((Extent) domain).getDescription();
+            if (description != null) {
+                return description.toString(getJavaLocale());
+            }
+        }
+        return noResultString();
+    }
+
+    /**
+     * Returns the domain of validity as a geographic bounding box for an identified object.
+     * This method returns a 2×2 matrix:
+     * the first row contains the latitude and longitude of upper left corner,
+     * and the second row contains the latitude and longitude of bottom right corner.
+     * Units are degrees.
+     *
+     * @param  codeOrPath  the code allocated by an authority, or the path to a file.
+     * @return the object bounding box.
+     */
+    @Override
+    public double[][] getGeographicArea(final String codeOrPath) {
+        final CacheKey<GeographicBoundingBox> key = new CacheKey<>(GeographicBoundingBox.class,
codeOrPath, null, null);
+        GeographicBoundingBox area = key.peek();
+        if (area == null) {
+            final Cache.Handler<GeographicBoundingBox> handler = key.lock();
+            try {
+                area = handler.peek();
+                if (area == null) try {
+                    final IdentifiedObject object = getIdentifiedObject(codeOrPath, null);
+                    final Object domain = IdentifiedObjects.getProperties(object).get(ReferenceSystem.DOMAIN_OF_VALIDITY_KEY);
+                    if (domain instanceof Extent) {
+                        area = Extents.getGeographicBoundingBox((Extent) domain);
+                    }
+                } catch (Exception exception) {
+                    reportException("getGeographicArea", exception);
+                }
+            } finally {
+                handler.putAndUnlock(area);
+            }
+        }
+        if (area == null) {
+            return new double[][] {};
+        }
+        return new double[][] {
+            new double[] {area.getNorthBoundLatitude(), area.getWestBoundLongitude()},
+            new double[] {area.getSouthBoundLatitude(), area.getEastBoundLongitude()}
+        };
+    }
+
+    /**
      * Returns the axis name and units for the specified dimension in a coordinate reference
system or coordinate system.
      * This method returns a short axis name as used in Well Known Text (WKT) format, for
example <cite>"Latitude"</cite>
      * instead of <cite>"Geodetic latitude"</cite>.
@@ -245,46 +328,6 @@ public class ReferencingFunctions extend
     }
 
     /**
-     * Returns the domain of validity as a geographic bounding box for an identified object.
-     * This method returns a 2×2 matrix:
-     * the first row contains the latitude and longitude of upper left corner,
-     * and the second row contains the latitude and longitude of bottom right corner.
-     * Units are degrees.
-     *
-     * @param  codeOrPath  the code allocated by an authority, or the path to a file.
-     * @return the object bounding box.
-     */
-    @Override
-    public double[][] getGeographicArea(final String codeOrPath) {
-        final CacheKey<GeographicBoundingBox> key = new CacheKey<>(GeographicBoundingBox.class,
codeOrPath, null, null);
-        GeographicBoundingBox area = key.peek();
-        if (area == null) {
-            final Cache.Handler<GeographicBoundingBox> handler = key.lock();
-            try {
-                area = handler.peek();
-                if (area == null) try {
-                    final IdentifiedObject object = getIdentifiedObject(codeOrPath, null);
-                    final Object domain = IdentifiedObjects.getProperties(object).get(ReferenceSystem.DOMAIN_OF_VALIDITY_KEY);
-                    if (domain instanceof Extent) {
-                        area = Extents.getGeographicBoundingBox((Extent) domain);
-                    }
-                } catch (Exception exception) {
-                    reportException("getGeographicArea", exception);
-                }
-            } finally {
-                handler.putAndUnlock(area);
-            }
-        }
-        if (area == null) {
-            return new double[][] {};
-        }
-        return new double[][] {
-            new double[] {area.getNorthBoundLatitude(), area.getWestBoundLongitude()},
-            new double[] {area.getSouthBoundLatitude(), area.getEastBoundLongitude()}
-        };
-    }
-
-    /**
      * Gets the {@code IdentifiedObject} for the given code as a {@code CoordinateReferenceSystem}.
      *
      * @param  codeOrPath  the code allocated by an authority, or the path to a file.

Modified: sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/Registration.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/Registration.java?rev=1814802&r1=1814801&r2=1814802&view=diff
==============================================================================
--- sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/Registration.java
[UTF-8] (original)
+++ sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/Registration.java
[UTF-8] Thu Nov  9 23:02:11 2017
@@ -62,7 +62,12 @@ public final class Registration implemen
     static final String LOGGER = "org.apache.sis.openoffice";
 
     /**
-     * Whether to force EPSG database startup early.
+     * Whether to force EPSG database startup early, for example in order to force database
creation from SQL scripts.
+     * The SQL scripts may be used if this module depends on {@code sis-epsg} module, or
if {@code SIS_DATA} directory
+     * contains a {@code "Databases/ExternalSources"} sub-directory. When such database creation
is necessary, it may
+     * be less surprising for users to perform this lengthly task at add-in installation
time instead than when the
+     * formulas are first used. However if the add-in depend on {@code sis-embedded-data}
instead, then early startup
+     * is less useful since there is no database to create.
      */
     private static final boolean FORCE_EPSG_STARTUP = false;
 
@@ -182,8 +187,8 @@ public final class Registration implemen
     /**
      * Filters a directory content in order to retain only the {@code "*.pack"} files.
      *
-     * @param directory the add-in installation directory.
-     * @param name the name of a file in the given directory.
+     * @param directory  the add-in installation directory.
+     * @param name       the name of a file in the given directory.
      */
     @Override
     public boolean accept(final File directory, final String name) {
@@ -194,7 +199,7 @@ public final class Registration implemen
      * Returns a factory for creating the service.
      * This method is called by the {@code com.sun.star.comp.loader.JavaLoader}; do not rename!
      *
-     * @param   implementation the name of the implementation for which a service is desired.
+     * @param   implementation  the name of the implementation for which a service is desired.
      * @return  a factory for creating the component.
      */
     public static XSingleComponentFactory __getComponentFactory(final String implementation)
{
@@ -214,7 +219,7 @@ public final class Registration implemen
      * Writes the service information into the given registry key.
      * This method is called by the {@code com.sun.star.comp.loader.JavaLoader}; do not rename!
      *
-     * @param  registry the registry key.
+     * @param  registry  the registry key.
      * @return {@code true} if the operation succeeded.
      */
     public static boolean __writeRegistryServiceInfo(final XRegistryKey registry) {

Modified: sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/XReferencing.idl
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/XReferencing.idl?rev=1814802&r1=1814801&r2=1814802&view=diff
==============================================================================
--- sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/XReferencing.idl
[UTF-8] (original)
+++ sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/XReferencing.idl
[UTF-8] Thu Nov  9 23:02:11 2017
@@ -44,12 +44,16 @@ module org {
             [in] string codeOrPath
           );
 
-          /// Returns the axis name for the specified dimension in an identified object.
-          string getAxis(
+          /// Returns the scope of an identified object.
+          string getScope(
             /// The authority code (e.g. "EPSG:4326").
-            [in] string codeOrPath,
-            /// The dimension (1, 2, ...).
-            [in] long dimension
+            [in] string codeOrPath
+          );
+
+          /// Returns the domain of validity as country or region names for an identified
object.
+          string getDomainOfValidity(
+            /// The authority code (e.g. "EPSG:4326").
+            [in] string codeOrPath
           );
 
           /// Returns the domain of validity as a geographic bounding box for an identified
object.
@@ -68,6 +72,14 @@ module org {
             [in] any areaOfInterest
           ) raises (com::sun::star::lang::IllegalArgumentException);
 
+          /// Returns the axis name for the specified dimension in an identified object.
+          string getAxis(
+            /// The authority code (e.g. "EPSG:4326").
+            [in] string codeOrPath,
+            /// The dimension (1, 2, ...).
+            [in] long dimension
+          );
+
           /// Transforms a list of coordinates from source CRS to target CRS.
           sequence< sequence< double > > transformPoints(
             /// Authority code of the source coordinate reference system.

Modified: sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/XReferencing.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/XReferencing.java?rev=1814802&r1=1814801&r2=1814802&view=diff
==============================================================================
--- sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/XReferencing.java
[UTF-8] (original)
+++ sis/branches/JDK8/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/XReferencing.java
[UTF-8] Thu Nov  9 23:02:11 2017
@@ -46,15 +46,20 @@ public interface XReferencing extends XI
     String getName(String codeOrPath);
 
     /**
-     * Returns the axis name and units for the specified dimension in a coordinate reference
system or coordinate system.
-     * This method returns a short axis name as used in Well Known Text (WKT) format, for
example <cite>"Latitude"</cite>
-     * instead of <cite>"Geodetic latitude"</cite>.
+     * Returns the scope of an identified object.
      *
      * @param  codeOrPath  the code allocated by an authority, or the path to a file.
-     * @param  dimension   the dimension (1, 2, …).
-     * @return the name of the requested axis.
+     * @return the object scope.
      */
-    String getAxis(String codeOrPath, int dimension);
+    String getScope(String codeOrPath);
+
+    /**
+     * Returns the domain of validity as country or region names for an identified object.
+     *
+     * @param  codeOrPath  the code allocated by an authority, or the path to a file.
+     * @return the domain of validity.
+     */
+    String getDomainOfValidity(String codeOrPath);
 
     /**
      * Returns the domain of validity as a geographic bounding box for an identified object.
@@ -80,6 +85,17 @@ public interface XReferencing extends XI
     double getAccuracy(String sourceCRS, String targetCRS, Object areaOfInterest) throws
IllegalArgumentException;
 
     /**
+     * Returns the axis name and units for the specified dimension in a coordinate reference
system or coordinate system.
+     * This method returns a short axis name as used in Well Known Text (WKT) format, for
example <cite>"Latitude"</cite>
+     * instead of <cite>"Geodetic latitude"</cite>.
+     *
+     * @param  codeOrPath  the code allocated by an authority, or the path to a file.
+     * @param  dimension   the dimension (1, 2, …).
+     * @return the name of the requested axis.
+     */
+    String getAxis(String codeOrPath, int dimension);
+
+    /**
      * Transforms coordinates from the specified source CRS to the specified target CRS.
      *
      * @param  sourceCRS  the authority code for the source coordinate reference system.

Modified: sis/branches/JDK8/application/sis-openoffice/src/main/unopkg/Referencing.xcu
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/application/sis-openoffice/src/main/unopkg/Referencing.xcu?rev=1814802&r1=1814801&r2=1814802&view=diff
==============================================================================
--- sis/branches/JDK8/application/sis-openoffice/src/main/unopkg/Referencing.xcu (original)
+++ sis/branches/JDK8/application/sis-openoffice/src/main/unopkg/Referencing.xcu Thu Nov 
9 23:02:11 2017
@@ -51,14 +51,14 @@
           </node>
         </node>
 
-        <node oor:name="getAxis" oor:op="replace">
+        <node oor:name="getScope" oor:op="replace">
           <prop oor:name="DisplayName">
-            <value xml:lang="en">CRS.AXIS</value>
-            <value xml:lang="fr">AXE.SRS</value>
+            <value xml:lang="en">CRS.USAGE</value>
+            <value xml:lang="fr">USAGE.SRS</value>
           </prop>
           <prop oor:name="Description">
-            <value xml:lang="en">Returns the axis name for the specified dimension
in a Coordinate Reference System (CRS) identified by the given code.</value>
-            <value xml:lang="fr">Retourne le nom de l’axe à la dimension spécifiée
dans un Système de Références Spatiales (SRS) identifié par le code donné.</value>
+            <value xml:lang="en">Returns the usage scope of an object identified by
the given code. The object is usually, but not necessarily, a Coordinate Reference System
(CRS).</value>
+            <value xml:lang="fr">Retourne le domaine d’utilisation d’un objet
identifié par le code donné. L’objet est habituellement, mais pas obligatoirement,
un Système de Références Spatiales (SRS).</value>
           </prop>
           <prop oor:name="Category">
             <value>Add-In</value>
@@ -74,14 +74,30 @@
                 <value xml:lang="fr">Le code alloué par une autorité ou le chemin
vers un fichier.</value>
               </prop>
             </node>
-            <node oor:name="dimension" oor:op="replace">
+          </node>
+        </node>
+
+        <node oor:name="getScope" oor:op="replace">
+          <prop oor:name="DisplayName">
+            <value xml:lang="en">REGION.NAME</value>
+            <value xml:lang="fr">NOM.REGION</value>
+          </prop>
+          <prop oor:name="Description">
+            <value xml:lang="en">Returns the domain of validity as country or region
name(s) for an object identified by the given code.</value>
+            <value xml:lang="fr">Retourne sous forme de nom(s) de pays ou de région(s)
le domaine de validité d’un objet identifié par le code donné.</value>
+          </prop>
+          <prop oor:name="Category">
+            <value>Add-In</value>
+          </prop>
+          <node oor:name="Parameters">
+            <node oor:name="codeOrPath" oor:op="replace">
               <prop oor:name="DisplayName">
-                <value xml:lang="en">dimension</value>
-                <value xml:lang="fr">dimension</value>
+                <value xml:lang="en">identifier</value>
+                <value xml:lang="fr">identifiant</value>
               </prop>
               <prop oor:name="Description">
-                <value xml:lang="en">The dimension (1, 2, …) of axis to describe.</value>
-                <value xml:lang="fr">La dimension (1, 2, …) de l’axe à
décrire.</value>
+                <value xml:lang="en">The code allocated by authority or the path to
a file.</value>
+                <value xml:lang="fr">Le code alloué par une autorité ou le chemin
vers un fichier.</value>
               </prop>
             </node>
           </node>
@@ -157,6 +173,42 @@
               </prop>
             </node>
           </node>
+        </node>
+
+        <node oor:name="getAxis" oor:op="replace">
+          <prop oor:name="DisplayName">
+            <value xml:lang="en">CRS.AXIS</value>
+            <value xml:lang="fr">AXE.SRS</value>
+          </prop>
+          <prop oor:name="Description">
+            <value xml:lang="en">Returns the axis name for the specified dimension
in a Coordinate Reference System (CRS) identified by the given code.</value>
+            <value xml:lang="fr">Retourne le nom de l’axe à la dimension spécifiée
dans un Système de Références Spatiales (SRS) identifié par le code donné.</value>
+          </prop>
+          <prop oor:name="Category">
+            <value>Add-In</value>
+          </prop>
+          <node oor:name="Parameters">
+            <node oor:name="codeOrPath" oor:op="replace">
+              <prop oor:name="DisplayName">
+                <value xml:lang="en">identifier</value>
+                <value xml:lang="fr">identifiant</value>
+              </prop>
+              <prop oor:name="Description">
+                <value xml:lang="en">The code allocated by authority or the path to
a file.</value>
+                <value xml:lang="fr">Le code alloué par une autorité ou le chemin
vers un fichier.</value>
+              </prop>
+            </node>
+            <node oor:name="dimension" oor:op="replace">
+              <prop oor:name="DisplayName">
+                <value xml:lang="en">dimension</value>
+                <value xml:lang="fr">dimension</value>
+              </prop>
+              <prop oor:name="Description">
+                <value xml:lang="en">The dimension (1, 2, …) of axis to describe.</value>
+                <value xml:lang="fr">La dimension (1, 2, …) de l’axe à
décrire.</value>
+              </prop>
+            </node>
+          </node>
         </node>
 
         <node oor:name="transformPoints" oor:op="replace">

Modified: sis/branches/JDK8/application/sis-openoffice/src/main/unopkg/org/apache/sis/openoffice/XReferencing.class
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/application/sis-openoffice/src/main/unopkg/org/apache/sis/openoffice/XReferencing.class?rev=1814802&r1=1814801&r2=1814802&view=diff
==============================================================================
Binary files - no diff available.

Modified: sis/branches/JDK8/application/sis-openoffice/src/main/unopkg/sis.rdb
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/application/sis-openoffice/src/main/unopkg/sis.rdb?rev=1814802&r1=1814801&r2=1814802&view=diff
==============================================================================
Binary files - no diff available.

Modified: sis/branches/JDK8/application/sis-openoffice/src/test/java/org/apache/sis/openoffice/ReferencingFunctionsTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/application/sis-openoffice/src/test/java/org/apache/sis/openoffice/ReferencingFunctionsTest.java?rev=1814802&r1=1814801&r2=1814802&view=diff
==============================================================================
--- sis/branches/JDK8/application/sis-openoffice/src/test/java/org/apache/sis/openoffice/ReferencingFunctionsTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/application/sis-openoffice/src/test/java/org/apache/sis/openoffice/ReferencingFunctionsTest.java
[UTF-8] Thu Nov  9 23:02:11 2017
@@ -84,6 +84,15 @@ public final strictfp class ReferencingF
     }
 
     /**
+     * Tests {@link ReferencingFunctions#getScope(String)}.
+     */
+    @Test
+    public void testGetScope() {
+        final String scope = instance.getScope("EPSG:4326");
+        assertTrue(scope, scope.contains("Horizontal component of 3D system"));
+    }
+
+    /**
      * Tests {@link ReferencingFunctions#getAxis(String, int)}.
      */
     @Test
@@ -96,13 +105,22 @@ public final strictfp class ReferencingF
     }
 
     /**
+     * Tests {@link ReferencingFunctions#getDomainOfValidity(String)}.
+     */
+    @Test
+    public void testGetDomainOfValidity() {
+        final String domain = instance.getDomainOfValidity("EPSG:4326");
+        assertTrue(domain, domain.contains("World"));
+    }
+
+    /**
      * Tests {@link ReferencingFunctions#getGeographicArea(String)}.
      */
     @Test
     public void testGetGeographicArea() {
         final double[][] bbox = instance.getGeographicArea("EPSG:32620");     // UTM zone
20
-        assertEquals(2, bbox.length);
-        assumeFalse(Double.isNaN(bbox[0][0]));    // NaN if EPSG dataset is not installed.
+        assumeFalse(bbox.length == 0);            // Empty if EPSG dataset is not installed.
+        assertEquals("bbox.length", 2, bbox.length);
         assertArrayEquals("Upper left corner",  new double[] {84, -66}, bbox[0], STRICT);
         assertArrayEquals("Lower right corner", new double[] { 0, -60}, bbox[1], STRICT);
     }



Mime
View raw message