sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1634011 - in /sis/branches/JDK8: ./ core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/code/ core/sis-metadata/src/test/java/org/apache/sis/metadata/ core/sis-metadata/...
Date Fri, 24 Oct 2014 07:25:47 GMT
Author: desruisseaux
Date: Fri Oct 24 07:25:46 2014
New Revision: 1634011

URL: http://svn.apache.org/r1634011
Log:
Avoid usage of deprecated methods.

Modified:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadataScope.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/code/CodeListMarshallingTest.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/PrunerTest.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultMetadataTest.java
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/DefaultMetadataTest.java
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ReferencingInMetadataTest.java
    sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/test/integration/Metadata.xml
    sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/jaxb/gmd/LanguageCodeTest.java
    sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/XMLComparator.java
    sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/mock/MetadataMock.java
    sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/xml/NilReasonTest.java
    sis/branches/JDK8/ide-project/NetBeans/build.xml
    sis/branches/JDK8/ide-project/NetBeans/nbproject/project.properties
    sis/branches/JDK8/pom.xml
    sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/MetadataReader.java
    sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/storage/netcdf/ConformanceTest.java
    sis/branches/JDK8/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/xml/XMLStoreTest.java

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java?rev=1634011&r1=1634010&r2=1634011&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
[UTF-8] Fri Oct 24 07:25:46 2014
@@ -659,7 +659,7 @@ public class DefaultMetadata extends ISO
         return new MetadataScopeAdapter<ScopeCode>(getMetadataScopes()) {
             /** Stores a legacy value into the new kind of value. */
             @Override protected MetadataScope wrap(final ScopeCode value) {
-                return new DefaultMetadataScope(value);
+                return new DefaultMetadataScope(value, null);
             }
 
             /** Extracts the legacy value from the new kind of value. */
@@ -683,8 +683,8 @@ public class DefaultMetadata extends ISO
      *
      * @param newValues The new hierarchy levels.
      *
-     * @deprecated As of ISO 19115:2014, replaced by {@link #getMetadataScopes()}
-     *   followed by {@link DefaultMetadataScope#setResourceScope(ScopeCode)}.
+     * @deprecated As of ISO 19115:2014, replaced by {@link #setMetadataScopes(Collection)}
+     *   and {@link DefaultMetadataScope#setResourceScope(ScopeCode)}.
      */
     @Deprecated
     public final void setHierarchyLevels(final Collection<? extends ScopeCode> newValues)
{
@@ -707,9 +707,7 @@ public class DefaultMetadata extends ISO
         return new MetadataScopeAdapter<String>(getMetadataScopes()) {
             /** Stores a legacy value into the new kind of value. */
             @Override protected MetadataScope wrap(final String value) {
-                final DefaultMetadataScope scope = new DefaultMetadataScope();
-                scope.setName(new SimpleInternationalString(value));
-                return scope;
+                return new DefaultMetadataScope(null, value);
             }
 
             /** Extracts the legacy value from the new kind of value. */
@@ -734,8 +732,8 @@ public class DefaultMetadata extends ISO
      *
      * @param newValues The new hierarchy level names.
      *
-     * @deprecated As of ISO 19115:2014, replaced by {@link #getMetadataScopes()}
-     *   followed by {@link DefaultMetadataScope#setName(InternationalString)}.
+     * @deprecated As of ISO 19115:2014, replaced by {@link #setMetadataScopes(Collection)}
+     *   and {@link DefaultMetadataScope#setName(InternationalString)}.
      */
     @Deprecated
     public final void setHierarchyLevelNames(final Collection<? extends String> newValues)
{

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadataScope.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadataScope.java?rev=1634011&r1=1634010&r2=1634011&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadataScope.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadataScope.java
[UTF-8] Fri Oct 24 07:25:46 2014
@@ -20,6 +20,7 @@ import javax.xml.bind.annotation.XmlType
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
 import org.opengis.util.InternationalString;
+import org.apache.sis.util.iso.Types;
 import org.opengis.metadata.MetadataScope;
 import org.opengis.metadata.maintenance.ScopeCode;
 
@@ -73,9 +74,11 @@ public class DefaultMetadataScope extend
      * Constructs a metadata scope initialized to the given value.
      *
      * @param resourceScope code for the scope.
+     * @param name Description of the scope, or {@code null} if none.
      */
-    public DefaultMetadataScope(final ScopeCode resourceScope) {
+    public DefaultMetadataScope(final ScopeCode resourceScope, final CharSequence name) {
         this.resourceScope = resourceScope;
+        this.name = Types.toInternationalString(name);
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/code/CodeListMarshallingTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/code/CodeListMarshallingTest.java?rev=1634011&r1=1634010&r2=1634011&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/code/CodeListMarshallingTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/code/CodeListMarshallingTest.java
[UTF-8] Fri Oct 24 07:25:46 2014
@@ -24,7 +24,7 @@ import javax.xml.bind.JAXBException;
 import org.opengis.metadata.citation.Role;
 import org.opengis.metadata.citation.DateType;
 import org.opengis.metadata.citation.CitationDate;
-import org.opengis.metadata.citation.ResponsibleParty;
+import org.opengis.metadata.citation.Responsibility;
 import org.opengis.metadata.identification.TopicCategory;
 import org.apache.sis.metadata.iso.identification.DefaultDataIdentification;
 import org.apache.sis.internal.jaxb.Schemas;
@@ -86,7 +86,7 @@ public final strictfp class CodeListMars
     @Test
     public void testDefaultURL() throws JAXBException {
         final String expected = getResponsiblePartyXML(Schemas.METADATA_ROOT);
-        final ResponsibleParty rp = (ResponsibleParty) XML.unmarshal(expected);
+        final Responsibility rp = (Responsibility) XML.unmarshal(expected);
         assertEquals(Role.PRINCIPAL_INVESTIGATOR, rp.getRole());
         /*
          * Use the convenience method in order to avoid the effort of creating
@@ -104,7 +104,7 @@ public final strictfp class CodeListMars
     @Test
     public void testISO_URL() throws JAXBException {
         final String expected = getResponsiblePartyXML(Schemas.ISO_19139_ROOT);
-        final ResponsibleParty rp = (ResponsibleParty) XML.unmarshal(expected);
+        final Responsibility rp = (Responsibility) XML.unmarshal(expected);
         assertEquals(Role.PRINCIPAL_INVESTIGATOR, rp.getRole());
 
         final MarshallerPool pool = getMarshallerPool();

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/PrunerTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/PrunerTest.java?rev=1634011&r1=1634010&r2=1634011&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/PrunerTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/PrunerTest.java
[UTF-8] Fri Oct 24 07:25:46 2014
@@ -22,6 +22,7 @@ import org.apache.sis.metadata.iso.exten
 import org.apache.sis.metadata.iso.extent.DefaultGeographicBoundingBox;
 import org.apache.sis.metadata.iso.identification.DefaultDataIdentification;
 import org.apache.sis.metadata.iso.acquisition.DefaultAcquisitionInformation;
+import org.apache.sis.internal.simple.SimpleIdentifier;
 import org.apache.sis.test.DependsOnMethod;
 import org.apache.sis.test.DependsOn;
 import org.apache.sis.test.TestCase;
@@ -37,7 +38,7 @@ import static org.apache.sis.metadata.Va
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from geotk-3.20)
- * @version 0.3
+ * @version 0.5
  * @module
  */
 @DependsOn(ValueMapTest.class)
@@ -98,7 +99,7 @@ public final strictfp class PrunerTest e
         /*
          * Set a non-empty metadata info.
          */
-        metadata.setFileIdentifier("A file identifiers");
+        metadata.setMetadataIdentifier(new SimpleIdentifier(null, "A file identifiers"));
         assertTrue ("GeographicBoundingBox", bbox.isEmpty());
         assertTrue ("Extent",                extent.isEmpty());
         assertFalse("DataIdentification",    identification.isEmpty());
@@ -114,7 +115,7 @@ public final strictfp class PrunerTest e
         /*
          * Set an empty string in an element.
          */
-        metadata.setFileIdentifier("   ");
+        metadata.setMetadataIdentifier(new SimpleIdentifier(null, "   "));
         assertTrue("Metadata", metadata.isEmpty());
     }
 
@@ -146,9 +147,9 @@ public final strictfp class PrunerTest e
     @Test
     @DependsOnMethod("testIsEmpty")
     public void testPrune() {
-        metadata.setFileIdentifier("A file identifiers");
+        metadata.setMetadataIdentifier(new SimpleIdentifier(null, "A file identifiers"));
         identification.setCitation(new DefaultCitation("A citation title"));
-        assertFalse(isNullOrEmpty(metadata.getFileIdentifier()));
+        assertFalse(isNullOrEmpty(metadata.getMetadataIdentifier()));
         assertFalse(isNullOrEmpty(identification.getCitation()));
         assertEquals(1, metadata.getIdentificationInfo().size());
         assertEquals(1, identification.getExtents().size());
@@ -156,19 +157,19 @@ public final strictfp class PrunerTest e
         assertFalse(metadata.isEmpty());
 
         metadata.prune();
-        assertFalse(isNullOrEmpty(metadata.getFileIdentifier()));
+        assertFalse(isNullOrEmpty(metadata.getMetadataIdentifier()));
         assertFalse(isNullOrEmpty(identification.getCitation()));
         assertEquals(1, metadata.getIdentificationInfo().size());
         assertEquals(0, identification.getExtents().size());
         assertEquals(0, extent.getGeographicElements().size());
         assertFalse(metadata.isEmpty());
 
-        metadata.setFileIdentifier(" ");
+        metadata.setMetadataIdentifier(new SimpleIdentifier(null, " "));
         identification.setCitation(new DefaultCitation(" "));
-        assertNotNull(metadata.getFileIdentifier());
+        assertNotNull(metadata.getMetadataIdentifier());
         metadata.prune();
 
-        assertNull(metadata.getFileIdentifier());
+        assertNull(metadata.getMetadataIdentifier());
         assertNull(identification.getCitation());
         assertTrue(metadata.getIdentificationInfo().isEmpty());
         assertTrue(identification.getExtents().isEmpty());

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=1634011&r1=1634010&r2=1634011&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] Fri Oct 24 07:25:46 2014
@@ -260,8 +260,9 @@ public final strictfp class DefaultMetad
          */
         it.remove();
         assertFalse(it.hasNext());
-        final DefaultMetadataScope c = new DefaultMetadataScope(levels[1] = ScopeCode.ATTRIBUTE_TYPE);
-        c.setName(new SimpleInternationalString(names[1] = "Clearance"));
+        final DefaultMetadataScope c = new DefaultMetadataScope(
+                levels[1] = ScopeCode.ATTRIBUTE_TYPE,
+                names [1] = "Clearance");
         assertTrue(scopes.add(c));
         assertArrayEquals("hierarchyLevelNames", names,  metadata.getHierarchyLevelNames().toArray());
         assertArrayEquals("hierarchyLevels",     levels, metadata.getHierarchyLevels().toArray());

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/DefaultMetadataTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/DefaultMetadataTest.java?rev=1634011&r1=1634010&r2=1634011&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/DefaultMetadataTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/DefaultMetadataTest.java
[UTF-8] Fri Oct 24 07:25:46 2014
@@ -20,6 +20,8 @@ import java.net.URI;
 import java.net.URL;
 import java.util.Arrays;
 import java.util.Locale;
+import java.io.StringWriter;
+import javax.xml.bind.Marshaller;
 import javax.xml.bind.Unmarshaller;
 import javax.xml.bind.JAXBException;
 import javax.measure.unit.SI;
@@ -50,11 +52,12 @@ import org.apache.sis.internal.jaxb.gmx.
 import org.apache.sis.referencing.NamedIdentifier;
 import org.apache.sis.util.iso.SimpleInternationalString;
 import org.apache.sis.util.ComparisonMode;
+import org.apache.sis.xml.Namespaces;
 import org.apache.sis.xml.MarshallerPool;
 import org.apache.sis.test.TestUtilities;
+import org.apache.sis.test.XMLComparator;
 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.*;
@@ -96,20 +99,23 @@ public strictfp class DefaultMetadataTes
 
     /**
      * Programmatically creates the metadata to marshall, or to compare against the unmarshalled
metadata.
+     *
+     * @return The hard-coded representation of {@code "Metadata.xml"} content.
      */
     private DefaultMetadata createHardCoded() {
         final DefaultMetadata metadata = new DefaultMetadata();
-        metadata.setFileIdentifier("Apache SIS/Metadata test");
-        metadata.setLanguage(Locale.ENGLISH);
-        metadata.setCharacterSet(StandardCharsets.UTF_8);
-        metadata.setHierarchyLevels(singleton(ScopeCode.DATASET));
-        metadata.setHierarchyLevelNames(singleton("Common Data Index record"));
-        metadata.setDateStamp(TestUtilities.date("2009-01-01 04:00:00"));
+        metadata.setMetadataIdentifier(new DefaultIdentifier("Apache SIS/Metadata test"));
+        metadata.setLanguages(singleton(Locale.ENGLISH));
+        metadata.setCharacterSets(singleton(StandardCharsets.UTF_8));
+        metadata.setMetadataScopes(singleton(new DefaultMetadataScope(ScopeCode.DATASET,
"Common Data Index record")));
+        metadata.setDates(singleton(new DefaultCitationDate(TestUtilities.date("2009-01-01
04:00:00"), DateType.CREATION)));
         /*
-         * Contact information for the author. The same party will be used
-         * for custodian and distributor, with only the role changed.
+         * Contact information for the author. The same party will be used for custodian
and distributor,
+         * with only the role changed. Note that we need to create an instance of the deprecated
class,
+         * because this is what will be unmarshalled from the XML document.
          */
-        final DefaultResponsibleParty author = new DefaultResponsibleParty(Role.AUTHOR);
+        @SuppressWarnings("deprecation")
+        final DefaultResponsibility 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/"));
@@ -141,7 +147,8 @@ public strictfp class DefaultMetadataTes
                     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);
+                @SuppressWarnings("deprecation")
+                final DefaultResponsibility 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);
@@ -166,7 +173,8 @@ public strictfp class DefaultMetadataTes
                     Locale.ENGLISH,             // Language,
                     TopicCategory.OCEANS);      // Topic category
             {
-                final DefaultResponsibleParty custodian = new DefaultResponsibleParty(author);
+                @SuppressWarnings("deprecation")
+                final DefaultResponsibility custodian = new DefaultResponsibleParty(author);
                 custodian.setRole(Role.CUSTODIAN);
                 identification.setPointOfContacts(singleton(custodian));
             }
@@ -205,14 +213,15 @@ public strictfp class DefaultMetadataTes
              * Data indentification / Aggregate information.
              */
             {
-                final DefaultAggregateInformation aggregateInfo = new DefaultAggregateInformation();
+                @SuppressWarnings("deprecation")
+                final DefaultAssociatedResource 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.setName(name);
                 aggregateInfo.setInitiativeType(InitiativeType.CAMPAIGN);
                 aggregateInfo.setAssociationType(AssociationType.LARGER_WORD_CITATION);
-                identification.setAggregationInfo(singleton(aggregateInfo));
+                identification.setAssociatedResources(singleton(aggregateInfo));
             }
             /*
              * Data indentification / Extent.
@@ -291,8 +300,9 @@ public strictfp class DefaultMetadataTes
          * Distribution information.
          */
         {
+            @SuppressWarnings("deprecation")
+            final DefaultResponsibility distributor = new DefaultResponsibleParty(author);
             final DefaultDistribution distributionInfo = new DefaultDistribution();
-            DefaultResponsibleParty distributor = new DefaultResponsibleParty(author);
             distributor.setRole(Role.DISTRIBUTOR);
             distributionInfo.setDistributors(singleton(new DefaultDistributor(distributor)));
             distributionInfo.setDistributionFormats(singleton(
@@ -313,6 +323,8 @@ public strictfp class DefaultMetadataTes
 
     /**
      * Returns the URL to the {@code "Metadata.xml"} file to use for this test.
+     *
+     * @return The URL to {@code "Metadata.xml"} test file.
      */
     private URL getResource() {
         return DefaultMetadataTest.class.getResource("Metadata.xml");
@@ -321,13 +333,52 @@ public strictfp class DefaultMetadataTes
     /**
      * Tests marshalling of a XML document.
      *
-     * @throws JAXBException If an error occurred during marshalling.
+     * @throws Exception If an error occurred during marshalling.
      */
     @Test
-    @Ignore("Need to investigate why anchors are lost at marshalling time.")
-    public void testMarshalling() throws JAXBException {
-        final String xml = marshal(createHardCoded());
-        assertXmlEquals(getResource(), xml, "xmlns:*", "xsi:schemaLocation");
+    public void testMarshalling() throws Exception {
+        final MarshallerPool pool   = getMarshallerPool();
+        final Marshaller     ms     = pool.acquireMarshaller();
+        final StringWriter   writer = new StringWriter(25000);
+        ms.marshal(createHardCoded(), writer);
+        pool.recycle(ms);
+        /*
+         * Apache SIS can marshal CharSequence as Anchor only if the property type is InternationalString.
+         * But the 'Metadata.hierarchyLevelName' and 'Identifier.code' properties are String,
which we can
+         * not subclass. Concequently SIS currently marshals them as plain string. Replace
those strings
+         * by the anchor version so we can compare the XML with the "Metadata.xml" file content.
+         */
+        final StringBuffer xml = writer.getBuffer();
+        replace(xml, "<gco:CharacterString>Common Data Index record</gco:CharacterString>",
+                     "<gmx:Anchor xlink:href=\"SDN:L231:3:CDI\">Common Data Index record</gmx:Anchor>");
+        replace(xml, "<gco:CharacterString>EPSG:4326</gco:CharacterString>",
+                     "<gmx:Anchor xlink:href=\"SDN:L101:2:4326\">EPSG:4326</gmx:Anchor>");
+        /*
+         * The <gmd:EX_TemporalExtent> block can not be marshalled yet, since it requires
the sis-temporal module.
+         * We need to instruct the XML comparator to ignore this block during the comparison.
We also ignore for
+         * now the "gml:id" attribute since SIS generates different values than the ones
in oyr test XML file,
+         * and those values may change in future SIS version.
+         */
+        final XMLComparator comparator = new XMLComparator(getResource(), xml.toString());
+        comparator.ignoredNodes.add(Namespaces.GMD + ":temporalElement");
+        comparator.ignoredAttributes.add("http://www.w3.org/2000/xmlns:*");
+        comparator.ignoredAttributes.add(Namespaces.XSI + ":schemaLocation");
+        comparator.ignoredAttributes.add(Namespaces.GML + ":id");
+        comparator.ignoreComments = true;
+        comparator.compare();
+    }
+
+    /**
+     * Replaces the first occurrence of the given string by an other one.
+     *
+     * @param buffer    The buffer in which to perform the replacement.
+     * @param toSearch  The string to search.
+     * @param replaceBy The value to use as a replacement.
+     */
+    private static void replace(final StringBuffer buffer, final String toSearch, final String
replaceBy) {
+        final int i = buffer.indexOf(toSearch);
+        assertTrue("String to replace not found.", i >= 0);
+        buffer.replace(i, i+toSearch.length(), replaceBy);
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ReferencingInMetadataTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ReferencingInMetadataTest.java?rev=1634011&r1=1634010&r2=1634011&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ReferencingInMetadataTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ReferencingInMetadataTest.java
[UTF-8] Fri Oct 24 07:25:46 2014
@@ -20,11 +20,7 @@ import java.net.URI;
 import java.util.Locale;
 import javax.xml.bind.JAXBException;
 import org.opengis.metadata.Metadata;
-import org.opengis.metadata.citation.Citation;
-import org.opengis.metadata.citation.OnLineFunction;
-import org.opengis.metadata.citation.OnlineResource;
-import org.opengis.metadata.citation.ResponsibleParty;
-import org.opengis.metadata.citation.Role;
+import org.opengis.metadata.citation.*;
 import org.opengis.metadata.extent.Extent;
 import org.opengis.metadata.extent.GeographicBoundingBox;
 import org.opengis.metadata.extent.VerticalExtent;
@@ -83,10 +79,10 @@ public final strictfp class ReferencingI
     @Test
     public void testMetadataWithVerticalCRS() throws JAXBException {
         final Metadata metadata = unmarshalFile(Metadata.class, VERTICAL_CRS_XML);
-        assertEquals("fileIdentifier", "20090901",                     metadata.getFileIdentifier());
-        assertEquals("language",       Locale.ENGLISH,                 metadata.getLanguage());
-        assertEquals("characterSet",   StandardCharsets.UTF_8,         metadata.getCharacterSet());
-        assertEquals("dateStamp",      xmlDate("2014-01-04 00:00:00"), metadata.getDateStamp());
+        assertEquals("fileIdentifier", "20090901",                     metadata.getMetadataIdentifier().getCode());
+        assertEquals("language",       Locale.ENGLISH,                 getSingleton(metadata.getLanguages()));
+        assertEquals("characterSet",   StandardCharsets.UTF_8,         getSingleton(metadata.getCharacterSets()));
+        assertEquals("dateStamp",      xmlDate("2014-01-04 00:00:00"), getSingleton(metadata.getDates()).getDate());
         /*
          * <gmd:contact>
          *   <gmd:CI_ResponsibleParty>
@@ -94,10 +90,13 @@ public final strictfp class ReferencingI
          *   </gmd:CI_ResponsibleParty>
          * </gmd:contact>
          */
-        final ResponsibleParty contact = (ResponsibleParty) getSingleton(metadata.getContacts());
-        final OnlineResource onlineResource = contact.getContactInfo().getOnlineResource();
+        final Responsibility contact        = getSingleton(metadata   .getContacts());
+        final Party          party          = getSingleton(contact    .getParties());
+        final Contact        contactInfo    = getSingleton(party      .getContactInfo());
+        final OnlineResource onlineResource = getSingleton(contactInfo.getOnlineResources());
+        assertInstanceOf("party", Organisation.class, party);
         assertNotNull("onlineResource", onlineResource);
-        assertEquals("organisationName", "Apache SIS", contact.getOrganisationName().toString());
+        assertEquals("organisationName", "Apache SIS", party.getName().toString());
         assertEquals("linkage", URI.create("http://sis.apache.org"), onlineResource.getLinkage());
         assertEquals("function", OnLineFunction.INFORMATION, onlineResource.getFunction());
         assertEquals("role", Role.PRINCIPAL_INVESTIGATOR, contact.getRole());

Modified: 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=1634011&r1=1634010&r2=1634011&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/test/integration/Metadata.xml
(original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/test/integration/Metadata.xml
Fri Oct 24 07:25:46 2014
@@ -97,7 +97,7 @@
     </gmd:CI_ResponsibleParty>
   </gmd:contact>
   <gmd:dateStamp>
-    <gco:DateTime>2009-01-01T06:00:00+02:00</gco:DateTime>
+    <gco:DateTime>2009-01-01T05:00:00+01:00</gco:DateTime>
   </gmd:dateStamp>
   <gmd:spatialRepresentationInfo>
     <gmd:MD_VectorSpatialRepresentation>

Modified: sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/jaxb/gmd/LanguageCodeTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/jaxb/gmd/LanguageCodeTest.java?rev=1634011&r1=1634010&r2=1634011&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/jaxb/gmd/LanguageCodeTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/jaxb/gmd/LanguageCodeTest.java
[UTF-8] Fri Oct 24 07:25:46 2014
@@ -36,6 +36,7 @@ import org.junit.AfterClass;
 import org.junit.Test;
 
 import static org.apache.sis.test.Assert.*;
+import static org.apache.sis.test.TestUtilities.getSingleton;
 
 
 /**
@@ -155,7 +156,7 @@ public final strictfp class LanguageCode
         final Unmarshaller unmarshaller = pool.acquireUnmarshaller();
         final String xml = getMetadataXML(LANGUAGE_CODE);
         final Metadata metadata = (Metadata) unmarshal(unmarshaller, xml);
-        assertEquals(Locale.JAPANESE, metadata.getLanguage());
+        assertEquals(Locale.JAPANESE, getSingleton(metadata.getLanguages()));
     }
 
     /**
@@ -178,7 +179,7 @@ public final strictfp class LanguageCode
         final Unmarshaller unmarshaller = pool.acquireUnmarshaller();
         final String xml = getMetadataXML(LANGUAGE_CODE_WITHOUT_ATTRIBUTE);
         final Metadata metadata = (Metadata) unmarshal(unmarshaller, xml);
-        assertEquals(Locale.JAPANESE, metadata.getLanguage());
+        assertEquals(Locale.JAPANESE, getSingleton(metadata.getLanguages()));
         pool.recycle(unmarshaller);
     }
 
@@ -219,7 +220,7 @@ public final strictfp class LanguageCode
         final Unmarshaller unmarshaller = pool.acquireUnmarshaller();
         final String xml = getMetadataXML(CHARACTER_STRING);
         final Metadata metadata = (Metadata) unmarshal(unmarshaller, xml);
-        assertEquals(Locale.JAPANESE, metadata.getLanguage());
+        assertEquals(Locale.JAPANESE, getSingleton(metadata.getLanguages()));
         pool.recycle(unmarshaller);
     }
 }

Modified: sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/XMLComparator.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/XMLComparator.java?rev=1634011&r1=1634010&r2=1634011&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/XMLComparator.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/XMLComparator.java
[UTF-8] Fri Oct 24 07:25:46 2014
@@ -294,6 +294,7 @@ public strictfp class XMLComparator {
     protected void compareNode(final Node expected, final Node actual) {
         if (expected == null || actual == null) {
             fail(formatErrorMessage(expected, actual));
+            return;
         }
         /*
          * Check text value for types:
@@ -460,6 +461,7 @@ public strictfp class XMLComparator {
      * @param expected The node having the expected attributes.
      * @param actual The node to compare.
      */
+    @SuppressWarnings("null")
     protected void compareAttributes(final Node expected, final Node actual) {
         final NamedNodeMap expectedAttributes = expected.getAttributes();
         final NamedNodeMap actualAttributes   = actual.getAttributes();
@@ -542,7 +544,8 @@ public strictfp class XMLComparator {
                  * Check if the fully qualified attribute name is one of the attributes to
ignore.
                  * Typical example: "http://www.w3.org/2001/XMLSchema-instance:schemaLocation"
                  */
-                if (ignored.contains(buffer.append(':').append(name).toString())) {
+                buffer.append(':').append(name, name.indexOf(':') + 1, name.length());
+                if (ignored.contains(buffer.toString())) {
                     return true;
                 }
                 /*
@@ -738,6 +741,7 @@ public strictfp class XMLComparator {
      * @param node          The node to format.
      * @param lineSeparator The platform-specific line separator.
      */
+    @SuppressWarnings("null")
     private static void formatNode(final StringBuilder buffer, final Node node, final String
lineSeparator) {
         if (node == null) {
             buffer.append("(no node)").append(lineSeparator);

Modified: sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/mock/MetadataMock.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/mock/MetadataMock.java?rev=1634011&r1=1634010&r2=1634011&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/mock/MetadataMock.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/mock/MetadataMock.java
[UTF-8] Fri Oct 24 07:25:46 2014
@@ -19,6 +19,7 @@ package org.apache.sis.test.mock;
 import java.util.Date;
 import java.util.Locale;
 import java.util.Collection;
+import java.util.Collections;
 import java.nio.charset.Charset;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
@@ -102,12 +103,13 @@ public final strictfp class MetadataMock
     }
 
     /**
-     * Undefined property.
-     * @return {@code null}.
+     * Returns {@link #language} in a singleton set or an empty set.
+     *
+     * @return {@link #language}
      */
     @Override
     public Collection<Locale> getLanguages() {
-        return null;
+        return (language != null) ? Collections.singleton(language) : Collections.emptySet();
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/xml/NilReasonTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/xml/NilReasonTest.java?rev=1634011&r1=1634010&r2=1634011&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/xml/NilReasonTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/xml/NilReasonTest.java
[UTF-8] Fri Oct 24 07:25:46 2014
@@ -19,7 +19,7 @@ package org.apache.sis.xml;
 import java.net.URISyntaxException;
 import org.opengis.util.InternationalString;
 import org.opengis.metadata.citation.Citation;
-import org.opengis.metadata.citation.ResponsibleParty;
+import org.opengis.metadata.citation.Responsibility;
 import org.apache.sis.util.LenientComparable;
 import org.apache.sis.util.ComparisonMode;
 import org.apache.sis.util.ArraysExt;
@@ -288,7 +288,7 @@ public final strictfp class NilReasonTes
         assertTrue (c.equals(e2, ComparisonMode.DEBUG));
 
         // Following object should alway be different because it does not implement the same
interface.
-        final ResponsibleParty r1 = NilReason.TEMPLATE.createNilObject(ResponsibleParty.class);
+        final Responsibility r1 = NilReason.TEMPLATE.createNilObject(Responsibility.class);
         assertFalse(c.equals(r1, ComparisonMode.STRICT));
         assertFalse(c.equals(r1, ComparisonMode.BY_CONTRACT));
         assertFalse(c.equals(r1, ComparisonMode.IGNORE_METADATA));

Modified: sis/branches/JDK8/ide-project/NetBeans/build.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/ide-project/NetBeans/build.xml?rev=1634011&r1=1634010&r2=1634011&view=diff
==============================================================================
--- sis/branches/JDK8/ide-project/NetBeans/build.xml (original)
+++ sis/branches/JDK8/ide-project/NetBeans/build.xml Fri Oct 24 07:25:46 2014
@@ -36,6 +36,8 @@
       <fileset dir="${project.root}/core/sis-utility/target/generated-resources/org/apache/sis/util/resources">
         <include name="*.utf"/>
       </fileset>
+    </copy>
+    <copy todir="${build.classes.dir}/org/apache/sis/internal/shapefile/jdbc">
       <fileset dir="${project.root}/storage/sis-shapefile/target/generated-resources/org/apache/sis/internal/shapefile/jdbc">
         <include name="*.utf"/>
       </fileset>

Modified: sis/branches/JDK8/ide-project/NetBeans/nbproject/project.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/ide-project/NetBeans/nbproject/project.properties?rev=1634011&r1=1634010&r2=1634011&view=diff
==============================================================================
--- sis/branches/JDK8/ide-project/NetBeans/nbproject/project.properties [ISO-8859-1] (original)
+++ sis/branches/JDK8/ide-project/NetBeans/nbproject/project.properties [ISO-8859-1] Fri Oct
24 07:25:46 2014
@@ -143,7 +143,7 @@ debug.test.classpath=\
 #
 # Build configuration and destination directories.
 #
-javac.compilerargs                       = -Xdoclint:all,-reference
+javac.compilerargs                       = -Xdoclint:syntax,html,missing/protected,accessibility/protected
 javac.deprecation                        = true
 javadoc.windowtitle                      = Apache SIS
 javadoc.encoding                         = ${source.encoding}

Modified: sis/branches/JDK8/pom.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/pom.xml?rev=1634011&r1=1634010&r2=1634011&view=diff
==============================================================================
--- sis/branches/JDK8/pom.xml (original)
+++ sis/branches/JDK8/pom.xml Fri Oct 24 07:25:46 2014
@@ -444,7 +444,7 @@ Apache SIS is a free software, Java lang
           <useIncrementalCompilation>false</useIncrementalCompilation> <!--
https://jira.codehaus.org/browse/MCOMPILER-209 -->
           <compilerArgs>
             <arg>-Xlint:all</arg>
-            <arg>-Xdoclint:all,-reference</arg>
+            <arg>-Xdoclint:syntax,html,missing/protected,accessibility/protected</arg>
           </compilerArgs>
         </configuration>
       </plugin>

Modified: sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/MetadataReader.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/MetadataReader.java?rev=1634011&r1=1634010&r2=1634011&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/MetadataReader.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/MetadataReader.java
[UTF-8] Fri Oct 24 07:25:46 2014
@@ -880,13 +880,11 @@ final class MetadataReader {
         if (creation != null) {
             metadata.setDates(singleton(new DefaultCitationDate(creation, DateType.CREATION)));
         }
-        metadata.setMetadataScopes(singleton(new DefaultMetadataScope(ScopeCode.DATASET)));
+        metadata.setMetadataScopes(singleton(new DefaultMetadataScope(ScopeCode.DATASET,
null)));
         for (final String service : SERVICES) {
             final String name = decoder.stringValue(service);
             if (name != null) {
-                final DefaultMetadataScope scope = new DefaultMetadataScope(ScopeCode.SERVICE);
-                scope.setName(new SimpleInternationalString(name));
-                metadata.getMetadataScopes().add(scope);
+                addIfAbsent(metadata.getMetadataScopes(), new DefaultMetadataScope(ScopeCode.SERVICE,
name));
             }
         }
         /*

Modified: sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/storage/netcdf/ConformanceTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/storage/netcdf/ConformanceTest.java?rev=1634011&r1=1634010&r2=1634011&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/storage/netcdf/ConformanceTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/storage/netcdf/ConformanceTest.java
[UTF-8] Fri Oct 24 07:25:46 2014
@@ -17,8 +17,6 @@
 package org.apache.sis.storage.netcdf;
 
 import java.util.Map;
-import java.util.Arrays;
-import java.util.HashSet;
 import java.io.IOException;
 import ucar.nc2.NetcdfFile;
 import org.opengis.metadata.Metadata;
@@ -27,6 +25,7 @@ import org.opengis.metadata.extent.Tempo
 import org.opengis.metadata.identification.DataIdentification;
 import org.opengis.metadata.maintenance.ScopeCode;
 import org.opengis.wrapper.netcdf.NetcdfMetadataTest;
+import org.apache.sis.metadata.iso.DefaultMetadataScope;
 import org.apache.sis.internal.netcdf.Decoder;
 import org.apache.sis.internal.netcdf.ucar.DecoderWrapper;
 import org.apache.sis.internal.netcdf.TestCase;
@@ -111,8 +110,11 @@ public final strictfp class ConformanceT
         assertNull(expected.put("identificationInfo.citation.identifier.code", "crm_v1"));
         assertNull(expected.put("contentInfo.dimension.sequenceIdentifier",    "z"));
         super.testTHREDDS();
-        assertEquals("hierarchyLevel", new HashSet<>(Arrays.asList(ScopeCode.DATASET,
ScopeCode.SERVICE)),
-                new HashSet<>(metadata.getHierarchyLevels()));
+        assertArrayEquals("metadataScopes", new DefaultMetadataScope[] {
+                new DefaultMetadataScope(ScopeCode.DATASET, null),
+                new DefaultMetadataScope(ScopeCode.SERVICE, "http://localhost:8080//thredds/wms/crm/crm_vol9.nc"),
+                new DefaultMetadataScope(ScopeCode.SERVICE, "http://localhost:8080//thredds/wcs/crm/crm_vol9.nc")},
+                metadata.getMetadataScopes().toArray());
         /*
          * In the SIS case, the Metadata/Contact and Metadata/Identification/PointOfContact
          * proprties are not just equals - they are expected to be the exact same instance.
@@ -138,7 +140,7 @@ public final strictfp class ConformanceT
     public void testNCEP() throws IOException {
         addCommonProperties(expectedProperties, true);
         super.testNCEP();
-        assertSame("hierarchyLevel", ScopeCode.DATASET, getSingleton(metadata.getHierarchyLevels()));
+        assertSame("metadataScope", ScopeCode.DATASET, getSingleton(metadata.getMetadataScopes()).getResourceScope());
         /*
          * In the SIS case, the Metadata/Contact and Metadata/Identification/PointOfContact
          * proprties are not just equals - they are expected to be the exact same instance.
@@ -166,7 +168,7 @@ public final strictfp class ConformanceT
     public void testLandsat() throws IOException {
         addCommonProperties(expectedProperties, false);
         super.testLandsat();
-        assertSame("hierarchyLevel", ScopeCode.DATASET, getSingleton(metadata.getHierarchyLevels()));
+        assertSame("metadataScope", ScopeCode.DATASET, getSingleton(metadata.getMetadataScopes()).getResourceScope());
 
         assertEmpty(expectedProperties);
         assertEmpty(actualProperties);
@@ -183,7 +185,7 @@ public final strictfp class ConformanceT
         final Map<String,Object> expected = expectedProperties;
         addCommonProperties(expected, true);
         super.testCIP();
-        assertSame("hierarchyLevel", ScopeCode.DATASET, getSingleton(metadata.getHierarchyLevels()));
+        assertSame("metadataScope", ScopeCode.DATASET, getSingleton(metadata.getMetadataScopes()).getResourceScope());
         /*
          * In the SIS case, the Metadata/Contact and Metadata/Identification/PointOfContact
          * proprties are not just equals - they are expected to be the exact same instance.

Modified: sis/branches/JDK8/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/xml/XMLStoreTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/xml/XMLStoreTest.java?rev=1634011&r1=1634010&r2=1634011&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/xml/XMLStoreTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/xml/XMLStoreTest.java
[UTF-8] Fri Oct 24 07:25:46 2014
@@ -19,17 +19,14 @@ package org.apache.sis.internal.storage.
 import java.util.Locale;
 import java.io.StringReader;
 import org.opengis.metadata.Metadata;
-import org.opengis.metadata.citation.Role;
-import org.opengis.metadata.citation.OnLineFunction;
-import org.opengis.metadata.citation.OnlineResource;
-import org.opengis.metadata.citation.ResponsibleParty;
+import org.opengis.metadata.citation.*;
 import org.apache.sis.xml.Namespaces;
 import org.apache.sis.storage.StorageConnector;
 import org.apache.sis.storage.DataStoreException;
 import org.apache.sis.test.TestCase;
 import org.junit.Test;
 
-import static org.junit.Assert.*;
+import static org.opengis.test.Assert.*;
 import static org.apache.sis.test.TestUtilities.getSingleton;
 
 // Branch-dependent imports
@@ -41,7 +38,7 @@ import java.nio.charset.StandardCharsets
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
- * @version 0.4
+ * @version 0.5
  * @module
  */
 public final strictfp class XMLStoreTest extends TestCase {
@@ -98,13 +95,16 @@ public final strictfp class XMLStoreTest
             metadata = store.getMetadata();
             assertSame("Expected cached value.", metadata, store.getMetadata());
         }
-        final ResponsibleParty party  = (ResponsibleParty) getSingleton(metadata.getContacts());
-        final OnlineResource resource = party.getContactInfo().getOnlineResource();
-
-        assertEquals(Locale.ENGLISH,              metadata.getLanguage());
-        assertEquals(StandardCharsets.UTF_8,      metadata.getCharacterSet());
-        assertEquals(Role.PRINCIPAL_INVESTIGATOR, party.getRole());
-        assertEquals("Apache SIS",                String.valueOf(party.getOrganisationName()));
+        final Responsibility resp     = getSingleton(metadata.getContacts());
+        final Party          party    = getSingleton(resp.getParties());
+        final Contact        contact  = getSingleton(party.getContactInfo());
+        final OnlineResource resource = getSingleton(contact.getOnlineResources());
+
+        assertInstanceOf("party", Organisation.class, party);
+        assertEquals(Locale.ENGLISH,              getSingleton(metadata.getLanguages()));
+        assertEquals(StandardCharsets.UTF_8,      getSingleton(metadata.getCharacterSets()));
+        assertEquals(Role.PRINCIPAL_INVESTIGATOR, resp.getRole());
+        assertEquals("Apache SIS",                String.valueOf(party.getName()));
         assertEquals("http://sis.apache.org",     String.valueOf(resource.getLinkage()));
         assertEquals(OnLineFunction.INFORMATION,  resource.getFunction());
     }



Mime
View raw message