sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1595039 [2/3] - in /sis/branches/JDK6: ./ application/sis-javafx/ core/ core/sis-build-helper/src/main/ant/ core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/ core/sis-feature/ core/sis-feature/src/main/java/org/apache/sis...
Date Thu, 15 May 2014 20:48:32 GMT
Modified: sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/package-info.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/package-info.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/package-info.java [UTF-8] Thu May 15 20:48:31 2014
@@ -21,21 +21,63 @@
  * The term “feature” may be used in different contexts:
  *
  * <ul>
- *   <li>{@linkplain org.apache.sis.feature.DefaultFeatureType Feature types} define the <em>structure</em> of a
- *       real-world representation. A feature type lists the attributes, operations, or associations to other
- *       features (collectively called “properties”) that a feature can have.
- *
- *       <div class="note"><b>Note:</b> a {@code FeatureType} in a Spatial Information System is equivalent to a
- *       {@link java.lang.Class} in the Java language. By extension, {@code AttributeType} and {@code OperationType}
- *       are equivalent to {@link java.lang.reflect.Field} and {@link java.lang.reflect.Method} respectively.</div></li>
- *
- *   <li>{@linkplain org.apache.sis.feature.DefaultFeature Feature instances} holds the <em>content</em> (or values)
- *       that describe one specific real-world object. For example the “Eiffel tower” is a feature <em>instance</em>
- *       belonging to the “Tower” feature <em>type</em>.
+ *   <li><p><b>{@linkplain org.apache.sis.feature.DefaultFeatureType Feature types}</b><br>
+ *       Define the <em>structure</em> of real-world representations. A feature type lists the
+ *       {@linkplain org.apache.sis.feature.DefaultAttributeType attributes},
+ *       {@linkplain org.apache.sis.feature.DefaultOperation operations} or
+ *       {@linkplain org.apache.sis.feature.DefaultAssociationRole associations to other features}
+ *       (collectively called “{@linkplain org.apache.sis.feature.DefaultFeatureType#getProperties(boolean) properties}”
+ *       or “characteristics”) that a feature can have.</p>
  *
- *       <div class="note"><b>Note:</b> feature instances are often called only {@code Feature}s.</div></li>
+ *       <div class="note"><b>Analogy:</b> a {@code FeatureType} in a Spatial Information System is equivalent to a
+ *       {@link java.lang.Class} in the Java language. By extension, {@code AttributeType} and {@code Operation} are
+ *       equivalent to {@link java.lang.reflect.Field} and {@link java.lang.reflect.Method} respectively.</div></li>
+ *
+ *   <li><p><b>{@linkplain org.apache.sis.feature.DefaultFeature Feature instances}</b> (often called only Features)<br>
+ *       Hold the <em>content</em> (or values) that describe one specific real-world object.</p>
+ *
+ *       <div class="note"><b>Example:</b> the “Eiffel tower” is a <em>feature instance</em> belonging
+ *       to the “Tower” <em>feature type</em>.</div></li>
+ *
+ *   <li><p><b>{@linkplain org.apache.sis.feature.DefaultFeatureType#isSimple() Simple features}</b><br>
+ *       Are instances of a feature type with no association to other features, and where all attributes
+ *       are constrained to the [1 … 1] cardinality. Such simple features are very common.</p></li>
  * </ul>
  *
+ * In addition, a feature type can inherit the properties of one or more other feature types.
+ * Properties defined in the sub-type can override properties of the same name defined in the
+ * {@linkplain org.apache.sis.feature.DefaultFeatureType#getSuperTypes() super-types}, provided
+ * that values of the sub-type property are assignable to the super-type property.
+ *
+ * {@section Naming}
+ * Each feature type has a {@linkplain org.apache.sis.feature.DefaultFeatureType#getName() name},
+ * which should be unique. Those names are the main criterion used for checking if a feature type
+ * {@linkplain org.apache.sis.feature.DefaultFeatureType#isAssignableFrom is assignable from} another type.
+ * Names can be {@linkplain org.apache.sis.util.iso.DefaultScopedName scoped} for avoiding name collision.
+ *
+ * {@section Class hierarchy}
+ * The class hierarchy for feature <cite>types</cite> is derived from ISO 19109 specification.
+ * The class hierarchy for feature <cite>instances</cite> is closely related:
+ *
+ * <table class="sis">
+ * <caption>Feature class hierarchy</caption>
+ * <tr>
+ *   <th>Types</th>
+ *   <th class="sep">Instances</th>
+ * </tr><tr><td style="width: 50%; white-space: nowrap">
+ *                 {@linkplain org.apache.sis.feature.AbstractIdentifiedType  Identified type}<br>
+ * {@code  ├─}     {@linkplain org.apache.sis.feature.DefaultFeatureType      Feature type}<br>
+ * {@code  └─}                                                                Property type<br>
+ * {@code      ├─} {@linkplain org.apache.sis.feature.DefaultAttributeType    Attribute type}<br>
+ * {@code      ├─} {@linkplain org.apache.sis.feature.DefaultAssociationRole  Feature association role}<br>
+ * {@code      └─} {@linkplain org.apache.sis.feature.DefaultOperation        Operation}<br>
+ * </td><td class="sep" style="width: 50%; white-space: nowrap">
+ *             {@linkplain org.apache.sis.feature.DefaultFeature     Feature}<br>
+ *                                                                   Property<br>
+ * {@code  ├─} {@linkplain org.apache.sis.feature.DefaultAttribute   Attribute}<br>
+ * {@code  └─} {@linkplain org.apache.sis.feature.DefaultAssociation Feature association}<br>
+ * </td></tr></table>
+ *
  * @author  Travis L. Pinney
  * @author  Johann Sorel (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)

Copied: sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/feature/DefaultAttributeTest.java (from r1595037, sis/branches/JDK7/core/sis-feature/src/test/java/org/apache/sis/feature/DefaultAttributeTest.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/feature/DefaultAttributeTest.java?p2=sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/feature/DefaultAttributeTest.java&p1=sis/branches/JDK7/core/sis-feature/src/test/java/org/apache/sis/feature/DefaultAttributeTest.java&r1=1595037&r2=1595039&rev=1595039&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-feature/src/test/java/org/apache/sis/feature/DefaultAttributeTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/feature/DefaultAttributeTest.java [UTF-8] Thu May 15 20:48:31 2014
@@ -46,7 +46,7 @@ public final strictfp class DefaultAttri
      * This attribute has a default value.
      */
     static DefaultAttribute<String> city() {
-        return new DefaultAttribute<>(DefaultAttributeTypeTest.city(new HashMap<String,Object>(4)));
+        return new DefaultAttribute<String>(DefaultAttributeTypeTest.city(new HashMap<String,Object>(4)));
     }
 
     /**
@@ -54,7 +54,7 @@ public final strictfp class DefaultAttri
      * This attribute has no default value.
      */
     static DefaultAttribute<Integer> population() {
-        return new DefaultAttribute<>(DefaultAttributeTypeTest.population(new HashMap<String,Object>(4)));
+        return new DefaultAttribute<Integer>(DefaultAttributeTypeTest.population(new HashMap<String,Object>(4)));
     }
 
     /**

Modified: sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/feature/DefaultAttributeTypeTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/feature/DefaultAttributeTypeTest.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/feature/DefaultAttributeTypeTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/feature/DefaultAttributeTypeTest.java [UTF-8] Thu May 15 20:48:31 2014
@@ -22,11 +22,11 @@ import java.util.Locale;
 import org.opengis.util.LocalName;
 import org.opengis.util.GenericName;
 import org.opengis.util.InternationalString;
-import org.apache.sis.measure.NumberRange;
+import org.apache.sis.test.DependsOnMethod;
 import org.apache.sis.test.TestCase;
 import org.junit.Test;
 
-import static org.opengis.test.Assert.*;
+import static org.apache.sis.test.Assert.*;
 
 
 /**
@@ -41,24 +41,37 @@ public final strictfp class DefaultAttri
     /**
      * Creates an attribute type for city name.
      *
-     * @param properties An empty temporary map (provided only for recycling existing instances).
+     * @param identification An empty temporary map (provided only for recycling existing instances).
      */
-    static DefaultAttributeType<String> city(final Map<String,Object> properties) {
-        assertNull(properties.put(DefaultAttributeType.NAME_KEY, "city"));
-        assertNull(properties.put(DefaultAttributeType.DESIGNATION_KEY + "_en", "City"));
-        assertNull(properties.put(DefaultAttributeType.DESIGNATION_KEY + "_fr", "Ville"));
-        assertNull(properties.put(DefaultAttributeType.DESIGNATION_KEY + "_ja", "都市"));
-        assertNull(properties.put(DefaultAttributeType.DEFINITION_KEY  + "_en", "The name of the city."));
-        assertNull(properties.put(DefaultAttributeType.DEFINITION_KEY  + "_fr", "Le nom de la ville."));
-        assertNull(properties.put(DefaultAttributeType.DEFINITION_KEY  + "_ja", "都市の名前。"));
-        assertNull(properties.put(DefaultAttributeType.DESCRIPTION_KEY, "Some verbose description."));
-        final DefaultAttributeType<String> city = new DefaultAttributeType<String>(properties,
-                String.class, "Utopia", NumberRange.create(1, true, 1, true));
-        properties.clear();
+    static DefaultAttributeType<String> city(final Map<String,Object> identification) {
+        assertNull(identification.put(DefaultAttributeType.NAME_KEY, "city"));
+        assertNull(identification.put(DefaultAttributeType.DESIGNATION_KEY + "_en", "City"));
+        assertNull(identification.put(DefaultAttributeType.DESIGNATION_KEY + "_fr", "Ville"));
+        assertNull(identification.put(DefaultAttributeType.DESIGNATION_KEY + "_ja", "都市"));
+        assertNull(identification.put(DefaultAttributeType.DEFINITION_KEY  + "_en", "The name of the city."));
+        assertNull(identification.put(DefaultAttributeType.DEFINITION_KEY  + "_fr", "Le nom de la ville."));
+        assertNull(identification.put(DefaultAttributeType.DEFINITION_KEY  + "_ja", "都市の名前。"));
+        assertNull(identification.put(DefaultAttributeType.DESCRIPTION_KEY, "Some verbose description."));
+        final DefaultAttributeType<String> city = new DefaultAttributeType<String>(identification,
+                String.class, 1, 1, "Utopia");
+        identification.clear();
         return city;
     }
 
     /**
+     * Creates an attribute type for city population.
+     *
+     * @param identification An empty temporary map (provided only for recycling existing instances).
+     */
+    static DefaultAttributeType<Integer> population(final Map<String,Object> identification) {
+        assertNull(identification.put(DefaultAttributeType.NAME_KEY, "population"));
+        final DefaultAttributeType<Integer> population = new DefaultAttributeType<Integer>(
+                identification, Integer.class, 1, 1, null);
+        identification.clear();
+        return population;
+    }
+
+    /**
      * Tests the creation of a simple {@link DefaultAttributeType} instance for a mandatory singleton.
      */
     @Test
@@ -84,9 +97,39 @@ public final strictfp class DefaultAttri
         assertEquals("valueClass",   String.class, city.getValueClass());
         assertEquals("defaultValue", "Utopia",     city.getDefaultValue());
 
-        final NumberRange<Integer> cardinality = city.getCardinality();
-        assertNotNull("cardinality", cardinality);
-        assertEquals("cardinality.minValue", Integer.valueOf(1), cardinality.getMinValue());
-        assertEquals("cardinality.maxValue", Integer.valueOf(1), cardinality.getMaxValue());
+        assertEquals("minimumOccurs", 1, city.getMinimumOccurs());
+        assertEquals("axnimumOccurs", 1, city.getMaximumOccurs());
+    }
+
+    /**
+     * Tests attribute comparison.
+     */
+    @Test
+    public void testEquals() {
+        final Map<String,Object> identification = new HashMap<String,Object>(4);
+        final DefaultAttributeType<Integer> a1 = population(identification);
+        final DefaultAttributeType<Integer> a2 = population(identification);
+        assertFalse ("equals",   a1.equals(null));
+        assertTrue  ("equals",   a1.equals(a2));
+        assertEquals("hashCode", a1.hashCode(), a2.hashCode());
+    }
+
+    /**
+     * Tests serialization.
+     */
+    @Test
+    @DependsOnMethod("testEquals")
+    public void testSerialization() {
+        final DefaultAttributeType<String> attribute = city(new HashMap<String,Object>(4));
+        assertSerializedEquals(attribute);
+    }
+
+    /**
+     * Tests {@link DefaultAttributeType#toString()}.
+     */
+    @Test
+    public void testToString() {
+        final DefaultAttributeType<String> city = city(new HashMap<String,Object>());
+        assertEquals("AttributeType[“city” : String]", city.toString());
     }
 }

Modified: sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/feature/DefaultFeatureTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/feature/DefaultFeatureTest.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/feature/DefaultFeatureTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/feature/DefaultFeatureTest.java [UTF-8] Thu May 15 20:48:31 2014
@@ -31,21 +31,25 @@ import static org.junit.Assert.*;
  * @version 0.5
  * @module
  */
-@DependsOn(DefaultFeatureTypeTest.class)
+@DependsOn({
+    DefaultFeatureTypeTest.class,
+    DefaultAttributeTest.class,
+    PropertySingletonTest.class
+})
 public final strictfp class DefaultFeatureTest extends TestCase {
     /**
      * Tests the construction of a simple feature without super-types.
      */
     @Test
     public void testSimple() {
-        final DefaultFeature simple = new DefaultFeature(DefaultFeatureTypeTest.simple());
+        final DefaultFeature cityPopulation = new DefaultFeature(DefaultFeatureTypeTest.city());
 
-        assertEquals("Utopia", simple.getAttributeValue("city"));
-        simple.setAttributeValue("city", "Atlantide");
-        assertEquals("Atlantide", simple.getAttributeValue("city"));
+        assertEquals("Utopia", cityPopulation.getPropertyValue("city"));
+        cityPopulation.setPropertyValue("city", "Atlantide");
+        assertEquals("Atlantide", cityPopulation.getPropertyValue("city"));
 
-        assertNull(simple.getAttributeValue("population"));
-        simple.setAttributeValue("population", 1000);
-        assertEquals(1000, simple.getAttributeValue("population"));
+        assertNull(cityPopulation.getPropertyValue("population"));
+        cityPopulation.setPropertyValue("population", 1000);
+        assertEquals(1000, cityPopulation.getPropertyValue("population"));
     }
 }

Modified: sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/feature/DefaultFeatureTypeTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/feature/DefaultFeatureTypeTest.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/feature/DefaultFeatureTypeTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/feature/DefaultFeatureTypeTest.java [UTF-8] Thu May 15 20:48:31 2014
@@ -18,15 +18,17 @@ package org.apache.sis.feature;
 
 import java.util.Map;
 import java.util.HashMap;
-import java.util.List;
-import org.apache.sis.measure.NumberRange;
+import java.util.Iterator;
+import java.util.Collection;
+import org.opengis.util.InternationalString;
 import org.apache.sis.test.DependsOnMethod;
 import org.apache.sis.test.DependsOn;
 import org.apache.sis.test.TestCase;
 import org.junit.Test;
 
-import static org.junit.Assert.*;
+import static org.apache.sis.test.Assert.*;
 import static java.util.Collections.singletonMap;
+import static org.apache.sis.test.TestUtilities.getSingleton;
 
 
 /**
@@ -41,64 +43,360 @@ import static java.util.Collections.sing
 public final strictfp class DefaultFeatureTypeTest extends TestCase {
     /**
      * Creates a simple feature type without super-types.
+     * The feature contains the following attribute:
+     *
+     * <ul>
+     *   <li>{@code city}       as a  {@link String}  (mandatory)</li>
+     *   <li>{@code population} as an {@link Integer} (mandatory)</li>
+     * </ul>
+     *
+     * @return The feature for a city.
      */
-    static DefaultFeatureType simple() {
-        final Map<String,Object> properties = new HashMap<String,Object>();
-        final DefaultAttributeType<String> city = DefaultAttributeTypeTest.city(properties);
+    public static DefaultFeatureType city() {
+        final Map<String,Object> identification = new HashMap<String,Object>();
+        final DefaultAttributeType<String>  city       = DefaultAttributeTypeTest.city(identification);
+        final DefaultAttributeType<Integer> population = DefaultAttributeTypeTest.population(identification);
 
-        properties.clear();
-        assertNull(properties.put(DefaultAttributeType.NAME_KEY, "population"));
-        final DefaultAttributeType<Integer> population = new DefaultAttributeType<Integer>(
-                properties, Integer.class, null, NumberRange.create(1, true, 1, true));
+        identification.clear();
+        assertNull(identification.put(DefaultFeatureType.NAME_KEY, "City"));
+        return new DefaultFeatureType(identification, false, null, city, population);
+    }
+
+    /**
+     * Creates a sub-type of the "city" type with only one additional property, a string giving the parliament name.
+     * The feature contains the following attribute:
+     *
+     * <ul>
+     *   <li>{@code city}       as a  {@link String}  (mandatory)</li>
+     *   <li>{@code population} as an {@link Integer} (mandatory)</li>
+     *   <li>{@code parliament} as a  {@link String}  (mandatory)</li>
+     * </ul>
+     *
+     * @return The feature for a capital.
+     */
+    public static DefaultFeatureType capital() {
+        return new DefaultFeatureType(singletonMap(DefaultFeatureType.NAME_KEY, "Capital"), false,
+                new DefaultFeatureType[] {city()},
+                new DefaultAttributeType<String>(singletonMap(DefaultAttributeType.NAME_KEY, "parliament"),
+                        String.class, 1, 1, null));
+    }
+
+    /**
+     * Creates a sub-type of the "city" type with two additional properties.
+     * The feature contains the following attribute:
+     *
+     * <ul>
+     *   <li>{@code city}       as a  {@link String}       (mandatory)</li>
+     *   <li>{@code population} as an {@link Integer}      (mandatory)</li>
+     *   <li>{@code region}     as a  {@link CharSequence} (mandatory) — the region for which the city is a metropolis.</li>
+     *   <li>{@code isGlobal}   as a  {@link Boolean}      (mandatory) — whether the city has an effect on global affairs.</li>
+     * </ul>
+     *
+     * @return The feature for a metropolis.
+     */
+    public static DefaultFeatureType metropolis() {
+        final Map<String,Object> identification = new HashMap<String,Object>(4);
+        assertNull(identification.put(DefaultFeatureType.NAME_KEY,         "Metropolis"));
+        assertNull(identification.put(DefaultFeatureType.NAME_KEY + "_fr", "Métropole"));
+        return new DefaultFeatureType(identification, false,
+                new DefaultFeatureType[] {city()},
+                new DefaultAttributeType<CharSequence>(singletonMap(DefaultAttributeType.NAME_KEY, "region"),
+                        CharSequence.class, 1, 1, null),
+                new DefaultAttributeType<Boolean>(singletonMap(DefaultAttributeType.NAME_KEY, "isGlobal"),
+                        Boolean.class, 1, 1, null));
+    }
 
-        properties.clear();
-        assertNull(properties.put(DefaultAttributeType.NAME_KEY, "City population"));
-        return new DefaultFeatureType(properties, false, null, city, population);
+    /**
+     * Creates a sub-type of the "metropolis" type with the "region" attribute overridden to the given type.
+     * The given type should be {@link InternationalString}, but we allow other type for testing argument checks.
+     */
+    private static <T> DefaultFeatureType worldMetropolis(final DefaultFeatureType metropolis, final Class<T> regionType) {
+        return new DefaultFeatureType(singletonMap(DefaultFeatureType.NAME_KEY, "World metropolis"), false,
+                new DefaultFeatureType[] {metropolis},
+                new DefaultAttributeType<T>(singletonMap(DefaultAttributeType.NAME_KEY, "region"),
+                        regionType, 1, 1, null));
+
+    }
+
+    /**
+     * Verifies that {@code DefaultFeatureType} methods returns unmodifiable collections.
+     * This method does <strong>not</strong> check recursively the properties.
+     */
+    private static void assertUnmodifiable(final DefaultFeatureType feature) {
+        final Collection<?> superTypes         = feature.getSuperTypes();
+        final Collection<?> declaredProperties = feature.getProperties(false);
+        final Collection<?> allProperties      = feature.getProperties(true);
+        if (!superTypes.isEmpty()) try {
+            superTypes.clear();
+            fail("Super-types collection shall not be modifiable.");
+        } catch (UnsupportedOperationException e) {
+            assertFalse(superTypes.isEmpty());
+        }
+        if (!declaredProperties.isEmpty()) try {
+            declaredProperties.clear();
+            fail("Properties collection shall not be modifiable.");
+        } catch (UnsupportedOperationException e) {
+            assertFalse(declaredProperties.isEmpty());
+        }
+        if (!allProperties.isEmpty()) try {
+            allProperties.clear();
+            fail("Properties collection shall not be modifiable.");
+        } catch (UnsupportedOperationException e) {
+            assertFalse(allProperties.isEmpty());
+        }
+        // Opportunist check.
+        assertTrue("'properties(true)' shall contain all 'properties(false)' elements.",
+                allProperties.containsAll(declaredProperties));
+    }
+
+    /**
+     * Asserts that the given feature contains the given properties, in the same order.
+     * This method tests the following {@code FeatureType} methods:
+     *
+     * <ul>
+     *   <li>{@link DefaultFeatureType#getProperties(boolean)}</li>
+     *   <li>{@link DefaultFeatureType#getProperty(String)}</li>
+     * </ul>
+     *
+     * @param feature The feature to verify.
+     * @param includeSuperTypes {@code true} for including the properties inherited from the super-types,
+     *        or {@code false} for returning only the properties defined explicitely in the feature type.
+     * @param expected Names of the expected properties.
+     */
+    private static void assertPropertiesEquals(final DefaultFeatureType feature, final boolean includeSuperTypes,
+            final String... expected)
+    {
+        int index = 0;
+        for (final AbstractIdentifiedType property : feature.getProperties(includeSuperTypes)) {
+            assertTrue("Found more properties than expected.", index < expected.length);
+            final String name = expected[index++];
+            assertNotNull(name, property);
+            assertEquals (name, property.getName().toString());
+            assertSame   (name, property, feature.getProperty(name));
+        }
+        assertEquals("Unexpected number of properties.", expected.length, index);
+        assertNull("Shall not found a non-existent property.", feature.getProperty("apple"));
     }
 
     /**
      * Tests the construction of a simple feature without super-types.
+     * A feature is said "simple" if the cardinality of all attributes is [1 … 1].
+     *
+     * <p>Current implementation performs its tests on the {@link #city()} feature.</p>
      */
     @Test
     public void testSimple() {
-        final DefaultFeatureType simple = simple();
-        assertEquals("name", "City population", simple.getName().toString());
-        /*
-         * Verify content.
-         */
-        final List<DefaultAttributeType<?>> characteristics = simple.getCharacteristics();
-        assertEquals("characteristics.size", 2, characteristics.size());
-        assertEquals("characteristics[0]", "city",       characteristics.get(0).getName().toString());
-        assertEquals("characteristics[1]", "population", characteristics.get(1).getName().toString());
-        /*
-         * Verify search by name.
-         */
-        assertSame(characteristics.get(0), simple.getProperty("city"));
-        assertSame(characteristics.get(1), simple.getProperty("population"));
-        assertNull(simple.getProperty("apple"));
+        final DefaultFeatureType simple = city();
+        assertUnmodifiable(simple);
+        assertEquals("name", "City",     simple.getName().toString());
+        assertTrue  ("superTypes",       simple.getSuperTypes().isEmpty());
+        assertFalse ("isAbstract",       simple.isAbstract());
+        assertTrue  ("isSimple",         simple.isSimple());
+        assertTrue  ("isAssignableFrom", simple.isAssignableFrom(simple));
+        assertEquals("instanceSize", 2,  simple.getInstanceSize());
+        assertPropertiesEquals(simple, false, "city", "population");
     }
 
     /**
-     * Ensures that we can not use two property with the same name.
+     * Tests the construction of a "complex" feature without super-types.
+     * A feature is said "complex" if it contains at least one attribute
+     * with a cardinality different than [0 … 0] and [1 … 1].
+     */
+    @Test
+    @DependsOnMethod("testSimple")
+    public void testComplex() {
+        final Map<String,Object> identification = new HashMap<String,Object>();
+        final DefaultAttributeType<String>  city       = DefaultAttributeTypeTest.city(identification);
+        final DefaultAttributeType<Integer> population = DefaultAttributeTypeTest.population(identification);
+        testComplex(city, population, 0, 0); // Simple
+        testComplex(city, population, 0, 1);
+        testComplex(city, population, 0, 2);
+        testComplex(city, population, 1, 2);
+        testComplex(city, population, 1, 1); // Simple
+    }
+
+    /**
+     * Implementation of {@link #testComplex()} for the given minimum and maximum occurrences.
+     */
+    private static void testComplex(
+            final DefaultAttributeType<String>  city,
+            final DefaultAttributeType<Integer> population,
+            final int minimumOccurs, final int maximumOccurs)
+    {
+        final DefaultAttributeType<String> festival = new DefaultAttributeType<String>(
+                singletonMap(DefaultAttributeType.NAME_KEY, "festival"),
+                String.class, minimumOccurs, maximumOccurs, null);
+
+        final DefaultFeatureType complex = new DefaultFeatureType(
+                singletonMap(DefaultAttributeType.NAME_KEY, "Festival"),
+                false, null, city, population, festival);
+
+        assertUnmodifiable(complex);
+        final Collection<AbstractIdentifiedType> properties = complex.getProperties(false);
+        final Iterator<AbstractIdentifiedType> it = properties.iterator();
+
+        assertEquals("name",            "Festival",                     complex.getName().toString());
+        assertTrue  ("superTypes",                                      complex.getSuperTypes().isEmpty());
+        assertTrue  ("isAssignableFrom",                                complex.isAssignableFrom(complex));
+        assertFalse ("isAbstract",                                      complex.isAbstract());
+        assertEquals("isSimple",        maximumOccurs == minimumOccurs, complex.isSimple());
+        assertEquals("instanceSize",    maximumOccurs == 0 ? 2 : 3,     complex.getInstanceSize());
+        assertEquals("minimumOccurs",   minimumOccurs,                  festival.getMinimumOccurs());
+        assertEquals("maximumOccurs",   maximumOccurs,                  festival.getMaximumOccurs());
+        assertEquals("properties.size", 3,                              properties.size());
+        assertSame  ("properties[0]",   city,                           it.next());
+        assertSame  ("properties[1]",   population,                     it.next());
+        assertSame  ("properties[2]",   festival,                       it.next());
+        assertFalse (it.hasNext());
+    }
+
+    /**
+     * Ensures that we can not use two properties with the same name.
      */
     @Test
     @DependsOnMethod("testSimple")
     public void testNameCollision() {
-        final NumberRange<Integer> cardinality = NumberRange.create(1, true, 1, true);
         final DefaultAttributeType<String> city = new DefaultAttributeType<String>(
-                singletonMap(DefaultAttributeType.NAME_KEY, "city"), String.class, null, cardinality);
+                singletonMap(DefaultAttributeType.NAME_KEY, "name"), String.class, 1, 1, null);
         final DefaultAttributeType<Integer> cityId = new DefaultAttributeType<Integer>(
-                singletonMap(DefaultAttributeType.NAME_KEY, "city"), Integer.class, null, cardinality);
+                singletonMap(DefaultAttributeType.NAME_KEY, "name"), Integer.class, 1, 1, null);
         final DefaultAttributeType<Integer> population = new DefaultAttributeType<Integer>(
-                singletonMap(DefaultAttributeType.NAME_KEY, "population"), Integer.class, null, cardinality);
+                singletonMap(DefaultAttributeType.NAME_KEY, "population"), Integer.class, 1, 1, null);
 
-        final Map<String,String> properties = singletonMap(DefaultAttributeType.NAME_KEY, "City population");
+        final Map<String,String> identification = singletonMap(DefaultAttributeType.NAME_KEY, "City");
         try {
-            new DefaultFeatureType(properties, false, null, city, population, cityId);
+            new DefaultFeatureType(identification, false, null, city, population, cityId);
             fail("Duplicated attribute names shall not be allowed.");
         } catch (IllegalArgumentException e) {
             final String message = e.getMessage();
-            assertTrue(message, message.contains("city"));
+            assertTrue(message, message.contains("name")); // Property name.
+            assertTrue(message, message.contains("City")); // Feature name.
+        }
+    }
+
+    /**
+     * Tests a feature type which inherit from an other feature type, but without property overriding.
+     *
+     * <p>Current implementation performs its tests on the {@link #capital()} feature.</p>
+     */
+    @Test
+    @DependsOnMethod({"testComplex", "testEquals"})
+    public void testInheritance() {
+        final DefaultFeatureType city    = city(); // Tested by 'testSimple()'.
+        final DefaultFeatureType capital = capital();
+        assertUnmodifiable(capital);
+        assertEquals("name", "Capital", capital.getName().toString());
+        assertEquals("superTypes",      city, getSingleton(capital.getSuperTypes()));
+        assertFalse ("isAbstract",      capital.isAbstract());
+        assertTrue  ("isSimple",        capital.isSimple());
+        assertEquals("instanceSize", 3, capital.getInstanceSize());
+
+        assertPropertiesEquals(city,    false, "city", "population");
+        assertPropertiesEquals(capital, false, "parliament");
+        assertPropertiesEquals(capital, true,  "city", "population", "parliament");
+
+        // Check based only on name.
+        assertTrue ("maybeAssignableFrom", city.maybeAssignableFrom(capital));
+        assertFalse("maybeAssignableFrom", capital.maybeAssignableFrom(city));
+
+        // Public API.
+        assertTrue ("isAssignableFrom", city.isAssignableFrom(capital));
+        assertFalse("isAssignableFrom", capital.isAssignableFrom(city));
+    }
+
+    /**
+     * Tests the inheritance of 2 types having the same common parent.
+     */
+    @Test
+    @DependsOnMethod("testInheritance")
+    public void testMultiInheritance() {
+        final DefaultFeatureType metropolis   = metropolis();
+        final DefaultFeatureType capital      = capital(); // Tested by 'testComplex()'.
+        final DefaultFeatureType metroCapital = new DefaultFeatureType(
+                singletonMap(DefaultFeatureType.NAME_KEY, "Metropolis and capital"), false,
+                new DefaultFeatureType[] {metropolis, capital},
+                new DefaultAttributeType<String>(singletonMap(DefaultAttributeType.NAME_KEY, "country"),
+                        String.class, 1, 1, null));
+
+        assertUnmodifiable(metroCapital);
+        assertEquals     ("name", "Metropolis and capital", metroCapital.getName().toString());
+        assertArrayEquals("superTypes", new Object[] {metropolis, capital}, metroCapital.getSuperTypes().toArray());
+        assertFalse      ("isAbstract",      metroCapital.isAbstract());
+        assertTrue       ("isSimple",        metroCapital.isSimple());
+        assertEquals     ("instanceSize", 6, metroCapital.getInstanceSize());
+
+        assertPropertiesEquals(metroCapital, false, "country");
+        assertPropertiesEquals(metroCapital, true, "city", "population", "region", "isGlobal", "parliament", "country");
+        assertEquals("property(“region”).valueClass", CharSequence.class,
+                ((DefaultAttributeType) metroCapital.getProperty("region")).getValueClass());
+
+        // Check based only on name.
+        assertTrue ("maybeAssignableFrom", capital.maybeAssignableFrom(metroCapital));
+        assertFalse("maybeAssignableFrom", metroCapital.maybeAssignableFrom(capital));
+        assertTrue ("maybeAssignableFrom", metropolis.maybeAssignableFrom(metroCapital));
+        assertFalse("maybeAssignableFrom", metroCapital.maybeAssignableFrom(metropolis));
+
+        // Public API.
+        assertTrue ("isAssignableFrom", capital.isAssignableFrom(metroCapital));
+        assertFalse("isAssignableFrom", metroCapital.isAssignableFrom(capital));
+        assertTrue ("isAssignableFrom", metropolis.isAssignableFrom(metroCapital));
+        assertFalse("isAssignableFrom", metroCapital.isAssignableFrom(metropolis));
+    }
+
+    /**
+     * Tests inheritance with a property that override an other property with a more specific type.
+     */
+    @Test
+    @DependsOnMethod({"testMultiInheritance", "testNameCollision"})
+    public void testPropertyOverride() {
+        final DefaultFeatureType metropolis = metropolis();
+        try {
+            worldMetropolis(metropolis, Integer.class);
+            fail("Shall not be allowed to override a 'CharSequence' attribute with an 'Integer' one.");
+        } catch (IllegalArgumentException e) {
+            final String message = e.getMessage();
+            assertTrue(message, message.contains("region"));
+            assertTrue(message, message.contains("Metropolis"));
         }
+        final DefaultFeatureType worldMetropolis = worldMetropolis(metropolis, InternationalString.class);
+        assertUnmodifiable(worldMetropolis);
+        assertEquals     ("name", "World metropolis", worldMetropolis.getName().toString());
+        assertArrayEquals("superTypes", new Object[] {metropolis}, worldMetropolis.getSuperTypes().toArray());
+        assertFalse      ("isAbstract",      worldMetropolis.isAbstract());
+        assertTrue       ("isSimple",        worldMetropolis.isSimple());
+        assertEquals     ("instanceSize", 4, worldMetropolis.getInstanceSize());
+
+        assertPropertiesEquals(worldMetropolis, false, "region");
+        assertPropertiesEquals(worldMetropolis, true, "city", "population", "region", "isGlobal");
+        assertEquals("property(“region”).valueClass", InternationalString.class,
+                ((DefaultAttributeType) worldMetropolis.getProperty("region")).getValueClass());
+
+        // Check based only on name.
+        assertTrue ("maybeAssignableFrom", metropolis.maybeAssignableFrom(worldMetropolis));
+        assertFalse("maybeAssignableFrom", worldMetropolis.maybeAssignableFrom(metropolis));
+
+        // Public API.
+        assertTrue ("isAssignableFrom", metropolis.isAssignableFrom(worldMetropolis));
+        assertFalse("isAssignableFrom", worldMetropolis.isAssignableFrom(metropolis));
+    }
+
+    /**
+     * Tests {@link DefaultFeatureType#equals(Object)}.
+     */
+    @Test
+    @DependsOnMethod("testSimple")
+    public void testEquals() {
+        final DefaultFeatureType city = city();
+        assertTrue (city.equals(city()));
+        assertFalse(city.equals(capital()));
+    }
+
+    /**
+     * Tests serialization.
+     */
+    @Test
+    @DependsOnMethod({"testInheritance", "testEquals"})
+    public void testSerialization() {
+        assertPropertiesEquals(assertSerializedEquals(capital()), true, "city", "population", "parliament");
     }
 }

Copied: sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/feature/PropertySingletonTest.java (from r1595037, sis/branches/JDK7/core/sis-feature/src/test/java/org/apache/sis/feature/PropertySingletonTest.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/feature/PropertySingletonTest.java?p2=sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/feature/PropertySingletonTest.java&p1=sis/branches/JDK7/core/sis-feature/src/test/java/org/apache/sis/feature/PropertySingletonTest.java&r1=1595037&r2=1595039&rev=1595039&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-feature/src/test/java/org/apache/sis/feature/PropertySingletonTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/feature/PropertySingletonTest.java [UTF-8] Thu May 15 20:48:31 2014
@@ -52,9 +52,9 @@ public final strictfp class PropertySing
      * Creates a new test case.
      */
     public PropertySingletonTest() {
-        attribute = new DefaultAttribute<>(new DefaultAttributeType<>(
+        attribute = new DefaultAttribute<Integer>(new DefaultAttributeType<Integer>(
                 singletonMap(DefaultAttributeType.NAME_KEY, "test"), Integer.class, 0, 1, null));
-        singleton = new PropertySingleton<>(attribute);
+        singleton = new PropertySingleton<Integer>(attribute);
     }
 
     /**

Modified: sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/test/suite/FeatureTestSuite.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/test/suite/FeatureTestSuite.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/test/suite/FeatureTestSuite.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/test/suite/FeatureTestSuite.java [UTF-8] Thu May 15 20:48:31 2014
@@ -32,7 +32,12 @@ import org.junit.BeforeClass;
 @Suite.SuiteClasses({
     org.apache.sis.feature.DefaultAttributeTypeTest.class,
     org.apache.sis.feature.DefaultFeatureTypeTest.class,
-    org.apache.sis.feature.DefaultFeatureTest.class
+    org.apache.sis.feature.DefaultAttributeTest.class,
+    org.apache.sis.feature.PropertySingletonTest.class,
+    org.apache.sis.feature.DefaultFeatureTest.class,
+    org.apache.sis.feature.DefaultAssociationRoleTest.class,
+    org.apache.sis.feature.DefaultAssociationTest.class,
+    org.apache.sis.feature.DefaultOperationTest.class
 })
 public final strictfp class FeatureTestSuite extends TestSuite {
     /**

Modified: sis/branches/JDK6/core/sis-metadata/pom.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/pom.xml?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/pom.xml (original)
+++ sis/branches/JDK6/core/sis-metadata/pom.xml Thu May 15 20:48:31 2014
@@ -132,17 +132,9 @@ Implementations of metadata derived from
       <artifactId>sis-utility</artifactId>
       <version>${project.version}</version>
     </dependency>
-    <dependency>
-      <groupId>org.opengis</groupId>
-      <artifactId>geoapi-pending</artifactId>
-    </dependency>
 
     <!-- Test dependencies -->
     <dependency>
-      <groupId>org.opengis</groupId>
-      <artifactId>geoapi-conformance</artifactId>
-    </dependency>
-    <dependency>
       <groupId>org.apache.sis.core</groupId>
       <artifactId>sis-utility</artifactId>
       <version>${project.version}</version>

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java [UTF-8] Thu May 15 20:48:31 2014
@@ -120,8 +120,11 @@ public class MetadataStandard implements
 
     /**
      * An instance working on ISO 19119 standard as defined by GeoAPI interfaces
-     * in the {@link org.opengis.service} package and sub-packages.
+     * in the {@code org.opengis.service} package and sub-packages.
+     *
+     * @deprecated Merged with {@link #ISO_19115} as of ISO 19115:2014 revision.
      */
+    @Deprecated
     public static final MetadataStandard ISO_19119;
 
     /**

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/package-info.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/package-info.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/package-info.java [UTF-8] Thu May 15 20:48:31 2014
@@ -21,8 +21,7 @@
  * The remaining discussion on this page is specific to the SIS implementation.
  *
  * {@section Overview}
- * For a global overview of metadata in SIS, see the
- * <a href="{@docRoot}/../sis-metadata/index.html">Metadata page on the project web site</a>.
+ * For a global overview of metadata in SIS, see the {@link org.apache.sis.metadata} package javadoc.
  *
  * <table class="sis">
  * <caption>Package overview</caption>

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/package-info.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/package-info.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/package-info.java [UTF-8] Thu May 15 20:48:31 2014
@@ -21,8 +21,7 @@
  * The remaining discussion on this page is specific to the SIS implementation.
  *
  * {@section Overview}
- * For a global overview of metadata in SIS, see the
- * <a href="{@docRoot}/../sis-metadata/index.html">Metadata page on the project web site</a>.
+ * For a global overview of metadata in SIS, see the {@link org.apache.sis.metadata} package javadoc.
  *
  * <table class="sis">
  * <caption>Package overview</caption>

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/package-info.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/package-info.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/package-info.java [UTF-8] Thu May 15 20:48:31 2014
@@ -21,8 +21,7 @@
  * The remaining discussion on this page is specific to the SIS implementation.
  *
  * {@section Overview}
- * For a global overview of metadata in SIS, see the
- * <a href="{@docRoot}/../sis-metadata/index.html">Metadata page on the project web site</a>.
+ * For a global overview of metadata in SIS, see the {@link org.apache.sis.metadata} package javadoc.
  *
  * <table class="sis">
  * <caption>Package overview</caption>

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/package-info.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/package-info.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/package-info.java [UTF-8] Thu May 15 20:48:31 2014
@@ -21,8 +21,7 @@
  * The remaining discussion on this page is specific to the SIS implementation.
  *
  * {@section Overview}
- * For a global overview of metadata in SIS, see the
- * <a href="{@docRoot}/../sis-metadata/index.html">Metadata page on the project web site</a>.
+ * For a global overview of metadata in SIS, see the {@link org.apache.sis.metadata} package javadoc.
  *
  * <table class="sis">
  * <caption>Package overview</caption>

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java [UTF-8] Thu May 15 20:48:31 2014
@@ -21,8 +21,7 @@
  * The remaining discussion on this page is specific to the SIS implementation.
  *
  * {@section Overview}
- * For a global overview of metadata in SIS, see the
- * <a href="{@docRoot}/../sis-metadata/index.html">Metadata page on the project web site</a>.
+ * For a global overview of metadata in SIS, see the {@link org.apache.sis.metadata} package javadoc.
  *
  * <table class="sis">
  * <caption>Package overview</caption>

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/package-info.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/package-info.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/package-info.java [UTF-8] Thu May 15 20:48:31 2014
@@ -21,8 +21,7 @@
  * The remaining discussion on this page is specific to the SIS implementation.
  *
  * {@section Overview}
- * For a global overview of metadata in SIS, see the
- * <a href="{@docRoot}/../sis-metadata/index.html">Metadata page on the project web site</a>.
+ * For a global overview of metadata in SIS, see the {@link org.apache.sis.metadata} package javadoc.
  *
  * <table class="sis">
  * <caption>Package overview</caption>

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java [UTF-8] Thu May 15 20:48:31 2014
@@ -21,8 +21,7 @@
  * The remaining discussion on this page is specific to the SIS implementation.
  *
  * {@section Overview}
- * For a global overview of metadata in SIS, see the
- * <a href="{@docRoot}/../sis-metadata/index.html">Metadata page on the project web site</a>.
+ * For a global overview of metadata in SIS, see the {@link org.apache.sis.metadata} package javadoc.
  *
  * <table class="sis">
  * <caption>Package overview</caption>

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/package-info.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/package-info.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/package-info.java [UTF-8] Thu May 15 20:48:31 2014
@@ -21,8 +21,7 @@
  * The remaining discussion on this page is specific to the SIS implementation.
  *
  * {@section Overview}
- * For a global overview of metadata in SIS, see the
- * <a href="{@docRoot}/../sis-metadata/index.html">Metadata page on the project web site</a>.
+ * For a global overview of metadata in SIS, see the {@link org.apache.sis.metadata} package javadoc.
  *
  * <table class="sis">
  * <caption>Package overview</caption>

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/package-info.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/package-info.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/package-info.java [UTF-8] Thu May 15 20:48:31 2014
@@ -21,8 +21,7 @@
  * The remaining discussion on this page is specific to the SIS implementation.
  *
  * {@section Overview}
- * For a global overview of metadata in SIS, see the
- * <a href="{@docRoot}/../sis-metadata/index.html">Metadata page on the project web site</a>.
+ * For a global overview of metadata in SIS, see the {@link org.apache.sis.metadata} package javadoc.
  *
  * <table class="sis">
  * <caption>Package overview</caption>

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java [UTF-8] Thu May 15 20:48:31 2014
@@ -21,8 +21,7 @@
  * The remaining discussion on this page is specific to the SIS implementation.
  *
  * {@section Overview}
- * For a global overview of metadata in SIS, see the
- * <a href="{@docRoot}/../sis-metadata/index.html">Metadata page on the project web site</a>.
+ * For a global overview of metadata in SIS, see the {@link org.apache.sis.metadata} package javadoc.
  * For some explanation about how to use various ISO 19115 elements for scientific dataset, the
  * <a href="https://geo-ide.noaa.gov/wiki/index.php?title=Category:ISO_19115">NOAA wiki page</a>
  * is a good source of information.

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/package-info.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/package-info.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/package-info.java [UTF-8] Thu May 15 20:48:31 2014
@@ -21,8 +21,7 @@
  * The remaining discussion on this page is specific to the SIS implementation.
  *
  * {@section Overview}
- * For a global overview of metadata in SIS, see the
- * <a href="{@docRoot}/../sis-metadata/index.html">Metadata page on the project web site</a>.
+ * For a global overview of metadata in SIS, see the {@link org.apache.sis.metadata} package javadoc.
  *
  * <table class="sis">
  * <caption>Package overview</caption>

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/package-info.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/package-info.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/package-info.java [UTF-8] Thu May 15 20:48:31 2014
@@ -21,8 +21,7 @@
  * The remaining discussion on this page is specific to the SIS implementation.
  *
  * {@section Overview}
- * For a global overview of metadata in SIS, see the
- * <a href="{@docRoot}/../sis-metadata/index.html">Metadata page on the project web site</a>.
+ * For a global overview of metadata in SIS, see the {@link org.apache.sis.metadata} package javadoc.
  *
  * <table class="sis">
  * <caption>Package overview</caption>

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/package-info.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/package-info.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/package-info.java [UTF-8] Thu May 15 20:48:31 2014
@@ -16,8 +16,7 @@
  */
 
 /**
- * Root package for various metadata implementations. For a global overview of metadata in SIS,
- * see the <a href="{@docRoot}/../sis-metadata/index.html">Metadata page on the project web site</a>.
+ * Root package for various metadata implementations.
  *
  * {@section Foreword}
  * Many metadata standards exist, including <cite>Dublin core</cite>, <cite>ISO 19115</cite> and the Image I/O
@@ -30,8 +29,8 @@
  * For example the ISO 19115 standard is defined by the <a href="http://www.geoapi.org">GeoAPI</a> interfaces
  * defined in the {@link org.opengis.metadata} package and sub-packages. That standard is identified in SIS by the
  * {@link org.apache.sis.metadata.MetadataStandard#ISO_19115} constant. Other standards are defined as well,
- * for example the {@link org.apache.sis.metadata.MetadataStandard#ISO_19119} constant stands for the standards
- * defined by the interfaces in the {@link org.opengis.service} package and sub-packages.
+ * for example the {@link org.apache.sis.metadata.MetadataStandard#ISO_19123} constant stands for the standards
+ * defined by the interfaces in the {@link org.opengis.coverage} package and sub-packages.
  *
  * <p>For each interface, the collection of declared getter methods defines its <cite>properties</cite>
  * (or <cite>attributes</cite>). If a {@link org.opengis.annotation.UML} annotation is attached to the getter method,

Modified: sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultMetadataTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultMetadataTest.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultMetadataTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultMetadataTest.java [UTF-8] Thu May 15 20:48:31 2014
@@ -32,7 +32,11 @@ import static org.apache.sis.test.Assert
 /**
  * Tests XML (un)marshalling of various metadata objects.
  * For every metadata objects tested by this class, the expected XML representation
- * is provided by {@code *.xml} files <a href="{@scmUrl metadata}/">here</a>.
+ * is provided by {@code *.xml} files in the following directory:
+ *
+ * <ul>
+ *   <li>{@code "core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso"}</li>
+ * </ul>
  *
  * @author  Cédric Briançon (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)

Modified: sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/DefaultExtentTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/DefaultExtentTest.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/DefaultExtentTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/DefaultExtentTest.java [UTF-8] Thu May 15 20:48:31 2014
@@ -41,7 +41,11 @@ import static org.apache.sis.test.TestUt
 public final strictfp class DefaultExtentTest extends XMLTestCase {
     /**
      * Returns the URL to the XML file of the given name.
-     * The argument shall be one of the files listed <a href="{@scmUrl metadata}/extent/">here</a>.
+     * The argument shall be one of the files listed in the following directory:
+     *
+     * <ul>
+     *   <li>{@code "core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/extent"}</li>
+     * </ul>
      *
      * @param  filename The name of the XML file.
      * @return The URL to the given XML file.
@@ -57,7 +61,7 @@ public final strictfp class DefaultExten
      * This test opportunistically tests setting {@code "gml:id"} value.
      *
      * <p><b>XML test file:</b>
-     * <a href="{@scmUrl metadata}/extent/Extent.xml">Extent.xml</a></p>
+     * {@code "core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/extent/Extent.xml"}</p>
      *
      * @throws IOException   If an error occurred while reading the XML file.
      * @throws JAXBException If an error occurred during the during marshalling / unmarshalling processes.

Modified: sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/lineage/DefaultProcessStepTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/lineage/DefaultProcessStepTest.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/lineage/DefaultProcessStepTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/lineage/DefaultProcessStepTest.java [UTF-8] Thu May 15 20:48:31 2014
@@ -43,7 +43,7 @@ public final strictfp class DefaultProce
      * Tests the (un)marshalling of a metadata mixing elements from ISO 19115 and ISO 19115-2 standards.
      *
      * <p><b>XML test file:</b>
-     * <a href="{@scmUrl metadata}/lineage/ProcessStep.xml">ProcessStep.xml</a></p>
+     * {@code "core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/lineage/ProcessStep.xml"}</p>
      *
      * @throws JAXBException If an error occurred during the during marshalling / unmarshalling processes.
      */

Modified: sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/quality/AbstractPositionalAccuracyTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/quality/AbstractPositionalAccuracyTest.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/quality/AbstractPositionalAccuracyTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/quality/AbstractPositionalAccuracyTest.java [UTF-8] Thu May 15 20:48:31 2014
@@ -50,7 +50,7 @@ public final strictfp class AbstractPosi
      * elaborated.
      *
      * <p><b>XML test file:</b>
-     * <a href="{@scmUrl metadata}/quality/PositionalAccuracy.xml">PositionalAccuracy.xml</a></p>
+     * {@code "core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/quality/PositionalAccuracy.xml"}</p>
      *
      * @throws JAXBException If an error occurred during the during marshalling / unmarshalling processes.
      *

Modified: sis/branches/JDK6/core/sis-referencing/pom.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/pom.xml?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/pom.xml (original)
+++ sis/branches/JDK6/core/sis-referencing/pom.xml Thu May 15 20:48:31 2014
@@ -107,17 +107,9 @@ Implementations of Coordinate Reference 
       <artifactId>sis-metadata</artifactId>
       <version>${project.version}</version>
     </dependency>
-    <dependency>
-      <groupId>org.opengis</groupId>
-      <artifactId>geoapi-pending</artifactId>
-    </dependency>
 
     <!-- Test dependencies -->
     <dependency>
-      <groupId>org.opengis</groupId>
-      <artifactId>geoapi-conformance</artifactId>
-    </dependency>
-    <dependency>
       <groupId>gov.nist.math</groupId>
       <artifactId>jama</artifactId>
       <scope>test</scope>

Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelopes.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelopes.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelopes.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelopes.java [UTF-8] Thu May 15 20:48:31 2014
@@ -155,7 +155,7 @@ public final class Envelopes extends Sta
         }
         final StringBuilder buffer = new StringBuilder("POLYGON(");
         String separator = "(";
-        for (int corner=0; corner<CORNERS.length; corner+=2) {
+        for (int corner = 0; corner < CORNERS.length; corner += 2) {
             for (int i=0; i<dimension; i++) {
                 final double value;
                 switch (i) {

Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java [UTF-8] Thu May 15 20:48:31 2014
@@ -780,7 +780,7 @@ public enum CommonCRS {
      *   <caption>Geodetic objects accessible by enumeration constants</caption>
      *   <tr><th>Name or alias</th>             <th>Object type</th> <th>Enumeration value</th></tr>
      *   <tr><td>Barometric altitude</td>       <td>CRS, Datum</td>  <td>{@link #BAROMETRIC}</td></tr>
-     *   <tr><td><s>Ellipsoidal height</s></td> <td>CRS, Datum</td>  <td><s>{@link #ELLIPSOIDAL}</s></td></tr>
+     *   <!-- <s>Ellipsoidal height</s> intentionally omitted        <td><s>{@link #ELLIPSOIDAL}</s></td> -->
      *   <tr><td>Mean Sea Level</td>            <td>Datum</td>       <td>{@link #MEAN_SEA_LEVEL}</td></tr>
      *   <tr><td>Mean Sea Level depth</td>      <td>CRS</td>         <td>{@link #DEPTH}</td></tr>
      *   <tr><td>Mean Sea Level height</td>     <td>CRS</td>         <td>{@link #MEAN_SEA_LEVEL}</td></tr>
@@ -925,7 +925,7 @@ public enum CommonCRS {
          *   <caption>Commonly used vertical CRS</caption>
          *   <tr><th>Name or alias</th>             <th>Enum</th>                        <th>EPSG</th></tr>
          *   <tr><td>Barometric altitude</td>       <td>{@link #BAROMETRIC}</td>         <td></td></tr>
-         *   <tr><td><s>Ellipsoidal height</s></td> <td><s>{@link #ELLIPSOIDAL}</s></td> <td></td></tr>
+         *   <!-- <s>Ellipsoidal height</s> intentionally omitted -->
          *   <tr><td>Mean Sea Level depth</td>      <td>{@link #DEPTH}</td>              <td>5715</td></tr>
          *   <tr><td>Mean Sea Level height</td>     <td>{@link #MEAN_SEA_LEVEL}</td>     <td>5714</td></tr>
          *   <tr><td>Other surface</td>             <td>{@link #OTHER_SURFACE}</td>      <td></td></tr>
@@ -991,7 +991,7 @@ public enum CommonCRS {
          *   <caption>Commonly used vertical datum</caption>
          *   <tr><th>Name or alias</th>             <th>Enum</th>                        <th>EPSG</th></tr>
          *   <tr><td>Barometric altitude</td>       <td>{@link #BAROMETRIC}</td>         <td></td></tr>
-         *   <tr><td><s>Ellipsoidal height</s></td> <td><s>{@link #ELLIPSOIDAL}</s></td> <td></td></tr>
+         *   <!-- <s>Ellipsoidal height</s> intentionally omitted -->
          *   <tr><td>Mean Sea Level</td>            <td>{@link #MEAN_SEA_LEVEL}</td>     <td>5100</td></tr>
          *   <tr><td>Other surface</td>             <td>{@link #OTHER_SURFACE}</td>      <td></td></tr>
          * </table></blockquote>

Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java [UTF-8] Thu May 15 20:48:31 2014
@@ -79,54 +79,8 @@ import org.apache.sis.internal.jdk7.Obje
  *           to (<var>X</var><sub>t</sub>, <var>Y</var><sub>t</sub>, <var>Z</var><sub>t</sub>)</center>
  * <center style="font-size: small">(ignoring unit conversions)</center>
  *
- * <p><math display="block" alttext="MathML capable browser required">
- *   <mfenced open="[" close="]">
- *     <mtable>
- *       <mtr><mtd><msub><mi>X</mi><mi>t</mi></msub></mtd></mtr>
- *       <mtr><mtd><msub><mi>Y</mi><mi>t</mi></msub></mtd></mtr>
- *       <mtr><mtd><msub><mi>Z</mi><mi>t</mi></msub></mtd></mtr>
- *     </mtable>
- *   </mfenced>
- *   <mo>=</mo>
- *   <mo>(</mo><mn>1</mn><mo>+</mo><mi>dS</mi><mo>)</mo>
- *   <mo>⋅</mo>
- *   <mfenced open="[" close="]">
- *     <mtable>
- *       <mtr>
- *         <mtd><mn>1</mn></mtd>
- *         <mtd><mo>-</mo><msub><mi>r</mi><mi>z</mi></msub></mtd>
- *         <mtd><mo>+</mo><msub><mi>r</mi><mi>y</mi></msub></mtd>
- *       </mtr>
- *       <mtr>
- *         <mtd><mo>+</mo><msub><mi>r</mi><mi>z</mi></msub></mtd>
- *         <mtd><mn>1</mn></mtd>
- *         <mtd><mo>-</mo><msub><mi>r</mi><mi>x</mi></msub></mtd>
- *       </mtr>
- *       <mtr>
- *         <mtd><mo>-</mo><msub><mi>r</mi><mi>y</mi></msub></mtd>
- *         <mtd><mo>+</mo><msub><mi>r</mi><mi>x</mi></msub></mtd>
- *         <mtd><mn>1</mn></mtd>
- *       </mtr>
- *     </mtable>
- *   </mfenced>
- *   <mo>×</mo>
- *   <mfenced open="[" close="]">
- *     <mtable>
- *       <mtr><mtd><msub><mi>X</mi><mi>s</mi></msub></mtd></mtr>
- *       <mtr><mtd><msub><mi>Y</mi><mi>s</mi></msub></mtd></mtr>
- *       <mtr><mtd><msub><mi>Z</mi><mi>s</mi></msub></mtd></mtr>
- *     </mtable>
- *   </mfenced>
- *   <mo>+</mo>
- *   <mfenced open="[" close="]">
- *     <mtable>
- *       <mtr><mtd><msub><mi>t</mi><mi>x</mi></msub></mtd></mtr>
- *       <mtr><mtd><msub><mi>t</mi><mi>y</mi></msub></mtd></mtr>
- *       <mtr><mtd><msub><mi>t</mi><mi>z</mi></msub></mtd></mtr>
- *     </mtable>
- *   </mfenced>
- * </math></p>
- * </tr></td></table>
+ * <p>{@include formulas.html#Bursa-Wolf}</p>
+ * </td></tr></table>
  *
  * The numerical fields in this {@code BursaWolfParameters} class use the EPSG abbreviations
  * with 4 additional constraints compared to the EPSG definitions:

Modified: sis/branches/JDK6/core/sis-utility/pom.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/pom.xml?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/pom.xml (original)
+++ sis/branches/JDK6/core/sis-utility/pom.xml Thu May 15 20:48:31 2014
@@ -166,17 +166,6 @@ Miscellaneous utilities.
            Dependencies
        =========================================================== -->
   <dependencies>
-    <dependency>
-      <groupId>org.opengis</groupId>
-      <artifactId>geoapi-pending</artifactId>
-    </dependency>
-
-    <!-- Test dependencies -->
-    <dependency>
-      <groupId>org.opengis</groupId>
-      <artifactId>geoapi-conformance</artifactId>
-    </dependency>
-
     <!-- Optional dependencies (provided scope) -->
     <dependency>
       <groupId>org.osgi</groupId>

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/util/CheckedArrayList.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/util/CheckedArrayList.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/util/CheckedArrayList.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/util/CheckedArrayList.java [UTF-8] Thu May 15 20:48:31 2014
@@ -43,11 +43,14 @@ import static org.apache.sis.util.Argume
  *   <li>Does not accept null elements.</li>
  * </ul>
  *
+ * The checks are performed only on a <cite>best effort</cite> basis. In current implementation,
+ * holes are known to exist in use cases like {@code sublist(…).set(…)} or when using the list iterator.
+ *
  * @param <E> The type of elements in the list.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from geotk-2.1)
- * @version 0.4
+ * @version 0.5
  * @module
  *
  * @see Collections#checkedList(List, Class)
@@ -145,9 +148,10 @@ public final class CheckedArrayList<E> e
      *
      * @param  element the object to check, or {@code null}.
      * @return {@code true} if the instance is valid, {@code false} if it shall be ignored.
-     * @throws IllegalArgumentException if the specified element can not be added to this list.
+     * @throws NullPointerException if the given element is {@code null}.
+     * @throws ClassCastException if the given element is not of the expected type.
      */
-    private boolean ensureValid(final E element) throws IllegalArgumentException {
+    private boolean ensureValid(final E element) {
         if (type.isInstance(element)) {
             return true;
         }
@@ -163,7 +167,7 @@ public final class CheckedArrayList<E> e
         if (element == null) {
             throw new NullArgumentException(message);
         } else {
-            throw new IllegalArgumentException(message);
+            throw new ClassCastException(message);
         }
     }
 
@@ -172,10 +176,11 @@ public final class CheckedArrayList<E> e
      *
      * @param  collection the collection to check, or {@code null}.
      * @return The potentially filtered collection of elements to add.
-     * @throws IllegalArgumentException if at least one element can not be added to this list.
+     * @throws NullPointerException if an element is {@code null}.
+     * @throws ClassCastException if an element is not of the expected type.
      */
     @SuppressWarnings("unchecked")
-    private List<E> ensureValidCollection(final Collection<? extends E> collection) throws IllegalArgumentException {
+    private List<E> ensureValidCollection(final Collection<? extends E> collection) {
         int count = 0;
         final Object[] array = collection.toArray();
         for (final Object element : array) {
@@ -189,11 +194,13 @@ public final class CheckedArrayList<E> e
     }
 
     /**
-     * A wrapper around the given array for use by {@link #addAll(Collection)} only.  This wrapper violates
-     * some {@link List} method contracts, so it must really be used only as a temporary object for passing
-     * the array to {@code AbstractList.addAll(…)} implementation. In particular {@link #toArray()} returns
-     * directly the internal array, because this is the method to be invoked by {@code addAll(…)}  (this is
-     * actually the only important method for this wrapper).
+     * A wrapper around the given array for use by {@link CheckedArrayList#addAll(Collection)} only.
+     * This wrapper violates some {@link List} method contracts, so it shall really be used only as
+     * a temporary object for passing array to {@code ArrayList.addAll(…)} methods.
+     * In particular {@link #toArray()} returns directly the internal array, because this is the method to be
+     * invoked by {@code ArrayList.addAll(…)} (this is actually the only important method in this wrapper).
+     *
+     * @param <E> The type or list elements.
      */
     private static final class Mediator<E> extends AbstractList<E> {
         private final E[] array;
@@ -210,10 +217,11 @@ public final class CheckedArrayList<E> e
      * @param  element element to be stored at the specified position.
      * @return the element previously at the specified position.
      * @throws IndexOutOfBoundsException if index out of range.
-     * @throws IllegalArgumentException if the specified element is not of the expected type.
+     * @throws NullPointerException if the given element is {@code null}.
+     * @throws ClassCastException if the given element is not of the expected type.
      */
     @Override
-    public E set(final int index, final E element) throws IllegalArgumentException {
+    public E set(final int index, final E element) {
         if (ensureValid(element)) {
             return super.set(index, element);
         }
@@ -225,10 +233,11 @@ public final class CheckedArrayList<E> e
      *
      * @param  element element to be appended to this list.
      * @return always {@code true}.
-     * @throws IllegalArgumentException if the specified element is not of the expected type.
+     * @throws NullPointerException if the given element is {@code null}.
+     * @throws ClassCastException if the given element is not of the expected type.
      */
     @Override
-    public boolean add(final E element) throws IllegalArgumentException {
+    public boolean add(final E element) {
         if (ensureValid(element)) {
             return super.add(element);
         }
@@ -241,10 +250,11 @@ public final class CheckedArrayList<E> e
      * @param  index index at which the specified element is to be inserted.
      * @param  element element to be inserted.
      * @throws IndexOutOfBoundsException if index out of range.
-     * @throws IllegalArgumentException if the specified element is not of the expected type.
+     * @throws NullPointerException if the given element is {@code null}.
+     * @throws ClassCastException if the given element is not of the expected type.
      */
     @Override
-    public void add(final int index, final E element) throws IllegalArgumentException {
+    public void add(final int index, final E element) {
         if (ensureValid(element)) {
             super.add(index, element);
         }
@@ -256,10 +266,11 @@ public final class CheckedArrayList<E> e
      *
      * @param  collection the elements to be inserted into this list.
      * @return {@code true} if this list changed as a result of the call.
-     * @throws IllegalArgumentException if at least one element is not of the expected type.
+     * @throws NullPointerException if an element is {@code null}.
+     * @throws ClassCastException if an element is not of the expected type.
      */
     @Override
-    public boolean addAll(final Collection<? extends E> collection) throws IllegalArgumentException {
+    public boolean addAll(final Collection<? extends E> collection) {
         return super.addAll(ensureValidCollection(collection));
     }
 
@@ -270,10 +281,26 @@ public final class CheckedArrayList<E> e
      * @param  index index at which to insert first element fromm the specified collection.
      * @param  collection elements to be inserted into this list.
      * @return {@code true} if this list changed as a result of the call.
-     * @throws IllegalArgumentException if at least one element is not of the expected type.
+     * @throws NullPointerException if an element is {@code null}.
+     * @throws ClassCastException if an element is not of the expected type.
      */
     @Override
-    public boolean addAll(final int index, final Collection<? extends E> collection) throws IllegalArgumentException {
+    public boolean addAll(final int index, final Collection<? extends E> collection) {
         return super.addAll(index, ensureValidCollection(collection));
     }
+
+    /**
+     * Returns a checked sublist.
+     *
+     * <p><b>Limitation:</b> current implementation checks only the type.
+     * It does not prevent the insertion of {@code null} values.</p>
+     *
+     * @param  fromIndex Index of the first element.
+     * @param  toIndex   Index after the last element.
+     * @return The sublist in the given index range.
+     */
+    @Override
+    public List<E> subList(final int fromIndex, final int toIndex) {
+        return Collections.checkedList(super.subList(fromIndex, toIndex), type);
+    }
 }

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java [UTF-8] Thu May 15 20:48:31 2014
@@ -77,6 +77,17 @@ public final class Units extends Static 
     public static final Unit<Dimensionless> PPM = Unit.ONE.times(1E-6);//.alternate("ppm");
 
     /**
+     * Salinity measured using PSS-78. While this is a dimensionless measurement, the {@code "psu"} symbol
+     * is sometime added to PSS-78 measurement. However this is officially discouraged.
+     */
+    static final Unit<Dimensionless> PSU = Unit.ONE.alternate("psu");
+
+    /**
+     * Sigma-level, used in oceanography. This is a way to measure a depth as a fraction of the sea floor depth.
+     */
+    static final Unit<Dimensionless> SIGMA = Unit.ONE.alternate("sigma");
+
+    /**
      * Returns {@code true} if the given unit is a linear unit.
      * Linear units are convertible to {@link NonSI#DEGREE_ANGLE}.
      *
@@ -395,12 +406,10 @@ public final class Units extends Static 
             if (equalsIgnorePlural(uom, "second")) return SI   .SECOND;
             if (equalsIgnorePlural(uom, "pixel"))  return NonSI.PIXEL;
             if (isCelsius(uom))                    return SI.CELSIUS;
-            if (uom.isEmpty() ||
-                uom.equalsIgnoreCase("psu") ||   // Pratical Salinity Scale (oceanography)
-                uom.equalsIgnoreCase("level"))   // Sigma level (oceanography)
-            {
-                return Unit.ONE;
-            }
+            if (uom.isEmpty())                     return Unit.ONE;
+            if (uom.equalsIgnoreCase("ppm"))       return PPM;
+            if (uom.equalsIgnoreCase("psu"))       return PSU;
+            if (uom.equalsIgnoreCase("sigma"))     return SIGMA;
         }
         final Unit<?> unit;
         try {
@@ -409,6 +418,13 @@ public final class Units extends Static 
             // Provides a better error message than the default JSR-275 0.9.4 implementation.
             throw Exceptions.setMessage(e, Errors.format(Errors.Keys.IllegalArgumentValue_2, "uom", uom), true);
         }
+        /*
+         * Special case: JSR-275 version 0.6.1 parses "1/s" and "s-1" as "Baud", which is not what
+         * we use in geoscience. Replace "Baud" by "Hertz" if the symbol was not explicitely "Bd".
+         */
+        if (unit.isCompatible(SI.HERTZ) && !uom.equals("Bd")) {
+            return SI.HERTZ;
+        }
         return UnitsMap.canonicalize(unit);
     }
 
@@ -559,7 +575,7 @@ public final class Units extends Static 
      */
     public static Integer getEpsgCode(final Unit<?> unit, final boolean inAxis) {
         Integer code = UnitsMap.EPSG_CODES.get(unit);
-        if (inAxis && code != null && code.intValue() == 9102) {
+        if (inAxis && code != null && code == 9102) {
             code = UnitsMap.I9122;
         }
         return code;

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/measure/UnitsMap.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/measure/UnitsMap.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/measure/UnitsMap.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/measure/UnitsMap.java [UTF-8] Thu May 15 20:48:31 2014
@@ -71,7 +71,7 @@ final class UnitsMap extends Static {
      */
     private static final Map<Unit<?>,Unit<?>> COMMONS = new HashMap<Unit<?>,Unit<?>>(48);
     static {
-        COMMONS.put(PPM, PPM);
+        COMMONS.put(MILLISECOND, MILLISECOND);
         boolean nonSI = false;
         do for (final Field field : (nonSI ? NonSI.class : SI.class).getFields()) {
             final int modifiers = field.getModifiers();

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/collection/DerivedIterator.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/collection/DerivedIterator.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/collection/DerivedIterator.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/collection/DerivedIterator.java [UTF-8] Thu May 15 20:48:31 2014
@@ -88,8 +88,7 @@ final class DerivedIterator<S,E> impleme
     /**
      * Removes from the underlying set the last element returned by the iterator.
      *
-     * @throws UnsupportedOperationException if the underlying collection doesn't supports the
-     * {@code remove} operation.
+     * @throws UnsupportedOperationException if the underlying collection doesn't supports the {@code remove} operation.
      */
     @Override
     public void remove() {

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/collection/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/collection/package-info.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/collection/package-info.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/collection/package-info.java [UTF-8] Thu May 15 20:48:31 2014
@@ -45,10 +45,8 @@
  *     of content, providing more efficient storage than what we would get with the general-purpose
  *     collection implementations.
  *   </li><li>
- *     {@link org.apache.sis.util.collection.DisjointSet},
- *     {@link org.apache.sis.util.collection.KeySortedList} and
  *     {@link org.apache.sis.util.collection.FrequencySortedSet} provides specialized ways to
- *     organize their elements.
+ *     organize its elements.
  *   </li>
  * </ul>
  *

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java?rev=1595039&r1=1595038&r2=1595039&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java [UTF-8] Thu May 15 20:48:31 2014
@@ -225,6 +225,11 @@ public final class Errors extends Indexe
         public static final short ForbiddenAttribute_2 = 26;
 
         /**
+         * Property “{0}” is not allowed.
+         */
+        public static final short ForbiddenProperty_1 = 155;
+
+        /**
          * Identifier “{0}” is already associated to another object.
          */
         public static final short IdentifierAlreadyBound_1 = 27;
@@ -423,6 +428,11 @@ public final class Errors extends Indexe
         public static final short MismatchedParameterDescriptor_1 = 146;
 
         /**
+         * Mismatched type for “{0}” property.
+         */
+        public static final short MismatchedPropertyType_1 = 154;
+
+        /**
          * No authority was specified for code “{0}”. The expected syntax is “AUTHORITY:CODE”.
          */
         public static final short MissingAuthority_1 = 135;
@@ -628,6 +638,11 @@ public final class Errors extends Indexe
         public static final short ParameterNotFound_2 = 147;
 
         /**
+         * Property “{1}” is already exists in “{0}”.
+         */
+        public static final short PropertyAlreadyExists_2 = 156;
+
+        /**
          * No property named “{1}” has been found in “{0}”.
          */
         public static final short PropertyNotFound_2 = 71;



Mime
View raw message