sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1480602 [5/15] - in /sis/branches/Android: ./ ide-project/ ide-project/NetBeans/ ide-project/NetBeans/nbproject/ ide-project/eclipse/ sis-app/src/main/java/org/apache/sis/cli/ sis-build-helper/ sis-build-helper/src/main/java/org/apache/sis...
Date Thu, 09 May 2013 12:24:20 GMT
Modified: sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/AbstractEnvelopeTest.java
URL: http://svn.apache.org/viewvc/sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/AbstractEnvelopeTest.java?rev=1480602&r1=1480601&r2=1480602&view=diff
==============================================================================
--- sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/AbstractEnvelopeTest.java [iso-8859-1] (original)
+++ sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/AbstractEnvelopeTest.java [UTF-8] Thu May  9 12:24:13 2013
@@ -50,7 +50,7 @@ public final strictfp class AbstractEnve
      * Enumeration of implementations to be tested.
      * The {@code LAST} constant is for stopping the loops.
      */
-    private static final int GENERAL=0, IMMUTABLE=1, RECTANGLE=2, LAST=3;
+    private static final int GENERAL=0, IMMUTABLE=1, RECTANGLE=2, SUBENVELOPE=3, LAST=4;
 
     /**
      * The coordinate reference system used for the tests.
@@ -82,7 +82,18 @@ public final strictfp class AbstractEnve
                 break;
             }
             case RECTANGLE: {
-                envelope = new Envelope2D(xmin, ymin, xmax - xmin, ymax - ymin, WGS84);
+                envelope = new Envelope2D(WGS84, xmin, ymin, xmax - xmin, ymax - ymin);
+                break;
+            }
+            case SUBENVELOPE: {
+                final GeneralEnvelope ge = new GeneralEnvelope(5);
+                ge.setCoordinateReferenceSystem(WGS84);
+                ge.setRange(1, xmin, xmax);
+                ge.setRange(2, ymin, ymax);
+                ge.setRange(0, 2, 3); // Following values will be verified in verifyInvariants(…)
+                ge.setRange(3, 4, 6);
+                ge.setRange(4, 8, 9);
+                envelope = ge.subEnvelope(1, 3);
                 break;
             }
             default: throw new IllegalArgumentException(String.valueOf(type));
@@ -94,13 +105,33 @@ public final strictfp class AbstractEnve
     }
 
     /**
+     * Verifies some invariants for the given envelope of the given type.
+     */
+    private static void verifyInvariants(final int type, final Envelope envelope) {
+        assertSame(WGS84, envelope.getCoordinateReferenceSystem());
+        switch (type) {
+            case SUBENVELOPE: {
+                // Asserts that other dimensions in the original envelope has not been modified.
+                final double[] ordinates = ((SubEnvelope) envelope).ordinates;
+                assertEquals(2, ordinates[0], STRICT);
+                assertEquals(3, ordinates[5], STRICT);
+                assertEquals(4, ordinates[3], STRICT);
+                assertEquals(6, ordinates[8], STRICT);
+                assertEquals(8, ordinates[4], STRICT);
+                assertEquals(9, ordinates[9], STRICT);
+                break;
+            }
+        }
+    }
+
+    /**
      * Tests the simple case (no anti-meridian crossing).
      *
      * {@preformat text
-     *     ┌─────────────┐
-     *     │  ┌───────┐  │
-     *     │  └───────┘  │
-     *     └─────────────┘
+     *     ┌─────────────┐
+     *     │  ┌───────┐  │
+     *     │  └───────┘  │
+     *     └─────────────┘
      * }
      */
     @Test
@@ -121,24 +152,29 @@ public final strictfp class AbstractEnve
             assertEquals(label, 12, envelope.getMaximum(0), STRICT);
             assertEquals(label,  4, envelope.getMedian (0), STRICT);
             assertEquals(label, 16, envelope.getSpan   (0), STRICT);
-            if (envelope instanceof AbstractEnvelope) {
-                final AbstractEnvelope ext = (AbstractEnvelope) envelope;
-                assertTrue (label, ext.contains  (inside));
-                assertFalse(label, ext.contains  (outside));
-                assertFalse(label, ext.contains  (intersect, false));
-                assertTrue (label, ext.intersects(intersect, false));
-                assertDisjoint(ext, disjoint);
-                assertContains(ext, contained);
-            }
-            if (envelope instanceof Rectangle2D) {
-                final Rectangle2D ext = (Rectangle2D) envelope;
-                assertTrue (label, ext.contains  (inside));
-                assertFalse(label, ext.contains  (outside));
-                assertFalse(label, ext.contains  (intersect));
-                assertTrue (label, ext.intersects(intersect));
-                assertDisjoint(ext, disjoint);
-                assertContains(ext, contained);
+            switch (type) {
+                default: {
+                    final AbstractEnvelope ext = (AbstractEnvelope) envelope;
+                    assertTrue (label, ext.contains  (inside));
+                    assertFalse(label, ext.contains  (outside));
+                    assertFalse(label, ext.contains  (intersect, false));
+                    assertTrue (label, ext.intersects(intersect, false));
+                    assertDisjoint(ext, disjoint);
+                    assertContains(ext, contained);
+                    break;
+                }
+                case RECTANGLE: {
+                    final Rectangle2D ext = (Rectangle2D) envelope;
+                    assertTrue (label, ext.contains  (inside));
+                    assertFalse(label, ext.contains  (outside));
+                    assertFalse(label, ext.contains  (intersect));
+                    assertTrue (label, ext.intersects(intersect));
+                    assertDisjoint(ext, disjoint);
+                    assertContains(ext, contained);
+                    break;
+                }
             }
+            verifyInvariants(type, envelope);
         }
     }
 
@@ -146,10 +182,10 @@ public final strictfp class AbstractEnve
      * Tests a case crossing the anti-meridian.
      *
      * {@preformat text
-     *      ─────┐  ┌─────────              ─────┐      ┌─────
-     *           │  │  ┌────┐       or      ──┐  │      │  ┌──
-     *           │  │  └────┘               ──┘  │      │  └──
-     *      ─────┘  └─────────              ─────┘      └─────
+     *      ─────┐  ┌─────────              ─────┐      ┌─────
+     *           │  │  ┌────┐       or      ──┐  │      │  ┌──
+     *           │  │  └────┘               ──┘  │      │  └──
+     *      ─────┘  └─────────              ─────┘      └─────
      * }
      */
     @Test
@@ -175,27 +211,32 @@ public final strictfp class AbstractEnve
             assertEquals(label,   -4, upper   .getOrdinate(0), STRICT);
             assertEquals(label, +180, envelope.getMaximum (0), STRICT);
             assertEquals(label, -176, envelope.getMedian  (0), STRICT);
-            assertEquals(label,  344, envelope.getSpan    (0), STRICT); // 360° - testSimpleEnvelope()
-            if (envelope instanceof AbstractEnvelope) {
-                final AbstractEnvelope ext = (AbstractEnvelope) envelope;
-                assertTrue (label, ext.contains  (inside));
-                assertFalse(label, ext.contains  (outside));
-                assertFalse(label, ext.contains  (intersect, false));
-                assertTrue (label, ext.intersects(intersect, false));
-                assertDisjoint(ext, disjoint);
-                assertContains(ext, contained);
-                assertContains(ext, spanning);
-            }
-            if (envelope instanceof Rectangle2D) {
-                final Rectangle2D ext = (Rectangle2D) envelope;
-                assertTrue (label, ext.contains  (inside));
-                assertFalse(label, ext.contains  (outside));
-                assertFalse(label, ext.contains  (intersect));
-                assertTrue (label, ext.intersects(intersect));
-                assertDisjoint(ext, disjoint);
-                assertContains(ext, contained);
-                assertContains(ext, spanning);
+            assertEquals(label,  344, envelope.getSpan    (0), STRICT); // 360° - testSimpleEnvelope()
+            switch (type) {
+                default: {
+                    final AbstractEnvelope ext = (AbstractEnvelope) envelope;
+                    assertTrue (label, ext.contains  (inside));
+                    assertFalse(label, ext.contains  (outside));
+                    assertFalse(label, ext.contains  (intersect, false));
+                    assertTrue (label, ext.intersects(intersect, false));
+                    assertDisjoint(ext, disjoint);
+                    assertContains(ext, contained);
+                    assertContains(ext, spanning);
+                    break;
+                }
+                case RECTANGLE: {
+                    final Rectangle2D ext = (Rectangle2D) envelope;
+                    assertTrue (label, ext.contains  (inside));
+                    assertFalse(label, ext.contains  (outside));
+                    assertFalse(label, ext.contains  (intersect));
+                    assertTrue (label, ext.intersects(intersect));
+                    assertDisjoint(ext, disjoint);
+                    assertContains(ext, contained);
+                    assertContains(ext, spanning);
+                    break;
+                }
             }
+            verifyInvariants(type, envelope);
         }
     }
 
