sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1611103 - in /sis/branches/JDK8/core: sis-metadata/src/main/java/org/apache/sis/internal/metadata/ sis-metadata/src/main/java/org/apache/sis/metadata/ sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/ sis-metadata/src/main/j...
Date Wed, 16 Jul 2014 17:33:58 GMT
Author: desruisseaux
Date: Wed Jul 16 17:33:57 2014
New Revision: 1611103

URL: http://svn.apache.org/r1611103
Log:
Added test.

Added:
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/DefaultMetadataTest.java
      - copied, changed from r1610648, sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultMetadataTest.java
    sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/test/integration/Metadata.xml   (with props)
Modified:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/LegacyPropertyAdapter.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/LegacyTelephones.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultVerticalExtent.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultMetadataTest.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/LegacyPropertyAdapter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/LegacyPropertyAdapter.java?rev=1611103&r1=1611102&r2=1611103&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/LegacyPropertyAdapter.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/LegacyPropertyAdapter.java [UTF-8] Wed Jul 16 17:33:57 2014
@@ -44,7 +44,7 @@ public abstract class LegacyPropertyAdap
     /**
      * The collection where to store the elements.
      */
-    final Collection<N> elements;
+    protected final Collection<N> elements;
 
     /**
      * For logging warning only once per collection usage.
@@ -224,13 +224,13 @@ public abstract class LegacyPropertyAdap
     /**
      * Adds a new element.
      *
-     * @param  element The element to add.
+     * @param  value The element to add.
      * @return {@code true} if the element has been added.
      */
     @Override
-    public final boolean add(final L element) {
-        ArgumentChecks.ensureNonNull("element", element);
-        return elements.add(wrap(element));
+    public boolean add(final L value) {
+        ArgumentChecks.ensureNonNull("value", value);
+        return elements.add(wrap(value));
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java?rev=1611103&r1=1611102&r2=1611103&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java [UTF-8] Wed Jul 16 17:33:57 2014
@@ -86,8 +86,8 @@ import static org.apache.sis.internal.ja
 @XmlTransient
 public abstract class ModifiableMetadata extends AbstractMetadata implements Cloneable {
     /**
-     * Initial capacity of lists and sets. We use a small value because those
-     * collections will typically contain few elements (often just a singleton).
+     * Initial capacity of sets. We use a small value because collections will typically
+     * contain few elements (often just a singleton).
      */
     private static final int INITIAL_CAPACITY = 4;
 
@@ -500,7 +500,7 @@ public abstract class ModifiableMetadata
         if (useSet(elementType)) {
             collection = createSet(elementType, INITIAL_CAPACITY);
         } else {
-            collection = new CheckedArrayList<>(elementType, INITIAL_CAPACITY);
+            collection = new CheckedArrayList<>(elementType, 1);
         }
         collection.add(value);
         return collection;
@@ -523,7 +523,14 @@ public abstract class ModifiableMetadata
             return null;
         }
         if (isModifiable()) {
-            return new CheckedArrayList<>(elementType, INITIAL_CAPACITY);
+            /*
+             * Do not specify an initial capacity, because the list will stay empty in a majority of cases
+             * (i.e. the users will want to iterate over the list elements more often than they will want
+             * to add elements). JDK implementation of ArrayList has a lazy instantiation mechanism for
+             * initially empty lists, but as of JDK8 this lazy instantiation works only for list having
+             * the default capacity.
+             */
+            return new CheckedArrayList<>(elementType);
         }
         return Collections.emptyList();
     }
@@ -545,7 +552,7 @@ public abstract class ModifiableMetadata
             return null;
         }
         if (isModifiable()) {
-            return new CheckedHashSet<>(elementType, INITIAL_CAPACITY);
+            return createSet(elementType, INITIAL_CAPACITY);
         }
         return Collections.emptySet();
     }
@@ -584,7 +591,8 @@ public abstract class ModifiableMetadata
             }
         } else {
             if (isModifiable) {
-                return new CheckedArrayList<>(elementType, INITIAL_CAPACITY);
+                // Do not specify an initial capacity for the reason explained in nonNullList(…).
+                return new CheckedArrayList<>(elementType);
             } else {
                 return Collections.emptyList();
             }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java?rev=1611103&r1=1611102&r2=1611103&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java [UTF-8] Wed Jul 16 17:33:57 2014
@@ -311,7 +311,7 @@ public class DefaultResponsibleParty ext
     /**
      * Sets the address of the responsible party.
      *
-     * <p>This implementation sets the contact info in the first pary found in the collection of
+     * <p>This implementation sets the contact info in the first party found in the collection of
      * {@linkplain #getParties() parties}.</p>
      *
      * @param newValue The new contact info, or {@code null} if none.

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/LegacyTelephones.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/LegacyTelephones.java?rev=1611103&r1=1611102&r2=1611103&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/LegacyTelephones.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/LegacyTelephones.java [UTF-8] Wed Jul 16 17:33:57 2014
@@ -17,9 +17,11 @@
 package org.apache.sis.metadata.iso.citation;
 
 import java.util.Collection;
+import java.util.Iterator;
 import org.opengis.metadata.citation.Telephone;
 import org.opengis.metadata.citation.TelephoneType;
 import org.apache.sis.internal.metadata.LegacyPropertyAdapter;
+import org.apache.sis.util.ArgumentChecks;
 
 
 /**
@@ -86,4 +88,27 @@ final class LegacyTelephones extends Leg
         }
         return false;
     }
+
+    /**
+     * Adds a new telephone number. As a special case if the first element is empty, then the telephone number
+     * will be set in that element. We test only the first element because {@link DefaultTelephone#getOwner()}
+     * initialize new collections as collection containing {@code DefaultTelephone.this}.
+     *
+     * @param  value The telephone number to add.
+     * @return {@code true} if the element has been added.
+     */
+    @Override
+    public boolean add(final String value) {
+        ArgumentChecks.ensureNonNull("value", value);
+        final Iterator<Telephone> it = elements.iterator();
+        if (it.hasNext()) {
+            final Telephone telephone = it.next();
+            if (telephone instanceof DefaultTelephone && ((DefaultTelephone) telephone).isEmpty()) {
+                if (update(telephone, value)) {
+                    return true;
+                }
+            }
+        }
+        return elements.add(wrap(value));
+    }
 }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultVerticalExtent.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultVerticalExtent.java?rev=1611103&r1=1611102&r2=1611103&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultVerticalExtent.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultVerticalExtent.java [UTF-8] Wed Jul 16 17:33:57 2014
