sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1791123 - in /sis/branches/JDK8: core/sis-feature/src/main/java/org/apache/sis/feature/ core/sis-feature/src/main/java/org/apache/sis/feature/builder/ core/sis-feature/src/main/java/org/apache/sis/internal/feature/ core/sis-feature/src/tes...
Date Wed, 12 Apr 2017 13:41:29 GMT
Author: desruisseaux
Date: Wed Apr 12 13:41:29 2017
New Revision: 1791123

URL: http://svn.apache.org/viewvc?rev=1791123&view=rev
Log:
Replace the "@" prefix by "sis:" in SIS conventional property names.

Modified:
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/EnvelopeOperation.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AttributeRole.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AttributeTypeBuilder.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/FeatureTypeBuilder.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/AttributeConvention.java
    sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/EnvelopeOperationTest.java
    sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/builder/FeatureTypeBuilderTest.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/AbstractName.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultNameSpace.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultScopedName.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/Names.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/package-info.java
    sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/measure/ScalarTest.java
    sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/util/iso/NamesTest.java
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/GroupAsPolylineOperation.java
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Reader.java
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Types.java
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Writer.java
    sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/ReaderTest.java
    sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/WriterTest.java

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/EnvelopeOperation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/EnvelopeOperation.java?rev=1791123&r1=1791122&r2=1791123&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/EnvelopeOperation.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/EnvelopeOperation.java [UTF-8] Wed Apr 12 13:41:29 2017
@@ -143,7 +143,7 @@ final class EnvelopeOperation extends Ab
                 final GenericName name = property.getName();
                 final String attributeName = (property instanceof LinkOperation)
                                              ? ((LinkOperation) property).referentName : name.toString();
