Author: desruisseaux
Date: Tue Oct  3 10:55:02 2017
New Revision: 1810976

URL: http://svn.apache.org/viewvc?rev=1810976&view=rev
Log:
Merge from JDK8 branch.

Added:
    
sis/branches/JDK7/core/sis-feature/src/test/java/org/apache/sis/feature/builder/AssociationRoleBuilderTest.java
      - copied unchanged from r1810974, 
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/builder/AssociationRoleBuilderTest.java
    
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Fallback.java
      - copied unchanged from r1810974, 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Fallback.java
    
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/LazySet.java
      - copied, changed from r1810974, 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/LazySet.java
    
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/LazySynchronizedIterator.java
      - copied unchanged from r1810974, 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/LazySynchronizedIterator.java
    
sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/geometry/ArrayEnvelopeTest.java
      - copied unchanged from r1810974, 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/geometry/ArrayEnvelopeTest.java
    
sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/LazySetTest.java
      - copied unchanged from r1810974, 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/LazySetTest.java
    
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/NameValue.java
      - copied unchanged from r1810974, 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/NameValue.java
    
sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/io/RewindableLineReader.java
      - copied unchanged from r1810974, 
sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/io/RewindableLineReader.java
    
sis/branches/JDK7/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/io/RewindableLineReaderTest.java
      - copied unchanged from r1810974, 
sis/branches/JDK8/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/io/RewindableLineReaderTest.java
Removed:
    
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/CodeType.java
    
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/util/Fallback.java
    
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/util/LazySet.java
    
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/util/LazySynchronizedIterator.java
    
sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/util/LazySetTest.java
Modified:
    sis/branches/JDK7/   (props changed)
    
sis/branches/JDK7/application/sis-console/src/main/java/org/apache/sis/console/ResourcesDownloader.java
    
sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java
    
sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeatureType.java
    
sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/NamedFeatureType.java
    
sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/builder/FeatureTypeBuilder.java
    
sis/branches/JDK7/core/sis-feature/src/test/java/org/apache/sis/feature/builder/FeatureTypeBuilderTest.java
    
sis/branches/JDK7/core/sis-feature/src/test/java/org/apache/sis/test/suite/FeatureTestSuite.java
    
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/direct/GO_ScopedName.java
    
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/NameMeaning.java
    
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Convention.java
    
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Symbols.java
    
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/package-info.java
    
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java
    
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
    
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java
    
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java
    
sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/CitationsTest.java
    
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractEnvelope.java
    
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/ArrayEnvelope.java
    
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelope2D.java
    
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelopes.java
    
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralEnvelope.java
    
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/Code.java
    
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Providers.java
    
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java
    
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/AuthorityFactories.java
    
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/Builder.java
    
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/EPSGFactoryFallback.java
    
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/NamedIdentifier.java
    
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AxesConvention.java
    
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.java
    
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
    
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticAuthorityFactory.java
    
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java
    
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
    
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGInstaller.java
    
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java
    
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java
    
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/package-info.java
    
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java
    
sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/geometry/CoordinateFormatTest.java
    
sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/geometry/GeneralEnvelopeTest.java
    
sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/geometry/ImmutableEnvelopeTest.java
    
sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/CommonAuthorityFactoryTest.java
    
sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/epsg/package.html
    
sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
    
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/NameAdapter.java
    
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/system/DataDirectory.java
    
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/util/Citations.java
    
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/collection/RangeSet.java
    
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultLocalName.java
    
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/TypeNames.java
    
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/package-info.java
    
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/xml/Pooled.java
    
sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/util/CitationsTest.java
    
sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/Assume.java
    
sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java
    sis/branches/JDK7/ide-project/NetBeans/nbproject/project.properties
    sis/branches/JDK7/pom.xml
    
sis/branches/JDK7/storage/sis-gdal/src/main/java/org/apache/sis/storage/gdal/Proj4Factory.java
    
sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/ChannelDecoder.java
    
sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/VariableInfo.java
    
sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/Store.java
    
sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/io/ChannelFactory.java
    
sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/io/InputStreamAdapter.java
    
sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/io/Markable.java
    
sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStoreRegistry.java
    
sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/storage/StorageConnector.java
    
sis/branches/JDK7/storage/sis-storage/src/test/java/org/apache/sis/test/suite/StorageTestSuite.java
    
sis/branches/JDK7/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Person.java

Propchange: sis/branches/JDK7/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Oct  3 10:55:02 2017
@@ -1,5 +1,5 @@
 /sis/branches/Android:1430670-1480699
 /sis/branches/JDK6:1394913-1508480
-/sis/branches/JDK8:1584960-1809384
+/sis/branches/JDK8:1584960-1810974
 /sis/branches/JDK9:1773327-1803064
 /sis/trunk:1394364-1508466,1519089-1519674

Modified: 
sis/branches/JDK7/application/sis-console/src/main/java/org/apache/sis/console/ResourcesDownloader.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/application/sis-console/src/main/java/org/apache/sis/console/ResourcesDownloader.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/application/sis-console/src/main/java/org/apache/sis/console/ResourcesDownloader.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/application/sis-console/src/main/java/org/apache/sis/console/ResourcesDownloader.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -35,7 +35,7 @@ import java.sql.Connection;
 import org.apache.sis.internal.system.DataDirectory;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.internal.util.X364;
-import org.apache.sis.internal.util.Fallback;
+import org.apache.sis.internal.referencing.Fallback;
 import org.apache.sis.setup.InstallationResources;
 
 import static org.apache.sis.internal.util.Constants.EPSG;

Modified: 
sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -19,6 +19,7 @@ package org.apache.sis.feature;
 import java.util.Map;
 import java.util.List;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.IdentityHashMap;
 import org.opengis.util.GenericName;
 import org.opengis.util.InternationalString;
@@ -216,10 +217,14 @@ public class DefaultAssociationRole exte
      * to feature <var>B</var> which has an association back to <var>A</var>. 
It may also be <var>A</var>
      * having an association to itself, <i>etc.</i>
      *
-     * @param  creating  the feature type in process of being constructed.
+     * @param  creating    the feature type in process of being constructed.
+     * @param  properties  {@code creating.getProperties(false)} given as a 
direct reference to the internal field,
+     *         without invoking {@code getProperties(…)}. We do that because 
{@code resolve(…)} is invoked while the
+     *         given {@code DefaultFeatureType} is under creation. Since 
{@code getProperties(…)} can be overridden,
+     *         invoking that method on {@code creating} may cause a failure 
with user code.
      * @return {@code true} if this association references a resolved feature 
type after this method call.
      */