@@ -82,16 +82,16 @@ public class DefaultVerticalExtent exten
     /**
      * Creates a vertical extent initialized to the specified values.
      *
-     * @param minimumValue The lowest vertical extent contained in the dataset.
-     * @param maximumValue The highest vertical extent contained in the dataset.
+     * @param minimumValue The lowest vertical extent contained in the dataset, or {@link Double#NaN} if none.
+     * @param maximumValue The highest vertical extent contained in the dataset, or {@link Double#NaN} if none.
      * @param verticalCRS  The information about the vertical coordinate reference system, or {@code null}.
      */
     public DefaultVerticalExtent(final double minimumValue,
                                  final double maximumValue,
                                  final VerticalCRS verticalCRS)
     {
-        this.minimumValue = minimumValue;
-        this.maximumValue = maximumValue;
+        if (!Double.isNaN(minimumValue)) this.minimumValue = minimumValue;
+        if (!Double.isNaN(maximumValue)) this.maximumValue = maximumValue;
         this.verticalCRS  = verticalCRS;
     }
 

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultMetadataTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultMetadataTest.java?rev=1611103&r1=1611102&r2=1611103&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultMetadataTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultMetadataTest.java [UTF-8] Wed Jul 16 17:33:57 2014
@@ -38,6 +38,10 @@ import static org.apache.sis.test.Assert
  *   <li>{@code "core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso"}</li>
  * </ul>
  *
