sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1785619 - in /sis/branches/JDK8: core/sis-metadata/src/main/java/org/apache/sis/metadata/ core/sis-metadata/src/test/java/org/apache/sis/metadata/ core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/ storage/sis-earth-observ...
Date Mon, 06 Mar 2017 10:19:02 GMT
Author: desruisseaux
Date: Mon Mar  6 10:19:02 2017
New Revision: 1785619

URL: http://svn.apache.org/viewvc?rev=1785619&view=rev
Log:
Fix the property order when the metadata implementation is a custom class.

Modified:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/CacheKey.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyComparator.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/SpecialCases.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNodeChildren.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataTestCase.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyAccessorTest.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/SpecialCasesTest.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableFormatTest.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBoxTest.java
    sis/branches/JDK8/storage/sis-earth-observation/src/test/java/org/apache/sis/storage/earthobservation/LandsatReaderTest.java
    sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/storage/netcdf/MetadataReaderTest.java

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/CacheKey.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/CacheKey.java?rev=1785619&r1=1785618&r2=1785619&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/CacheKey.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/CacheKey.java
[UTF-8] Mon Mar  6 10:19:02 2017
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.metadata;
 
+import org.apache.sis.util.Classes;
 import org.apache.sis.util.Debug;
 import org.apache.sis.util.resources.Errors;
 