-                final boolean isDefault = AttributeConvention.GEOMETRY_PROPERTY.equals(name.tip());
+                final boolean isDefault = AttributeConvention.GEOMETRY_PROPERTY.equals(name);
                 if (isDefault) {
                     defaultGeometry = attributeName;
                 }

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AttributeRole.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AttributeRole.java?rev=1791123&r1=1791122&r2=1791123&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AttributeRole.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AttributeRole.java [UTF-8] Wed Apr 12 13:41:29 2017
@@ -52,9 +52,9 @@ public enum AttributeRole {
      *
      * <ul>
      *   <li>If no attribute has this role, then no attribute is marked as feature identifier.</li>
-     *   <li>If exactly one attribute has this role, then a synthetic attribute named {@code "@identifier"}
+     *   <li>If exactly one attribute has this role, then a synthetic attribute named {@code "sis:identifier"}
      *       will be created as a {@linkplain FeatureOperations#link link} to the flagged attribute.</li>
-     *   <li>If more than one attribute have this role, then a synthetic attribute named {@code "@identifier"}
+     *   <li>If more than one attribute have this role, then a synthetic attribute named {@code "sis:identifier"}
      *       will be created as a {@linkplain FeatureOperations#compound compound key} made of all flagged
      *       attributes. The separator character can be modified by a call to
      *       {@link FeatureTypeBuilder#setIdentifierDelimiters(String, String, String)}</li>

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AttributeTypeBuilder.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AttributeTypeBuilder.java?rev=1791123&r1=1791122&r2=1791123&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AttributeTypeBuilder.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AttributeTypeBuilder.java [UTF-8] Wed Apr 12 13:41:29 2017
@@ -87,8 +87,8 @@ public final class AttributeTypeBuilder<
 
     /**
      * Whether this attribute will be used in a {@linkplain FeatureOperations#compound compound key} named
-     * {@code "@identifier"}. If only one attribute has this flag and {@link FeatureTypeBuilder#idPrefix} and
-     * {@code isSuffix} are null, then {@code "@identifier"} will be a {@linkplain FeatureOperations#link link}
+     * {@code "sis:identifier"}. If only one attribute has this flag and {@link FeatureTypeBuilder#idPrefix} and
+     * {@code isSuffix} are null, then {@code "sis:identifier"} will be a {@linkplain FeatureOperations#link link}
      * to {@code idAttributes[0]}.
      *
      * @see #addRole(AttributeRole)

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/FeatureTypeBuilder.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/FeatureTypeBuilder.java?rev=1791123&r1=1791122&r2=1791123&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/FeatureTypeBuilder.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/FeatureTypeBuilder.java [UTF-8] Wed Apr 12 13:41:29 2017
@@ -113,13 +113,13 @@ public class FeatureTypeBuilder extends
 
     /**
      * An optional prefix or suffix to insert before or after the {@linkplain FeatureOperations#compound compound key}
-     * named {@code "@identifier"}.
+     * named {@code "sis:identifier"}.
      */
     private String idPrefix, idSuffix;
 
     /**
      * The separator to insert between each single component in a {@linkplain FeatureOperations#compound compound key}
-     * named {@code "@identifier"}. This is ignored if {@link #identifierCount} is zero.
+     * named {@code "sis:identifier"}. This is ignored if {@link #identifierCount} is zero.
      */
     private String idDelimiter;
 
@@ -211,7 +211,7 @@ public class FeatureTypeBuilder extends
                 } else if (AttributeConvention.GEOMETRY_PROPERTY.equals(name)) {
                     role = AttributeRole.DEFAULT_GEOMETRY;
                 } else if (AttributeConvention.ENVELOPE_PROPERTY.equals(name)) {
-                    // If "@envelope" is an operation, skip it completely.
+                    // If "sis:envelope" is an operation, skip it completely.
                     // It will be recreated if a default geometry exists.
                     role = null;
                 } else {
@@ -685,9 +685,9 @@ public class FeatureTypeBuilder extends
     public FeatureType build() throws IllegalStateException {
         if (feature == null) {
             /*
-             * Creates an initial array of property types with up to 3 slots reserved for @identifier, @geometry
-             * and @envelope operations. At first we presume that there is always an identifier.  The identifier
-             * slot will be removed later if there is none.
+             * Creates an initial array of property types with up to 3 slots reserved for sis:identifier, sis:geometry
+             * and sis:envelope operations. At first we presume that there is always an identifier. The identifier slot
+             * will be removed later if there is none.
              */
             final int numSpecified = properties.size();     // Number of explicitely specified properties.
             int numSynthetic;                               // Number of synthetic properties that may be generated.
@@ -723,8 +723,8 @@ public class FeatureTypeBuilder extends
                     identifierTypes[identifierCursor++] = instance;
                 }
                 /*
-                 * If there is a default geometry, add a link named "@geometry" to that geometry.
-                 * It may happen that the property created by the user is already named "@geometry",
+                 * If there is a default geometry, add a link named "sis:geometry" to that geometry.
+                 * It may happen that the property created by the user is already named "sis:geometry",
                  * in which case we will avoid to duplicate the property.
                  */
                 if (builder == defaultGeometry && geometryIndex >= 0) {
@@ -742,7 +742,7 @@ public class FeatureTypeBuilder extends
             /*
              * Create the "envelope" operation only after we created all other properties.
              * Actually it is okay if the 'propertyTypes' array still contains null elements not needed for envelope calculation
-             * like "@identifier", since FeatureOperations.envelope(…) constructor ignores any property which is not for a value.
+             * like "sis:identifier", since FeatureOperations.envelope(…) constructor ignores any property which is not for a value.
              */
             if (envelopeIndex >= 0) try {
                 propertyTypes[envelopeIndex] = FeatureOperations.envelope(name(AttributeConvention.ENVELOPE_PROPERTY), null, propertyTypes);
@@ -752,7 +752,7 @@ public class FeatureTypeBuilder extends
             /*
              * If a synthetic identifier need to be created, create it now as the first property.
              * It may happen that the user provided a single identifier component already named
-             * "@identifier", in which case we avoid to duplicate the property.
+             * "sis:identifier", in which case we avoid to duplicate the property.
              */
             if (identifierTypes != null) {
                 if (identifierCursor != identifierTypes.length) {

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/AttributeConvention.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/AttributeConvention.java?rev=1791123&r1=1791122&r2=1791123&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/AttributeConvention.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/AttributeConvention.java [UTF-8] Wed Apr 12 13:41:29 2017
@@ -19,11 +19,8 @@ package org.apache.sis.internal.feature;
 import org.opengis.util.LocalName;
 import org.opengis.util.ScopedName;
 import org.opengis.util.GenericName;
-import org.opengis.util.NameFactory;
-import org.opengis.util.NameSpace;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
-import org.apache.sis.internal.system.DefaultFactories;
-import org.apache.sis.internal.util.Constants;
+import org.apache.sis.util.iso.Names;
 import org.apache.sis.util.Static;
 
 // Branch-dependent imports
@@ -41,10 +38,10 @@ import org.opengis.feature.Property;
  * appropriate "real" property in the feature.
  *
  * <div class="note"><b>Example:</b>
- * one of the most frequently used synthetic property is {@code "@identifier"}, which contains a unique
+ * one of the most frequently used synthetic property is {@code "sis:identifier"}, which contains a unique
  * identifier (or primary key) for the feature. This property is usually (but not necessarily)
  * a {@linkplain org.apache.sis.feature.FeatureOperations#link link to an existing attribute}.
- * By using the {@code "@identifier"} alias, users do not need to know the name of the "real" attribute.
+ * By using the {@code "sis:identifier"} alias, users do not need to know the name of the "real" attribute.
  * </div>
  *
  * This class defines names for two kinds of usage:
@@ -66,15 +63,15 @@ import org.opengis.feature.Property;
  *
  * @author  Johann Sorel (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.7
+ * @version 0.8
  * @since   0.7
  * @module
  */
 public final class AttributeConvention extends Static {
     /**
-     * Namespace of all names defined by SIS convention.
+     * Scope of all names defined by SIS convention.
      */
-    private static final GenericName NAMESPACE;
+    private static final LocalName SCOPE;
 
     /**
      * Conventional name for a property used as a unique identifier.
@@ -90,7 +87,7 @@ public final class AttributeConvention e
      * <p>The {@linkplain org.apache.sis.feature.DefaultAttributeType#getValueClass() value class} is usually
      * {@link String}, {@link Integer}, {@link java.util.UUID} or other types commonly used as identifiers.</p>
      */
-    public static final LocalName IDENTIFIER_PROPERTY;
+    public static final ScopedName IDENTIFIER_PROPERTY;
 
     /**
      * Conventional name for a property containing the geometric object to use by default.
@@ -107,7 +104,7 @@ public final class AttributeConvention e
      *
      * @see #isGeometryAttribute(IdentifiedType)
      */
-    public static final LocalName GEOMETRY_PROPERTY;
+    public static final ScopedName GEOMETRY_PROPERTY;
 
     /**
      * Conventional name for fetching the envelope encompassing all geometries in a feature. Most {@code FeatureType}s
@@ -120,7 +117,7 @@ public final class AttributeConvention e
      * <p>The {@linkplain org.apache.sis.feature.DefaultAttributeType#getValueClass() value class} should be
      * {@link org.opengis.geometry.Envelope}.</p>
      */
-    public static final LocalName ENVELOPE_PROPERTY;
+    public static final ScopedName ENVELOPE_PROPERTY;
 
     /**
      * Conventional name for fetching the Coordinate Reference System (CRS) of a geometry or a coverage.
@@ -139,7 +136,7 @@ public final class AttributeConvention e
      *
      * @see #getCRSCharacteristic(Property)
      */
-    public static final LocalName CRS_CHARACTERISTIC;
+    public static final ScopedName CRS_CHARACTERISTIC;
 
     /**
      * Conventional name for fetching the maximal length of string values.
@@ -153,7 +150,7 @@ public final class AttributeConvention e
      *
      * @see #getMaximalLengthCharacteristic(Property)
      */
-    public static final LocalName MAXIMAL_LENGTH_CHARACTERISTIC;
+    public static final ScopedName MAXIMAL_LENGTH_CHARACTERISTIC;
 
     /**
      * Conventional name for fetching the enumeration of valid values.
@@ -162,18 +159,15 @@ public final class AttributeConvention e
      * {@linkplain org.apache.sis.feature.DefaultAttributeType#characteristics() characteristic} associated
      * to the attribute on which the restriction applies.
      */
-    public static final LocalName VALID_VALUES_CHARACTERISTIC;
-
+    public static final GenericName VALID_VALUES_CHARACTERISTIC;
     static {
-        final NameFactory factory = DefaultFactories.forBuildin(NameFactory.class);
-        NAMESPACE                     = factory.createGenericName(null, "Apache", Constants.SIS);
-        final NameSpace ns            = factory.createNameSpace(NAMESPACE, null);
-        IDENTIFIER_PROPERTY           = factory.createLocalName(ns, "@identifier");
-        GEOMETRY_PROPERTY             = factory.createLocalName(ns, "@geometry");
-        ENVELOPE_PROPERTY             = factory.createLocalName(ns, "@envelope");
-        CRS_CHARACTERISTIC            = factory.createLocalName(ns, "@crs");
-        MAXIMAL_LENGTH_CHARACTERISTIC = factory.createLocalName(ns, "@maximalLength");
-        VALID_VALUES_CHARACTERISTIC   = factory.createLocalName(ns, "@validValues");
+        SCOPE                         = Names.createLocalName("Apache", null, "sis");
+        IDENTIFIER_PROPERTY           = Names.createScopedName(SCOPE, null, "identifier");
+        GEOMETRY_PROPERTY             = Names.createScopedName(SCOPE, null, "geometry");
+        ENVELOPE_PROPERTY             = Names.createScopedName(SCOPE, null, "envelope");
+        CRS_CHARACTERISTIC            = Names.createScopedName(SCOPE, null, "crs");
+        MAXIMAL_LENGTH_CHARACTERISTIC = Names.createScopedName(SCOPE, null, "maximalLength");
+        VALID_VALUES_CHARACTERISTIC   = Names.createScopedName(SCOPE, null, "validValues");
     }
 
     /**
@@ -195,17 +189,14 @@ public final class AttributeConvention e
      * @param  name  the name of the property or characteristic to test, or {@code null}.
      * @return {@code true} if the given name is non-null and in the SIS namespace.
      */
-    public static boolean contains(final GenericName name) {
-        if (name == null) {
-            return false;
-        }
-        final GenericName scope;
-        if (name instanceof ScopedName) {
-            scope = ((ScopedName) name).path().toFullyQualifiedName();
-        } else {
-            scope = name.scope().name();
+    public static boolean contains(GenericName name) {
+        while (name instanceof ScopedName) {
+            if (SCOPE.equals(((ScopedName) name).path())) {
+                return true;
+            }
+            name = ((ScopedName) name).tail();
         }
-        return NAMESPACE.equals(scope);
+        return false;
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/EnvelopeOperationTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/EnvelopeOperationTest.java?rev=1791123&r1=1791122&r2=1791123&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/EnvelopeOperationTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/EnvelopeOperationTest.java [UTF-8] Wed Apr 12 13:41:29 2017
@@ -59,7 +59,7 @@ public final strictfp class EnvelopeOper
      *   <li>{@code classes} as a {@link Polygon}</li>
      *   <li>{@code climbing wall} as a {@link Point}</li>
      *   <li>{@code gymnasium} as a {@link Polygon}</li>
-     *   <li>{@code @geometry} as a link to the default geometry</li>
+     *   <li>{@code sis:geometry} as a link to the default geometry</li>
      *   <li>{@code bounds} as the feature envelope attribute.</li>
      * </ul>
      *

Modified: sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/builder/FeatureTypeBuilderTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/builder/FeatureTypeBuilderTest.java?rev=1791123&r1=1791122&r2=1791123&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/builder/FeatureTypeBuilderTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/builder/FeatureTypeBuilderTest.java [UTF-8] Wed Apr 12 13:41:29 2017
@@ -168,8 +168,8 @@ public final strictfp class FeatureTypeB
 
     /**
      * Tests {@link FeatureTypeBuilder#addAttribute(Class)} where one attribute is an identifier that already has
-     * the {@code "@identifier"} name. This is called "anonymous" because identifiers with an explicit name in the
-     * data file should use that name instead in the feature type.
+     * the {@code "sis:identifier"} name. This is called "anonymous" because identifiers with an explicit name in
+     * the data file should use that name instead in the feature type.
      */
     @Test
     @DependsOnMethod("testAddIdentifierAndGeometry")
@@ -191,8 +191,8 @@ public final strictfp class FeatureTypeB
 
     /**
      * Tests {@link FeatureTypeBuilder#addAttribute(Class)} where one attribute is a geometry that already has
-     * the {@code "@geometry"} name. This is called "anonymous" because geometries with an explicit name in the
-     * data file should use that name instead in the feature type.
+     * the {@code "sis:geometry"} name. This is called "anonymous" because geometries with an explicit name in
+     * the data file should use that name instead in the feature type.
      */
     @Test
     @DependsOnMethod("testAddIdentifierAndGeometry")

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/AbstractName.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/AbstractName.java?rev=1791123&r1=1791122&r2=1791123&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/AbstractName.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/AbstractName.java [UTF-8] Wed Apr 12 13:41:29 2017
@@ -271,7 +271,7 @@ public abstract class AbstractName imple
      * Returns the separator to write before the given name. If the scope of the given name
      * is a {@link DefaultNameSpace} instance, then this method returns its head separator.
      * We really want {@link DefaultNameSpace#headSeparator}, not {@link DefaultNameSpace#separator}.
-     * See {@link DefaultNameSpace#child(CharSequence)} for details.
+     * See {@link DefaultNameSpace#child(CharSequence, String)} for details.
      *
      * @param  name  the name after which to write a separator.
      * @return the separator to write after the given name.

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultNameSpace.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultNameSpace.java?rev=1791123&r1=1791122&r2=1791123&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultNameSpace.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultNameSpace.java [UTF-8] Wed Apr 12 13:41:29 2017
@@ -51,7 +51,7 @@ import static org.apache.sis.util.Argume
  * remain safe to call from multiple threads and do not change any public {@code NameSpace} state.
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
- * @version 0.3
+ * @version 0.8
  *
  * @see DefaultScopedName
  * @see DefaultLocalName
@@ -345,10 +345,11 @@ public class DefaultNameSpace implements
      * but it is {@code "."} for all children ({@code "opengeospatial"} and {@code "org"}).</p>
      *
      * @param  name  the name of the child namespace.
+     * @param  sep   the separator to use (typically {@link #separator}).
      * @return the child namespace. It may be an existing instance.
      */
-    final DefaultNameSpace child(final CharSequence name) {
-        return child(key(name), name, separator, separator);
+    final DefaultNameSpace child(final CharSequence name, final String sep) {
+        return child(key(name), name, sep, sep);
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultScopedName.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultScopedName.java?rev=1791123&r1=1791122&r2=1791123&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultScopedName.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultScopedName.java [UTF-8] Wed Apr 12 13:41:29 2017
@@ -49,7 +49,7 @@ import org.apache.sis.internal.util.Unmo
  * state.
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
- * @version 0.3
+ * @version 0.8
  *
  * @see DefaultNameSpace
  * @see DefaultLocalName
@@ -133,7 +133,7 @@ public class DefaultScopedName extends A
         do {
             ArgumentChecks.ensureNonNullElement("names", i, name);
             locals[i++] = new DefaultLocalName(ns, name);
-            ns = ns.child(name);
+            ns = ns.child(name, ns.separator);
             name = it.next();
         } while (it.hasNext());
         /*
@@ -148,7 +148,7 @@ public class DefaultScopedName extends A
             tip.fullyQualified = fullyQualified = this;
         }
         locals[i++] = tip;
-        if (i != size) { // Paranoiac check.
+        if (i != size) {                                        // Paranoiac check.
             throw new ConcurrentModificationException(Errors.format(Errors.Keys.UnexpectedChange_1, "names"));
         }
         // Following line is safe because 'parsedNames' type is <? extends LocalName>.
@@ -162,15 +162,13 @@ public class DefaultScopedName extends A
      * @param path  the first part to concatenate.
      * @param tail  the second part to concatenate.
      */
-    @SuppressWarnings("SuspiciousToArrayCall")
     protected DefaultScopedName(final GenericName path, final GenericName tail) {
         ArgumentChecks.ensureNonNull("path", path);
         ArgumentChecks.ensureNonNull("tail", tail);
         final List<? extends LocalName> parsedPath = path.getParsedNames();
         final List<? extends LocalName> parsedTail = tail.getParsedNames();
         int index = parsedPath.size();
-        LocalName[] locals = new LocalName[index + parsedTail.size()];
-        locals = parsedPath.toArray(locals);
+        final LocalName[] locals = parsedPath.toArray(new LocalName[index + parsedTail.size()]);
         /*
          * We have copied the LocalNames from the path unconditionally.  Now we need to process the
          * LocalNames from the tail. If the tail scope follows the path scope, we can just copy the
@@ -193,7 +191,7 @@ public class DefaultScopedName extends A
             if (path instanceof LocalName) {
                 this.tail = tail;
             }
-            while (true) {
+            for (;;) {
                 locals[index++] = name;
                 if (!it.hasNext()) break;
                 name = it.next();
@@ -205,8 +203,8 @@ public class DefaultScopedName extends A
              */
             DefaultNameSpace scope = DefaultNameSpace.castOrCopy(lastScope);
             CharSequence label = name(lastName);
-            while (true) {
-                scope = scope.child(label);
+            for (;;) {
+                scope = scope.child(label, scope.separator);
                 label = name(name);
                 name  = new DefaultLocalName(scope, label);
                 locals[index++] = name;
@@ -225,6 +223,38 @@ public class DefaultScopedName extends A
     }
 
     /**
+     * Constructs a scoped name as the concatenation of the given generic name with a single character sequence.
+     * The scope of the new name will be the scope of the {@code path} argument.
+     * The tail is a local name created from the given character sequence.
+     *
+     * @param path       the first part to concatenate.
+     * @param separator  the separator between the head and the tail,
+     *                   or {@code null} for inheriting the same separator than the given path.
+     * @param tail       the second part to concatenate.
+     *
+     * @see Names#createScopedName(GenericName, String, CharSequence)
+     *
+     * @since 0.8
+     */
+    protected DefaultScopedName(final GenericName path, final String separator, final CharSequence tail) {
+        /*
+         * Following is the same code than DefaultScopedName(GenericName, GenericName)
+         * after simplification we can do because we create the LocalName ourselves.
+         */
+        ArgumentChecks.ensureNonNull("path", path);
+        ArgumentChecks.ensureNonNull("tail", tail);
+        final List<? extends LocalName> parsedPath = path.getParsedNames();
+        final int index = parsedPath.size();
+        final LocalName[] locals = parsedPath.toArray(new LocalName[index + 1]);
+        final LocalName lastName = locals[index - 1];
+        DefaultNameSpace scope = DefaultNameSpace.castOrCopy(lastName.scope());
+        scope = scope.child(name(lastName), separator != null ? separator : scope.separator);
+        locals[index] = new DefaultLocalName(scope, tail);
+        parsedNames = UnmodifiableArrayList.wrap(locals);
+        this.path = path;
+    }
+
+    /**
      * Returns the name to be given to {@link DefaultLocalName} constructors.
      */
     private static CharSequence name(final GenericName name) {

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/Names.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/Names.java?rev=1791123&r1=1791122&r2=1791123&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/Names.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/Names.java [UTF-8] Wed Apr 12 13:41:29 2017
@@ -20,6 +20,7 @@ import java.util.Collections;
 import org.opengis.util.TypeName;
 import org.opengis.util.LocalName;
 import org.opengis.util.MemberName;
+import org.opengis.util.ScopedName;
 import org.opengis.util.GenericName;
 import org.opengis.util.NameSpace;
 import org.opengis.util.NameFactory;
@@ -127,6 +128,24 @@ public final class Names extends Static
     }
 
     /**
+     * Constructs a scoped name as the concatenation of the given generic name with a single character sequence.
+     * The scope of the new name will be the scope of the {@code path} argument.
+     * The tail is a local name created from the given character sequence.
+     *
+     * @param  scope      the first part to concatenate.
+     * @param  separator  the separator between the head and the tail,
+     *                    or {@code null} for inheriting the same separator than the given scope.
+     * @param  name       the second part to concatenate.
+     * @return a scoped name in the given namespace.
+     *
+     * @since 0.8
+     */
+    public static ScopedName createScopedName(final GenericName scope, final String separator, final CharSequence name) {
+        // Current version does not perform any caching, but this is something we could add in the future.
+        return new DefaultScopedName(scope, separator, name);
+    }
+
+    /**
      * Creates a name which is local in the given namespace.
      * The character sequences can be either {@link String} or {@link InternationalString} instances.
      * Those character sequences are taken verbatim; they are <em>not</em> parsed into their components.

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/package-info.java?rev=1791123&r1=1791122&r2=1791123&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/package-info.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/package-info.java [UTF-8] Wed Apr 12 13:41:29 2017
@@ -107,7 +107,7 @@
  * </table>
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
- * @version 0.7
+ * @version 0.8
  * @since   0.3
  * @module
  */

Modified: sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/measure/ScalarTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/measure/ScalarTest.java?rev=1791123&r1=1791122&r2=1791123&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/measure/ScalarTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/measure/ScalarTest.java [UTF-8] Wed Apr 12 13:41:29 2017
@@ -82,7 +82,7 @@ public final strictfp class ScalarTest e
 
     /**
      * Tests {@link Scalar#multiply(Quantity)}, {@link Scalar#divide(Quantity)} and {@link Quantity#inverse()}.
-     * Those tests depend on proper working of {@link Units#quantity(double, Unit)}, which depends in turn on
+     * Those tests depend on proper working of {@link Quantities#create(double, Unit)}, which depends in turn on
      * proper declarations of {@link ScalarFactory} in {@link Units} initialization.
      */
     @Test

Modified: sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/util/iso/NamesTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/util/iso/NamesTest.java?rev=1791123&r1=1791122&r2=1791123&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/util/iso/NamesTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/util/iso/NamesTest.java [UTF-8] Wed Apr 12 13:41:29 2017
@@ -27,6 +27,7 @@ import org.opengis.util.NameSpace;
 import org.opengis.util.ScopedName;
 import org.apache.sis.util.UnknownNameException;
 import org.apache.sis.internal.system.DefaultFactories;
+import org.apache.sis.test.DependsOnMethod;
 import org.apache.sis.test.DependsOn;
 import org.apache.sis.test.TestCase;
 import org.junit.Test;
@@ -38,13 +39,28 @@ import static org.junit.Assert.*;
  * Tests the {@link Names} class.
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.5
+ * @version 0.8
  * @since   0.5
  * @module
  */
 @DependsOn(DefaultNameFactoryTest.class)
 public final strictfp class NamesTest extends TestCase {
     /**
+     * Tests {@link Names#createScopedName(GenericName, String, CharSequence)}.
+     */
+    @Test
+    @DependsOnMethod("testCreateLocalName")
+    public void testCreateScopedName() {
+        final LocalName scope = Names.createLocalName("Apache", null, "sis");
+        final ScopedName name = Names.createScopedName(scope, null, "identifier");
+        assertSame  ("path()",      scope,                   name.path());
+        assertEquals("tail()",      "identifier",            name.tail().toString());
+        assertEquals("toString()",  "sis:identifier",        name.toString());
+        assertEquals("full",        "Apache:sis:identifier", name.toFullyQualifiedName().toString());
+        assertEquals("tail().full", "Apache:sis:identifier", name.tail().toFullyQualifiedName().toString());
+    }
+
+    /**
      * Tests {@link Names#createLocalName(CharSequence, String, CharSequence)}.
      */
     @Test

Modified: sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/GroupAsPolylineOperation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/GroupAsPolylineOperation.java?rev=1791123&r1=1791122&r2=1791123&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/GroupAsPolylineOperation.java [UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/GroupAsPolylineOperation.java [UTF-8] Wed Apr 12 13:41:29 2017
@@ -167,7 +167,7 @@ class GroupAsPolylineOperation extends A
                 boolean isFirst = true;
                 geometry = new Polyline();
                 for (final Object child : (Collection<?>) feature.getPropertyValue(association)) {
-                    addGeometry(geometry, ((Feature) child).getPropertyValue("@geometry"), isFirst);
+                    addGeometry(geometry, ((Feature) child).getPropertyValue("sis:geometry"), isFirst);
                     isFirst = false;
                 }
             }

Modified: sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Reader.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Reader.java?rev=1791123&r1=1791122&r2=1791123&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Reader.java [UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Reader.java [UTF-8] Wed Apr 12 13:41:29 2017
@@ -409,8 +409,8 @@ parse:  while (reader.hasNext()) {
                     (lat == null) ? Attributes.LATITUDE : Attributes.LONGITUDE, tagName));
         }
         final Feature feature = ((Store) owner).types.wayPoint.newInstance();
-        feature.setPropertyValue("@identifier", index);
-        feature.setPropertyValue("@geometry", new Point(parseDouble(lon), parseDouble(lat)));
+        feature.setPropertyValue("sis:identifier", index);
+        feature.setPropertyValue("sis:geometry", new Point(parseDouble(lon), parseDouble(lat)));
         List<Link> links = null;
         while (true) {
             /*
@@ -474,7 +474,7 @@ parse:  while (reader.hasNext()) {
     private Feature parseRoute(final int index) throws Exception {
         assert reader.isStartElement() && Tags.ROUTES.equals(reader.getLocalName());
         final Feature feature = ((Store) owner).types.route.newInstance();
-        feature.setPropertyValue("@identifier", index);
+        feature.setPropertyValue("sis:identifier", index);
         List<Feature> wayPoints = null;
         List<Link> links = null;
         while (true) {
@@ -530,7 +530,7 @@ parse:  while (reader.hasNext()) {
     private Feature parseTrackSegment(final int index) throws Exception {
         assert reader.isStartElement() && Tags.TRACK_SEGMENTS.equals(reader.getLocalName());
         final Feature feature = ((Store) owner).types.trackSegment.newInstance();
-        feature.setPropertyValue("@identifier", index);
+        feature.setPropertyValue("sis:identifier", index);
         List<Feature> wayPoints = null;
         while (true) {
             /*
@@ -573,7 +573,7 @@ parse:  while (reader.hasNext()) {
     private Feature parseTrack(final int index) throws Exception {
         assert reader.isStartElement() && Tags.TRACKS.equals(reader.getLocalName());
         final Feature feature = ((Store) owner).types.track.newInstance();
-        feature.setPropertyValue("@identifier", index);
+        feature.setPropertyValue("sis:identifier", index);
         List<Feature> segments = null;
         List<Link> links = null;
         while (true) {

Modified: sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Types.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Types.java?rev=1791123&r1=1791122&r2=1791123&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Types.java [UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Types.java [UTF-8] Wed Apr 12 13:41:29 2017
@@ -21,7 +21,7 @@ import java.util.Collections;
 import java.util.Locale;
 import java.util.Map;
 import com.esri.core.geometry.Point;
-import org.opengis.util.LocalName;
+import org.opengis.util.ScopedName;
 import org.opengis.util.NameFactory;
 import org.opengis.util.FactoryException;
 import org.opengis.metadata.citation.OnlineResource;
@@ -108,20 +108,20 @@ final class Types extends Static {
      * @throws FactoryException if an error occurred while creating an "envelope bounds" operation.
      */
     Types(final NameFactory factory, final Locale locale) throws FactoryException, IllegalNameException {
-        final LocalName     geomName = AttributeConvention.GEOMETRY_PROPERTY;
+        final ScopedName    geomName = AttributeConvention.GEOMETRY_PROPERTY;
         final Map<String,?> geomInfo = Collections.singletonMap(AbstractIdentifiedType.NAME_KEY, geomName);
         final Map<String,?> envpInfo = Collections.singletonMap(AbstractIdentifiedType.NAME_KEY, AttributeConvention.ENVELOPE_PROPERTY);
         /*
          * The parent of all FeatureTypes to be created in this constructor.
-         * This parent has a single property, "@identifier" of type Integer,
+         * This parent has a single property, "sis:identifier" of type Integer,
          * which is not part of GPX specification.
          *
          * http://www.topografix.com/GPX/GPXEntity
-         * ┌─────────────┬─────────┬─────────────┐
-         * │ Name        │ Type    │ Cardinality │
-         * ├─────────────┼─────────┼─────────────┤
-         * │ @identifier │ Integer │   [1 … 1]   │      SIS-specific property
-         * └─────────────┴─────────┴─────────────┘
+         * ┌────────────────┬─────────┬─────────────┐
+         * │ Name           │ Type    │ Cardinality │
+         * ├────────────────┼─────────┼─────────────┤
+         * │ sis:identifier │ Integer │   [1 … 1]   │      SIS-specific property
+         * └────────────────┴─────────┴─────────────┘
          */
         FeatureTypeBuilder builder = new FeatureTypeBuilder(null, factory, locale);
         builder.setDefaultScope(Tags.NAMESPACE).setName("GPXEntity").setAbstract(true);
@@ -129,31 +129,31 @@ final class Types extends Static {
         final FeatureType parent = builder.build();
         /*
          * http://www.topografix.com/GPX/WayPoint ⇾ GPXEntity
-         * ┌───────────────┬────────────────┬────────────────────────┬─────────────┐
-         * │ Name          │ Type           │ XML type               │ Cardinality │
-         * ├───────────────┼────────────────┼────────────────────────┼─────────────┤
-         * │ @identifier   │ Integer        │                        │   [1 … 1]   │
-         * │ @envelope     │ Envelope       │                        │   [1 … 1]   │
-         * │ @geometry     │ Point          │ (lat,lon) attributes   │   [1 … 1]   │
-         * │ ele           │ Double         │ xsd:decimal            │   [0 … 1]   │
-         * │ time          │ Temporal       │ xsd:dateTime           │   [0 … 1]   │
-         * │ magvar        │ Double         │ gpx:degreesType        │   [0 … 1]   │
-         * │ geoidheight   │ Double         │ xsd:decimal            │   [0 … 1]   │
-         * │ name          │ String         │ xsd:string             │   [0 … 1]   │
-         * │ cmt           │ String         │ xsd:string             │   [0 … 1]   │
-         * │ desc          │ String         │ xsd:string             │   [0 … 1]   │
-         * │ src           │ String         │ xsd:string             │   [0 … 1]   │
-         * │ link          │ OnlineResource │ gpx:linkType           │   [0 … ∞]   │
-         * │ sym           │ String         │ xsd:string             │   [0 … 1]   │
-         * │ type          │ String         │ xsd:string             │   [0 … 1]   │
-         * │ fix           │ Fix            │ gpx:fixType            │   [0 … 1]   │
-         * │ sat           │ Integer        │ xsd:nonNegativeInteger │   [0 … 1]   │
-         * │ hdop          │ Double         │ xsd:decimal            │   [0 … 1]   │
-         * │ vdop          │ Double         │ xsd:decimal            │   [0 … 1]   │
-         * │ pdop          │ Double         │ xsd:decimal            │   [0 … 1]   │
-         * │ ageofdgpsdata │ Double         │ xsd:decimal            │   [0 … 1]   │
-         * │ dgpsid        │ Integer        │ gpx:dgpsStationType    │   [0 … 1]   │
-         * └───────────────┴────────────────┴────────────────────────┴─────────────┘
+         * ┌──────────────────┬────────────────┬────────────────────────┬─────────────┐
+         * │ Name             │ Type           │ XML type               │ Cardinality │
+         * ├──────────────────┼────────────────┼────────────────────────┼─────────────┤
+         * │ sis:identifier   │ Integer        │                        │   [1 … 1]   │
+         * │ sis:envelope     │ Envelope       │                        │   [1 … 1]   │
+         * │ sis:geometry     │ Point          │ (lat,lon) attributes   │   [1 … 1]   │
+         * │ ele              │ Double         │ xsd:decimal            │   [0 … 1]   │
+         * │ time             │ Temporal       │ xsd:dateTime           │   [0 … 1]   │
+         * │ magvar           │ Double         │ gpx:degreesType        │   [0 … 1]   │
+         * │ geoidheight      │ Double         │ xsd:decimal            │   [0 … 1]   │
+         * │ name             │ String         │ xsd:string             │   [0 … 1]   │
+         * │ cmt              │ String         │ xsd:string             │   [0 … 1]   │
+         * │ desc             │ String         │ xsd:string             │   [0 … 1]   │
+         * │ src              │ String         │ xsd:string             │   [0 … 1]   │
+         * │ link             │ OnlineResource │ gpx:linkType           │   [0 … ∞]   │
+         * │ sym              │ String         │ xsd:string             │   [0 … 1]   │
+         * │ type             │ String         │ xsd:string             │   [0 … 1]   │
+         * │ fix              │ Fix            │ gpx:fixType            │   [0 … 1]   │
+         * │ sat              │ Integer        │ xsd:nonNegativeInteger │   [0 … 1]   │
+         * │ hdop             │ Double         │ xsd:decimal            │   [0 … 1]   │
+         * │ vdop             │ Double         │ xsd:decimal            │   [0 … 1]   │
+         * │ pdop             │ Double         │ xsd:decimal            │   [0 … 1]   │
+         * │ ageofdgpsdata    │ Double         │ xsd:decimal            │   [0 … 1]   │
+         * │ dgpsid           │ Integer        │ gpx:dgpsStationType    │   [0 … 1]   │
+         * └──────────────────┴────────────────┴────────────────────────┴─────────────┘
          */
         builder = new FeatureTypeBuilder(null, factory, locale).setSuperTypes(parent);
         builder.setDefaultScope(Tags.NAMESPACE).setName("WayPoint");
@@ -182,21 +182,21 @@ final class Types extends Static {
         wayPoint = builder.build();
         /*
          * http://www.topografix.com/GPX/Route ⇾ GPXEntity
-         * ┌─────────────┬────────────────┬────────────────────────┬─────────────┐
-         * │ Name        │ Type           │ XML type               │ Cardinality │
-         * ├─────────────┼────────────────┼────────────────────────┼─────────────┤
-         * │ @identifier │ Integer        │                        │   [1 … 1]   │
-         * │ @envelope   │ Envelope       │                        │   [1 … 1]   │
-         * │ @geometry   │ Polyline       │                        │   [1 … 1]   │
-         * │ name        │ String         │ xsd:string             │   [0 … 1]   │
-         * │ cmt         │ String         │ xsd:string             │   [0 … 1]   │
-         * │ desc        │ String         │ xsd:string             │   [0 … 1]   │
-         * │ src         │ String         │ xsd:string             │   [0 … 1]   │
-         * │ link        │ OnlineResource │ gpx:linkType           │   [0 … ∞]   │
-         * │ number      │ Integer        │ xsd:nonNegativeInteger │   [0 … 1]   │
-         * │ type        │ String         │ xsd:string             │   [0 … 1]   │
-         * │ rtept       │ WayPoint       │ gpx:wptType            │   [0 … ∞]   │
-         * └─────────────┴────────────────┴────────────────────────┴─────────────┘
+         * ┌────────────────┬────────────────┬────────────────────────┬─────────────┐
+         * │ Name           │ Type           │ XML type               │ Cardinality │
+         * ├────────────────┼────────────────┼────────────────────────┼─────────────┤
+         * │ sis:identifier │ Integer        │                        │   [1 … 1]   │
+         * │ sis:envelope   │ Envelope       │                        │   [1 … 1]   │
+         * │ sis:geometry   │ Polyline       │                        │   [1 … 1]   │
+         * │ name           │ String         │ xsd:string             │   [0 … 1]   │
+         * │ cmt            │ String         │ xsd:string             │   [0 … 1]   │
+         * │ desc           │ String         │ xsd:string             │   [0 … 1]   │
+         * │ src            │ String         │ xsd:string             │   [0 … 1]   │
+         * │ link           │ OnlineResource │ gpx:linkType           │   [0 … ∞]   │
+         * │ number         │ Integer        │ xsd:nonNegativeInteger │   [0 … 1]   │
+         * │ type           │ String         │ xsd:string             │   [0 … 1]   │
+         * │ rtept          │ WayPoint       │ gpx:wptType            │   [0 … ∞]   │
+         * └────────────────┴────────────────┴────────────────────────┴─────────────┘
          */
         GroupAsPolylineOperation groupOp = new GroupPointsAsPolylineOperation(geomInfo, Tags.ROUTE_POINTS);
         builder = new FeatureTypeBuilder(null, factory, locale).setSuperTypes(parent);
@@ -215,14 +215,14 @@ final class Types extends Static {
         route = builder.build();
         /*
          * http://www.topografix.com/GPX/TrackSegment ⇾ GPXEntity
-         * ┌─────────────┬──────────┬─────────────┬─────────────┐
-         * │ Name        │ Type     │ XML type    │ Cardinality │
-         * ├─────────────┼──────────┼─────────────┼─────────────┤
-         * │ @identifier │ Integer  │             │   [1 … 1]   │
-         * │ @envelope   │ Envelope │             │   [1 … 1]   │
-         * │ @geometry   │ Polyline │             │   [1 … 1]   │
-         * │ trkpt       │ WayPoint │ gpx:wptType │   [0 … ∞]   │
-         * └─────────────┴──────────┴─────────────┴─────────────┘
+         * ┌────────────────┬──────────┬─────────────┬─────────────┐
+         * │ Name           │ Type     │ XML type    │ Cardinality │
+         * ├────────────────┼──────────┼─────────────┼─────────────┤
+         * │ sis:identifier │ Integer  │             │   [1 … 1]   │
+         * │ sis:envelope   │ Envelope │             │   [1 … 1]   │
+         * │ sis:geometry   │ Polyline │             │   [1 … 1]   │
+         * │ trkpt          │ WayPoint │ gpx:wptType │   [0 … ∞]   │
+         * └────────────────┴──────────┴─────────────┴─────────────┘
          */
         groupOp = new GroupPointsAsPolylineOperation(geomInfo, Tags.TRACK_POINTS);
         builder = new FeatureTypeBuilder(null, factory, locale).setSuperTypes(parent);
@@ -234,21 +234,21 @@ final class Types extends Static {
         trackSegment = builder.build();
         /*
          * http://www.topografix.com/GPX/Track ⇾ GPXEntity
-         * ┌─────────────┬────────────────┬────────────────────────┬─────────────┐
-         * │ Name        │ Type           │ XML type               │ Cardinality │
-         * ├─────────────┼────────────────┼────────────────────────┼─────────────┤
-         * │ @identifier │ Integer        │                        │   [1 … 1]   │
-         * │ @envelope   │ Envelope       │                        │   [1 … 1]   │
-         * │ @geometry   │ Polyline       │                        │   [1 … 1]   │
-         * │ name        │ String         │ xsd:string             │   [0 … 1]   │
-         * │ cmt         │ String         │ xsd:string             │   [0 … 1]   │
-         * │ desc        │ String         │ xsd:string             │   [0 … 1]   │
-         * │ src         │ String         │ xsd:string             │   [0 … 1]   │
-         * │ link        │ OnlineResource │ gpx:linkType           │   [0 … ∞]   │
-         * │ number      │ Integer        │ xsd:nonNegativeInteger │   [0 … 1]   │
-         * │ type        │ String         │ xsd:string             │   [0 … 1]   │
-         * │ trkseg      │ TrackSegment   │ gpx:trksegType         │   [0 … ∞]   │
-         * └─────────────┴────────────────┴────────────────────────┴─────────────┘
+         * ┌────────────────┬────────────────┬────────────────────────┬─────────────┐
+         * │ Name           │ Type           │ XML type               │ Cardinality │
+         * ├────────────────┼────────────────┼────────────────────────┼─────────────┤
+         * │ sis:identifier │ Integer        │                        │   [1 … 1]   │
+         * │ sis:envelope   │ Envelope       │                        │   [1 … 1]   │
+         * │ sis:geometry   │ Polyline       │                        │   [1 … 1]   │
+         * │ name           │ String         │ xsd:string             │   [0 … 1]   │
+         * │ cmt            │ String         │ xsd:string             │   [0 … 1]   │
+         * │ desc           │ String         │ xsd:string             │   [0 … 1]   │
+         * │ src            │ String         │ xsd:string             │   [0 … 1]   │
+         * │ link           │ OnlineResource │ gpx:linkType           │   [0 … ∞]   │
+         * │ number         │ Integer        │ xsd:nonNegativeInteger │   [0 … 1]   │
+         * │ type           │ String         │ xsd:string             │   [0 … 1]   │
+         * │ trkseg         │ TrackSegment   │ gpx:trksegType         │   [0 … ∞]   │
+         * └────────────────┴────────────────┴────────────────────────┴─────────────┘
          */
         groupOp = new GroupAsPolylineOperation(geomInfo, Tags.TRACK_SEGMENTS);
         builder = new FeatureTypeBuilder(null, factory, locale).setSuperTypes(parent);

Modified: sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Writer.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Writer.java?rev=1791123&r1=1791122&r2=1791123&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Writer.java [UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Writer.java [UTF-8] Wed Apr 12 13:41:29 2017
@@ -191,7 +191,7 @@ final class Writer extends StaxStreamWri
      */
     private void writeWayPoint(final Feature feature, final String tagName) throws XMLStreamException, JAXBException {
         if (feature != null) {
-            final Point pt = (Point) feature.getPropertyValue("@geometry");
+            final Point pt = (Point) feature.getPropertyValue("sis:geometry");
             writer.writeStartElement(tagName);
             writer.writeAttribute(Attributes.LATITUDE, Double.toString(pt.getY()));
             writer.writeAttribute(Attributes.LONGITUDE, Double.toString(pt.getX()));

Modified: sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/ReaderTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/ReaderTest.java?rev=1791123&r1=1791122&r2=1791123&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/ReaderTest.java [UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/ReaderTest.java [UTF-8] Wed Apr 12 13:41:29 2017
@@ -335,12 +335,12 @@ public final strictfp class ReaderTest e
         verifyPoint((Feature) points.get(1), 1, v11);
         verifyPoint((Feature) points.get(2), 2, v11);
 
-        final Polyline p = (Polyline) f.getPropertyValue("@geometry");
+        final Polyline p = (Polyline) f.getPropertyValue("sis:geometry");
         assertEquals("pointCount", 3, p.getPointCount());
         assertEquals("point(0)", new Point(15, 10), p.getPoint(0));
         assertEquals("point(1)", new Point(25, 20), p.getPoint(1));
         assertEquals("point(2)", new Point(35, 30), p.getPoint(2));
-        assertEnvelopeEquals(15, 35, 10, 30, (Envelope) f.getPropertyValue("@envelope"));
+        assertEnvelopeEquals(15, 35, 10, 30, (Envelope) f.getPropertyValue("sis:envelope"));
     }
 
     /**
@@ -359,7 +359,7 @@ public final strictfp class ReaderTest e
 
         assertTrue( "links.isEmpty()", ((Collection<?>) f.getPropertyValue("link" )).isEmpty());
         assertTrue("points.isEmpty()", ((Collection<?>) f.getPropertyValue(dep)).isEmpty());
-        assertNull("@envelope",                         f.getPropertyValue("@envelope"));
+        assertNull("sis:envelope",                      f.getPropertyValue("sis:envelope"));
     }
 
     /**
@@ -439,12 +439,12 @@ public final strictfp class ReaderTest e
         verifyPoint((Feature) points.get(2), 2, v11);
         assertTrue(((Collection<?>) seg2.getPropertyValue("trkpt")).isEmpty());
 
-        final Polyline p = (Polyline) f.getPropertyValue("@geometry");
+        final Polyline p = (Polyline) f.getPropertyValue("sis:geometry");
         assertEquals("pointCount", 3, p.getPointCount());
         assertEquals("point(0)", new Point(15, 10), p.getPoint(0));
         assertEquals("point(1)", new Point(25, 20), p.getPoint(1));
         assertEquals("point(2)", new Point(35, 30), p.getPoint(2));
-        assertEnvelopeEquals(15, 35, 10, 30, (Envelope) f.getPropertyValue("@envelope"));
+        assertEnvelopeEquals(15, 35, 10, 30, (Envelope) f.getPropertyValue("sis:envelope"));
     }
 
     /**
@@ -455,12 +455,12 @@ public final strictfp class ReaderTest e
      * @param  v11    {@code true} for GPX 1.1, or {@code false} for GPX 1.0.
      */
     private static void verifyPoint(final Feature f, final int index, final boolean v11) {
-        assertEquals("@identifier", index + 1, f.getPropertyValue("@identifier"));
+        assertEquals("sis:identifier", index + 1, f.getPropertyValue("sis:identifier"));
         switch (index) {
             case 0: {
                 assertEquals(Instant.parse("2010-01-10T00:00:00Z"), f.getPropertyValue("time"));
-                assertEquals("x",               15.0,      ((Point) f.getPropertyValue("@geometry")).getX(), STRICT);
-                assertEquals("y",               10.0,      ((Point) f.getPropertyValue("@geometry")).getY(), STRICT);
+                assertEquals("x",               15.0,      ((Point) f.getPropertyValue("sis:geometry")).getX(), STRICT);
+                assertEquals("y",               10.0,      ((Point) f.getPropertyValue("sis:geometry")).getY(), STRICT);
                 assertEquals("ele",            140.0,               f.getPropertyValue("ele"));
                 assertEquals("magvar",          35.0,               f.getPropertyValue("magvar"));
                 assertEquals("geoidheight",    112.32,              f.getPropertyValue("geoidheight"));
@@ -484,12 +484,12 @@ public final strictfp class ReaderTest e
                     assertStringEquals("http://first-address2.org", links.get(1));
                     assertStringEquals("http://first-address3.org", links.get(2));
                 }
-                assertEnvelopeEquals(15, 15, 10, 10, (Envelope) f.getPropertyValue("@envelope"));
+                assertEnvelopeEquals(15, 15, 10, 10, (Envelope) f.getPropertyValue("sis:envelope"));
                 break;
             }
             case 1: {
-                assertEquals("x", 25, ((Point)f.getPropertyValue("@geometry")).getX(), STRICT);
-                assertEquals("y", 20, ((Point)f.getPropertyValue("@geometry")).getY(), STRICT);
+                assertEquals("x", 25, ((Point)f.getPropertyValue("sis:geometry")).getX(), STRICT);
+                assertEquals("y", 20, ((Point)f.getPropertyValue("sis:geometry")).getY(), STRICT);
                 assertNull("ele",             f.getPropertyValue("ele"));
                 assertNull("time",            f.getPropertyValue("time"));
                 assertNull("magvar",          f.getPropertyValue("magvar"));
@@ -508,13 +508,13 @@ public final strictfp class ReaderTest e
                 assertNull("ageofdgpsdata",   f.getPropertyValue("ageofdgpsdata"));
                 assertNull("dgpsid",          f.getPropertyValue("dgpsid"));
                 assertTrue("links.isEmpty()", ((List<?>) f.getPropertyValue("link")).isEmpty());
-                assertEnvelopeEquals(25, 25, 20, 20, (Envelope) f.getPropertyValue("@envelope"));
+                assertEnvelopeEquals(25, 25, 20, 20, (Envelope) f.getPropertyValue("sis:envelope"));
                 break;
             }
             case 2: {
                 assertEquals(Instant.parse("2010-01-30T00:00:00Z"),  f.getPropertyValue("time"));
-                assertEquals("x",               35.0,       ((Point) f.getPropertyValue("@geometry")).getX(), STRICT);
-                assertEquals("y",               30.0,       ((Point) f.getPropertyValue("@geometry")).getY(), STRICT);
+                assertEquals("x",               35.0,       ((Point) f.getPropertyValue("sis:geometry")).getX(), STRICT);
+                assertEquals("y",               30.0,       ((Point) f.getPropertyValue("sis:geometry")).getY(), STRICT);
                 assertEquals("ele",            150.0,                f.getPropertyValue("ele"));
                 assertEquals("magvar",          25.0,                f.getPropertyValue("magvar"));
                 assertEquals("geoidheight",    142.32,               f.getPropertyValue("geoidheight"));
@@ -537,7 +537,7 @@ public final strictfp class ReaderTest e
                 if (v11) {
                     assertStringEquals("http://third-address2.org", links.get(1));
                 }
-                assertEnvelopeEquals(35, 35, 30, 30, (Envelope) f.getPropertyValue("@envelope"));
+                assertEnvelopeEquals(35, 35, 30, 30, (Envelope) f.getPropertyValue("sis:envelope"));
                 break;
             }
             default: {

Modified: sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/WriterTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/WriterTest.java?rev=1791123&r1=1791122&r2=1791123&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/WriterTest.java [UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/WriterTest.java [UTF-8] Wed Apr 12 13:41:29 2017
@@ -251,7 +251,7 @@ public final strictfp class WriterTest e
          * Appear also in "route.xml" and "track.xml" files.
          */
         final Feature point1 = types.wayPoint.newInstance();
-        point1.setPropertyValue("@geometry",     new Point(15, 10));
+        point1.setPropertyValue("sis:geometry",  new Point(15, 10));
         point1.setPropertyValue("time",          Instant.parse("2010-01-10T00:00:00Z"));
         point1.setPropertyValue("name",          "first point");
         point1.setPropertyValue("cmt",           "first comment");
@@ -273,7 +273,7 @@ public final strictfp class WriterTest e
                                                                new Link(new URI("http://first-address2.org")),
                                                                new Link(new URI("http://first-address3.org"))));
         final Feature point3 = types.wayPoint.newInstance();
-        point3.setPropertyValue("@geometry",     new Point(35, 30));
+        point3.setPropertyValue("sis:geometry",  new Point(35, 30));
         point3.setPropertyValue("time",          Instant.parse("2010-01-30T00:00:00Z"));
         point3.setPropertyValue("name",          "third point");
         point3.setPropertyValue("cmt",           "third comment");
@@ -294,7 +294,7 @@ public final strictfp class WriterTest e
         point3.setPropertyValue("link",          Arrays.asList(new Link(new URI("http://third-address1.org")),
                                                                new Link(new URI("http://third-address2.org"))));
         final Feature point2 = types.wayPoint.newInstance();
-        point2.setPropertyValue("@geometry", new Point(25, 20));
+        point2.setPropertyValue("sis:geometry", new Point(25, 20));
         final List<Feature> wayPoints = Arrays.asList(point1, point2, point3);
         final List<Feature> features;
         switch (type) {



Mime
View raw message