+ * Metadata tested by this class do not include Coordinate Reference System (CRS) information. A metadata
+ * object with CRS information is tested by {@code org.apache.sis.test.integration.DefaultMetadataTest}
+ * in the {@code sis-referencing} module.
+ *
  * @author  Cédric Briançon (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from geotk-2.5)

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java?rev=1611103&r1=1611102&r2=1611103&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java [UTF-8] Wed Jul 16 17:33:57 2014
@@ -26,7 +26,7 @@ import org.junit.BeforeClass;
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
- * @version 0.4
+ * @version 0.5
  * @module
  */
 @Suite.SuiteClasses({

Copied: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/DefaultMetadataTest.java (from r1610648, sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultMetadataTest.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/DefaultMetadataTest.java?p2=sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/DefaultMetadataTest.java&p1=sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultMetadataTest.java&r1=1610648&r2=1611103&rev=1611103&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultMetadataTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/DefaultMetadataTest.java [UTF-8] Wed Jul 16 17:33:57 2014
@@ -14,108 +14,314 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.metadata.iso;
+package org.apache.sis.test.integration;
 
-import java.util.logging.LogRecord;
-import javax.xml.bind.Unmarshaller;
+import java.net.URI;
+import java.util.Arrays;
+import java.util.Locale;
 import javax.xml.bind.JAXBException;
-import org.apache.sis.xml.XML;
-import org.apache.sis.xml.Namespaces;
-import org.apache.sis.xml.MarshallerPool;
-import org.apache.sis.util.logging.WarningListener;
+import javax.measure.unit.SI;
+
+import org.opengis.metadata.*;
+import org.opengis.metadata.citation.*;
+import org.opengis.metadata.constraint.*;
+import org.opengis.metadata.identification.*;
+import org.opengis.metadata.maintenance.*;
+import org.opengis.metadata.spatial.*;
+import org.opengis.referencing.cs.AxisDirection;
+import org.opengis.referencing.datum.VerticalDatumType;
+
+import org.apache.sis.metadata.iso.*;
+import org.apache.sis.metadata.iso.citation.*;
+import org.apache.sis.metadata.iso.constraint.*;
+import org.apache.sis.metadata.iso.content.*;
+import org.apache.sis.metadata.iso.distribution.*;
+import org.apache.sis.metadata.iso.extent.*;
+import org.apache.sis.metadata.iso.identification.*;
+import org.apache.sis.metadata.iso.spatial.*;
+import org.apache.sis.referencing.datum.DefaultVerticalDatum;
+import org.apache.sis.referencing.cs.DefaultCoordinateSystemAxis;
+import org.apache.sis.referencing.cs.DefaultVerticalCS;
+import org.apache.sis.referencing.crs.DefaultVerticalCRS;
+import org.apache.sis.internal.jaxb.metadata.ReferenceSystemMetadata;
+import org.apache.sis.internal.jaxb.gmx.Anchor;
+import org.apache.sis.referencing.NamedIdentifier;
+import org.apache.sis.util.iso.SimpleInternationalString;
+import org.apache.sis.util.ComparisonMode;
+import org.apache.sis.test.TestUtilities;
 import org.apache.sis.test.XMLTestCase;
+import org.apache.sis.test.DependsOn;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import static org.apache.sis.test.Assert.*;
+import static java.util.Collections.singleton;
+import static java.util.Collections.singletonMap;
 
 
 /**
- * Tests XML (un)marshalling of various metadata objects.
- * For every metadata objects tested by this class, the expected XML representation
- * is provided by {@code *.xml} files in the following directory:
- *
- * <ul>
- *   <li>{@code "core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso"}</li>
- * </ul>
+ * Tests XML (un)marshalling of a metadata object containing various elements
+ * in addition to Coordinate Reference System (CRS) elements.
  *
- * @author  Cédric Briançon (Geomatys)
+ * @author  Guilhem Legal (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
- * @since   0.3 (derived from geotk-2.5)
- * @version 0.4
+ * @since   0.5
+ * @version 0.5
  * @module
+ *
+ * @see org.apache.sis.metadata.iso.DefaultMetadataTest
  */
-public final strictfp class DefaultMetadataTest extends XMLTestCase implements WarningListener<Object> {
-    /**
-     * The resource key for the message of the warning that occurred while unmarshalling a XML fragment,
-     * or {@code null} if none.
-     */
-    private Object resourceKey;
-
-    /**
-     * The parameter of the warning that occurred while unmarshalling a XML fragment, or {@code null} if none.
-     */
-    private Object[] parameters;
-
+@DependsOn(ReferencingInMetadataTest.class)
+public strictfp class DefaultMetadataTest extends XMLTestCase {
     /**
-     * For internal {@code DefaultMetadata} usage.
+     * Sets the temporal extent. The current implementation does nothing, because {@code sis-metadata} does not have
+     * any dependency to {@code sis-temporal}. However a future version or an other module may implement this method.
      *
-     * @return {@code Object.class}.
+     * @param extent    The extent to set.
+     * @param startTime The start time in the {@code "yyy-mm-dd"} format.
+     * @param endTime   The end time in the {@code "yyy-mm-dd"} format.
      */
-    @Override
-    public Class<Object> getSourceClass() {
-        return Object.class;
+    protected void setTemporalBounds(final DefaultTemporalExtent extent, final String startTime, final String endTime) {
     }
 
     /**
-     * Invoked when a warning occurred while unmarshalling a test XML fragment. This method ensures that no other
-     * warning occurred before this method call (i.e. each test is allowed to cause at most one warning), then
-     * remember the warning parameters for verification by the test method.
-     *
-     * @param source  Ignored.
-     * @param warning The warning.
+     * Programmatically creates the metadata to marshall, or to compare against the unmarshalled metadata.
      */
-    @Override
-    public void warningOccured(final Object source, final LogRecord warning) {
-        assertNull(resourceKey);
-        assertNull(parameters);
-        assertNotNull(resourceKey = warning.getMessage());
-        assertNotNull(parameters  = warning.getParameters());
+    private DefaultMetadata createHardCoded() {
+        final DefaultMetadata metadata = new DefaultMetadata();
+        metadata.setFileIdentifier("Apache SIS/Metadata test");
+        metadata.setLanguage(Locale.ENGLISH);
+        metadata.setCharacterSet(CharacterSet.UTF_8);
+        metadata.setHierarchyLevels(singleton(ScopeCode.DATASET));
+        metadata.setHierarchyLevelNames(singleton("Common Data Index record"));
+        metadata.setDateStamp(TestUtilities.date("2009-01-01 04:00:00"));
+        /*
+         * Contact information for the author. The same party will be used
+         * for custodian and distributor, with only the role changed.
+         */
+        final DefaultResponsibleParty author = new DefaultResponsibleParty(Role.AUTHOR);
+        final Anchor country = new Anchor(URI.create("SDN:C320:2:FR"), "France"); // Non-public SIS class.
+        {
+            final DefaultOnlineResource online = new DefaultOnlineResource(URI.create("http://www.ifremer.fr/sismer/"));
+            online.setProtocol("http");
+            final DefaultContact contact = new DefaultContact(online);
+            contact.setPhones(Arrays.asList(
+                    new DefaultTelephone("+33 (0)2 xx.xx.xx.x6", TelephoneType.VOICE),
+                    new DefaultTelephone("+33 (0)2 xx.xx.xx.x4", TelephoneType.FACSIMILE)
+            ));
+            final DefaultAddress address = new DefaultAddress();
+            address.setDeliveryPoints(singleton("Brest institute"));
+            address.setCity(new SimpleInternationalString("Plouzane"));
+            address.setPostalCode("29280");
+            address.setCountry(country);
+            address.setElectronicMailAddresses(singleton("xx@xx.fr"));
+            contact.setAddresses(singleton(address));
+            author.setParties(Arrays.asList(
+                    new DefaultOrganisation("Marine institutes", null, null, contact)
+            ));
+            metadata.setContacts(singleton(author));
+        }
+        /*
+         * Data indentification.
+         */
+        {
+            final DefaultCitation citation = new DefaultCitation("90008411.ctd");
+            citation.setAlternateTitles(singleton(new SimpleInternationalString("42292_5p_19900609195600")));
+            citation.setDates(Arrays.asList(
+                    new DefaultCitationDate(TestUtilities.date("1990-06-04 22:00:00"), DateType.REVISION),
+                    new DefaultCitationDate(TestUtilities.date("1979-08-02 22:00:00"), DateType.CREATION)));
+            {
+                final DefaultResponsibleParty originator = new DefaultResponsibleParty(Role.ORIGINATOR);
+                final DefaultOnlineResource online = new DefaultOnlineResource(URI.create("http://www.com.univ-mrs.fr/LOB/"));
+                online.setProtocol("http");
+                final DefaultContact contact = new DefaultContact(online);
+                contact.setPhones(Arrays.asList(
+                        new DefaultTelephone("+33 (0)4 xx.xx.xx.x5", TelephoneType.VOICE),
+                        new DefaultTelephone("+33 (0)4 xx.xx.xx.x8", TelephoneType.FACSIMILE)
+                ));
+                final DefaultAddress address = new DefaultAddress();
+                address.setDeliveryPoints(singleton("Oceanology institute"));
+                address.setCity(new SimpleInternationalString("Marseille"));
+                address.setPostalCode("13288");
+                address.setCountry(country);
+                contact.setAddresses(singleton(address));
+                originator.setParties(Arrays.asList(
+                        new DefaultOrganisation("Oceanology laboratory", null, null, contact)
+                ));
+                citation.setCitedResponsibleParties(singleton(originator));
+            }
+            final DefaultDataIdentification identification = new DefaultDataIdentification(
+                    citation,                   // Citation
+                    "CTD NEDIPROD VI 120",      // Abstract
+                    Locale.ENGLISH,             // Language,
+                    TopicCategory.OCEANS);      // Topic category
+            {
+                final DefaultResponsibleParty custodian = new DefaultResponsibleParty(author);
+                custodian.setRole(Role.CUSTODIAN);
+                identification.setPointOfContacts(singleton(custodian));
+            }
+            /*
+             * Data indentification / Keywords.
+             */
+            {
+                final DefaultKeywords keyword = new DefaultKeywords(
+                        new Anchor(URI.create("SDN:P021:35:ATTN"), "Transmittance and attenuance of the water column"));
+                keyword.setType(KeywordType.FEATURE_TYPE);
+                final DefaultCitation thesaurus = new DefaultCitation("BODC Parameter Discovery Vocabulary");
+                thesaurus.setAlternateTitles(singleton(new SimpleInternationalString("P021")));
+                thesaurus.setDates(singleton(new DefaultCitationDate(TestUtilities.date("2008-11-25 23:00:00"), DateType.REVISION)));
+                thesaurus.setEdition(new Anchor(URI.create("SDN:C371:1:35"), "35"));
+                thesaurus.setIdentifiers(singleton(new ImmutableIdentifier(null, null, "http://www.seadatanet.org/urnurl/")));
+                keyword.setThesaurusName(thesaurus);
+                identification.setDescriptiveKeywords(singleton(keyword));
+            }
+            /*
+             * Data indentification / Browse graphic.
+             */
+            {
+                final DefaultBrowseGraphic g = new DefaultBrowseGraphic(URI.create("file:///thumbnail.png"));
+                g.setFileDescription(new SimpleInternationalString("Arbitrary thumbnail for this test only."));
+                identification.setGraphicOverviews(Arrays.asList(g));
+            }
+            /*
+             * Data indentification / Resource constraint.
+             */
+            {
+                final DefaultLegalConstraints constraint = new DefaultLegalConstraints();
+                constraint.setAccessConstraints(singleton(Restriction.LICENCE));
+                identification.setResourceConstraints(singleton(constraint));
+            }
+            /*
+             * Data indentification / Aggregate information.
+             */
+            {
+                final DefaultAggregateInformation aggregateInfo = new DefaultAggregateInformation();
+                final DefaultCitation name = new DefaultCitation("MEDIPROD VI");
+                name.setAlternateTitles(singleton(new SimpleInternationalString("90008411")));
+                name.setDates(singleton(new DefaultCitationDate(TestUtilities.date("1990-06-04 22:00:00"), DateType.REVISION)));
+                aggregateInfo.setAggregateDataSetName(name);
+                aggregateInfo.setInitiativeType(InitiativeType.CAMPAIGN);
+                aggregateInfo.setAssociationType(AssociationType.LARGER_WORD_CITATION);
+                identification.setAggregationInfo(singleton(aggregateInfo));
+            }
+            /*
+             * Data indentification / Extent.
+             */
+            {
+                final DefaultCoordinateSystemAxis axis = new DefaultCoordinateSystemAxis(
+                        singletonMap(DefaultCoordinateSystemAxis.NAME_KEY, new NamedIdentifier(null, "Depth")),
+                        "d", AxisDirection.DOWN, SI.METRE);
+
+                final DefaultVerticalCS cs = new DefaultVerticalCS(
+                        singletonMap(DefaultVerticalCS.NAME_KEY, new NamedIdentifier(null, "Depth")),
+                        axis);
+
+                final DefaultVerticalDatum datum = new DefaultVerticalDatum(
+                        singletonMap(DefaultVerticalDatum.NAME_KEY, new NamedIdentifier(null, "D28")),
+                        VerticalDatumType.OTHER_SURFACE);
+
+                final DefaultVerticalCRS vcrs = new DefaultVerticalCRS(
+                        singletonMap(DefaultVerticalCRS.NAME_KEY, new NamedIdentifier(null, "Depth below D28")),
+                        datum, cs);
+
+                final DefaultTemporalExtent temporal = new DefaultTemporalExtent();
+                setTemporalBounds(temporal, "1990-06-05", "1990-07-02");
+                identification.setExtents(singleton(new DefaultExtent(
+                        null,
+                        new DefaultGeographicBoundingBox(1.1667, 1.1667, 36.6, 36.6),
+                        new DefaultVerticalExtent(Double.NaN, Double.NaN, vcrs),
+                        temporal)));
+            }
+            metadata.setIdentificationInfo(singleton(identification));
+        }
+        /*
+         * Information about spatial representation.
+         */
+        {
+            final DefaultVectorSpatialRepresentation rep = new DefaultVectorSpatialRepresentation();
+            final DefaultGeometricObjects geoObj = new DefaultGeometricObjects(GeometricObjectType.POINT);
+            rep.setGeometricObjects(singleton(geoObj));
+            metadata.setSpatialRepresentationInfo(singleton(rep));
+        }
+        /*
+         * Information about Coordinate Reference System.
+         */
+        {
+            final DefaultCitation citation = new DefaultCitation("A geographic coordinate reference frames");
+            citation.setAlternateTitles(singleton(new SimpleInternationalString("L101")));
+            citation.setIdentifiers(singleton(new ImmutableIdentifier(null, null, "http://www.seadatanet.org/urnurl/")));
+            citation.setEdition(new Anchor(URI.create("SDN:C371:1:2"), "2"));
+            metadata.setReferenceSystemInfo(singleton(
+                    new ReferenceSystemMetadata(new ImmutableIdentifier(citation, "L101", "EPSG:4326"))));
+        }
+        /*
+         * Information about content.
+         */
+        {
+            final DefaultImageDescription contentInfo = new DefaultImageDescription();
+            contentInfo.setCloudCoverPercentage(50.0);
+            metadata.setContentInfo(singleton(contentInfo));
+        }
+        /*
+         * Extension to metadata.
+         */
+        {
+            final DefaultMetadataExtensionInformation extensionInfo = new DefaultMetadataExtensionInformation();
+            extensionInfo.setExtendedElementInformation(singleton(new DefaultExtendedElementInformation(
+                    "SDN:EDMO::",                           // Name
+                    "http://www.seadatanet.org/urnurl/",    // Definition
+                    null,                                   // Condition
+                    Datatype.CODE_LIST,                     // Data type
+                    "SeaDataNet",                           // Parent entity
+                    null,                                   // Rule
+                    null)));                                // Source
+            metadata.setMetadataExtensionInfo(singleton(extensionInfo));
+        }
+        /*
+         * Distribution information.
+         */
+        {
+            final DefaultDistribution distributionInfo = new DefaultDistribution();
+            DefaultResponsibleParty distributor = new DefaultResponsibleParty(author);
+            distributor.setRole(Role.DISTRIBUTOR);
+            distributionInfo.setDistributors(singleton(new DefaultDistributor(distributor)));
+            distributionInfo.setDistributionFormats(singleton(
+                    new DefaultFormat(new Anchor(URI.create("SDN:L241:1:MEDATLAS"), "MEDATLAS ASCII"), "1.0")));
+            final DefaultDigitalTransferOptions transfer = new DefaultDigitalTransferOptions();
+            transfer.setTransferSize(2.431640625);
+            final DefaultOnlineResource onlines = new DefaultOnlineResource(URI.create(
+                    "http://www.ifremer.fr/data/something"));
+            onlines.setDescription(new SimpleInternationalString("CTDF02"));
+            onlines.setFunction(OnLineFunction.DOWNLOAD);
+            onlines.setProtocol("http");
+            transfer.setOnLines(singleton(onlines));
+            distributionInfo.setTransferOptions(singleton(transfer));
+            metadata.setDistributionInfo(distributionInfo);
+        }
+        return metadata;
     }
 
     /**
-     * Unmarshalls the given XML fragment.
+     * Tests marshalling of a XML document.
+     *
+     * @throws JAXBException If an error occurred during marshalling.
      */
-    private DefaultMetadata unmarshal(final String xml) throws JAXBException {
-        final MarshallerPool pool = getMarshallerPool();
-        final Unmarshaller unmarshaller = pool.acquireUnmarshaller();
-        unmarshaller.setProperty(XML.WARNING_LISTENER, this);
-        final Object c = unmarshal(unmarshaller, xml);
-        pool.recycle(unmarshaller);
-        return (DefaultMetadata) c;
+    @Test
+    @Ignore("Need to investigate why anchors are lost at marshalling time.")
+    public void testMarshalling() throws JAXBException {
+        final String xml = marshal(createHardCoded());
+        assertXmlEquals(DefaultMetadataTest.class.getResource("Metadata.xml"), xml, "xmlns:*", "xsi:schemaLocation");
     }
 
     /**
-     * Tests unmarshalling of a metadata having a collection that contains no element.
-     * This was used to cause a {@code NullPointerException} prior SIS-139 fix.
-     *
-     * @throws JAXBException If an error occurred during the during unmarshalling processes.
+     * Tests unmarshalling of a XML document.
      *
-     * @see <a href="https://issues.apache.org/jira/browse/SIS-139">SIS-139</a>
+     * @throws JAXBException If an error occurred during unmarshalling.
      */
     @Test
-    public void testEmptyCollection() throws JAXBException {
-        final DefaultMetadata metadata = unmarshal(
-                "<gmd:MD_Metadata xmlns:gmd=\"" + Namespaces.GMD + "\">\n" +
-                "  <gmd:contact/>\n" +
-                "</gmd:MD_Metadata>");
-        /*
-         * Verify metadata property.
-         */
-        assertTrue(metadata.getContacts().isEmpty());
-        /*
-         * Verify warning message emitted during unmarshalling.
-         */
-        assertEquals("warning", "NullCollectionElement_1", resourceKey);
-        assertArrayEquals("warning", new String[] {"CheckedArrayList<ResponsibleParty>"}, parameters);
+    public void testUnmarshalling() throws JAXBException {
+        final DefaultMetadata metadata = unmarshalFile(DefaultMetadata.class, "Metadata.xml");
+        final DefaultMetadata expected = createHardCoded();
+        assertTrue(metadata.equals(expected, ComparisonMode.DEBUG));
     }
 }

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java?rev=1611103&r1=1611102&r2=1611103&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java [UTF-8] Wed Jul 16 17:33:57 2014
@@ -113,7 +113,8 @@ import org.junit.BeforeClass;
 
     org.apache.sis.distance.LatLonPointRadiusTest.class, // Pending refactoring in a geometry package.
 
-    org.apache.sis.test.integration.ReferencingInMetadataTest.class
+    org.apache.sis.test.integration.ReferencingInMetadataTest.class,
+    org.apache.sis.test.integration.DefaultMetadataTest.class
 })
 public final strictfp class ReferencingTestSuite extends TestSuite {
     /**

Added: sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/test/integration/Metadata.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/test/integration/Metadata.xml?rev=1611103&view=auto
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/test/integration/Metadata.xml (added)
+++ sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/test/integration/Metadata.xml Wed Jul 16 17:33:57 2014
@@ -0,0 +1,560 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<gmd:MD_Metadata
+    xmlns:gml   = "http://www.opengis.net/gml/3.2"
+    xmlns:gmd   = "http://www.isotc211.org/2005/gmd"
+    xmlns:gmx   = "http://www.isotc211.org/2005/gmx"
+    xmlns:gco   = "http://www.isotc211.org/2005/gco"
+    xmlns:xsi   = "http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:xlink = "http://www.w3.org/1999/xlink"
+    xsi:schemaLocation = "http://www.isotc211.org/2005/gmd http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd
+                          http://www.isotc211.org/2005/gmx http://schemas.opengis.net/iso/19139/20070417/gmx/gmx.xsd">
+
+  <gmd:fileIdentifier>
+    <gco:CharacterString>Apache SIS/Metadata test</gco:CharacterString>
+  </gmd:fileIdentifier>
+  <gmd:language>
+    <gmd:LanguageCode codeListValue="eng" codeList="http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/gmxCodelists.xml#LanguageCode">English</gmd:LanguageCode>
+  </gmd:language>
+  <gmd:characterSet>
+    <gmd:MD_CharacterSetCode codeListValue="utf8" codeList="http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/gmxCodelists.xml#MD_CharacterSetCode">UTF-8</gmd:MD_CharacterSetCode>
+  </gmd:characterSet>
+  <gmd:hierarchyLevel>
+    <gmd:MD_ScopeCode codeSpace="eng" codeListValue="dataset" codeList="http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/gmxCodelists.xml#MD_ScopeCode">Dataset</gmd:MD_ScopeCode>
+  </gmd:hierarchyLevel>
+  <gmd:hierarchyLevelName>
+    <gmx:Anchor xlink:href="SDN:L231:3:CDI">Common Data Index record</gmx:Anchor>
+  </gmd:hierarchyLevelName>
+  <gmd:contact>
+    <gmd:CI_ResponsibleParty>
+      <gmd:organisationName>
+        <gco:CharacterString>Marine institutes</gco:CharacterString>
+      </gmd:organisationName>
+      <gmd:contactInfo>
+        <gmd:CI_Contact>
+          <gmd:phone>
+            <gmd:CI_Telephone>
+              <gmd:voice>
+                <gco:CharacterString>+33 (0)2 xx.xx.xx.x6</gco:CharacterString>
+              </gmd:voice>
+              <gmd:facsimile>
+                <gco:CharacterString>+33 (0)2 xx.xx.xx.x4</gco:CharacterString>
+              </gmd:facsimile>
+            </gmd:CI_Telephone>
+          </gmd:phone>
+          <gmd:address>
+            <gmd:CI_Address>
+              <gmd:deliveryPoint>
+                <gco:CharacterString>Brest institute</gco:CharacterString>
+              </gmd:deliveryPoint>
+              <gmd:city>
+                <gco:CharacterString>Plouzane</gco:CharacterString>
+              </gmd:city>
+              <gmd:postalCode>
+                <gco:CharacterString>29280</gco:CharacterString>
+              </gmd:postalCode>
+              <gmd:country>
+                <gmx:Anchor xlink:href="SDN:C320:2:FR">France</gmx:Anchor>
+              </gmd:country>
+              <gmd:electronicMailAddress>
+                <gco:CharacterString>xx@xx.fr</gco:CharacterString>
+              </gmd:electronicMailAddress>
+            </gmd:CI_Address>
+          </gmd:address>
+          <gmd:onlineResource>
+            <gmd:CI_OnlineResource>
+              <gmd:linkage>
+                <gmd:URL>http://www.ifremer.fr/sismer/</gmd:URL>
+              </gmd:linkage>
+              <gmd:protocol>
+                <gco:CharacterString>http</gco:CharacterString>
+              </gmd:protocol>
+            </gmd:CI_OnlineResource>
+          </gmd:onlineResource>
+        </gmd:CI_Contact>
+      </gmd:contactInfo>
+      <gmd:role>
+        <gmd:CI_RoleCode codeListValue="author" codeList="http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/gmxCodelists.xml#CI_RoleCode">Author</gmd:CI_RoleCode>
+      </gmd:role>
+    </gmd:CI_ResponsibleParty>
+  </gmd:contact>
+  <gmd:dateStamp>
+    <gco:DateTime>2009-01-01T06:00:00+02:00</gco:DateTime>
+  </gmd:dateStamp>
+  <gmd:spatialRepresentationInfo>
+    <gmd:MD_VectorSpatialRepresentation>
+      <gmd:geometricObjects>
+        <gmd:MD_GeometricObjects>
+          <gmd:geometricObjectType>
+            <gmd:MD_GeometricObjectTypeCode codeListValue="point" codeList="http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/gmxCodelists.xml#MD_GeometricObjectTypeCode">Point</gmd:MD_GeometricObjectTypeCode>
+          </gmd:geometricObjectType>
+        </gmd:MD_GeometricObjects>
+      </gmd:geometricObjects>
+    </gmd:MD_VectorSpatialRepresentation>
+  </gmd:spatialRepresentationInfo>
+  <gmd:referenceSystemInfo>
+    <gmd:MD_ReferenceSystem>
+      <gmd:referenceSystemIdentifier>
+        <gmd:RS_Identifier>
+          <gmd:code>
+            <gmx:Anchor xlink:href="SDN:L101:2:4326">EPSG:4326</gmx:Anchor>
+          </gmd:code>
+          <gmd:codeSpace>
+            <gco:CharacterString>L101</gco:CharacterString>
+          </gmd:codeSpace>
+          <gmd:authority>
+            <gmd:CI_Citation>
+              <gmd:title>
+                <gco:CharacterString>A geographic coordinate reference frames</gco:CharacterString>
+              </gmd:title>
+              <gmd:alternateTitle>
+                <gco:CharacterString>L101</gco:CharacterString>
+              </gmd:alternateTitle>
+              <gmd:edition>
+                <gmx:Anchor xlink:href="SDN:C371:1:2">2</gmx:Anchor>
+              </gmd:edition>
+              <gmd:identifier>
+                <gmd:RS_Identifier>
+                  <gmd:code>
+                    <gco:CharacterString>http://www.seadatanet.org/urnurl/</gco:CharacterString>
+                  </gmd:code>
+                </gmd:RS_Identifier>
+              </gmd:identifier>
+            </gmd:CI_Citation>
+          </gmd:authority>
+        </gmd:RS_Identifier>
+      </gmd:referenceSystemIdentifier>
+    </gmd:MD_ReferenceSystem>
+  </gmd:referenceSystemInfo>
+  <gmd:metadataExtensionInfo>
+    <gmd:MD_MetadataExtensionInformation>
+      <gmd:extendedElementInformation>
+        <gmd:MD_ExtendedElementInformation>
+          <gmd:name>
+            <gco:CharacterString>SDN:EDMO::</gco:CharacterString>
+          </gmd:name>
+          <gmd:definition>
+            <gco:CharacterString>http://www.seadatanet.org/urnurl/</gco:CharacterString>
+          </gmd:definition>
+          <gmd:dataType>
+            <gmd:MD_DatatypeCode codeListValue="codelist" codeList="http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/gmxCodelists.xml#MD_DatatypeCode">Codelist</gmd:MD_DatatypeCode>
+          </gmd:dataType>
+          <gmd:parentEntity>
+            <gco:CharacterString>SeaDataNet</gco:CharacterString>
+          </gmd:parentEntity>
+        </gmd:MD_ExtendedElementInformation>
+      </gmd:extendedElementInformation>
+    </gmd:MD_MetadataExtensionInformation>
+  </gmd:metadataExtensionInfo>
+  <gmd:identificationInfo>
+    <gmd:MD_DataIdentification>
+      <gmd:citation>
+        <gmd:CI_Citation>
+          <gmd:title>
+            <gco:CharacterString>90008411.ctd</gco:CharacterString>
+          </gmd:title>
+          <gmd:alternateTitle>
+            <gco:CharacterString>42292_5p_19900609195600</gco:CharacterString>
+          </gmd:alternateTitle>
+          <gmd:date>
+            <gmd:CI_Date>
+              <gmd:date>
+                <gco:Date>1990-06-05</gco:Date>
+              </gmd:date>
+              <gmd:dateType>
+                <gmd:CI_DateTypeCode codeSpace="eng" codeListValue="revision" codeList="http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/gmxCodelists.xml#CI_DateTypeCode">Revision</gmd:CI_DateTypeCode>
+              </gmd:dateType>
+            </gmd:CI_Date>
+          </gmd:date>
+          <gmd:date>
+            <gmd:CI_Date>
+              <gmd:date>
+                <gco:Date>1979-08-03</gco:Date>
+              </gmd:date>
+              <gmd:dateType>
+                <gmd:CI_DateTypeCode codeSpace="eng" codeListValue="creation" codeList="http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/gmxCodelists.xml#CI_DateTypeCode">Creation</gmd:CI_DateTypeCode>
+              </gmd:dateType>
+            </gmd:CI_Date>
+          </gmd:date>
+          <gmd:citedResponsibleParty>
+            <gmd:CI_ResponsibleParty>
+              <gmd:organisationName>
+                <gco:CharacterString>Oceanology laboratory</gco:CharacterString>
+              </gmd:organisationName>
+              <gmd:contactInfo>
+                <gmd:CI_Contact>
+                  <gmd:phone>
+                    <gmd:CI_Telephone>
+                      <gmd:voice>
+                        <gco:CharacterString>+33 (0)4 xx.xx.xx.x5</gco:CharacterString>
+                      </gmd:voice>
+                      <gmd:facsimile>
+                        <gco:CharacterString>+33 (0)4 xx.xx.xx.x8</gco:CharacterString>
+                      </gmd:facsimile>
+                    </gmd:CI_Telephone>
+                  </gmd:phone>
+                  <gmd:address>
+                    <gmd:CI_Address>
+                      <gmd:deliveryPoint>
+                        <gco:CharacterString>Oceanology institute</gco:CharacterString>
+                      </gmd:deliveryPoint>
+                      <gmd:city>
+                        <gco:CharacterString>Marseille</gco:CharacterString>
+                      </gmd:city>
+                      <gmd:postalCode>
+                        <gco:CharacterString>13288</gco:CharacterString>
+                      </gmd:postalCode>
+                      <gmd:country>
+                        <gmx:Anchor xlink:href="SDN:C320:2:FR">France</gmx:Anchor>
+                      </gmd:country>
+                    </gmd:CI_Address>
+                  </gmd:address>
+                  <gmd:onlineResource>
+                    <gmd:CI_OnlineResource>
+                      <gmd:linkage>
+                        <gmd:URL>http://www.com.univ-mrs.fr/LOB/</gmd:URL>
+                      </gmd:linkage>
+                      <gmd:protocol>
+                        <gco:CharacterString>http</gco:CharacterString>
+                      </gmd:protocol>
+                    </gmd:CI_OnlineResource>
+                  </gmd:onlineResource>
+                </gmd:CI_Contact>
+              </gmd:contactInfo>
+              <gmd:role>
+                <gmd:CI_RoleCode codeListValue="originator" codeList="http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/gmxCodelists.xml#CI_RoleCode">Originator</gmd:CI_RoleCode>
+              </gmd:role>
+            </gmd:CI_ResponsibleParty>
+          </gmd:citedResponsibleParty>
+        </gmd:CI_Citation>
+      </gmd:citation>
+      <gmd:abstract>
+        <gco:CharacterString>CTD NEDIPROD VI 120</gco:CharacterString>
+      </gmd:abstract>
+      <gmd:pointOfContact>
+        <gmd:CI_ResponsibleParty>
+          <gmd:organisationName>
+            <gco:CharacterString>Marine institutes</gco:CharacterString>
+          </gmd:organisationName>
+          <gmd:contactInfo>
+            <gmd:CI_Contact>
+              <gmd:phone>
+                <gmd:CI_Telephone>
+                  <gmd:voice>
+                    <gco:CharacterString>+33 (0)2 xx.xx.xx.x6</gco:CharacterString>
+                  </gmd:voice>
+                  <gmd:facsimile>
+                    <gco:CharacterString>+33 (0)2 xx.xx.xx.x4</gco:CharacterString>
+                  </gmd:facsimile>
+                </gmd:CI_Telephone>
+              </gmd:phone>
+              <gmd:address>
+                <gmd:CI_Address>
+                  <gmd:deliveryPoint>
+                    <gco:CharacterString>Brest institute</gco:CharacterString>
+                  </gmd:deliveryPoint>
+                  <gmd:city>
+                    <gco:CharacterString>Plouzane</gco:CharacterString>
+                  </gmd:city>
+                  <gmd:postalCode>
+                    <gco:CharacterString>29280</gco:CharacterString>
+                  </gmd:postalCode>
+                  <gmd:country>
+                    <gmx:Anchor xlink:href="SDN:C320:2:FR">France</gmx:Anchor>
+                  </gmd:country>
+                  <gmd:electronicMailAddress>
+                    <gco:CharacterString>xx@xx.fr</gco:CharacterString>
+                  </gmd:electronicMailAddress>
+                </gmd:CI_Address>
+              </gmd:address>
+              <gmd:onlineResource>
+                <gmd:CI_OnlineResource>
+                  <gmd:linkage>
+                    <gmd:URL>http://www.ifremer.fr/sismer/</gmd:URL>
+                  </gmd:linkage>
+                  <gmd:protocol>
+                    <gco:CharacterString>http</gco:CharacterString>
+                  </gmd:protocol>
+                </gmd:CI_OnlineResource>
+              </gmd:onlineResource>
+            </gmd:CI_Contact>
+          </gmd:contactInfo>
+          <gmd:role>
+            <gmd:CI_RoleCode codeListValue="custodian" codeList="http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/gmxCodelists.xml#CI_RoleCode">Custodian</gmd:CI_RoleCode>
+          </gmd:role>
+        </gmd:CI_ResponsibleParty>
+      </gmd:pointOfContact>
+      <gmd:graphicOverview>
+        <gmd:MD_BrowseGraphic>
+          <gmd:fileName>
+            <gmx:FileName src="file:///thumbnail.png">thumbnail.png</gmx:FileName>
+          </gmd:fileName>
+          <gmd:fileDescription>
+            <gco:CharacterString>Arbitrary thumbnail for this test only.</gco:CharacterString>
+          </gmd:fileDescription>
+        </gmd:MD_BrowseGraphic>
+      </gmd:graphicOverview>
+      <gmd:descriptiveKeywords>
+        <gmd:MD_Keywords>
+          <gmd:keyword>
+            <gmx:Anchor xlink:href="SDN:P021:35:ATTN">Transmittance and attenuance of the water column</gmx:Anchor>
+          </gmd:keyword>
+          <gmd:type>
+            <gmd:MD_KeywordTypeCode codeListValue="featureType" codeList="http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/gmxCodelists.xml#MD_KeywordTypeCode">Feature type</gmd:MD_KeywordTypeCode>
+          </gmd:type>
+          <gmd:thesaurusName>
+            <gmd:CI_Citation>
+              <gmd:title>
+                <gco:CharacterString>BODC Parameter Discovery Vocabulary</gco:CharacterString>
+              </gmd:title>
+              <gmd:alternateTitle>
+                <gco:CharacterString>P021</gco:CharacterString>
+              </gmd:alternateTitle>
+              <gmd:date>
+                <gmd:CI_Date>
+                  <gmd:date>
+                    <gco:Date>2008-11-26</gco:Date>
+                  </gmd:date>
+                  <gmd:dateType>
+                    <gmd:CI_DateTypeCode codeSpace="eng" codeListValue="revision" codeList="http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/gmxCodelists.xml#CI_DateTypeCode">Revision</gmd:CI_DateTypeCode>
+                  </gmd:dateType>
+                </gmd:CI_Date>
+              </gmd:date>
+              <gmd:edition>
+                <gmx:Anchor xlink:href="SDN:C371:1:35">35</gmx:Anchor>
+              </gmd:edition>
+              <gmd:identifier>
+                <gmd:RS_Identifier>
+                  <gmd:code>
+                    <gco:CharacterString>http://www.seadatanet.org/urnurl/</gco:CharacterString>
+                  </gmd:code>
+                </gmd:RS_Identifier>
+              </gmd:identifier>
+            </gmd:CI_Citation>
+          </gmd:thesaurusName>
+        </gmd:MD_Keywords>
+      </gmd:descriptiveKeywords>
+      <gmd:resourceConstraints>
+        <gmd:MD_LegalConstraints>
+          <gmd:accessConstraints>
+            <gmd:MD_RestrictionCode codeListValue="license" codeList="http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/gmxCodelists.xml#MD_RestrictionCode">Licence</gmd:MD_RestrictionCode>
+          </gmd:accessConstraints>
+        </gmd:MD_LegalConstraints>
+      </gmd:resourceConstraints>
+      <gmd:aggregationInfo>
+        <gmd:MD_AggregateInformation>
+          <gmd:aggregateDataSetName>
+            <gmd:CI_Citation>
+              <gmd:title>
+                <gco:CharacterString>MEDIPROD VI</gco:CharacterString>
+              </gmd:title>
+              <gmd:alternateTitle>
+                <gco:CharacterString>90008411</gco:CharacterString>
+              </gmd:alternateTitle>
+              <gmd:date>
+                <gmd:CI_Date>
+                  <gmd:date>
+                    <gco:Date>1990-06-05</gco:Date>
+                  </gmd:date>
+                  <gmd:dateType>
+                    <gmd:CI_DateTypeCode codeSpace="eng" codeListValue="revision" codeList="http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/gmxCodelists.xml#CI_DateTypeCode">Revision</gmd:CI_DateTypeCode>
+                  </gmd:dateType>
+                </gmd:CI_Date>
+              </gmd:date>
+            </gmd:CI_Citation>
+          </gmd:aggregateDataSetName>
+          <gmd:associationType>
+            <gmd:DS_AssociationTypeCode codeListValue="largerWorkCitation" codeList="http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/gmxCodelists.xml#DS_AssociationTypeCode">Larger work citation</gmd:DS_AssociationTypeCode>
+          </gmd:associationType>
+          <gmd:initiativeType>
+            <gmd:DS_InitiativeTypeCode codeListValue="campaign" codeList="http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/gmxCodelists.xml#DS_InitiativeTypeCode">Campaign</gmd:DS_InitiativeTypeCode>
+          </gmd:initiativeType>
+        </gmd:MD_AggregateInformation>
+      </gmd:aggregationInfo>
+      <gmd:language>
+        <gmd:LanguageCode codeListValue="eng" codeList="http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/gmxCodelists.xml#LanguageCode">English</gmd:LanguageCode>
+      </gmd:language>
+      <gmd:topicCategory>
+        <gmd:MD_TopicCategoryCode>oceans</gmd:MD_TopicCategoryCode>
+      </gmd:topicCategory>
+      <gmd:extent>
+        <gmd:EX_Extent>
+          <gmd:geographicElement>
+            <gmd:EX_GeographicBoundingBox>
+              <gmd:extentTypeCode>
+                <gco:Boolean>true</gco:Boolean>
+              </gmd:extentTypeCode>
+              <gmd:westBoundLongitude>
+                <gco:Decimal>1.1667</gco:Decimal>
+              </gmd:westBoundLongitude>
+              <gmd:eastBoundLongitude>
+                <gco:Decimal>1.1667</gco:Decimal>
+              </gmd:eastBoundLongitude>
+              <gmd:southBoundLatitude>
+                <gco:Decimal>36.6</gco:Decimal>
+              </gmd:southBoundLatitude>
+              <gmd:northBoundLatitude>
+                <gco:Decimal>36.6</gco:Decimal>
+              </gmd:northBoundLatitude>
+            </gmd:EX_GeographicBoundingBox>
+          </gmd:geographicElement>
+          <gmd:temporalElement>
+            <gmd:EX_TemporalExtent>
+              <gmd:extent>
+                <gml:TimePeriod gml:id="extent">
+                  <gml:beginPosition>1990-06-05</gml:beginPosition>
+                  <gml:endPosition>1990-07-02</gml:endPosition>
+                </gml:TimePeriod>
+              </gmd:extent>
+            </gmd:EX_TemporalExtent>
+          </gmd:temporalElement>
+          <gmd:verticalElement>
+            <gmd:EX_VerticalExtent>
+              <gmd:verticalCRS>
+                <gml:VerticalCRS gml:id="depth_D28">
+                  <gml:name>Depth below D28</gml:name>
+                  <gml:verticalCS>
+                    <gml:VerticalCS gml:id="depth">
+                      <gml:name>Depth</gml:name>
+                      <gml:axis>
+                        <gml:CoordinateSystemAxis uom="urn:ogc:def:uom:EPSG::9001" gml:id="d">
+                          <gml:name>Depth</gml:name>
+                          <gml:axisAbbrev>d</gml:axisAbbrev>
+                          <gml:axisDirection codeSpace="EPSG">down</gml:axisDirection>
+                        </gml:CoordinateSystemAxis>
+                      </gml:axis>
+                    </gml:VerticalCS>
+                  </gml:verticalCS>
+                  <gml:verticalDatum>
+                    <gml:VerticalDatum gml:id="D28">
+                      <gml:name>D28</gml:name>
+                    </gml:VerticalDatum>
+                  </gml:verticalDatum>
+                </gml:VerticalCRS>
+              </gmd:verticalCRS>
+            </gmd:EX_VerticalExtent>
+          </gmd:verticalElement>
+        </gmd:EX_Extent>
+      </gmd:extent>
+    </gmd:MD_DataIdentification>
+  </gmd:identificationInfo>
+  <gmd:contentInfo>
+    <gmd:MD_ImageDescription>
+      <gmd:cloudCoverPercentage>
+        <gco:Real>50.0</gco:Real>
+      </gmd:cloudCoverPercentage>
+    </gmd:MD_ImageDescription>
+  </gmd:contentInfo>
+  <gmd:distributionInfo>
+    <gmd:MD_Distribution>
+      <gmd:distributionFormat>
+        <gmd:MD_Format>
+          <gmd:name>
+            <gmx:Anchor xlink:href="SDN:L241:1:MEDATLAS">MEDATLAS ASCII</gmx:Anchor>
+          </gmd:name>
+          <gmd:version>
+            <gco:CharacterString>1.0</gco:CharacterString>
+          </gmd:version>
+        </gmd:MD_Format>
+      </gmd:distributionFormat>
+      <gmd:distributor>
+        <gmd:MD_Distributor>
+          <gmd:distributorContact>
+            <gmd:CI_ResponsibleParty>
+              <gmd:organisationName>
+                <gco:CharacterString>Marine institutes</gco:CharacterString>
+              </gmd:organisationName>
+              <gmd:contactInfo>
+                <gmd:CI_Contact>
+                  <gmd:phone>
+                    <gmd:CI_Telephone>
+                      <gmd:voice>
+                        <gco:CharacterString>+33 (0)2 xx.xx.xx.x6</gco:CharacterString>
+                      </gmd:voice>
+                      <gmd:facsimile>
+                        <gco:CharacterString>+33 (0)2 xx.xx.xx.x4</gco:CharacterString>
+                      </gmd:facsimile>
+                    </gmd:CI_Telephone>
+                  </gmd:phone>
+                  <gmd:address>
+                    <gmd:CI_Address>
+                      <gmd:deliveryPoint>
+                        <gco:CharacterString>Brest institute</gco:CharacterString>
+                      </gmd:deliveryPoint>
+                      <gmd:city>
+                        <gco:CharacterString>Plouzane</gco:CharacterString>
+                      </gmd:city>
+                      <gmd:postalCode>
+                        <gco:CharacterString>29280</gco:CharacterString>
+                      </gmd:postalCode>
+                      <gmd:country>
+                        <gmx:Anchor xlink:href="SDN:C320:2:FR">France</gmx:Anchor>
+                      </gmd:country>
+                      <gmd:electronicMailAddress>
+                        <gco:CharacterString>xx@xx.fr</gco:CharacterString>
+                      </gmd:electronicMailAddress>
+                    </gmd:CI_Address>
+                  </gmd:address>
+                  <gmd:onlineResource>
+                    <gmd:CI_OnlineResource>
+                      <gmd:linkage>
+                        <gmd:URL>http://www.ifremer.fr/sismer/</gmd:URL>
+                      </gmd:linkage>
+                      <gmd:protocol>
+                        <gco:CharacterString>http</gco:CharacterString>
+                      </gmd:protocol>
+                    </gmd:CI_OnlineResource>
+                  </gmd:onlineResource>
+                </gmd:CI_Contact>
+              </gmd:contactInfo>
+              <gmd:role>
+                <gmd:CI_RoleCode codeListValue="distributor" codeList="http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/gmxCodelists.xml#CI_RoleCode">Distributor</gmd:CI_RoleCode>
+              </gmd:role>
+            </gmd:CI_ResponsibleParty>
+          </gmd:distributorContact>
+        </gmd:MD_Distributor>
+      </gmd:distributor>
+      <gmd:transferOptions>
+        <gmd:MD_DigitalTransferOptions>
+          <gmd:transferSize>
+            <gco:Real>2.431640625</gco:Real>
+          </gmd:transferSize>
+          <gmd:onLine>
+            <gmd:CI_OnlineResource>
+              <gmd:linkage>
+                <gmd:URL>http://www.ifremer.fr/data/something</gmd:URL>
+              </gmd:linkage>
+              <gmd:protocol>
+                <gco:CharacterString>http</gco:CharacterString>
+              </gmd:protocol>
+              <gmd:description>
+                <gco:CharacterString>CTDF02</gco:CharacterString>
+              </gmd:description>
+              <gmd:function>
+                <gmd:CI_OnLineFunctionCode codeSpace="eng" codeListValue="download" codeList="http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/gmxCodelists.xml#CI_OnLineFunctionCode">Download</gmd:CI_OnLineFunctionCode>
+              </gmd:function>
+            </gmd:CI_OnlineResource>
+          </gmd:onLine>
+        </gmd:MD_DigitalTransferOptions>
+      </gmd:transferOptions>
+    </gmd:MD_Distribution>
+  </gmd:distributionInfo>
+</gmd:MD_Metadata>

Propchange: sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/test/integration/Metadata.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/test/integration/Metadata.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message