@@ -204,10 +245,10 @@ public final strictfp class AbstractEnve
      * on the left side.
      *
      * {@preformat text
-     *      ───┐    ┌─────────              ───┐      ┌─────
-     *         │    │  ┌────┐       or      ───┼──┐   │  ┌──
-     *         │    │  └────┘               ───┼──┘   │  └──
-     *      ───┘    └─────────              ───┘      └─────
+     *      ───┐    ┌─────────              ───┐      ┌─────
+     *         │    │  ┌────┐       or      ───┼──┐   │  ┌──
+     *         │    │  └────┘               ───┼──┘   │  └──
+     *      ───┘    └─────────              ───┘      └─────
      * }
      */
     @Test
@@ -233,7 +274,7 @@ public final strictfp class AbstractEnve
             assertEquals(label, -364, upper   .getOrdinate(0), STRICT);
             assertEquals(label, +180, envelope.getMaximum (0), STRICT);
             assertEquals(label,    4, envelope.getMedian  (0), STRICT); // Note the alternance with the previous test methods.
-            assertEquals(label,  NaN, envelope.getSpan    (0), STRICT); // testCrossingAntiMeridian() + 360°.
+            assertEquals(label,  NaN, envelope.getSpan    (0), STRICT); // testCrossingAntiMeridian() + 360°.
             if (envelope instanceof AbstractEnvelope) {
                 final AbstractEnvelope ext = (AbstractEnvelope) envelope;
                 assertTrue (label, ext.contains  (inside));
@@ -244,6 +285,7 @@ public final strictfp class AbstractEnve
                 assertTrue (label, ext.intersects(spanning,  false));
                 assertDisjoint(ext, disjoint);
                 assertContains(ext, contained);
+                break;
             }
             if (envelope instanceof Rectangle2D) {
                 final Rectangle2D ext = (Rectangle2D) envelope;
@@ -255,7 +297,9 @@ public final strictfp class AbstractEnve
                 assertTrue (label, ext.intersects(spanning));
                 assertDisjoint(ext, disjoint);
                 assertContains(ext, contained);
+                break;
             }
+            verifyInvariants(type, envelope);
         }
     }
 
@@ -286,32 +330,37 @@ public final strictfp class AbstractEnve
             assertEquals(label, -364, upper   .getOrdinate(0), STRICT);
             assertEquals(label, +180, envelope.getMaximum (0), STRICT);
             assertEquals(label, -176, envelope.getMedian  (0), STRICT); // Note the alternance with the previous test methods.
-            assertEquals(label,  NaN, envelope.getSpan    (0), STRICT); // testCrossingAntiMeridianTwice() + 360°.
-            if (envelope instanceof AbstractEnvelope) {
-                final AbstractEnvelope ext = (AbstractEnvelope) envelope;
-                assertFalse(label, ext.contains  (wasInside));
-                assertFalse(label, ext.contains  (outside));
-                assertFalse(label, ext.contains  (spanning,  false));
-                assertTrue (label, ext.intersects(spanning,  false));
-                assertDisjoint(ext, wasIntersect);
-                assertDisjoint(ext, disjoint);
-                assertDisjoint(ext, wasContained);
-            }
-            if (envelope instanceof Rectangle2D) {
-                final Rectangle2D ext = (Rectangle2D) envelope;
-                assertFalse(label, ext.contains  (wasInside));
-                assertFalse(label, ext.contains  (outside));
-                assertFalse(label, ext.contains  (spanning));
-                assertTrue (label, ext.intersects(spanning));
-                assertDisjoint(ext, wasIntersect);
-                assertDisjoint(ext, disjoint);
-                assertDisjoint(ext, wasContained);
+            assertEquals(label,  NaN, envelope.getSpan    (0), STRICT); // testCrossingAntiMeridianTwice() + 360°.
+            switch (type) {
+                default: {
+                    final AbstractEnvelope ext = (AbstractEnvelope) envelope;
+                    assertFalse(label, ext.contains  (wasInside));
+                    assertFalse(label, ext.contains  (outside));
+                    assertFalse(label, ext.contains  (spanning,  false));
+                    assertTrue (label, ext.intersects(spanning,  false));
+                    assertDisjoint(ext, wasIntersect);
+                    assertDisjoint(ext, disjoint);
+                    assertDisjoint(ext, wasContained);
+                    break;
+                }
+                case RECTANGLE: {
+                    final Rectangle2D ext = (Rectangle2D) envelope;
+                    assertFalse(label, ext.contains  (wasInside));
+                    assertFalse(label, ext.contains  (outside));
+                    assertFalse(label, ext.contains  (spanning));
+                    assertTrue (label, ext.intersects(spanning));
+                    assertDisjoint(ext, wasIntersect);
+                    assertDisjoint(ext, disjoint);
+                    assertDisjoint(ext, wasContained);
+                    break;
+                }
             }
+            verifyInvariants(type, envelope);
         }
     }
 
     /**
-     * Tests an empty envelope from -0 to 0°
+     * Tests an empty envelope from -0 to 0°
      */
     @Test
     public void testRange0() {
@@ -331,33 +380,38 @@ public final strictfp class AbstractEnve
             assertEquals(label,  0.0, envelope.getMaximum(0), STRICT);
             assertEquals(label,    0, envelope.getMedian (0), STRICT);
             assertEquals(label,    0, envelope.getSpan   (0), STRICT);
-            if (envelope instanceof AbstractEnvelope) {
-                final AbstractEnvelope ext = (AbstractEnvelope) envelope;
-                assertFalse(label, ext.contains  (wasInside));
-                assertFalse(label, ext.contains  (outside));
-                assertFalse(label, ext.contains  (intersect, false));
-                assertTrue (label, ext.intersects(intersect, false));
-                assertFalse(label, ext.contains  (spanning,  false));
-                assertFalse(label, ext.intersects(spanning,  false));
-                assertFalse(label, ext.intersects(spanning,  false));
-                assertDisjoint(ext, wasContained);
-            }
-            if (envelope instanceof Rectangle2D) {
-                final Rectangle2D ext = (Rectangle2D) envelope;
-                assertFalse(label, ext.contains  (wasInside));
-                assertFalse(label, ext.contains  (outside));
-                assertFalse(label, ext.contains  (intersect));
-                assertTrue (label, ext.intersects(intersect));
-                assertFalse(label, ext.contains  (spanning));
-                assertFalse(label, ext.intersects(spanning));
-                assertFalse(label, ext.intersects(spanning));
-                assertDisjoint(ext, wasContained);
+            switch (type) {
+                default: {
+                    final AbstractEnvelope ext = (AbstractEnvelope) envelope;
+                    assertFalse(label, ext.contains  (wasInside));
+                    assertFalse(label, ext.contains  (outside));
+                    assertFalse(label, ext.contains  (intersect, false));
+                    assertTrue (label, ext.intersects(intersect, false));
+                    assertFalse(label, ext.contains  (spanning,  false));
+                    assertFalse(label, ext.intersects(spanning,  false));
+                    assertFalse(label, ext.intersects(spanning,  false));
+                    assertDisjoint(ext, wasContained);
+                    break;
+                }
+                case RECTANGLE: {
+                    final Rectangle2D ext = (Rectangle2D) envelope;
+                    assertFalse(label, ext.contains  (wasInside));
+                    assertFalse(label, ext.contains  (outside));
+                    assertFalse(label, ext.contains  (intersect));
+                    assertTrue (label, ext.intersects(intersect));
+                    assertFalse(label, ext.contains  (spanning));
+                    assertFalse(label, ext.intersects(spanning));
+                    assertFalse(label, ext.intersects(spanning));
+                    assertDisjoint(ext, wasContained);
+                    break;
+                }
             }
+            verifyInvariants(type, envelope);
         }
     }
 
     /**
-     * Tests a case crossing the anti-meridian crossing, from 0° to -0°.
+     * Tests a case crossing the anti-meridian crossing, from 0° to -0°.
      */
     @Test
     @Ignore("The tested envelope needs to be associated to CRS:84")
@@ -382,22 +436,27 @@ public final strictfp class AbstractEnve
             assertEquals(label, +180, envelope.getMaximum (0), STRICT);
             assertEquals(label,  180, envelope.getMedian  (0), STRICT);
             assertEquals(label,  360, envelope.getSpan    (0), STRICT);
-            if (envelope instanceof AbstractEnvelope) {
-                final AbstractEnvelope ext = (AbstractEnvelope) envelope;
-                assertTrue(label, ext.contains(inside));
-                assertTrue(label, ext.contains(wasOutside));
-                assertTrue(label, ext.intersects(intersect, false));
-                assertContains(ext, contained);
-                assertContains(ext, spanning);
-            }
-            if (envelope instanceof Rectangle2D) {
-                final Rectangle2D ext = (Rectangle2D) envelope;
-                assertTrue(label, ext.contains(inside));
-                assertTrue(label, ext.contains(wasOutside));
-                assertTrue(label, ext.intersects(intersect));
-                assertContains(ext, contained);
-                assertContains(ext, spanning);
+            switch (type) {
+                default: {
+                    final AbstractEnvelope ext = (AbstractEnvelope) envelope;
+                    assertTrue(label, ext.contains(inside));
+                    assertTrue(label, ext.contains(wasOutside));
+                    assertTrue(label, ext.intersects(intersect, false));
+                    assertContains(ext, contained);
+                    assertContains(ext, spanning);
+                    break;
+                }
+                case RECTANGLE: {
+                    final Rectangle2D ext = (Rectangle2D) envelope;
+                    assertTrue(label, ext.contains(inside));
+                    assertTrue(label, ext.contains(wasOutside));
+                    assertTrue(label, ext.intersects(intersect));
+                    assertContains(ext, contained);
+                    assertContains(ext, spanning);
+                    break;
+                }
             }
+            verifyInvariants(type, envelope);
         }
     }
 }