-    final boolean resolve(final DefaultFeatureType creating) {
+    final boolean resolve(final DefaultFeatureType creating, final 
Collection<PropertyType> properties) {
         final FeatureType type = valueType;
         if (type instanceof NamedFeatureType) {
             FeatureType resolved = ((NamedFeatureType) type).resolved;
@@ -234,7 +239,7 @@ public class DefaultAssociationRole exte
                      * the 'creating' feature itself. This is a little bit 
unusual, but not illegal.
                      */
                     final List<FeatureType> deferred = new ArrayList<>();
-                    resolved = search(creating, name, deferred);
+                    resolved = search(creating, properties, name, deferred);
                     if (resolved == null) {
                         /*
                          * Did not found the desired FeatureType in the 
'creating' instance.
@@ -261,19 +266,25 @@ public class DefaultAssociationRole exte
      * <p>Current implementation does not check that there is no duplicated 
names.
      * See {@link #deepSearch(List, GenericName)} for a rational.</p>
      *
-     * @param  feature   the feature in which to search.
-     * @param  name      the name of the feature to search.
-     * @param  deferred  where to store {@code FeatureType}s to be eventually 
used for a deep search.
+     * @param  feature     the feature in which to search.
+     * @param  properties  {@code feature.getProperties(false)}, or {@code 
null} for letting this method performing the call.
+     * @param  name        the name of the feature to search.
+     * @param  deferred    where to store {@code FeatureType}s to be 
eventually used for a deep search.
      * @return the feature of the given name, or {@code null} if none.
      */
     @SuppressWarnings("null")
-    private static FeatureType search(final FeatureType feature, final 
GenericName name, final List<FeatureType> deferred) {
+    private static FeatureType search(final FeatureType feature, Collection<? 
extends PropertyType> properties,
+            final GenericName name, final List<FeatureType> deferred)
+    {
         /*
          * Search only in associations declared in the given feature, not in 
inherited associations.
          * The inherited associations will be checked in a separated loop 
below if we did not found
          * the request feature type in explicitly declared associations.
          */
-        for (final PropertyType property : feature.getProperties(false)) {
+        if (properties == null) {
+            properties = feature.getProperties(false);
+        }
+        for (final PropertyType property : properties) {
             if (property instanceof FeatureAssociationRole) {
                 final FeatureType valueType;
                 if (property instanceof DefaultAssociationRole) {
@@ -300,7 +311,7 @@ public class DefaultAssociationRole exte
             if (name.equals(type.getName())) {
                 return type;
             }
-            type = search(type, name, deferred);
+            type = search(type, null, name, deferred);
             if (type != null) {
                 return type;
             }
@@ -309,7 +320,7 @@ public class DefaultAssociationRole exte
     }
 
     /**
-     * Potentially invoked after {@link #search(FeatureType, GenericName, 
List)} for searching
+     * Potentially invoked after {@link #search(FeatureType, Collection, 
GenericName, List)} for searching
      * in associations of associations.
      *
      * <p>Current implementation does not check that there is no duplicated 
names. Even if we did so,
@@ -317,7 +328,7 @@ public class DefaultAssociationRole exte
      * later. We rather put a warning in {@link #DefaultAssociationRole(Map, 
GenericName, int, int)}
      * javadoc.</p>
      *
-     * @param  deferred  the feature types collected by {@link 
#search(FeatureType, GenericName, List)}.
+     * @param  deferred  the feature types collected by {@link 
#search(FeatureType, Collection, GenericName, List)}.
      * @param  name      the name of the feature to search.
      * @return the feature of the given name, or {@code null} if none.
      */
@@ -327,7 +338,7 @@ public class DefaultAssociationRole exte
             FeatureType valueType = deferred.get(i++);
             if (done.put(valueType, Boolean.TRUE) == null) {
                 deferred.subList(0, i).clear();                 // Discard 
previous value for making more room.
-                valueType = search(valueType, name, deferred);
+                valueType = search(valueType, null, name, deferred);
                 if (valueType != null) {
                     return valueType;
                 }

Modified: 
sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeatureType.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeatureType.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeatureType.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeatureType.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -531,7 +531,7 @@ public class DefaultFeatureType extends
          */
         if (feature instanceof DefaultFeatureType) {
             final DefaultFeatureType dt = (DefaultFeatureType) feature;
-            return dt.isResolved = resolve(feature, dt.properties, previous, 
dt.isResolved);
+            return dt.isResolved = resolve(dt, dt.properties, previous, 
dt.isResolved);
         } else {
             return resolve(feature, feature.getProperties(false), previous, 
feature.isSimple());
         }
@@ -560,7 +560,7 @@ public class DefaultFeatureType extends
             for (final PropertyType property : toUpdate) {
                 if (property instanceof FeatureAssociationRole) {
                     if (property instanceof DefaultAssociationRole) {
-                        if (!((DefaultAssociationRole) 
property).resolve(this)) {
+                        if (!((DefaultAssociationRole) property).resolve(this, 
properties)) {
                             resolved = false;
                             continue;
                         }

Modified: 
sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/NamedFeatureType.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/NamedFeatureType.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/NamedFeatureType.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/NamedFeatureType.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -53,9 +53,9 @@ final class NamedFeatureType implements
 
     /**
      * The feature type to use instead of the {@code NamedFeatureType}. 
Initially null, then set to the "real"
-     * feature type after {@link 
DefaultAssociationRole#resolve(DefaultFeatureType)} has been able to create it.
-     * This information is stored in case the same {@code NamedFeatureType} 
instance has been used in more than
-     * one {@link DefaultFeatureType}.
+     * feature type after {@link 
DefaultAssociationRole#resolve(DefaultFeatureType, Collection)} has been able
+     * to create it. This information is stored in case the same {@code 
NamedFeatureType} instance has been used
+     * in more than one {@link DefaultFeatureType}.
      */
     volatile FeatureType resolved;
 

Modified: 
sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/builder/FeatureTypeBuilder.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/builder/FeatureTypeBuilder.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/builder/FeatureTypeBuilder.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/builder/FeatureTypeBuilder.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -408,9 +408,10 @@ public class FeatureTypeBuilder extends
 
     /**
      * Sets the parent types (or super-type) from which to inherit properties.
-     * If this method is not invoked, then the default value is to have no 
parent.
+     * If this method is not invoked, then the default value is no parent.
      *
      * @param  parents  the parent types from which to inherit properties, or 
an empty array if none.
+     *                  Null elements are ignored.
      * @return {@code this} for allowing method calls chaining.
      */
     public FeatureTypeBuilder setSuperTypes(final FeatureType... parents) {
@@ -419,6 +420,11 @@ public class FeatureTypeBuilder extends
         if (!superTypes.equals(asList)) {
             superTypes.clear();
             superTypes.addAll(asList);
+            for (int i=superTypes.size(); --i >= 0;) {
+                if (superTypes.get(i) == null) {
+                    superTypes.remove(i);
+                }
+            }
             clearCache();
         }
         return this;

Modified: 
sis/branches/JDK7/core/sis-feature/src/test/java/org/apache/sis/feature/builder/FeatureTypeBuilderTest.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-feature/src/test/java/org/apache/sis/feature/builder/FeatureTypeBuilderTest.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-feature/src/test/java/org/apache/sis/feature/builder/FeatureTypeBuilderTest.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-feature/src/test/java/org/apache/sis/feature/builder/FeatureTypeBuilderTest.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -20,8 +20,8 @@ import java.util.Iterator;
 import java.util.Collections;
 import com.esri.core.geometry.Geometry;
 import com.esri.core.geometry.Point;
-import org.apache.sis.feature.AbstractOperation;
 import org.opengis.geometry.Envelope;
+import org.apache.sis.feature.AbstractOperation;
 import org.apache.sis.internal.feature.AttributeConvention;
 import org.apache.sis.feature.DefaultFeatureTypeTest;
 import org.apache.sis.feature.FeatureOperations;
@@ -47,6 +47,7 @@ import org.opengis.feature.Operation;
  *
  * @author  Johann Sorel (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
+ * @author  Michael Hausegger
  * @version 0.8
  * @since   0.8
  * @module
@@ -54,9 +55,56 @@ import org.opengis.feature.Operation;
 @DependsOn(AttributeTypeBuilderTest.class)
 public final strictfp class FeatureTypeBuilderTest extends TestCase {
     /**
+     * Verifies that {@link FeatureTypeBuilder#setSuperTypes(FeatureType...)} 
ignores null parents.
+     * This method tests only the builder state without creating feature type.
+     */
+    @Test
+    public void testNullParents() {
+        final FeatureTypeBuilder builder = new FeatureTypeBuilder(null);
+        assertSame(builder, builder.setSuperTypes(new FeatureType[6]));
+        assertEquals(0, builder.getSuperTypes().length);
+    }
+
+    /**
+     * Verifies {@link FeatureTypeBuilder#setAbstract(boolean)}.
+     * This method tests only the builder state without creating feature type.
+     */
+    @Test
+    public void testSetAbstract() {
+        final FeatureTypeBuilder builder = new FeatureTypeBuilder(null);
+        assertFalse("isAbstract", builder.isAbstract());
+        assertSame (builder, builder.setAbstract(true));
+        assertTrue ("isAbstract", builder.isAbstract());
+    }
+
+    /**
+     * Verifies {@link FeatureTypeBuilder#setDeprecated(boolean)}.
+     * This method tests only the builder state without creating feature type.
+     */
+    @Test
+    public void testSetDeprecated() {
+        FeatureTypeBuilder builder = new FeatureTypeBuilder();
+        assertFalse("isDeprecated", builder.isDeprecated());
+        builder.setDeprecated(true);
+        assertTrue("isDeprecated", builder.isDeprecated());
+    }
+
+    /**
+     * Verifies {@link FeatureTypeBuilder#setNameSpace(CharSequence)}.
+     */
+    @Test
+    public void testSetNameSpace() {
+        final FeatureTypeBuilder builder = new FeatureTypeBuilder();
+        assertNull("nameSpace", builder.getNameSpace());
+        assertSame(builder, builder.setNameSpace("myNameSpace"));
+        assertEquals("nameSpace", "myNameSpace", builder.getNameSpace());
+    }
+
+    /**
      * Tests with the minimum number of parameters (no property and no super 
type).
      */
     @Test
+    @DependsOnMethod({"testSetAbstract", "testSetDeprecated", 
"testSetNameSpace"})
     public void testInitialization() {
         final FeatureTypeBuilder builder = new FeatureTypeBuilder();
         try {

Modified: 
sis/branches/JDK7/core/sis-feature/src/test/java/org/apache/sis/test/suite/FeatureTestSuite.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-feature/src/test/java/org/apache/sis/test/suite/FeatureTestSuite.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-feature/src/test/java/org/apache/sis/test/suite/FeatureTestSuite.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-feature/src/test/java/org/apache/sis/test/suite/FeatureTestSuite.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -52,6 +52,7 @@ import org.junit.BeforeClass;
     org.apache.sis.internal.feature.AttributeConventionTest.class,
     org.apache.sis.feature.builder.CharacteristicTypeBuilderTest.class,
     org.apache.sis.feature.builder.AttributeTypeBuilderTest.class,
+    org.apache.sis.feature.builder.AssociationRoleBuilderTest.class,
     org.apache.sis.feature.builder.FeatureTypeBuilderTest.class
 })
 public final strictfp class FeatureTestSuite extends TestSuite {

Modified: 
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/direct/GO_ScopedName.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/direct/GO_ScopedName.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/direct/GO_ScopedName.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/direct/GO_ScopedName.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -19,7 +19,7 @@ package org.apache.sis.internal.jaxb.met
 import javax.xml.bind.annotation.adapters.XmlAdapter;
 import org.opengis.util.ScopedName;
 import org.opengis.util.GenericName;
-import org.apache.sis.internal.jaxb.gml.CodeType;
+import org.apache.sis.internal.jaxb.gco.NameValue;
 
 
 /**
@@ -34,7 +34,7 @@ import org.apache.sis.internal.jaxb.gml.
  * @since 0.5
  * @module
  */
-public final class GO_ScopedName extends XmlAdapter<CodeType.ScopedName, 
ScopedName> {
+public final class GO_ScopedName extends XmlAdapter<NameValue.Scoped, 
ScopedName> {
     /**
      * Converts a GeoAPI interface to the SIS implementation for XML 
marshalling.
      *
@@ -42,9 +42,9 @@ public final class GO_ScopedName extends
      * @return the adapter for the given value, here the SIS implementation.
      */
     @Override
-    public CodeType.ScopedName marshal(final ScopedName name) {
+    public NameValue.Scoped marshal(final ScopedName name) {
         if (name != null) {
-            final CodeType.ScopedName code = new CodeType.ScopedName();
+            final NameValue.Scoped code = new NameValue.Scoped();
             code.setName(name);
             return code;
         }
@@ -58,7 +58,7 @@ public final class GO_ScopedName extends
      * @return the value to marshal (which is the same).
      */
     @Override
-    public ScopedName unmarshal(final CodeType.ScopedName code) {
+    public ScopedName unmarshal(final NameValue.Scoped code) {
         if (code != null) {
             final GenericName parsed = code.getName();
             if (parsed instanceof ScopedName) {

Modified: 
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/NameMeaning.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/NameMeaning.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/NameMeaning.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/NameMeaning.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -167,7 +167,7 @@ public final class NameMeaning extends S
                  * new name for that organization).
                  */
                 final Citation c = Citations.fromName(key);
-                codeSpace = 
org.apache.sis.internal.util.Citations.getCodeSpace(c);
+                codeSpace = Citations.getCodeSpace(c);
                 if (AUTHORITIES.get(codeSpace) == null) {
                     return null;            // Not an authority that we 
recognize for the OGC namespace.
                 }

Modified: 
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Convention.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Convention.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Convention.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Convention.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -28,7 +28,7 @@ import org.apache.sis.metadata.iso.citat
  * (also known as “WKT 2”), or whether to use the format previously defined in 
OGC 01-009 (referenced as “WKT 1”).
  *
  * <div class="section">WKT 1 variants</div>
- * The WKT 2 format should be parsed and formatted consistently by all 
softwares.
+ * The WKT 2 format should be parsed and formatted consistently by all 
software products.
  * But the WKT 1 format has been interpreted differently by various 
implementors.
  * Apache SIS can adapt itself to different WKT variants, sometime 
automatically. But some aspects can not be guessed.
  * One noticeable source of confusion is the unit of measurement of {@code 
PRIMEM[…]} and {@code PARAMETER[…]} elements:
@@ -37,8 +37,8 @@ import org.apache.sis.metadata.iso.citat
  *   <li>The unit of the Prime Meridian shall be the angular unit of the 
enclosing Geographic CRS
  *       according the OGC 01-009 (<cite>Coordinate transformation 
services</cite>) specification.</li>
  *   <li>An older specification — <cite>Simple Features</cite> — was unclear 
on this matter and has been
- *       interpreted by many softwares as fixing the unit to decimal 
degrees.</li>
- *   <li>Some softwares support only (<var>longitude</var>, 
<var>latitude</var>) axis order
+ *       interpreted by many software products as fixing the unit to decimal 
degrees.</li>
+ *   <li>Some software products support only (<var>longitude</var>, 
<var>latitude</var>) axis order
  *       and ignore completely all {@code AXIS[…]} elements in the WKT.</li>
  * </ul>
  *
@@ -172,7 +172,7 @@ public enum Convention {
      * <p>Note that {@code AXIS[…]} elements still need to be well formed even 
when parsing a text with this convention.
      * Malformed axis elements will continue to cause a {@link 
java.text.ParseException} despite their content being ignored.</p>
      *
-     * <p>This convention may be useful for compatibility with some other 
softwares that do not handle axis order correctly.
+     * <p>This convention may be useful for compatibility with some other 
software products that do not handle axis order correctly.
      * But except when imposed by such compatibility reasons, this convention 
should be avoided as much as possible.</p>
      *
      * @since 0.6

Modified: 
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Symbols.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Symbols.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Symbols.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Symbols.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -605,7 +605,7 @@ public class Symbols implements Localize
      * of confusion when processing geographic data. Some applications just 
ignore any declared axis order
      * in favor of their own hard-coded (<var>longitude</var>, 
<var>latitude</var>) axis order.
      * Consequently, the presence of {@code AXIS[…]} elements in a WKT is an 
indication that the encoded
-     * object may not be understood as intended by some external softwares.
+     * object may not be understood as intended by some external software 
products.
      *
      * @param  wkt  the WKT to inspect.
      * @return {@code true} if the given WKT contains at least one instance of 
the {@code AXIS[…]} element.

Modified: 
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/package-info.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/package-info.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/package-info.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/package-info.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -39,7 +39,7 @@
  *   <li>Apply syntactic coloring on terminal supporting <cite>ANSI escape 
codes</cite>
  *       (a.k.a. ECMA-48, ISO/IEC 6429 and X3.64).</li>
  *   <li>Alter the parsing in a way compatible with non-standard (but commonly 
used) WKT.
- *       For example some others softwares ignore the {@code AXIS[…]} elements 
at parsing time.</li>
+ *       For example some others software products ignore the {@code AXIS[…]} 
elements at parsing time.</li>
  *   <li>Report warnings that occurred during parsing or formatting.</li>
  * </ul>
  *
@@ -56,9 +56,9 @@
  * The WKT 1 format has been interpreted differently by various implementors.
  * One noticeable difference is the unit of measurement of prime meridians and 
projection parameters.
  * The WKT 2 format aims to solve the inter-operability problem caused by such 
mismatches,
- * but not all softwares support this new format. Consequently importing or 
exporting data from/to a software with
- * the WKT syntax require knowledge of the WKT variant used by that software. 
This variant can be specified by the
- * {@link org.apache.sis.io.wkt.Convention} enumeration.
+ * but not all software products support this new format. Consequently 
importing or exporting data from/to a software
+ * with the WKT syntax require knowledge of the WKT variant used by that 
software. This variant can be specified by
+ * the {@link org.apache.sis.io.wkt.Convention} enumeration.
  *
  * <div class="section">Geometry WKT</div>
  * The {@link org.apache.sis.geometry.GeneralEnvelope} and {@link 
org.apache.sis.geometry.GeneralDirectPosition} classes

Modified: 
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -23,7 +23,7 @@ import org.opengis.metadata.Identifier;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.util.InternationalString;
 import org.apache.sis.metadata.TitleProperty;
-import org.apache.sis.internal.util.Citations;
+import org.apache.sis.metadata.iso.citation.Citations;
 
 
 /**

Modified: 
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -314,7 +314,7 @@ public class ImmutableIdentifier extends
          */
         value = properties.get(CODESPACE_KEY);
         if (value == null) {
-            codeSpace = 
org.apache.sis.internal.util.Citations.getCodeSpace(authority);
+            codeSpace = Citations.getCodeSpace(authority);
         } else if (value instanceof String) {
             codeSpace = trimWhitespaces((String) value);
         } else {

Modified: 
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -689,7 +689,29 @@ public final class Citations extends Sta
      *
      * @since 0.6
      */
+    @SuppressWarnings("deprecation")
     public static String getUnicodeIdentifier(final Citation citation) {
         return 
org.apache.sis.internal.util.Citations.getUnicodeIdentifier(citation);
     }
+
+    /**
+     * Infers a code space from the given citation, or returns {@code null} if 
none.
+     * This method is very close to {@link #getUnicodeIdentifier(Citation)}, 
except that it looks for
+     * {@link IdentifierSpace#getName()} before to scan the identifiers and 
titles. The result should
+     * be the same in most cases, except some cases like the {@link 
org.apache.sis.metadata.iso.citation.Citations}
+     * constant for {@code "Proj.4"} in which case this method returns {@code 
"Proj4"} instead of {@code null}.
+     *
+     * @param  citation  the citation for which to infer the code space, or 
{@code null}.
+     * @return a non-empty code space for the given citation without leading 
or trailing whitespaces,
+     *         or {@code null} if the given citation is null or does not have 
any Unicode identifier or title.
+     *
+     * @since 0.8
+     */
+    public static String getCodeSpace(final Citation citation) {
+        if (citation instanceof IdentifierSpace<?>) {
+            return ((IdentifierSpace<?>) citation).getName();
+        } else {
+            return getUnicodeIdentifier(citation);
+        }
+    }
 }

Modified: 
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -238,7 +238,7 @@ public class DefaultMaintenanceInformati
     @Dependencies("getMaintenanceDates")
     public Date getDateOfNextUpdate() {
         final Collection<CitationDate> dates = getMaintenanceDates();
-        if (dates != null) { // May be null on XML marshalling.
+        if (dates != null) {                                                   
 // May be null on XML marshalling.
             for (final CitationDate date : dates) {
                 if (DateType.NEXT_UPDATE.equals(date.getDateType())) {
                     return date.getDate();

Modified: 
sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/CitationsTest.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/CitationsTest.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/CitationsTest.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/CitationsTest.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -22,7 +22,9 @@ import java.lang.reflect.Field;
 import org.opengis.metadata.Identifier;
 import org.opengis.metadata.citation.Citation;
 import org.apache.sis.internal.simple.CitationConstant;
+import org.apache.sis.internal.simple.SimpleCitation;
 import org.apache.sis.internal.util.Constants;
+import org.apache.sis.xml.IdentifierSpace;
 import org.apache.sis.test.DependsOnMethod;
 import org.apache.sis.test.TestCase;
 import org.junit.Test;
@@ -131,27 +133,63 @@ public final strictfp class CitationsTes
     }
 
     /**
-     * Tests {@link 
org.apache.sis.internal.util.Citations#getCodeSpace(Citation)} on the constants
-     * declared in the {@link Citations} class.
+     * Tests {@link Citations#getCodeSpace(Citation)} with some ignorable 
characters.
+     * Ignorable character used in this test are:
+     *
+     * <ul>
+     *   <li>200B: zero width space</li>
+     *   <li>2060: word joiner</li>
+     * </ul>
      */
     @Test
-    @DependsOnMethod("testGetUnicodeIdentifier")
+    @DependsOnMethod("testGetIdentifier")
     public void testGetCodeSpace() {
-        assertEquals("SIS",         
org.apache.sis.internal.util.Citations.getCodeSpace(SIS));
-        assertEquals("OGC",         
org.apache.sis.internal.util.Citations.getCodeSpace(WMS));
-        assertEquals("OGC",         
org.apache.sis.internal.util.Citations.getCodeSpace(OGC));
-        assertEquals("IOGP",        
org.apache.sis.internal.util.Citations.getCodeSpace(IOGP));
-        assertEquals("EPSG",        
org.apache.sis.internal.util.Citations.getCodeSpace(EPSG));
-        assertEquals("ESRI",        
org.apache.sis.internal.util.Citations.getCodeSpace(ESRI));
-        assertEquals("NetCDF",      
org.apache.sis.internal.util.Citations.getCodeSpace(NETCDF));
-        assertEquals("GeoTIFF",     
org.apache.sis.internal.util.Citations.getCodeSpace(GEOTIFF));
-        assertEquals("MapInfo",     
org.apache.sis.internal.util.Citations.getCodeSpace(MAP_INFO));
-        assertEquals("ISBN",        
org.apache.sis.internal.util.Citations.getCodeSpace(ISBN));
-        assertEquals("ISSN",        
org.apache.sis.internal.util.Citations.getCodeSpace(ISSN));
-        assertEquals("Proj4",       
org.apache.sis.internal.util.Citations.getCodeSpace(PROJ4));
-        assertEquals("S57",         
org.apache.sis.internal.util.Citations.getCodeSpace(S57));
-        assertNull  ("ISO_19115-1", 
org.apache.sis.internal.util.Citations.getCodeSpace(ISO_19115.get(0)));
-        assertNull  ("ISO_19115-2", 
org.apache.sis.internal.util.Citations.getCodeSpace(ISO_19115.get(1)));
+        final SimpleCitation citation = new SimpleCitation(" 
Valid\u2060Id\u200Bentifier ");
+        assertEquals("ValidIdentifier", Citations.getCodeSpace(citation));
+
+        assertNull("Shall not be taken as a valid identifier.",
+                Citations.getCodeSpace(new SimpleCitation("Proj.4")));
+        assertEquals("Shall fallback on the the identifier space name.",
+                "TheProj4Space", Citations.getCodeSpace(new Proj4()));
+    }
+
+    /**
+     * A citation which is also an {@link IdentifierSpace}, for {@link 
#testGetCodeSpace()} purpose.
+     */
+    @SuppressWarnings("serial")
+    private static final class Proj4 extends SimpleCitation implements 
IdentifierSpace<Integer> {
+        Proj4() {
+            super("Proj.4");
+        }
+
+        @Override
+        public String getName() {
+            return "TheProj4Space";         // Intentionally a very different 
name than "Proj4".
+        }
+    }
+
+    /**
+     * Tests {@link Citations#getCodeSpace(Citation)} on the constants
+     * declared in the {@link Citations} class.
+     */
+    @Test
+    @DependsOnMethod({"testGetUnicodeIdentifier", "testGetIdentifier"})
+    public void testGetConstantCodeSpace() {
+        assertEquals("SIS",         Citations.getCodeSpace(SIS));
+        assertEquals("OGC",         Citations.getCodeSpace(WMS));
+        assertEquals("OGC",         Citations.getCodeSpace(OGC));
+        assertEquals("IOGP",        Citations.getCodeSpace(IOGP));
+        assertEquals("EPSG",        Citations.getCodeSpace(EPSG));
+        assertEquals("ESRI",        Citations.getCodeSpace(ESRI));
+        assertEquals("NetCDF",      Citations.getCodeSpace(NETCDF));
+        assertEquals("GeoTIFF",     Citations.getCodeSpace(GEOTIFF));
+        assertEquals("MapInfo",     Citations.getCodeSpace(MAP_INFO));
+        assertEquals("ISBN",        Citations.getCodeSpace(ISBN));
+        assertEquals("ISSN",        Citations.getCodeSpace(ISSN));
+        assertEquals("Proj4",       Citations.getCodeSpace(PROJ4));
+        assertEquals("S57",         Citations.getCodeSpace(S57));
+        assertNull  ("ISO_19115-1", Citations.getCodeSpace(ISO_19115.get(0)));
+        assertNull  ("ISO_19115-2", Citations.getCodeSpace(ISO_19115.get(1)));
     }
 
     /**

Modified: 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractEnvelope.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractEnvelope.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractEnvelope.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractEnvelope.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -213,7 +213,17 @@ public abstract class AbstractEnvelope i
      * @return {@code true} if the range meaning is {@code WRAPAROUND}.
      */
     static boolean isWrapAround(final CoordinateReferenceSystem crs, final int 
dimension) {
-        final CoordinateSystemAxis axis = getAxis(crs, dimension);
+        return isWrapAround(getAxis(crs, dimension));
+    }
+
+    /**
+     * Returns {@code true} if the given axis is non-null and has the
+     * {@link RangeMeaning#WRAPAROUND WRAPAROUND} range meaning.
+     *
+     * @param  axis  the axis to test, or {@code null}.
+     * @return {@code true} if the range meaning is {@code WRAPAROUND}.
+     */
+    static boolean isWrapAround(final CoordinateSystemAxis axis) {
         return (axis != null) && 
RangeMeaning.WRAPAROUND.equals(axis.getRangeMeaning());
     }
 
@@ -225,7 +235,7 @@ public abstract class AbstractEnvelope i
      * @return the spanning of the given axis.
      */
     static double getSpan(final CoordinateSystemAxis axis) {
-        if (axis != null && 
RangeMeaning.WRAPAROUND.equals(axis.getRangeMeaning())) {
+        if (isWrapAround(axis)) {
             return axis.getMaximumValue() - axis.getMinimumValue();
         }
         return Double.NaN;
@@ -338,9 +348,10 @@ public abstract class AbstractEnvelope i
 
     /**
      * Returns the minimal ordinate value for the specified dimension. In the 
typical case
-     * of envelopes <em>not</em> spanning the anti-meridian, this method 
returns the
+     * of non-empty envelopes <em>not</em> spanning the anti-meridian, this 
method returns the
      * {@link #getLower(int)} value verbatim. In the case of envelope spanning 
the anti-meridian,
      * this method returns the {@linkplain 
CoordinateSystemAxis#getMinimumValue() axis minimum value}.
+     * If the range in the given dimension is invalid, then this method 
returns {@code NaN}.
      *
      * @param  dimension  the dimension for which to obtain the ordinate value.
      * @return the minimal ordinate value at the given dimension.
@@ -352,16 +363,17 @@ public abstract class AbstractEnvelope i
         double lower = getLower(dimension);
         if (isNegative(getUpper(dimension) - lower)) {              // Special 
handling for -0.0
             final CoordinateSystemAxis axis = 
getAxis(getCoordinateReferenceSystem(), dimension);
-            lower = (axis != null) ? axis.getMinimumValue() : 
Double.NEGATIVE_INFINITY;
+            lower = isWrapAround(axis) ? axis.getMinimumValue() : Double.NaN;
         }
         return lower;
     }
 
     /**
      * Returns the maximal ordinate value for the specified dimension. In the 
typical case
-     * of envelopes <em>not</em> spanning the anti-meridian, this method 
returns the
+     * of non-empty envelopes <em>not</em> spanning the anti-meridian, this 
method returns the
      * {@link #getUpper(int)} value verbatim. In the case of envelope spanning 
the anti-meridian,
      * this method returns the {@linkplain 
CoordinateSystemAxis#getMaximumValue() axis maximum value}.
+     * If the range in the given dimension is invalid, then this method 
returns {@code NaN}.
      *
      * @param  dimension  the dimension for which to obtain the ordinate value.
      * @return the maximal ordinate value at the given dimension.
@@ -373,7 +385,7 @@ public abstract class AbstractEnvelope i
         double upper = getUpper(dimension);
         if (isNegative(upper - getLower(dimension))) {              // Special 
handling for -0.0
             final CoordinateSystemAxis axis = 
getAxis(getCoordinateReferenceSystem(), dimension);
-            upper = (axis != null) ? axis.getMaximumValue() : 
Double.POSITIVE_INFINITY;
+            upper = isWrapAround(axis) ? axis.getMaximumValue() : Double.NaN;
         }
         return upper;
     }
@@ -417,7 +429,7 @@ public abstract class AbstractEnvelope i
      * If no shift can be applied, returns {@code NaN}.
      */
     static double fixMedian(final CoordinateSystemAxis axis, final double 
median) {
-        if (axis != null && 
RangeMeaning.WRAPAROUND.equals(axis.getRangeMeaning())) {
+        if (isWrapAround(axis)) {
             final double minimum = axis.getMinimumValue();
             final double maximum = axis.getMaximumValue();
             final double cycle   = maximum - minimum;
@@ -468,7 +480,7 @@ public abstract class AbstractEnvelope i
      * @return a positive span, or NaN if the span can not be fixed.
      */
     static double fixSpan(final CoordinateSystemAxis axis, double span) {
-        if (axis != null && 
RangeMeaning.WRAPAROUND.equals(axis.getRangeMeaning())) {
+        if (isWrapAround(axis)) {
             final double cycle = axis.getMaximumValue() - 
axis.getMinimumValue();
             if (cycle > 0 && cycle != Double.POSITIVE_INFINITY) {
                 span += cycle;
@@ -1108,7 +1120,7 @@ public abstract class AbstractEnvelope i
      *
      * <div class="note"><b>Note:</b>
      * The {@code BOX} element is not part of the standard <cite>Well Known 
Text</cite> (WKT) format.
-     * However it is understood by many softwares, for example GDAL and 
PostGIS.</div>
+     * However it is understood by many software libraries, for example GDAL 
and PostGIS.</div>
      *
      * The string returned by this method can be {@linkplain 
GeneralEnvelope#GeneralEnvelope(CharSequence) parsed}
      * by the {@code GeneralEnvelope} constructor.

Modified: 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/ArrayEnvelope.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/ArrayEnvelope.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/ArrayEnvelope.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/ArrayEnvelope.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -459,7 +459,7 @@ scanNumber: while ((i += Character.charC
         double lower = ordinates[i];
         if (isNegative(ordinates[i + (ordinates.length >>> 1)] - lower)) {     
 // Special handling for -0.0
             final CoordinateSystemAxis axis = getAxis(crs, dimension);
-            lower = (axis != null) ? axis.getMinimumValue() : 
Double.NEGATIVE_INFINITY;
+            lower = isWrapAround(axis) ? axis.getMinimumValue() : Double.NaN;
         }
         return lower;
     }
@@ -474,7 +474,7 @@ scanNumber: while ((i += Character.charC
         double upper = ordinates[i + (ordinates.length >>> 1)];
         if (isNegative(upper - ordinates[i])) {                                
 // Special handling for -0.0
             final CoordinateSystemAxis axis = getAxis(crs, dimension);
-            upper = (axis != null) ? axis.getMaximumValue() : 
Double.POSITIVE_INFINITY;
+            upper = isWrapAround(axis) ? axis.getMaximumValue() : Double.NaN;
         }
         return upper;
     }

Modified: 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelope2D.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelope2D.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelope2D.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelope2D.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -32,8 +32,6 @@ import org.apache.sis.util.Emptiable;
 
 import static java.lang.Double.NaN;
 import static java.lang.Double.isNaN;
-import static java.lang.Double.POSITIVE_INFINITY;
-import static java.lang.Double.NEGATIVE_INFINITY;
 import static java.lang.Double.doubleToLongBits;
 import static org.apache.sis.math.MathFunctions.isPositive;
 import static org.apache.sis.math.MathFunctions.isNegative;
@@ -388,7 +386,7 @@ public class Envelope2D extends Rectangl
         }
         if (isNegative(span)) {                                         // 
Special handling for -0.0
             final CoordinateSystemAxis axis = getAxis(crs, dimension);
-            return (axis != null) ? axis.getMinimumValue() : NEGATIVE_INFINITY;
+            return isWrapAround(axis) ? axis.getMinimumValue() : NaN;
         }
         return value;
     }
@@ -412,7 +410,7 @@ public class Envelope2D extends Rectangl
         }
         if (isNegative(span)) {                                         // 
Special handling for -0.0
             final CoordinateSystemAxis axis = getAxis(crs, dimension);
-            return (axis != null) ? axis.getMaximumValue() : POSITIVE_INFINITY;
+            return isWrapAround(axis) ? axis.getMaximumValue() : NaN;
         }
         return value + span;
     }

Modified: 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelopes.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelopes.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelopes.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelopes.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -103,6 +103,8 @@ public final class Envelopes extends Sta
 
     /**
      * Returns {@code true} if the given axis is of kind "Wrap Around".
+     *
+     * @see AbstractEnvelope#isWrapAround(CoordinateSystemAxis)
      */
     static boolean isWrapAround(final CoordinateSystemAxis axis) {
         return RangeMeaning.WRAPAROUND.equals(axis.getRangeMeaning());
@@ -734,7 +736,7 @@ public final class Envelopes extends Sta
      *
      * <p>Example:</p>
      * <ul>
-     *   <li>{@code BOX(-180 -90, 180 90)} (not really a geometry, but 
understood by many softwares)</li>
+     *   <li>{@code BOX(-180 -90, 180 90)} (not really a geometry, but 
understood by many software products)</li>
      *   <li>{@code POINT(6 10)}</li>
      *   <li>{@code MULTIPOLYGON(((1 1, 5 1, 1 5, 1 1),(2 2, 3 2, 3 3, 2 
2)))}</li>
      *   <li>{@code GEOMETRYCOLLECTION(POINT(4 6),LINESTRING(3 8,7 10))}</li>
@@ -771,7 +773,7 @@ public final class Envelopes extends Sta
      *
      * <div class="note"><b>Note:</b>
      * The {@code BOX} element is not part of the standard <cite>Well Known 
Text</cite> (WKT) format.
-     * However it is understood by many softwares, for example GDAL and 
PostGIS.</div>
+     * However it is understood by many software libraries, for example GDAL 
and PostGIS.</div>
      *
      * The string returned by this method can be {@linkplain 
GeneralEnvelope#GeneralEnvelope(CharSequence)
      * parsed} by the {@code GeneralEnvelope} constructor.

Modified: 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralEnvelope.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralEnvelope.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralEnvelope.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralEnvelope.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -978,7 +978,7 @@ public class GeneralEnvelope extends Arr
             final double upper = ordinates[iUpper];
             if (isNegative(upper - lower)) {
                 final CoordinateSystemAxis axis = getAxis(crs, i);
-                if (axis != null && 
RangeMeaning.WRAPAROUND.equals(axis.getRangeMeaning())) {
+                if (isWrapAround(axis)) {
                     ordinates[iLower] = axis.getMinimumValue();
                     ordinates[iUpper] = axis.getMaximumValue();
                     changed = true;

Modified: 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/Code.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/Code.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/Code.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/Code.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -27,7 +27,7 @@ import org.apache.sis.internal.metadata.
 import org.apache.sis.referencing.NamedIdentifier;
 import org.apache.sis.metadata.iso.citation.Citations;
 
-import static org.apache.sis.internal.util.Citations.getCodeSpace;
+import static org.apache.sis.metadata.iso.citation.Citations.getCodeSpace;
 
 
 /**

Copied: 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/LazySet.java
 (from r1810974, 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/LazySet.java)
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/LazySet.java?p2=sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/LazySet.java&p1=sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/LazySet.java&r1=1810974&r2=1810976&rev=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/LazySet.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/LazySet.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -281,6 +281,11 @@ public class LazySet<E> extends SetOfUnk
             public E next() {
                 return get(cursor++);
             }
+
+            @Override
+            public void remove() {
+                throw new UnsupportedOperationException();
+            }
         };
     }
 }

Modified: 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Providers.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Providers.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Providers.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Providers.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -18,7 +18,7 @@ package org.apache.sis.internal.referenc
 
 import java.util.List;
 import org.opengis.referencing.operation.OperationMethod;
-import org.apache.sis.internal.util.LazySet;
+import org.apache.sis.internal.referencing.LazySet;
 
 
 /**

Modified: 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -63,7 +63,7 @@ import static org.apache.sis.util.Argume
  * centered by default on (0°,0°) with no scale factor and no false 
easting/northing.
  * The projection is valid from 80°S to 84°N and on all the longitude range 
(±180°).
  * In this example, the <cite>"Longitude of natural origin"</cite> parameter 
is giving different aliases
- * for illustrating the case of different softwares or standards using 
different conventions.
+ * for illustrating the case of different software libraries or standards 
using different conventions.
  *
  * {@preformat java
  *   ParameterBuilder builder = new ParameterBuilder();

Modified: 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/AuthorityFactories.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/AuthorityFactories.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/AuthorityFactories.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/AuthorityFactories.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -27,7 +27,7 @@ import org.opengis.referencing.cs.CSAuth
 import org.opengis.referencing.crs.CRSAuthorityFactory;
 import org.opengis.referencing.datum.DatumAuthorityFactory;
 import org.opengis.referencing.operation.CoordinateOperationAuthorityFactory;
-import org.apache.sis.internal.util.LazySet;
+import org.apache.sis.internal.referencing.LazySet;
 import org.apache.sis.internal.system.Loggers;
 import org.apache.sis.internal.system.Modules;
 import org.apache.sis.internal.system.SystemListener;

Modified: 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/Builder.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/Builder.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/Builder.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/Builder.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -32,7 +32,7 @@ import org.opengis.metadata.citation.Cit
 import org.opengis.referencing.IdentifiedObject;
 import org.apache.sis.metadata.iso.ImmutableIdentifier;
 import org.apache.sis.internal.system.DefaultFactories;
-import org.apache.sis.internal.util.Citations;
+import org.apache.sis.metadata.iso.citation.Citations;
 import org.apache.sis.internal.referencing.DeprecatedCode;
 import org.apache.sis.internal.referencing.DeprecatedName;
 import org.apache.sis.util.iso.Types;

Modified: 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/EPSGFactoryFallback.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/EPSGFactoryFallback.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/EPSGFactoryFallback.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/EPSGFactoryFallback.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -39,8 +39,8 @@ import org.apache.sis.metadata.iso.citat
 import org.apache.sis.referencing.factory.GeodeticAuthorityFactory;
 import org.apache.sis.internal.referencing.provider.TransverseMercator;
 import org.apache.sis.internal.referencing.Resources;
+import org.apache.sis.internal.referencing.Fallback;
 import org.apache.sis.internal.util.Constants;
-import org.apache.sis.internal.util.Fallback;
 import org.apache.sis.util.resources.Vocabulary;
 import org.apache.sis.util.iso.DefaultNameSpace;
 import org.apache.sis.util.CharSequences;

Modified: 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/NamedIdentifier.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/NamedIdentifier.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/NamedIdentifier.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/NamedIdentifier.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -35,7 +35,7 @@ import org.opengis.metadata.Identifier;
 import org.opengis.parameter.InvalidParameterValueException;
 import org.apache.sis.internal.metadata.NameToIdentifier;
 import org.apache.sis.internal.system.DefaultFactories;
-import org.apache.sis.internal.util.Citations;
+import org.apache.sis.metadata.iso.citation.Citations;
 import org.apache.sis.metadata.iso.ImmutableIdentifier;
 import org.apache.sis.util.ArgumentChecks;
 

Modified: 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AxesConvention.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AxesConvention.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AxesConvention.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AxesConvention.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -88,13 +88,13 @@ import org.apache.sis.measure.Units;
  * and for some polar projections among others.
  *
  * <p>Recent OGC standards mandate the use of axis order as defined by the 
authority. Oldest OGC standards used the
- * (<var>x</var>,<var>y</var>) axis order instead, ignoring any authority 
specification. Many softwares still use the
- * old (<var>x</var>,<var>y</var>) axis order, because it is easier to 
implement. Apache SIS supports both conventions.
+ * (<var>x</var>,<var>y</var>) axis order instead, ignoring any authority 
specification. Many software products still use
+ * the old (<var>x</var>,<var>y</var>) axis order, because it is easier to 
implement. Apache SIS supports both conventions.
  * By default, SIS creates CRS with axis order as defined by the authority. 
Those CRS are created by calls to the
  * {@link org.apache.sis.referencing.CRS#forCode(String)} method. The actual 
axis order can be verified after the CRS
  * creation with {@code System.out.println(crs)}. If 
(<var>x</var>,<var>y</var>) axis order is wanted for compatibility
- * with older OGC specifications or other softwares, CRS forced to "longitude 
first" axis order can be created using the
- * {@link #CONVENTIONALLY_ORIENTED} or {@link #NORMALIZED} enumeration 
value.</p>
+ * with older OGC specifications or other software products, CRS forced to 
"longitude first" axis order can be created
+ * using the {@link #CONVENTIONALLY_ORIENTED} or {@link #NORMALIZED} 
enumeration value.</p>
  *
  * <div class="section">Range of longitude values</div>
  * Most geographic CRS have a longitude axis defined in the [-180 … +180]° 
range. All map projections in Apache SIS are

Modified: 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -34,9 +34,9 @@ import org.apache.sis.referencing.Identi
 import org.apache.sis.util.iso.Types;
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.util.ComparisonMode;
-import org.apache.sis.internal.util.Citations;
 import org.apache.sis.internal.metadata.NameToIdentifier;
 import org.apache.sis.internal.metadata.MetadataUtilities;
+import org.apache.sis.metadata.iso.citation.Citations;
 import org.apache.sis.io.wkt.ElementKind;
 import org.apache.sis.io.wkt.Formatter;
 
@@ -427,7 +427,7 @@ public class AbstractDatum extends Abstr
                  * and parameters. We extend this rule to datum as well.
                  */
                 final Datum that = (Datum) object;
-                final Boolean match = 
Citations.hasCommonIdentifier(getIdentifiers(), that.getIdentifiers());
+                final Boolean match = 
org.apache.sis.internal.util.Citations.hasCommonIdentifier(getIdentifiers(), 
that.getIdentifiers());
                 if (match != null) {
                     return match;
                 }

Modified: 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -326,8 +326,8 @@ public class DefaultPrimeMeridian extend
      * If we were not formatting a base CRS, we would have many lines between 
{@code PrimeMeridian[…]} and
      * {@code AngleUnit[…]} in the above example, which would make less 
obvious that the angle unit applies
      * also to the prime meridian. It does not bring any ambiguity from an ISO 
19162 standard point of view,
-     * but historically some other softwares interpreted the {@code PRIMEM[…]} 
units wrongly, which is why
-     * we try to find a compromise between keeping the WKT simple and avoiding 
an historical ambiguity.
+     * but historically some other software products interpreted the {@code 
PRIMEM[…]} units wrongly, which
+     * is why we try to find a compromise between keeping the WKT simple and 
avoiding an historical ambiguity.
      *
      * @see org.apache.sis.referencing.crs.AbstractCRS#isBaseCRS(Formatter)
      */

Modified: 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticAuthorityFactory.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticAuthorityFactory.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticAuthorityFactory.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticAuthorityFactory.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -138,7 +138,7 @@ public abstract class GeodeticAuthorityF
      * @return the namespaces recognized by this factory, or an empty set if 
none.
      */
     public Set<String> getCodeSpaces() {
-        final String authority = Citations.getCodeSpace(getAuthority());
+        final String authority = 
org.apache.sis.metadata.iso.citation.Citations.getCodeSpace(getAuthority());
         return (authority != null) ? Collections.singleton(authority) : 
Collections.<String>emptySet();
     }
 

Modified: 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -46,13 +46,12 @@ import org.opengis.util.FactoryException
 import org.opengis.util.InternationalString;
 import org.apache.sis.internal.system.Loggers;
 import org.apache.sis.internal.util.AbstractIterator;
-import org.apache.sis.internal.util.Citations;
 import org.apache.sis.internal.util.DefinitionURI;
 import org.apache.sis.internal.util.CollectionsExt;
-import org.apache.sis.internal.util.LazySet;
-import org.apache.sis.internal.util.LazySynchronizedIterator;
 import org.apache.sis.internal.util.SetOfUnknownSize;
+import org.apache.sis.internal.referencing.LazySet;
 import org.apache.sis.internal.referencing.Resources;
+import org.apache.sis.metadata.iso.citation.Citations;
 import org.apache.sis.util.ArraysExt;
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.util.ArgumentChecks;
@@ -774,7 +773,7 @@ public class MultiAuthoritiesFactory ext
              * Separate the version from the rest of the code. The version is 
optional. The code may have no room
              * for version (e.g. "EPSG:4326"), or specify an empty version 
(e.g. "EPSG::4326"). If the version is
              * equals to an empty string or to the "0" string, it will be 
considered as no version. Usage of 0 as
-             * a pseudo-version is a practice commonly found in other 
softwares.
+             * a pseudo-version is a practice commonly found in other software 
products.
              */
             int afterVersion = 
code.indexOf(DefaultNameSpace.DEFAULT_SEPARATOR, ++afterAuthority);
             start = CharSequences.skipLeadingWhitespaces(code, afterAuthority, 
afterVersion);

Modified: 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -152,8 +152,8 @@ import org.apache.sis.internal.util.Stan
  *
  * <div class="section">SQL dialects</div>
  * Because the primary distribution format for the EPSG dataset is MS-Access, 
this class uses SQL statements formatted
- * for the MS-Access dialect. For usage with other database softwares like 
PostgreSQL or Derby, a {@link SQLTranslator}
- * instance is provided to the constructor.
+ * for the MS-Access dialect. For usage with other database software products 
like PostgreSQL or Derby,
+ * a {@link SQLTranslator} instance is provided to the constructor.
  *
  * @author  Yann Cézard (IRD)
  * @author  Martin Desruisseaux (IRD, Geomatys)

Modified: 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGInstaller.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGInstaller.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGInstaller.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGInstaller.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -31,7 +31,7 @@ import org.apache.sis.internal.metadata.
 import org.apache.sis.internal.metadata.sql.SQLUtilities;
 import org.apache.sis.internal.system.DefaultFactories;
 import org.apache.sis.internal.util.StandardDateFormat;
-import org.apache.sis.internal.util.Fallback;
+import org.apache.sis.internal.referencing.Fallback;
 import org.apache.sis.util.Exceptions;
 import org.apache.sis.util.resources.Messages;
 import org.apache.sis.util.logging.PerformanceLevel;

Modified: 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -385,11 +385,11 @@ class CoordinateOperationRegistry {
                     /*
                      * Above check is necessary because this method may be 
invoked in some situations where the code
                      * are equal while the CRS are not. Such situation should 
be illegal, but unfortunately it still
-                     * happen because many softwares are not compliant with 
EPSG definition of axis order.   In such
-                     * cases we will need to compute a transform from 
sourceCRS to targetCRS ignoring the source and
-                     * target codes. The CoordinateOperationFinder class can 
do that, providing that we prevent this
-                     * CoordinateOperationRegistry to (legitimately) claims 
that the operation from sourceCode to
-                     * targetCode is the identity transform.
+                     * happen because many software products are not compliant 
with EPSG definition of axis order.
+                     * In such cases we will need to compute a transform from 
sourceCRS to targetCRS ignoring the
+                     * source and target codes. The CoordinateOperationFinder 
class can do that, providing that we
+                     * prevent this CoordinateOperationRegistry to 
(legitimately) claims that the operation from
+                     * sourceCode to targetCode is the identity transform.
                      */
                     return null;
                 }

Modified: 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -42,7 +42,7 @@ import org.apache.sis.internal.metadata.
 import org.apache.sis.internal.system.DefaultFactories;
 import org.apache.sis.internal.util.CollectionsExt;
 import org.apache.sis.internal.util.Constants;
-import org.apache.sis.internal.util.LazySet;
+import org.apache.sis.internal.referencing.LazySet;
 import org.apache.sis.referencing.CRS;
 import org.apache.sis.referencing.factory.InvalidGeodeticParameterException;
 import org.apache.sis.referencing.operation.transform.AbstractMathTransform;

Modified: 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/package-info.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/package-info.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/package-info.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/package-info.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -41,7 +41,7 @@
  *
  * <div class="section">Apache SIS specific behavior</div>
  * The following operations have a behavior in Apache SIS which may be 
different
- * than the behavior found in other softwares. Those particularities apply 
only when the math transform is
+ * than the behavior found in other software products. Those particularities 
apply only when the math transform is
  * {@linkplain 
org.apache.sis.referencing.operation.transform.DefaultMathTransformFactory#createParameterizedTransform
  * created directly}. Users do not need to care about them when the coordinate 
operation is
  * {@linkplain 
org.apache.sis.referencing.operation.DefaultCoordinateOperationFactory#createOperation

Modified: 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java?rev=1810976&r1=1810975&r2=1810976&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java
 [UTF-8] Tue Oct  3 10:55:02 2017
@@ -53,7 +53,7 @@ import org.opengis.util.FactoryException
 import org.opengis.util.NoSuchIdentifierException;
 
 import org.apache.sis.io.wkt.Parser;
-import org.apache.sis.internal.util.LazySet;
+import org.apache.sis.internal.referencing.LazySet;
 import org.apache.sis.internal.util.Constants;
 import org.apache.sis.internal.referencing.Formulas;
 import org.apache.sis.internal.metadata.ReferencingServices;


Reply via email to