@@ -96,9 +97,9 @@ final class CacheKey {
     @Debug
     @Override
     public String toString() {
-        String name = (type != null) ? type.getCanonicalName() : "null";
+        String name = Classes.getShortName(type);
         if (propertyType != Object.class) {
-            name = name + " as " + propertyType.getSimpleName();
+            name = name + " as " + Classes.getShortName(propertyType);
         }
         return name;
     }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java?rev=1785619&r1=1785618&r2=1785619&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java
[UTF-8] Mon Mar  6 10:19:02 2017
@@ -360,11 +360,12 @@ public class MetadataStandard implements
             if (v instanceof PropertyAccessor) {
                 return v;
             }
+            final Class<?> standardImpl = getImplementation(type);
             final PropertyAccessor accessor;
             if (SpecialCases.isSpecialCase(type)) {
-                accessor = new SpecialCases(citation, type, key.type);
+                accessor = new SpecialCases(citation, type, k.type, standardImpl);
             } else {
-                accessor = new PropertyAccessor(citation, type, key.type);
+                accessor = new PropertyAccessor(citation, type, k.type, standardImpl);
             }
             return accessor;
         });

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java?rev=1785619&r1=1785618&r2=1785619&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java
[UTF-8] Mon Mar  6 10:19:02 2017
@@ -238,13 +238,15 @@ class PropertyAccessor {
      * @param  standard        the standard which define the {@code type} interface.
      * @param  type            the interface implemented by the metadata class.
      * @param  implementation  the class of metadata implementations, or {@code type} if
none.
+     * @param  standardImpl    the implementation specified by the {@link MetadataStandard},
or {@code null} if none.
+     *                         This is the same than {@code implementation} unless a custom
implementation is used.
      */
-    PropertyAccessor(final Citation standard, final Class<?> type, final Class<?>
implementation) {
+    PropertyAccessor(final Citation standard, final Class<?> type, final Class<?>
implementation, final Class<?> standardImpl) {
         assert type.isAssignableFrom(implementation) : implementation;
         this.standard       = standard;
         this.type           = type;
         this.implementation = implementation;
-        this.getters        = getGetters(type, implementation);
+        this.getters        = getGetters(type, implementation, standardImpl);
         int allCount = getters.length;
         int standardCount = allCount;
         if (allCount != 0 && getters[allCount-1] == EXTRA_GETTER) {
@@ -400,9 +402,10 @@ class PropertyAccessor {
      *
      * @param  type            the metadata interface.
      * @param  implementation  the class of metadata implementations, or {@code type} if
none.
+     * @param  standardImpl    the implementation specified by the {@link MetadataStandard},
or {@code null} if none.
      * @return the getters declared in the given interface (never {@code null}).
      */
-    private static Method[] getGetters(final Class<?> type, final Class<?> implementation)
{
+    private static Method[] getGetters(final Class<?> type, final Class<?> implementation,
final Class<?> standardImpl) {
         /*
          * Indices map is used for choosing what to do in case of name collision.
          */
@@ -466,7 +469,7 @@ class PropertyAccessor {
          * keep the extra methods last. The code checking for the extra methods require
          * them to be last.
          */
-        Arrays.sort(getters, 0, count, new PropertyComparator(implementation));
+        Arrays.sort(getters, 0, count, new PropertyComparator(implementation, standardImpl));
         if (!hasExtraGetter) {
             if (getters.length == count) {
                 getters = Arrays.copyOf(getters, count+1);

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyComparator.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyComparator.java?rev=1785619&r1=1785618&r2=1785619&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyComparator.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyComparator.java
[UTF-8] Mon Mar  6 10:19:02 2017
@@ -44,7 +44,7 @@ import org.opengis.annotation.Obligation
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
- * @version 0.5
+ * @version 0.8
  * @module
  */
 final class PropertyComparator implements Comparator<Method> {
@@ -92,10 +92,32 @@ final class PropertyComparator implement
      * Creates a new comparator for the given implementation class.
      *
      * @param implementation  the implementation class, or the interface if the implementation
class is unknown.
+     * @param standardImpl    the implementation specified by the {@link MetadataStandard},
or {@code null} if none.
+     *                        This is the same than {@code implementation} unless a custom
implementation is used.
      */
-    PropertyComparator(Class<?> implementation) {
-        this.implementation = implementation;
+    PropertyComparator(Class<?> implementation, final Class<?> standardImpl)
{
         order = new HashMap<>();
+        defineOrder(implementation, order);
+        if (order.isEmpty() && standardImpl != null && !standardImpl.isAssignableFrom(implementation))
{
+            /*
+             * We enter in this block only if the user specified its own metadata implementation
and that
+             * custom implementation does not have any JAXB @XmlType annotation. In such
case this method
+             * can not sort the properties. So we will use the class defined by org.apache.sis.metadata.iso
+             * instead.
+             */
+            implementation = standardImpl;
+            defineOrder(implementation, order);
+        }
+        this.implementation = implementation;
+    }
+
+    /**
+     * Uses the {@link XmlType} annotation for defining the property order.
+     *
+     * @param implementation  the implementation class where to search for {@code XmlType}
annotation.
+     * @param order           the {@link #order} map where to store the properties order.
+     */
+    private static void defineOrder(Class<?> implementation, final Map<Object,Integer>
order) {
         do {
             final XmlType xml = implementation.getAnnotation(XmlType.class);
             if (xml != null) {

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/SpecialCases.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/SpecialCases.java?rev=1785619&r1=1785618&r2=1785619&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/SpecialCases.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/SpecialCases.java
[UTF-8] Mon Mar  6 10:19:02 2017
@@ -31,7 +31,7 @@ import org.apache.sis.util.collection.Ba
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
- * @version 0.5
+ * @version 0.8
  * @module
  */
 final class SpecialCases extends PropertyAccessor {
@@ -47,9 +47,11 @@ final class SpecialCases extends Propert
      * @param  type            the interface implemented by the metadata, which must be
      *                         the value returned by {@link #getStandardType(Class, String)}.
      * @param  implementation  the class of metadata implementations, or {@code type} if
none.
+     * @param  standardImpl    the implementation specified by the {@link MetadataStandard},
or {@code null} if none.
+     *                         This is the same than {@code implementation} unless a custom
implementation is used.
      */
-    SpecialCases(final Citation standard, final Class<?> type, final Class<?>
implementation) {
-        super(standard, type, implementation);
+    SpecialCases(final Citation standard, final Class<?> type, final Class<?>
implementation, final Class<?> standardImpl) {
+        super(standard, type, implementation, standardImpl);
         assert isSpecialCase(type) : type;
         westBoundLongitude = indexOf("westBoundLongitude", true);
         eastBoundLongitude = indexOf("eastBoundLongitude", true);

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNodeChildren.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNodeChildren.java?rev=1785619&r1=1785618&r2=1785619&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNodeChildren.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNodeChildren.java
[UTF-8] Mon Mar  6 10:19:02 2017
@@ -114,7 +114,7 @@ final class TreeNodeChildren extends Abs
         this.parent   = parent;
         this.metadata = metadata;
         this.accessor = accessor;
-        children = new TreeNode[accessor.count()];
+        this.children = new TreeNode[accessor.count()];
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataTestCase.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataTestCase.java?rev=1785619&r1=1785618&r2=1785619&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataTestCase.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataTestCase.java
[UTF-8] Mon Mar  6 10:19:02 2017
@@ -189,7 +189,7 @@ public abstract strictfp class MetadataT
                 final Class<?> impl = getImplementation(type);
                 if (impl != null) {
                     assertTrue(type.isAssignableFrom(impl));
-                    testPropertyValues(new PropertyAccessor(standard.getCitation(), type,
impl));
+                    testPropertyValues(new PropertyAccessor(standard.getCitation(), type,
impl, impl));
                 }
             }
         }

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyAccessorTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyAccessorTest.java?rev=1785619&r1=1785618&r2=1785619&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyAccessorTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyAccessorTest.java
[UTF-8] Mon Mar  6 10:19:02 2017
@@ -92,7 +92,7 @@ public final strictfp class PropertyAcce
      * Creates a new property accessor for the {@link DefaultCitation} class.
      */
     private static PropertyAccessor createPropertyAccessor() {
-        return new PropertyAccessor(HardCodedCitations.ISO_19115, Citation.class, DefaultCitation.class);
+        return new PropertyAccessor(HardCodedCitations.ISO_19115, Citation.class, DefaultCitation.class,
DefaultCitation.class);
     }
 
     /**
@@ -200,7 +200,7 @@ public final strictfp class PropertyAcce
     @Test
     @DependsOnMethod("testConstructor")
     public void testConstructorWithInheritance() {
-        assertMappingEquals(new PropertyAccessor(HardCodedCitations.ISO_19115, DataIdentification.class,
DefaultDataIdentification.class),
+        assertMappingEquals(new PropertyAccessor(HardCodedCitations.ISO_19115, DataIdentification.class,
DefaultDataIdentification.class, DefaultDataIdentification.class),
         //……Declaring type………………………Method………………………………………………………………………JavaBeans………………………………………………………UML
identifier………………………………………Sentence……………………………………………………………Type………………………………………………………………
             Identification.class, "getCitation",                   "citation",          
        "citation",                  "Citation",                     Citation.class,
             Identification.class, "getAbstract",                   "abstract",          
        "abstract",                  "Abstract",                     InternationalString.class,
@@ -238,7 +238,7 @@ public final strictfp class PropertyAcce
     @DependsOnMethod("testConstructorWithInheritance")
     public void testConstructorWithCovariantReturnType() {
         final Class<?> type = GeographicCRS.class;
-        assertMappingEquals(new PropertyAccessor(HardCodedCitations.ISO_19111, type, type),
+        assertMappingEquals(new PropertyAccessor(HardCodedCitations.ISO_19111, type, type,
type),
         //……Declaring type……………………………Method……………………………………………JavaBeans……………………………UML
identifier………………Sentence…………………………………Type…………………………………………………………
             GeographicCRS.class,    "getCoordinateSystem", "coordinateSystem", "coordinateSystem",
"Coordinate system",  EllipsoidalCS.class,       // Covariant return type
             GeodeticCRS.class,      "getDatum",            "datum",            "datum", 
          "Datum",              GeodeticDatum.class,       // Covariant return type
@@ -368,7 +368,7 @@ public final strictfp class PropertyAcce
     @DependsOnMethod("testSet")
     public void testSetDeprecated() {
         final PropertyAccessor accessor = new PropertyAccessor(HardCodedCitations.ISO_19115,
-                CoverageDescription.class, DefaultCoverageDescription.class);
+                CoverageDescription.class, DefaultCoverageDescription.class, DefaultCoverageDescription.class);
         final int indexOfDeprecated  = accessor.indexOf("contentType", true);
         final int indexOfReplacement = accessor.indexOf("attributeGroup", true);
         assertTrue("Deprecated elements shall be sorted after non-deprecated ones.",

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/SpecialCasesTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/SpecialCasesTest.java?rev=1785619&r1=1785618&r2=1785619&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/SpecialCasesTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/SpecialCasesTest.java
[UTF-8] Mon Mar  6 10:19:02 2017
@@ -57,7 +57,7 @@ public final strictfp class SpecialCases
      */
     public SpecialCasesTest() {
         accessor = new SpecialCases(HardCodedCitations.ISO_19115,
-                GeographicBoundingBox.class, DefaultGeographicBoundingBox.class);
+                GeographicBoundingBox.class, DefaultGeographicBoundingBox.class, DefaultGeographicBoundingBox.class);
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableFormatTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableFormatTest.java?rev=1785619&r1=1785618&r2=1785619&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableFormatTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableFormatTest.java
[UTF-8] Mon Mar  6 10:19:02 2017
@@ -86,10 +86,10 @@ public final strictfp class TreeTableFor
             "  ├─Title……………………………………………………………………………
Undercurrent\n" +
             "  ├─Alternate title…………………………………………………
Andākarento\n" +
             "  ├─Identifier\n" +
-            "  │   ├─Code……………………………………………………………………
9782505004509\n" +
             "  │   ├─Authority\n" +
             "  │   │   ├─Title………………………………………………………
International Standard Book Number\n" +
             "  │   │   └─Alternate title……………………………
ISBN\n" +
+            "  │   ├─Code……………………………………………………………………
9782505004509\n" +
             "  │   └─Code space……………………………………………………
ISBN\n"+
             "  ├─Cited responsible party (1 of 2)\n" +
             "  │   ├─Party\n" +

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBoxTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBoxTest.java?rev=1785619&r1=1785618&r2=1785619&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBoxTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBoxTest.java
[UTF-8] Mon Mar  6 10:19:02 2017
@@ -21,11 +21,12 @@ import org.opengis.metadata.extent.Geogr
 import org.apache.sis.measure.Latitude;
 import org.apache.sis.measure.Longitude;
 import org.apache.sis.test.DependsOnMethod;
+import org.apache.sis.test.TestUtilities;
 import org.apache.sis.test.TestCase;
 import org.junit.Test;
 
 import static java.lang.Double.NaN;
-import static org.junit.Assert.*;
+import static org.apache.sis.test.Assert.*;
 
 
 /**
@@ -33,7 +34,7 @@ import static org.junit.Assert.*;
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
- * @version 0.5
+ * @version 0.8
  * @module
  */
 public final strictfp class DefaultGeographicBoundingBoxTest extends TestCase {
@@ -418,4 +419,31 @@ public final strictfp class DefaultGeogr
             Boolean.TRUE
         }, map.values().toArray());
     }
+
+    /**
+     * Tests the {@code toString()} implementation of a custom geographic bounding box inside
a {@link DefaultExtent}.
+     * In a previous Apache SIS version, those properties were not properly sorted.
+     *
+     * @since 0.8
+     */
+    @Test
+    public void testToString() {
+        final GeographicBoundingBox bbox = new GeographicBoundingBox() {
+            @Override public double getWestBoundLongitude() {return -40;}
+            @Override public double getEastBoundLongitude() {return  50;}
+            @Override public double getSouthBoundLatitude() {return -20;}
+            @Override public double getNorthBoundLatitude() {return  45;}
+            @Override public Boolean getInclusion() {return Boolean.TRUE;}
+        };
+        final DefaultExtent extent = new DefaultExtent(null, bbox, null, null);
+        assertSame(bbox, TestUtilities.getSingleton(extent.getGeographicElements()));
+        assertMultilinesEquals(
+                "Extent\n" +
+                "  └─Geographic element\n" +
+                "      ├─West bound longitude…… 40°W\n" +
+                "      ├─East bound longitude…… 50°E\n" +
+                "      ├─South bound latitude…… 20°S\n" +
+                "      ├─North bound latitude…… 45°N\n" +
+                "      └─Extent type code……………… true\n", extent.toString());
+    }
 }

Modified: sis/branches/JDK8/storage/sis-earth-observation/src/test/java/org/apache/sis/storage/earthobservation/LandsatReaderTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-earth-observation/src/test/java/org/apache/sis/storage/earthobservation/LandsatReaderTest.java?rev=1785619&r1=1785618&r2=1785619&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-earth-observation/src/test/java/org/apache/sis/storage/earthobservation/LandsatReaderTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-earth-observation/src/test/java/org/apache/sis/storage/earthobservation/LandsatReaderTest.java
[UTF-8] Mon Mar  6 10:19:02 2017
@@ -295,27 +295,27 @@ public class LandsatReaderTest extends T
                 + "  │   └─Code……………………………………………………………………………………………
LandsatTest\n"
                 + "  ├─Metadata standard (1 of 2)\n"
                 + "  │   ├─Title…………………………………………………………………………………………
Geographic Information — Metadata Part 1: Fundamentals\n"
-                + "  │   ├─Cited responsible party\n"
-                + "  │   │   ├─Party\n"
-                + "  │   │   │   └─Name………………………………………………………………………
International Organization for Standardization\n"
-                + "  │   │   └─Role…………………………………………………………………………………
Principal investigator\n"
                 + "  │   ├─Edition……………………………………………………………………………………
ISO 19115-1:2014(E)\n"
                 + "  │   ├─Identifier\n"
                 + "  │   │   ├─Code…………………………………………………………………………………
19115-1\n"
                 + "  │   │   ├─Code space…………………………………………………………………
ISO\n"
                 + "  │   │   └─Version…………………………………………………………………………
2014(E)\n"
+                + "  │   ├─Cited responsible party\n"
+                + "  │   │   ├─Party\n"
+                + "  │   │   │   └─Name………………………………………………………………………
International Organization for Standardization\n"
+                + "  │   │   └─Role…………………………………………………………………………………
Principal investigator\n"
                 + "  │   └─Presentation form…………………………………………………………
Document digital\n"
                 + "  └─Metadata standard (2 of 2)\n"
                 + "      ├─Title…………………………………………………………………………………………
Geographic Information — Metadata Part 2: Extensions for imagery and gridded data\n"
-                + "      ├─Cited responsible party\n"
-                + "      │   ├─Party\n"
-                + "      │   │   └─Name………………………………………………………………………
International Organization for Standardization\n"
-                + "      │   └─Role…………………………………………………………………………………
Principal investigator\n"
                 + "      ├─Edition……………………………………………………………………………………
ISO 19115-2:2009(E)\n"
                 + "      ├─Identifier\n"
                 + "      │   ├─Code…………………………………………………………………………………
19115-2\n"
                 + "      │   ├─Code space…………………………………………………………………
ISO\n"
                 + "      │   └─Version…………………………………………………………………………
2009(E)\n"
+                + "      ├─Cited responsible party\n"
+                + "      │   ├─Party\n"
+                + "      │   │   └─Name………………………………………………………………………
International Organization for Standardization\n"
+                + "      │   └─Role…………………………………………………………………………………
Principal investigator\n"
                 + "      └─Presentation form…………………………………………………………
Document digital\n", text);
     }
 }

Modified: sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/storage/netcdf/MetadataReaderTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/storage/netcdf/MetadataReaderTest.java?rev=1785619&r1=1785618&r2=1785619&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/storage/netcdf/MetadataReaderTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/storage/netcdf/MetadataReaderTest.java
[UTF-8] Mon Mar  6 10:19:02 2017
@@ -158,27 +158,27 @@ public final strictfp class MetadataRead
             "  │   └─Code……………………………………………………………………………………………
NCEP/SST/Global_5x2p5deg/SST_Global_5x2p5deg_20050922_0000.nc\n" +
             "  ├─Metadata standard (1 of 2)\n" +
             "  │   ├─Title…………………………………………………………………………………………
Geographic Information — Metadata Part 1: Fundamentals\n" +
-            "  │   ├─Cited responsible party\n" +
-            "  │   │   ├─Party\n" +
-            "  │   │   │   └─Name………………………………………………………………………
International Organization for Standardization\n" +
-            "  │   │   └─Role…………………………………………………………………………………
Principal investigator\n" +
             "  │   ├─Edition……………………………………………………………………………………
ISO 19115-1:2014(E)\n" +
             "  │   ├─Identifier\n" +
             "  │   │   ├─Code…………………………………………………………………………………
19115-1\n" +
             "  │   │   ├─Code space…………………………………………………………………
ISO\n" +
             "  │   │   └─Version…………………………………………………………………………
2014(E)\n" +
+            "  │   ├─Cited responsible party\n" +
+            "  │   │   ├─Party\n" +
+            "  │   │   │   └─Name………………………………………………………………………
International Organization for Standardization\n" +
+            "  │   │   └─Role…………………………………………………………………………………
Principal investigator\n" +
             "  │   └─Presentation form…………………………………………………………
Document digital\n" +
             "  └─Metadata standard (2 of 2)\n" +
             "      ├─Title…………………………………………………………………………………………
Geographic Information — Metadata Part 2: Extensions for imagery and gridded data\n" +
-            "      ├─Cited responsible party\n" +
-            "      │   ├─Party\n" +
-            "      │   │   └─Name………………………………………………………………………
International Organization for Standardization\n" +
-            "      │   └─Role…………………………………………………………………………………
Principal investigator\n" +
             "      ├─Edition……………………………………………………………………………………
ISO 19115-2:2009(E)\n" +
             "      ├─Identifier\n" +
             "      │   ├─Code…………………………………………………………………………………
19115-2\n" +
             "      │   ├─Code space…………………………………………………………………
ISO\n" +
             "      │   └─Version…………………………………………………………………………
2009(E)\n" +
+            "      ├─Cited responsible party\n" +
+            "      │   ├─Party\n" +
+            "      │   │   └─Name………………………………………………………………………
International Organization for Standardization\n" +
+            "      │   └─Role…………………………………………………………………………………
Principal investigator\n" +
             "      └─Presentation form…………………………………………………………
Document digital\n", text);
     }
 }



Mime
View raw message