Propchange: sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/AbstractEnvelopeTest.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Modified: sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/DirectPosition1DTest.java
URL: http://svn.apache.org/viewvc/sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/DirectPosition1DTest.java?rev=1480602&r1=1480601&r2=1480602&view=diff
==============================================================================
--- sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/DirectPosition1DTest.java [iso-8859-1] (original)
+++ sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/DirectPosition1DTest.java [UTF-8] Thu May  9 12:24:13 2013
@@ -46,7 +46,7 @@ public final strictfp class DirectPositi
     }
 
     /**
-     * Tests the {@link DirectPosition1D#DirectPosition2D(String)} constructor.
+     * Tests the {@link DirectPosition1D#DirectPosition1D(CharSequence)} constructor.
      */
     @Test
     public void testWktParsing() {

Propchange: sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/DirectPosition1DTest.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Modified: sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/DirectPosition2DTest.java
URL: http://svn.apache.org/viewvc/sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/DirectPosition2DTest.java?rev=1480602&r1=1480601&r2=1480602&view=diff
==============================================================================
--- sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/DirectPosition2DTest.java [iso-8859-1] (original)
+++ sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/DirectPosition2DTest.java [UTF-8] Thu May  9 12:24:13 2013
@@ -46,7 +46,7 @@ public final strictfp class DirectPositi
     }
 
     /**
-     * Tests the {@link DirectPosition2D#DirectPosition2D(String)} constructor.
+     * Tests the {@link DirectPosition2D#DirectPosition2D(CharSequence)} constructor.
      */
     @Test
     public void testWktParsing() {

Propchange: sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/DirectPosition2DTest.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Modified: sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/Envelope2DTest.java
URL: http://svn.apache.org/viewvc/sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/Envelope2DTest.java?rev=1480602&r1=1480601&r2=1480602&view=diff
==============================================================================
--- sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/Envelope2DTest.java [iso-8859-1] (original)
+++ sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/Envelope2DTest.java [UTF-8] Thu May  9 12:24:13 2013
@@ -43,7 +43,7 @@ public final strictfp class Envelope2DTe
      */
     @Test
     public void testSerialization() {
-        final Envelope2D e1 = new Envelope2D(-20, -10, 40, 20, WGS84);
+        final Envelope2D e1 = new Envelope2D(WGS84, -20, -10, 40, 20);
         final Envelope2D e2 = assertSerializedEquals(e1);
         assertNotSame(e1, e2);
         validate(e2);

Propchange: sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/Envelope2DTest.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Modified: sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/GeneralDirectPositionTest.java
URL: http://svn.apache.org/viewvc/sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/GeneralDirectPositionTest.java?rev=1480602&r1=1480601&r2=1480602&view=diff
==============================================================================
--- sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/GeneralDirectPositionTest.java [iso-8859-1] (original)
+++ sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/GeneralDirectPositionTest.java [UTF-8] Thu May  9 12:24:13 2013
@@ -61,7 +61,7 @@ public final strictfp class GeneralDirec
     }
 
     /**
-     * Tests the {@link GeneralDirectPosition#GeneralDirectPosition(String)} constructor.
+     * Tests the {@link GeneralDirectPosition#GeneralDirectPosition(CharSequence)} constructor.
      */
     @Test
     public void testWktParsing() {
@@ -73,7 +73,7 @@ public final strictfp class GeneralDirec
     }
 
     /**
-     * Tests the {@link GeneralDirectPosition#GeneralDirectPosition(String)} constructor
+     * Tests the {@link GeneralDirectPosition#GeneralDirectPosition(CharSequence)} constructor
      * with invalid input strings.
      */
     @Test
@@ -85,7 +85,7 @@ public final strictfp class GeneralDirec
             // This is the expected exception.
             final String message = e.getMessage();
             assertTrue(message.contains("POINT(6 10 2"));
-            assertTrue(message.contains("‘)’"));
+            assertTrue(message.contains("‘)’"));
         }
         try {
             new GeneralDirectPosition("POINT 6 10 2)");
@@ -100,7 +100,7 @@ public final strictfp class GeneralDirec
             // This is the expected exception.
             final String message = e.getMessage();
             assertTrue(message.contains("POINT(6 10 2) x"));
-            assertTrue(message.contains("“x”"));
+            assertTrue(message.contains("“x”"));
         }
     }
 

Propchange: sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/GeneralDirectPositionTest.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Modified: sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/GeneralEnvelopeTest.java
URL: http://svn.apache.org/viewvc/sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/GeneralEnvelopeTest.java?rev=1480602&r1=1480601&r2=1480602&view=diff
==============================================================================
--- sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/GeneralEnvelopeTest.java [iso-8859-1] (original)
+++ sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/GeneralEnvelopeTest.java [UTF-8] Thu May  9 12:24:13 2013
@@ -20,6 +20,7 @@ import org.opengis.geometry.Envelope;
 import org.opengis.geometry.DirectPosition;
 import org.apache.sis.test.DependsOn;
 import org.apache.sis.test.TestCase;
+import org.apache.sis.test.DependsOnMethod;
 import org.junit.Ignore;
 import org.junit.Test;
 
@@ -43,11 +44,11 @@ import static org.apache.sis.geometry.Ab
  * @module
  */
 @DependsOn(AbstractEnvelopeTest.class)
-public final strictfp class GeneralEnvelopeTest extends TestCase {
+public strictfp class GeneralEnvelopeTest extends TestCase {
     /**
      * The comparison threshold for strict comparisons.
      */
-    private static final double STRICT = 0;
+    static final double STRICT = 0;
 
     /**
      * Tolerance threshold for floating point comparisons.
@@ -56,8 +57,9 @@ public final strictfp class GeneralEnvel
 
     /**
      * Creates a new geographic envelope for the given ordinate values.
+     * This method is overridden by {@link SubEnvelopeTest}.
      */
-    private static GeneralEnvelope create(final double xmin, final double ymin, final double xmax, final double ymax) {
+    GeneralEnvelope create(final double xmin, final double ymin, final double xmax, final double ymax) {
         final GeneralEnvelope envelope = new GeneralEnvelope(2);
         envelope.setCoordinateReferenceSystem(WGS84);
         envelope.setEnvelope(xmin, ymin, xmax, ymax);
@@ -68,6 +70,14 @@ public final strictfp class GeneralEnvel
     }
 
     /**
+     * Verifies invariants for the given envelope after each test.
+     * This method is overridden by {@link SubEnvelopeTest}.
+     */
+    void verifyInvariants(final GeneralEnvelope envelope) {
+        assertSame(WGS84, envelope.getCoordinateReferenceSystem());
+    }
+
+    /**
      * Asserts that the given two-dimensional envelope is equals to the given rectangle.
      * The {@code xLower} and {@code xUpper} arguments are the <var>x</var> ordinate values
      * for the lower and upper corners respectively. The actual {@code xmin} and {@code ymin}
@@ -211,58 +221,62 @@ public final strictfp class GeneralEnvel
     @Test
     @Ignore("The tested envelope needs to be associated to CRS:84")
     public void testIntersection() {
-        //  ┌─────────────┐
-        //  │  ┌───────┐  │
-        //  │  └───────┘  │
-        //  └─────────────┘
+        //  ┌─────────────┐
+        //  │  ┌───────┐  │
+        //  │  └───────┘  │
+        //  └─────────────┘
         final GeneralEnvelope e1 = create(20, -20, 80, 10);
         final GeneralEnvelope e2 = create(40, -10, 62,  8);
         assertIntersectEquals(e1, e2, 40, -10, 62, 8);
-        //  ┌──────────┐
-        //  │  ┌───────┼──┐
-        //  │  └───────┼──┘
-        //  └──────────┘
+        //  ┌──────────┐
+        //  │  ┌───────┼──┐
+        //  │  └───────┼──┘
+        //  └──────────┘
         e1.setEnvelope(20, -20,  80, 12);
         e2.setEnvelope(40, -10, 100, 30);
         final double ymin=-10, ymax=12; // Will not change anymore
         assertIntersectEquals(e1, e2, 40, ymin, 80, ymax);
-        //  ────┐  ┌────
-        //  ──┐ │  │ ┌──
-        //  ──┘ │  │ └──
-        //  ────┘  └────
+        //  ────┐  ┌────
+        //  ──┐ │  │ ┌──
+        //  ──┘ │  │ └──
+        //  ────┘  └────
         e1.setRange(0,  80, 20);
         e2.setRange(0, 100, 18);
         assertIntersectEquals(e1, e2, 100, ymin, 18, ymax);
-        //  ────┐  ┌────
-        //  ────┼──┼─┐┌─
-        //  ────┼──┼─┘└─
-        //  ────┘  └────
+        //  ────┐  ┌────
+        //  ────┼──┼─┐┌─
+        //  ────┼──┼─┘└─
+        //  ────┘  └────
         e2.setRange(0, 100, 90);
         assertIntersectEquals(e1, e2, 100, ymin, 20, ymax);
-        //  ─────┐      ┌─────
-        //     ┌─┼────┐ │
-        //     └─┼────┘ │
-        //  ─────┘      └─────
+        //  ─────┐      ┌─────
+        //     ┌─┼────┐ │
+        //     └─┼────┘ │
+        //  ─────┘      └─────
         e2.setRange(0, 10, 30);
         assertIntersectEquals(e1, e2, 10, ymin, 20, ymax);
-        //  ──────────┐  ┌─────
-        //    ┌────┐  │  │
-        //    └────┘  │  │
-        //  ──────────┘  └─────
+        //  ──────────┐  ┌─────
+        //    ┌────┐  │  │
+        //    └────┘  │  │
+        //  ──────────┘  └─────
         e2.setRange(0, 10, 16);
         assertIntersectEquals(e1, e2, 10, ymin, 16, ymax);
-        //  ─────┐     ┌─────
-        //       │ ┌─┐ │
-        //       │ └─┘ │
-        //  ─────┘     └─────
+        //  ─────┐     ┌─────
+        //       │ ┌─┐ │
+        //       │ └─┘ │
+        //  ─────┘     └─────
         e2.setRange(0, 40, 60);
         assertIntersectEquals(e1, e2, NaN, ymin, NaN, ymax);
-        //  ─────┐     ┌─────
-        //     ┌─┼─────┼─┐
-        //     └─┼─────┼─┘
-        //  ─────┘     └─────
+        //  ─────┐     ┌─────
+        //     ┌─┼─────┼─┐
+        //     └─┼─────┼─┘
+        //  ─────┘     └─────
         e2.setRange(0, 10, 90);
         assertIntersectEquals(e1, e2, NaN, ymin, NaN, ymax);
+
+        // Post-test verification, mostly for SubEnvelope.
+        verifyInvariants(e1);
+        verifyInvariants(e2);
     }
 
     /**
@@ -272,58 +286,62 @@ public final strictfp class GeneralEnvel
     @Test
     @Ignore("The tested envelope needs to be associated to CRS:84")
     public void testUnion() {
-        //  ┌─────────────┐
-        //  │  ┌───────┐  │
-        //  │  └───────┘  │
-        //  └─────────────┘
+        //  ┌─────────────┐
+        //  │  ┌───────┐  │
+        //  │  └───────┘  │
+        //  └─────────────┘
         final GeneralEnvelope e1 = create(20, -20, 80, 10);
         final GeneralEnvelope e2 = create(40, -10, 62,  8);
         assertUnionEquals(e1, e2, 20, -20, 80, 10, false, false);
-        //  ┌──────────┐
-        //  │  ┌───────┼──┐
-        //  │  └───────┼──┘
-        //  └──────────┘
+        //  ┌──────────┐
+        //  │  ┌───────┼──┐
+        //  │  └───────┼──┘
+        //  └──────────┘
         e1.setEnvelope(20, -20,  80, 12);
         e2.setEnvelope(40, -10, 100, 30);
         final double ymin=-20, ymax=30; // Will not change anymore
         assertUnionEquals(e1, e2, 20, ymin, 100, ymax, false, false);
-        //  ────┐  ┌────
-        //  ──┐ │  │ ┌──
-        //  ──┘ │  │ └──
-        //  ────┘  └────
+        //  ────┐  ┌────
+        //  ──┐ │  │ ┌──
+        //  ──┘ │  │ └──
+        //  ────┘  └────
         e1.setRange(0,  80, 20);
         e2.setRange(0, 100, 18);
         assertUnionEquals(e1, e2, 80, ymin, 20, ymax, false, false);
-        //  ────┐  ┌────
-        //  ────┼──┼─┐┌─
-        //  ────┼──┼─┘└─
-        //  ────┘  └────
+        //  ────┐  ┌────
+        //  ────┼──┼─┐┌─
+        //  ────┼──┼─┘└─
+        //  ────┘  └────
         e2.setRange(0, 100, 90);
         assertUnionEquals(e1, e2, +0.0, ymin, -0.0, ymax, true, false);
-        //  ─────┐      ┌─────
-        //     ┌─┼────┐ │
-        //     └─┼────┘ │
-        //  ─────┘      └─────
+        //  ─────┐      ┌─────
+        //     ┌─┼────┐ │
+        //     └─┼────┘ │
+        //  ─────┘      └─────
         e2.setRange(0, 10, 30);
         assertUnionEquals(e1, e2, 80, ymin, 30, ymax, false, true);
-        //  ──────────┐  ┌─────
-        //    ┌────┐  │  │
-        //    └────┘  │  │
-        //  ──────────┘  └─────
+        //  ──────────┐  ┌─────
+        //    ┌────┐  │  │
+        //    └────┘  │  │
+        //  ──────────┘  └─────
         e2.setRange(0, 10, 16);
         assertUnionEquals(e1, e2, 80, ymin, 20, ymax, false, true);
-        //  ─────┐     ┌─────
-        //       │ ┌─┐ │
-        //       │ └─┘ │
-        //  ─────┘     └─────
+        //  ─────┐     ┌─────
+        //       │ ┌─┐ │
+        //       │ └─┘ │
+        //  ─────┘     └─────
         e2.setRange(0, 41, 60);
         assertUnionEquals(e1, e2, 41, ymin, 20, ymax, false, true);
-        //  ─────┐     ┌─────
-        //     ┌─┼─────┼─┐
-        //     └─┼─────┼─┘
-        //  ─────┘     └─────
+        //  ─────┐     ┌─────
+        //     ┌─┼─────┼─┐
+        //     └─┼─────┼─┘
+        //  ─────┘     └─────
         e2.setRange(0, 10, 90);
         assertUnionEquals(e1, e2, +0.0, ymin, -0.0, ymax, true, true);
+
+        // Post-test verification, mostly for SubEnvelope.
+        verifyInvariants(e1);
+        verifyInvariants(e2);
     }
 
     /**
@@ -353,6 +371,8 @@ public final strictfp class GeneralEnvel
 
         p.x = 30; // Add on the left side.
         assertAddEquals(e, p, 80, ymin, 30, ymax);
+
+        verifyInvariants(e);
     }
 
     /**
@@ -377,18 +397,20 @@ public final strictfp class GeneralEnvel
         assertTrue(e.normalize());
         assertEquals("Expect positive zero", Double.doubleToLongBits(+0.0), Double.doubleToLongBits(e.getLower(0)));
         assertEquals("Expect negative zero", Double.doubleToLongBits(-0.0), Double.doubleToLongBits(e.getUpper(0)));
+        verifyInvariants(e);
     }
 
     /**
      * Tests the {@link GeneralEnvelope#normalize()} method
-     * with an envelope having more then 360° of longitude.
+     * with an envelope having more then 360° of longitude.
      */
     @Test
     @Ignore("The tested envelope needs to be associated to CRS:84")
     public void testNormalizeWorld() {
-        GeneralEnvelope e = create(-195, -90, +170, +90); // -195° is equivalent to 165°
+        GeneralEnvelope e = create(-195, -90, +170, +90); // -195° is equivalent to 165°
         assertTrue(e.normalize());
         assertEnvelopeEquals(e, -180, -90, +180, +90);
+        verifyInvariants(e);
     }
 
     /**
@@ -402,7 +424,7 @@ public final strictfp class GeneralEnvel
         assertFalse(e.simplify());
         assertEnvelopeEquals(e, -100, -10, +100, +10);
 
-        // Anti-meridian spanning: should substitute [-180 … 180]°
+        // Anti-meridian spanning: should substitute [-180 … 180]°
         e = create(30, -10, -60, 10);
         assertTrue(e.simplify());
         assertEnvelopeEquals(e, -180, -10, 180, 10);
@@ -411,6 +433,7 @@ public final strictfp class GeneralEnvel
         e = create(0.0, -10, -0.0, 10);
         assertTrue(e.simplify());
         assertEnvelopeEquals(e, -180, -10, 180, 10);
+        verifyInvariants(e);
     }
 
     /**
@@ -425,12 +448,29 @@ public final strictfp class GeneralEnvel
         assertEquals(-2.0, e.getLower(1), 0.0);
         assertEquals( 3.0, e.getUpper(0), 0.0);
         assertEquals(-1.0, e.getUpper(1), 0.0);
+        verifyInvariants(e);
+    }
+
+    /**
+     * Tests the {@link GeneralEnvelope#toString()} method.
+     */
+    @Test
+    public void testToString() {
+        GeneralEnvelope envelope = new GeneralEnvelope(new double[] {-180, -90}, new double[] {180, 90});
+        assertEquals("BOX(-180 -90, 180 90)", envelope.toString());
+
+        envelope = new GeneralEnvelope(3);
+        envelope.setRange(0, -180, +180);
+        envelope.setRange(1,  -90,  +90);
+        envelope.setRange(2,   10,   30);
+        assertEquals("BOX3D(-180 -90 10, 180 90 30)", envelope.toString());
     }
 
     /**
-     * Tests the {@link GeneralEnvelope#GeneralEnvelope(String)} constructor.
+     * Tests the {@link GeneralEnvelope#GeneralEnvelope(CharSequence)} constructor.
      */
     @Test
+    @DependsOnMethod("testToString")
     public void testWktParsing() {
         GeneralEnvelope envelope = new GeneralEnvelope("BOX(-180 -90,180 90)");
         assertEquals(2, envelope.getDimension());
@@ -457,20 +497,20 @@ public final strictfp class GeneralEnvel
         assertEquals(  40, envelope.getUpper(1), STRICT);
         validate(envelope);
 
-        assertEquals("BOX2D(6 10, 6 10)",     new GeneralEnvelope("POINT(6 10)").toString());
+        assertEquals("BOX(6 10, 6 10)",       new GeneralEnvelope("POINT(6 10)").toString());
         assertEquals("BOX3D(6 10 3, 6 10 3)", new GeneralEnvelope("POINT M [ 6 10 3 ] ").toString());
-        assertEquals("BOX2D(3 4, 20 50)",     new GeneralEnvelope("LINESTRING(3 4,10 50,20 25)").toString());
-        assertEquals("BOX2D(1 1, 6 5)",       new GeneralEnvelope(
+        assertEquals("BOX(3 4, 20 50)",       new GeneralEnvelope("LINESTRING(3 4,10 50,20 25)").toString());
+        assertEquals("BOX(1 1, 6 5)",         new GeneralEnvelope(
                 "MULTIPOLYGON(((1 1,5 1,5 5,1 5,1 1),(2 2, 3 2, 3 3, 2 3,2 2)),((3 3,6 2,6 4,3 3)))").toString());
-        assertEquals("BOX2D(3 6, 7 10)", new GeneralEnvelope("GEOMETRYCOLLECTION(POINT(4 6),LINESTRING(3 8,7 10))").toString());
+        assertEquals("BOX(3 6, 7 10)", new GeneralEnvelope("GEOMETRYCOLLECTION(POINT(4 6),LINESTRING(3 8,7 10))").toString());
         assertEquals(0, new GeneralEnvelope("BOX()").getDimension());
 
         try {
-            new GeneralEnvelope("BOX2D(3 4");
+            new GeneralEnvelope("BOX(3 4");
             fail("Parsing should fails because of missing parenthesis.");
         } catch (IllegalArgumentException e) {
             // This is the expected exception.
-            assertTrue(e.getMessage().contains("BOX2D"));
+            assertTrue(e.getMessage().contains("BOX"));
         }
         try {
             new GeneralEnvelope("LINESTRING(3 4,10 50),20 25)");
@@ -482,7 +522,8 @@ public final strictfp class GeneralEnvel
     }
 
     /**
-     * Tests the {@link GeneralEnvelope#equals} method.
+     * Tests the {@link GeneralEnvelope#equals(Object)} and
+     * {@link GeneralEnvelope#equals(Envelope, double, boolean)} methods.
      */
     @Test
     public void testEquals() {
@@ -492,7 +533,7 @@ public final strictfp class GeneralEnvel
          */
         final GeneralEnvelope e1 = new GeneralEnvelope(4);
         assertTrue  (e1.isEmpty());
-        assertFalse (e1.isNull());
+        assertFalse (e1.isAllNaN());
         assertEquals(e1.getLowerCorner(), e1.getUpperCorner());
         /*
          * Initializes with arbitrary coordinate values.
@@ -501,7 +542,7 @@ public final strictfp class GeneralEnvel
         for (int i=e1.getDimension(); --i>=0;) {
             e1.setRange(i, i*5 + 2, i*6 + 5);
         }
-        assertFalse(e1.isNull ());
+        assertFalse(e1.isAllNaN ());
         assertFalse(e1.isEmpty());
         assertFalse(e1.getLowerCorner().equals(e1.getUpperCorner()));
         /*
@@ -573,10 +614,8 @@ public final strictfp class GeneralEnvel
      * Tests {@code GeneralEnvelope} serialization.
      */
     @Test
-    public void testSerialization() {
-        final GeneralEnvelope e1 = new GeneralEnvelope(
-                new double[] {-20, -10},
-                new double[] { 20,  10});
+    public final void testSerialization() {
+        final GeneralEnvelope e1 = create(-20, -10, 20, 10);
         final GeneralEnvelope e2 = assertSerializedEquals(e1);
         assertNotSame(e1, e2);
         validate(e2);

Propchange: sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/GeneralEnvelopeTest.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Propchange: sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/geometry/ImmutableEnvelopeTest.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Propchange: sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/referencing/Assert.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Propchange: sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/storage/TestQuadTreeNode.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Modified: sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
URL: http://svn.apache.org/viewvc/sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java?rev=1480602&r1=1480601&r2=1480602&view=diff
==============================================================================
--- sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java [iso-8859-1] (original)
+++ sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java [UTF-8] Thu May  9 12:24:13 2013
@@ -18,10 +18,11 @@ package org.apache.sis.test.suite;
 
 import org.apache.sis.test.TestSuite;
 import org.junit.runners.Suite;
+import org.junit.BeforeClass;
 
 
 /**
- * All tests from the {@code sis-utility} module, in approximative dependency order.
+ * All tests from the {@code sis-referencing} module, in approximative dependency order.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
@@ -35,8 +36,17 @@ import org.junit.runners.Suite;
     org.apache.sis.geometry.DirectPosition2DTest.class,
     org.apache.sis.geometry.AbstractEnvelopeTest.class,
     org.apache.sis.geometry.GeneralEnvelopeTest.class,
+    org.apache.sis.geometry.SubEnvelopeTest.class,
     org.apache.sis.geometry.ImmutableEnvelopeTest.class,
     org.apache.sis.geometry.Envelope2DTest.class
 })
 public final strictfp class ReferencingTestSuite extends TestSuite {
+    /**
+     * Verifies the list of tests before to run the suite.
+     * See {@link #verifyTestList(Class)} for more information.
+     */
+    @BeforeClass
+    public static void verifyTestList() {
+        verifyTestList(ReferencingTestSuite.class);
+    }
 }

Propchange: sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Propchange: sis/branches/Android/sis-referencing/src/test/java/org/apache/sis/util/TestGeoHashUtils.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Modified: sis/branches/Android/sis-utility/pom.xml
URL: http://svn.apache.org/viewvc/sis/branches/Android/sis-utility/pom.xml?rev=1480602&r1=1480601&r2=1480602&view=diff
==============================================================================
--- sis/branches/Android/sis-utility/pom.xml (original)
+++ sis/branches/Android/sis-utility/pom.xml Thu May  9 12:24:13 2013
@@ -50,50 +50,107 @@ Miscellaneous utilities.
        =========================================================== -->
   <developers>
     <developer>
-      <id>desruisseaux</id>
       <name>Martin Desruisseaux</name>
+      <id>desruisseaux</id>
       <email>desruisseaux@apache.org</email>
       <organization>Geomatys</organization>
-      <organizationUrl>http://www.geomatys.com/</organizationUrl>
+      <organizationUrl>http://www.geomatys.com</organizationUrl>
       <timezone>+1</timezone>
       <roles>
-        <role>Developer</role>
+        <role>developer</role>
+      </roles>
+    </developer>
+    <developer>
+      <name>Joseph F. White</name>
+      <id>jwhite</id>
+      <roles>
+        <role>developer</role>
       </roles>
     </developer>
   </developers>
   <contributors>
     <contributor>
+      <name>Adrian Custer</name>
+      <roles>
+        <role>documentation</role>
+      </roles>
+    </contributor>
+    <contributor>
       <name>Cédric Briançon</name>
       <email>cedric.briancon@geomatys.com</email>
       <organization>Geomatys</organization>
+      <organizationUrl>http://www.geomatys.com</organizationUrl>
       <timezone>+1</timezone>
       <roles>
-        <role>Developer</role>
+        <role>developer</role>
       </roles>
     </contributor>
     <contributor>
       <name>Guilhem Legal</name>
       <email>guilhem.legal@geomatys.com</email>
       <organization>Geomatys</organization>
+      <organizationUrl>http://www.geomatys.com</organizationUrl>
       <timezone>+1</timezone>
       <roles>
-        <role>Developer</role>
+        <role>developer</role>
       </roles>
     </contributor>
     <contributor>
       <name>Touraïvane</name>
-      <organization>
-        Institut de Recherche pour le Développement (IRD)
-      </organization>
+      <organization>Institut de Recherche pour le Développement (IRD)</organization>
+      <organizationUrl>http://www.ird.fr</organizationUrl>
       <timezone>+11</timezone>
       <roles>
-        <role>Developer</role>
+        <role>developer</role>
       </roles>
     </contributor>
   </contributors>
 
 
   <!-- ===========================================================
+           Build configuration
+       =========================================================== -->
+  <build>
+    <plugins>
+
+      <!-- Delete the "com/sun/xml/..." directory after compilation. -->
+      <plugin>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>process-test-classes</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <target>
+                <delete dir="${project.build.outputDirectory}/com"/>
+              </target>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
+      <!-- Compile properties files into resources UTF files. -->
+      <plugin>
+        <groupId>org.apache.sis</groupId>
+        <artifactId>sis-build-helper</artifactId>
+        <version>${sis.plugin.version}</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>compile-resources</goal>
+              <!-- The "collect-jars" goal declared in the JDK7 branch is omitted
+                   in the JDK6 branch, because much more costly on JDK6 platforms. -->
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+
+  <!-- ===========================================================
            Dependencies
        =========================================================== -->
   <dependencies>
@@ -110,11 +167,14 @@ Miscellaneous utilities.
       <artifactId>jcip-annotations</artifactId>
     </dependency>
 
-    <!-- Optional dependencies -->
+    <!-- Optional dependencies (provided scope) -->
     <dependency>
       <groupId>org.osgi</groupId>
       <artifactId>org.osgi.core</artifactId>
-      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>javax</groupId>
+      <artifactId>javaee-api</artifactId>
     </dependency>
   </dependencies>
 

Propchange: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/AdapterReplacement.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Modified: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java
URL: http://svn.apache.org/viewvc/sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java?rev=1480602&r1=1480601&r2=1480602&view=diff
==============================================================================
--- sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java [iso-8859-1] (original)
+++ sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java [UTF-8] Thu May  9 12:24:13 2013
@@ -30,12 +30,11 @@ import org.opengis.metadata.citation.Cit
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.xml.IdentifierMap;
 import org.apache.sis.xml.IdentifierSpace;
-import org.apache.sis.xml.IdentifierAlreadyBoundException;
 
-import static org.apache.sis.util.collection.Collections.hashMapCapacity;
+import static org.apache.sis.util.collection.Containers.hashMapCapacity;
 
 // Related to JDK7
-import org.apache.sis.internal.util.Objects;
+import org.apache.sis.internal.jdk7.Objects;
 
 
 /**
@@ -89,7 +88,7 @@ public class IdentifierMapAdapter extend
     /**
      * For cross-version compatibility.
      */
-    private static final long serialVersionUID = 2661044384787218964L;
+    private static final long serialVersionUID = -1445849218952061605L;
 
     /**
      * An immutable empty instance.
@@ -102,11 +101,6 @@ public class IdentifierMapAdapter extend
     public final Collection<Identifier> identifiers;
 
     /**
-     * A view over the entries, created only when first needed.
-     */
-    private transient Set<Entry<Citation,String>> entries;
-
-    /**
      * Creates a new map which will be a view over the given identifiers.
      *
      * @param identifiers The identifiers to wrap in a map view.
@@ -250,12 +244,10 @@ public class IdentifierMapAdapter extend
      * @param  authority The authority for which to set the code.
      * @param  code The new code for the given authority, or {@code null} for removing the entry.
      * @return The previous code for the given authority, or {@code null} if none.
-     * @throws IdentifierAlreadyBoundException If this map expects unique identifiers for the
-     *         given authority, and the given value is already associated to another object.
      */
     @Override
     public String put(final Citation authority, final String code)
-            throws IdentifierAlreadyBoundException, UnsupportedOperationException
+            throws UnsupportedOperationException
     {
         ArgumentChecks.ensureNonNull("authority", authority);
         String old = null;
@@ -290,7 +282,7 @@ public class IdentifierMapAdapter extend
      */
     @Override
     public <T> T putSpecialized(final IdentifierSpace<T> authority, final T value)
-            throws IdentifierAlreadyBoundException, UnsupportedOperationException
+            throws UnsupportedOperationException
     {
         ArgumentChecks.ensureNonNull("authority", authority);
         T old = null;
@@ -332,11 +324,14 @@ public class IdentifierMapAdapter extend
      * @return A view over the collection of identifiers.
      */
     @Override
-    public synchronized Set<Entry<Citation,String>> entrySet() {
-        if (entries == null) {
-            entries = new Entries(identifiers);
-        }
-        return entries;
+    public Set<Entry<Citation,String>> entrySet() {
+        /*
+         * Do not cache the entries set because if is very cheap to create and not needed very often.
+         * Not caching allows this implementation to be thread-safe without synchronization or volatile
+         * fields if the underlying list is thread-safe. Furthermore, IdentifierMapAdapter are temporary
+         * objects anyway in the current ISOMetadata implementation.
+         */
+        return new Entries(identifiers);
     }
 
     /**
@@ -453,7 +448,7 @@ public class IdentifierMapAdapter extend
 
         /**
          * Advances to the next non-null identifier, skips duplicated authorities, wraps the
-         * identifier in an entry if needed and stores the result in the {@link #next} field.
+         * identifier in an entry if needed and stores the result in the {@link #next} field.
          * If we reach the iteration end, then this method set the {@link #identifiers}
          * iterator to {@code null}.
          */
@@ -539,9 +534,9 @@ public class IdentifierMapAdapter extend
      *
      * <p>String examples:</p>
      * <ul>
-     *   <li>{gml:id=“myID”}</li>
-     *   <li>{gco:uuid=“42924124-032a-4dfe-b06e-113e3cb81cf0”}</li>
-     *   <li>{xlink:href=“http://www.mydomain.org/myHREF”}</li>
+     *   <li>{gml:id=“myID”}</li>
+     *   <li>{gco:uuid=“42924124-032a-4dfe-b06e-113e3cb81cf0”}</li>
+     *   <li>{xlink:href=“http://www.mydomain.org/myHREF”}</li>
      * </ul>
      *
      * @see SpecializedIdentifier#toString()

Propchange: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Modified: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapEntry.java
URL: http://svn.apache.org/viewvc/sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapEntry.java?rev=1480602&r1=1480601&r2=1480602&view=diff
==============================================================================
--- sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapEntry.java [iso-8859-1] (original)
+++ sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapEntry.java [UTF-8] Thu May  9 12:24:13 2013
@@ -37,7 +37,7 @@ final class IdentifierMapEntry extends A
     /**
      * For cross-version compatibility.
      */
-    private static final long serialVersionUID = -5484541090753985572L;
+    private static final long serialVersionUID = 5159620102001638970L;
 
     /**
      * Creates a new entry for the given authority and code.
@@ -68,7 +68,7 @@ final class IdentifierMapEntry extends A
      * identifier collection.
      */
     static final class Immutable extends AbstractMap.SimpleImmutableEntry<Citation,String> implements Identifier {
-        private static final long serialVersionUID = -8179498861233498041L;
+        private static final long serialVersionUID = -6857931598565368465L;
         Immutable(Citation authority, String code) {super(authority, code);}
         @Override public Citation getAuthority()   {return getKey();}
         @Override public String   getCode()        {return getValue();}

Propchange: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapEntry.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Modified: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapWithSpecialCases.java
URL: http://svn.apache.org/viewvc/sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapWithSpecialCases.java?rev=1480602&r1=1480601&r2=1480602&view=diff
==============================================================================
--- sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapWithSpecialCases.java [iso-8859-1] (original)
+++ sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapWithSpecialCases.java [UTF-8] Thu May  9 12:24:13 2013
@@ -18,16 +18,14 @@ package org.apache.sis.internal.jaxb;
 
 import java.net.URI;
 import java.net.URISyntaxException;
-import java.util.UUID;
 import java.util.Collection;
 import org.opengis.metadata.Identifier;
 import org.opengis.metadata.citation.Citation;
 import org.apache.sis.xml.IdentifierSpace;
-import org.apache.sis.xml.IdentifierAlreadyBoundException;
 import org.apache.sis.xml.XLink;
 
 // Related to JDK7
-import org.apache.sis.internal.util.Objects;
+import org.apache.sis.internal.jdk7.Objects;
 
 
 /**
@@ -36,7 +34,6 @@ import org.apache.sis.internal.util.Obje
  *
  * <ul>
  *   <li>{@link IdentifierSpace#HREF}: handled as a shortcut to {@link XLink#getHRef()}.</li>
- *   <li>{@link IdentifierSpace#UUID}: {@code put} operations register the UUID in a shared map.</li>
  * </ul>
  *
  * See usages of {@link #specialCase(Object)} for identifying the code locations where a special
@@ -51,34 +48,26 @@ public final class IdentifierMapWithSpec
     /**
      * For cross-version compatibility.
      */
-    private static final long serialVersionUID = 5139573827448780289L;
-
-    /**
-     * The object being referenced by the identifiers, or {@code null} if not applicable.
-     */
-    private final Object referent;
+    private static final long serialVersionUID = 8135179749011991090L;
 
     /**
      * Creates a new map which will be a view over the given identifiers.
      *
      * @param identifiers The identifiers to wrap in a map view.
-     * @param referent    The object being referenced by the identifiers.
      */
-    public IdentifierMapWithSpecialCases(final Collection<Identifier> identifiers, final Object referent) {
+    public IdentifierMapWithSpecialCases(final Collection<Identifier> identifiers) {
         super(identifiers);
-        this.referent = referent;
     }
 
     /**
      * If the given authority is a special case, returns its {@link NonMarshalledAuthority}
      * integer enum. Otherwise returns -1. See javadoc for more information about special cases.
      *
-     * @param authority A {@link Citation} constant. The type is relaxed to {@code Object}
-     *        because the signature of some {@code Map} methods are that way.
+     * @param authority A {@link Citation} constant. The type is relaxed to {@code Object}
+     *        because the signature of some {@code Map} methods are that way.
      */
     private static int specialCase(final Object authority) {
         if (authority == IdentifierSpace.HREF) return NonMarshalledAuthority.HREF;
-        if (authority == IdentifierSpace.UUID) return NonMarshalledAuthority.UUID;
         // A future Apache SIS version may add more special cases here.
         return -1;
     }
@@ -122,29 +111,6 @@ public final class IdentifierMapWithSpec
     }
 
     /**
-     * Sets the {@code "gco:uuid"} value, which may be null. This method stores the UUID-object
-     * association in a shared map, if no value existed previously.
-     *
-     * @param  uuid The UUID to assign to the object.
-     * @return The previous value, or {@code null} if none.
-     * @throws IdentifierAlreadyBoundException If the given identifier is already associated to another object.
-     */
-    private UUID setUUID(final UUID uuid) throws IdentifierAlreadyBoundException {
-        if (referent == null) {
-            return super.putSpecialized(IdentifierSpace.UUID, uuid);
-        }
-        if (uuid != null) {
-            UUIDs.bind(uuid, referent); // May throws IdentifierAlreadyBoundException
-        }
-        // Invoke 'put' only if UUIDs.bind(…) has been succesful.
-        final UUID old = super.putSpecialized(IdentifierSpace.UUID, uuid);
-        if (old != null && !old.equals(uuid)) {
-            UUIDs.unbind(old, referent);
-        }
-        return old;
-    }
-
-    /**
      * {@inheritDoc}
      */
     @Override
@@ -212,7 +178,7 @@ public final class IdentifierMapWithSpec
      */
     @Override
     public String put(final Citation authority, final String code)
-            throws IdentifierAlreadyBoundException, UnsupportedOperationException
+            throws UnsupportedOperationException
     {
         final Exception exception;
         switch (specialCase(authority)) {
@@ -231,18 +197,6 @@ public final class IdentifierMapWithSpec
                 id = setHRef(id);
                 return (id != null) ? id.toString() : old;
             }
-            case NonMarshalledAuthority.UUID: {
-                UUID id = null;
-                if (code != null) try {
-                    id = UUID.fromString(code);
-                } catch (IllegalArgumentException e) {
-                    exception = e;
-                    break;
-                }
-                final String old = getUnspecialized(authority);
-                id = setUUID(id);
-                return (id != null) ? id.toString() : old;
-            }
         }
         SpecializedIdentifier.parseFailure(exception);
         return super.put(authority, code);
@@ -254,12 +208,11 @@ public final class IdentifierMapWithSpec
     @Override
     @SuppressWarnings("unchecked")
     public <T> T putSpecialized(final IdentifierSpace<T> authority, final T value)
-            throws IdentifierAlreadyBoundException, UnsupportedOperationException
+            throws UnsupportedOperationException
     {
         switch (specialCase(authority)) {
             default: return super.putSpecialized(authority, value);
             case NonMarshalledAuthority.HREF: return (T) setHRef((URI)  value);
-            case NonMarshalledAuthority.UUID: return (T) setUUID((UUID) value);
         }
     }
 }

Propchange: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapWithSpecialCases.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Modified: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java
URL: http://svn.apache.org/viewvc/sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java?rev=1480602&r1=1480601&r2=1480602&view=diff
==============================================================================
--- sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java [iso-8859-1] (original)
+++ sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java [UTF-8] Thu May  9 12:24:13 2013
@@ -19,12 +19,17 @@ package org.apache.sis.internal.jaxb;
 import java.util.Iterator;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.logging.Level;
+import java.util.logging.LogRecord;
 import java.io.Serializable;
 import java.io.ObjectStreamException;
 import java.lang.reflect.Field;
 import org.opengis.metadata.Identifier;
+import org.opengis.metadata.citation.Citation;
 import org.apache.sis.internal.simple.SimpleCitation;
+import org.apache.sis.internal.util.UnmodifiableArrayList;
 import org.apache.sis.util.logging.Logging;
+import org.apache.sis.util.resources.Errors;
 import org.apache.sis.xml.IdentifierSpace;
 
 
@@ -37,8 +42,8 @@ import org.apache.sis.xml.IdentifierSpac
  *
  * <ul>
  *   <li>The XML attributes declared by ISO 19139 specification in the {@code gco:PropertyType}
- *       element: {@code gml:id}, {@code gco:uuid} and {@code xlink:href}. Those attributes are not
- *       part of the ISO 19115 specification. Those authorities are declared in the
+ *       element: {@code gml:id}, {@code gco:uuid} and {@code xlink:href}. Those attributes are
+ *       not part of the ISO 19115 specification. Those authorities are declared in the
  *       {@link IdentifierSpace} interfaces.</li>
  *
  *   <li>ISO 19115 attributes that we choose, for the SIS implementation, to merge with
@@ -68,7 +73,13 @@ public final class NonMarshalledAuthorit
     /**
      * For cross-version compatibility.
      */
-    private static final long serialVersionUID = -6309485399210742418L;
+    private static final long serialVersionUID = 6299502270649111201L;
+
+    /**
+     * Sets to {@code true} if {@link #getCitation(String)} has already logged a warning.
+     * This is used in order to avoid flooding the logs with the same message.
+     */
+    private static volatile boolean warningLogged;
 
     /**
      * Ordinal values for switch statements. The constant defined here shall
@@ -164,13 +175,50 @@ public final class NonMarshalledAuthorit
     }
 
     /**
+     * If marshalling, filters the given collection of identifiers in order to omit any identifiers
+     * for which the authority is an instance of {@code NonMarshalledAuthority}. This should exclude
+     * all {@link org.apache.sis.xml.IdentifierSpace} constants.
+     *
+     * @param  identifiers The identifiers to filter, or {@code null}.
+     * @return The identifiers to marshal, or {@code null} if none.
+     */
+    public static Collection<Identifier> excludeOnMarshalling(Collection<Identifier> identifiers) {
+        if (identifiers != null && Context.isMarshalling()) {
+            int count = identifiers.size();
+            if (count != 0) {
+                final Identifier[] copy = identifiers.toArray(new Identifier[count]);
+                for (int i=count; --i>=0;) {
+                    final Identifier id = copy[i];
+                    if (id == null || (id.getAuthority() instanceof NonMarshalledAuthority)) {
+                        System.arraycopy(copy, i+1, copy, i, --count - i);
+                    }
+                }
+                identifiers = (count != 0) ? UnmodifiableArrayList.wrap(copy, 0, count) : null;
+            }
+        }
+        return identifiers;
+    }
+
+    /**
      * Returns a collection containing only the identifiers having a {@code NonMarshalledAuthority}.
+     * This method is invoked for saving the identifiers that are conceptually stored in distinct fields
+     * (XML identifier, UUID, ISBN, ISSN) before to overwrite the collection of all identifiers in
+     * a metadata object.
+     *
+     * <p>This method is invoked from {@code setIdentifiers(Collection<Identifier>)} implementation
+     * in {@link org.apache.sis.metadata.iso.ISOMetadata} subclasses as below:</p>
+     *
+     * {@preformat java
+     *     final Collection<Identifier> oldIds = NonMarshalledAuthority.filteredCopy(identifiers);
+     *     identifiers = writeCollection(newValues, identifiers, Identifier.class);
+     *     NonMarshalledAuthority.replace(identifiers, oldIds);
+     * }
      *
      * @param  <T> The type of object used as identifier values.
-     * @param  identifiers The identifiers to getIdentifiers, or {@code null} if none.
-     * @return The filtered identifiers, or {@code null} if none.
+     * @param  identifiers The metadata internal identifiers collection, or {@code null} if none.
+     * @return The new list containing the filtered identifiers, or {@code null} if none.
      */
-    public static <T extends Identifier> Collection<T> getIdentifiers(final Collection<? extends T> identifiers) {
+    public static <T extends Identifier> Collection<T> filteredCopy(final Collection<T> identifiers) {
         Collection<T> filtered = null;
         if (identifiers != null) {
             int remaining = identifiers.size();
@@ -188,29 +236,40 @@ public final class NonMarshalledAuthorit
     }
 
     /**
-     * Removes from the given collection every identifiers having a {@code NonMarshalledAuthority},
-     * then adds the previously filtered identifiers (if any).
+     * Replaces all identifiers in the {@code identifiers} collection having the same
+     * {@linkplain Identifier#getAuthority() authority} than the ones in {@code oldIds}.
+     * More specifically:
+     *
+     * <ul>
+     *   <li>First, remove all {@code identifiers} elements having the same authority
+     *       than one of the elements in {@code oldIds}.</li>
+     *   <li>Next, add all {@code oldIds} elements to {@code identifiers}.</li>
+     * </ul>
      *
      * @param <T> The type of object used as identifier values.
-     * @param identifiers The collection from which to remove identifiers, or {@code null}.
-     * @param filtered The previous filtered identifiers returned by {@link #getIdentifiers}.
-     */
-    public static <T extends Identifier> void setIdentifiers(final Collection<T> identifiers, final Collection<T> filtered) {
-        if (identifiers != null) {
-            for (final Iterator<T> it=identifiers.iterator(); it.hasNext();) {
-                final T id = it.next();
-                if (id == null || id.getAuthority() instanceof NonMarshalledAuthority<?>) {
-                    it.remove();
+     * @param identifiers The metadata internal identifiers collection, or {@code null} if none.
+     * @param oldIds The previous filtered identifiers returned by {@link #filteredCopy(Collection)},
+     *               or {@code null} if none.
+     */
+    public static <T extends Identifier> void replace(final Collection<T> identifiers, final Collection<T> oldIds) {
+        if (oldIds != null && identifiers != null) {
+            for (final T old : oldIds) {
+                final Citation authority = old.getAuthority();
+                for (final Iterator<T> it=identifiers.iterator(); it.hasNext();) {
+                    final T id = it.next();
+                    if (id == null || id.getAuthority() == authority) {
+                        it.remove();
+                    }
                 }
             }
-            if (filtered != null) {
-                identifiers.addAll(filtered);
-            }
+            identifiers.addAll(oldIds);
         }
     }
 
     /**
-     * Returns one of the constants in the {@link DefaultCitation} class.
+     * Returns one of the constants in the {@link DefaultCitation} class, or {@code null} if none.
+     * We need to use Java reflection because the {@code sis-metadata} module may not be in the
+     * classpath.
      */
     private static IdentifierSpace<?> getCitation(final String name) throws ObjectStreamException {
         try {
@@ -218,13 +277,19 @@ public final class NonMarshalledAuthorit
             field.setAccessible(true);
             return (IdentifierSpace<?>) field.get(null);
         } catch (Exception e) {
-            Logging.unexpectedException(NonMarshalledAuthority.class, "readResolve", e);
+            if (!warningLogged) {
+                warningLogged = true;
+                final LogRecord record = Errors.getResources(null).getLogRecord(Level.WARNING,
+                        Errors.Keys.MissingRequiredModule_1, "sis-metadata");
+                record.setThrown(e);
+                Logging.log(NonMarshalledAuthority.class, "readResolve", record);
+            }
         }
         return null;
     }
 
     /**
-     * Invoked at deserialization time in order to setIdentifiers the deserialized instance
+     * Invoked at deserialization time in order to replace the deserialized instance
      * by the appropriate instance defined in the {@link IdentifierSpace} interface.
      */
     private Object readResolve() throws ObjectStreamException {

Propchange: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Modified: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/SpecializedIdentifier.java
URL: http://svn.apache.org/viewvc/sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/SpecializedIdentifier.java?rev=1480602&r1=1480601&r2=1480602&view=diff
==============================================================================
--- sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/SpecializedIdentifier.java [iso-8859-1] (original)
+++ sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/SpecializedIdentifier.java [UTF-8] Thu May  9 12:24:13 2013
@@ -29,7 +29,7 @@ import org.apache.sis.util.logging.Loggi
 import org.apache.sis.internal.util.Citations;
 
 // Related to JDK7
-import org.apache.sis.internal.util.Objects;
+import org.apache.sis.internal.jdk7.Objects;
 
 
 /**
@@ -48,7 +48,7 @@ public final class SpecializedIdentifier
     /**
      * For cross-version compatibility.
      */
-    private static final long serialVersionUID = 1673231050676950993L;
+    private static final long serialVersionUID = -1699757455535495848L;
 
     /**
      * The authority, typically as a {@link NonMarshalledAuthority) instance.
@@ -197,7 +197,7 @@ public final class SpecializedIdentifier
 
     /**
      * Returns a string representation of this identifier.
-     * Example: {@code Identifier[gco:uuid=“42924124-032a-4dfe-b06e-113e3cb81cf0”]}.
+     * Example: {@code Identifier[gco:uuid=“42924124-032a-4dfe-b06e-113e3cb81cf0”]}.
      *
      * @see IdentifierMapAdapter#toString()
      */
@@ -214,8 +214,8 @@ public final class SpecializedIdentifier
     static void format(final StringBuilder buffer, final Citation authority, final String code) {
         buffer.append(Citations.getIdentifier(authority)).append('=');
         final boolean quote = (code != null) && (code.indexOf('[') < 0);
-        if (quote) buffer.append('“');
+        if (quote) buffer.append('“');
         buffer.append(code);
-        if (quote) buffer.append('”');
+        if (quote) buffer.append('”');
     }
 }

Propchange: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/SpecializedIdentifier.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Modified: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/CharSequenceAdapter.java
URL: http://svn.apache.org/viewvc/sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/CharSequenceAdapter.java?rev=1480602&r1=1480601&r2=1480602&view=diff
==============================================================================
--- sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/CharSequenceAdapter.java [iso-8859-1] (original)
+++ sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/CharSequenceAdapter.java [UTF-8] Thu May  9 12:24:13 2013
@@ -21,7 +21,7 @@ import org.opengis.util.InternationalStr
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.xml.XLink;
 import org.apache.sis.xml.ReferenceResolver;
-import org.apache.sis.internal.jaxb.MarshalContext;
+import org.apache.sis.internal.jaxb.Context;
 import org.apache.sis.internal.jaxb.gmx.Anchor;
 import org.apache.sis.internal.jaxb.gmd.PT_FreeText;
 
@@ -37,7 +37,7 @@ import org.apache.sis.internal.jaxb.gmd.
  *       in the current marshalling context maps the given text to a {@code xlink}.</li>
  * </ul>
  *
- * @author  Cédric Briançon (Geomatys)
+ * @author  Cédric Briançon (Geomatys)
  * @author  Guilhem Legal (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from geotk-3.00)
@@ -98,13 +98,13 @@ public final class CharSequenceAdapter e
          * </gmd:someElement>
          */
         if (value instanceof InternationalString) {
-            final PT_FreeText ft = PT_FreeText.create(MarshalContext.current(), (InternationalString) value);
+            final PT_FreeText ft = PT_FreeText.create(Context.current(), (InternationalString) value);
             if (ft != null) {
                 return ft;
             }
         }
         /*
-         * Invoking (indirectly) CharSequence.subSequence(…) may change the kind of object.
+         * Invoking (indirectly) CharSequence.subSequence(…) may change the kind of object.
          * We know that Anchor is safe, and that most InternationalString implementations
          * lost the localized strings. This is why we trim the white spaces only here.
          */
@@ -118,8 +118,8 @@ public final class CharSequenceAdapter e
         if (!(value instanceof Anchor)) {
             final String key = CharSequences.trimWhitespaces(value.toString());
             if (key != null && !key.isEmpty()) {
-                final MarshalContext context = MarshalContext.current();
-                final XLink linkage = MarshalContext.resolver(context).anchor(context, value, key);
+                final Context context = Context.current();
+                final XLink linkage = Context.resolver(context).anchor(context, value, key);
                 if (linkage != null) {
                     if (linkage instanceof Anchor) {
                         value = (Anchor) linkage;
@@ -133,11 +133,11 @@ public final class CharSequenceAdapter e
          * At this stage, the value (typically a String or InternationalString) may
          * have been replaced by an Anchor. The output will be one of the following:
          *
-         * ┌──────────────────────────────────────────────────┬────────────────────────────────┐
-         * │ <gmd:someElement>                                │ <gmd:someElement>              │
-         * │   <gco:CharacterString>...</gco:CharacterString> │   <gmx:Anchor>...</gmx:Anchor> │
-         * │ </gmd:someElement>                               │ </gmd:someElement>             │
-         * └──────────────────────────────────────────────────┴────────────────────────────────┘
+         * ┌──────────────────────────────────────────────────┬────────────────────────────────┐
+         * │ <gmd:someElement>                                │ <gmd:someElement>              │
+         * │   <gco:CharacterString>...</gco:CharacterString> │   <gmx:Anchor>...</gmx:Anchor> │
+         * │ </gmd:someElement>                               │ </gmd:someElement>             │
+         * └──────────────────────────────────────────────────┴────────────────────────────────┘
          */
         return new GO_CharacterString(value);
     }
@@ -157,8 +157,8 @@ public final class CharSequenceAdapter e
             return null;
         }
         CharSequence value = string;
-        final MarshalContext context = MarshalContext.current();
-        final XLink linkage = MarshalContext.resolver(context).anchor(context, object, string);
+        final Context context = Context.current();
+        final XLink linkage = Context.resolver(context).anchor(context, object, string);
         if (linkage != null) {
             if (linkage instanceof Anchor) {
                 value = (Anchor) linkage;

Propchange: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/CharSequenceAdapter.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Propchange: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Boolean.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8



Mime
View raw message