sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1634574 - in /sis/trunk: ./ core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/ core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/ core/sis-me...
Date Mon, 27 Oct 2014 15:25:53 GMT
Author: desruisseaux
Date: Mon Oct 27 15:25:53 2014
New Revision: 1634574

URL: http://svn.apache.org/r1634574
Log:
Merge from the JDK6 branch.

Added:
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/APIVerifier.java
      - copied unchanged from r1634554, sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/APIVerifier.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/BiConsumer.java
      - copied unchanged from r1634554, sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/BiConsumer.java
Modified:
    sis/trunk/   (props changed)
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultExtendedElementInformation.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultContact.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultTelephone.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultCoverageDescription.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureCatalogueDescription.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultRangeDimension.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDigitalTransferOptions.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultFormat.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBox.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultGeographicDescription.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultSource.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultScope.java
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java
    sis/trunk/core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/api-changes.properties
    sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/TestSuite.java
    sis/trunk/ide-project/NetBeans/build.xml

Propchange: sis/trunk/
------------------------------------------------------------------------------
  Merged /sis/branches/JDK8:r1634097-1634544
  Merged /sis/branches/JDK7:r1634099-1634547
  Merged /sis/branches/JDK6:r1634174-1634554

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultExtendedElementInformation.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultExtendedElementInformation.java?rev=1634574&r1=1634573&r2=1634574&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultExtendedElementInformation.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultExtendedElementInformation.java [UTF-8] Mon Oct 27 15:25:53 2014
@@ -87,6 +87,7 @@ public class DefaultExtendedElementInfor
     /**
      * Short form suitable for use in an implementation method such as XML or SGML.
      */
+    @Deprecated
     private String shortName;
 
     /**
@@ -94,6 +95,7 @@ public class DefaultExtendedElementInfor
      * Non-null only if the {@linkplain #getDataType() data type}
      * is {@linkplain Datatype#CODE_LIST_ELEMENT code list element}.
      */
+    @Deprecated
     private Integer domainCode;
 
     /**
@@ -506,9 +508,9 @@ public class DefaultExtendedElementInfor
     }
 
     /**
-     * Reason for creating the extended element.
+     * Returns the reason for creating the extended element.
      *
-     * @return Reason for creating the extended element.
+     * @return Reason for creating the extended element, or {@code null}.
      *
      * @since 0.5
      */

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java?rev=1634574&r1=1634573&r2=1634574&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java [UTF-8] Mon Oct 27 15:25:53 2014
@@ -363,6 +363,14 @@ public class DefaultMetadata extends ISO
         return new DefaultMetadata(object);
     }
 
+    /*
+     * Note about deprecated methods implementation: as a general guideline in our metadata implementation,
+     * the deprecated getter methods invoke only the non-deprecated getter replacement, and the deprecated
+     * setter methods invoke only the non-deprecated setter replacement (unless the invoked methods are final).
+     * This means that if a deprecated setter methods need the old value, it will read the field directly.
+     * The intend is to avoid surprising code paths for user who override some methods.
+     */
+
     /**
      * Returns a unique identifier for this metadata record.
      *
@@ -398,7 +406,7 @@ public class DefaultMetadata extends ISO
     @Override
     @Deprecated
     @XmlElement(name = "fileIdentifier")
-    public final String getFileIdentifier() {
+    public String getFileIdentifier() {
         final Identifier identifier = getMetadataIdentifier();
         return (identifier != null) ? identifier.getCode() : null;
     }
@@ -411,8 +419,8 @@ public class DefaultMetadata extends ISO
      * @deprecated As of ISO 19115:2014, replaced by {@link #setMetadataIdentifier(Identifier)}
      */
     @Deprecated
-    public final void setFileIdentifier(final String newValue) {
-        DefaultIdentifier identifier = DefaultIdentifier.castOrCopy(getMetadataIdentifier());
+    public void setFileIdentifier(final String newValue) {
+        DefaultIdentifier identifier = DefaultIdentifier.castOrCopy(metadataIdentifier); // See "Note about deprecated methods implementation"
         if (identifier == null) {
             if (newValue == null) return;
             identifier = new DefaultIdentifier();
@@ -470,8 +478,8 @@ public class DefaultMetadata extends ISO
     @Override
     @Deprecated
     @XmlElement(name = "language")
-    public final Locale getLanguage() {
-        return OtherLocales.getFirst(languages);
+    public Locale getLanguage() {
+        return OtherLocales.getFirst(getLanguages());
         // No warning if the collection contains more than one locale, because
         // this is allowed by the "getLanguage() + getLocales()" contract.
     }
@@ -490,9 +498,9 @@ public class DefaultMetadata extends ISO
      * @deprecated As of GeoAPI 3.1, replaced by {@link #setLanguages(Collection)}.
      */
     @Deprecated
-    public final void setLanguage(final Locale newValue) {
+    public void setLanguage(final Locale newValue) {
         checkWritePermission();
-        setLanguages(OtherLocales.setFirst(languages, newValue));
+        setLanguages(OtherLocales.setFirst(languages, newValue)); // See "Note about deprecated methods implementation"
     }
 
     /**
@@ -506,7 +514,7 @@ public class DefaultMetadata extends ISO
     @Deprecated
     @XmlElement(name = "locale")
     @XmlJavaTypeAdapter(PT_Locale.class)
-    public final Collection<Locale> getLocales() {
+    public Collection<Locale> getLocales() {
         return OtherLocales.filter(getLanguages());
     }
 
@@ -518,9 +526,9 @@ public class DefaultMetadata extends ISO
      * @deprecated As of GeoAPI 3.1, replaced by {@link #setLanguages(Collection)}.
      */
     @Deprecated
-    public final void setLocales(final Collection<? extends Locale> newValues) {
+    public void setLocales(final Collection<? extends Locale> newValues) {
         checkWritePermission();
-        setLanguages(OtherLocales.merge(getLanguage(), newValues));
+        setLanguages(OtherLocales.merge(OtherLocales.getFirst(languages), newValues)); // See "Note about deprecated methods implementation"
     }
 
     /**
@@ -572,7 +580,7 @@ public class DefaultMetadata extends ISO
     @Deprecated
     @XmlElement(name = "characterSet")
     public final CharacterSet getCharacterSet() {
-        final Charset cs = LegacyPropertyAdapter.getSingleton(characterSets,
+        final Charset cs = LegacyPropertyAdapter.getSingleton(getCharacterSets(),
                 Charset.class, null, DefaultMetadata.class, "getCharacterSet");
         if (cs == null) {
             return null;
@@ -642,7 +650,7 @@ public class DefaultMetadata extends ISO
     @Override
     @Deprecated
     @XmlElement(name = "parentIdentifier")
-    public final String getParentIdentifier() {
+    public String getParentIdentifier() {
         final Citation parentMetadata = getParentMetadata();
         if (parentMetadata != null) {
             final InternationalString title = parentMetadata.getTitle();
@@ -661,14 +669,14 @@ public class DefaultMetadata extends ISO
      * @deprecated As of ISO 19115:2014, replaced by {@link #getParentMetadata()}.
      */
     @Deprecated
-    public final void setParentIdentifier(final String newValue) {
+    public void setParentIdentifier(final String newValue) {
         checkWritePermission();
-        DefaultCitation parentMetadata = DefaultCitation.castOrCopy(getParentMetadata());
-        if (parentMetadata == null) {
-            parentMetadata = new DefaultCitation();
+        DefaultCitation parent = DefaultCitation.castOrCopy(parentMetadata); // See "Note about deprecated methods implementation"
+        if (parent == null) {
+            parent = new DefaultCitation();
         }
-        parentMetadata.setTitle(new SimpleInternationalString(newValue));
-        setParentMetadata(parentMetadata);
+        parent.setTitle(new SimpleInternationalString(newValue));
+        setParentMetadata(parent);
     }
 
     /**
@@ -744,7 +752,7 @@ public class DefaultMetadata extends ISO
      *   and {@link DefaultMetadataScope#setResourceScope(ScopeCode)}.
      */
     @Deprecated
-    public final void setHierarchyLevels(final Collection<? extends ScopeCode> newValues) {
+    public void setHierarchyLevels(final Collection<? extends ScopeCode> newValues) {
         checkWritePermission();
         ((LegacyPropertyAdapter<ScopeCode,?>) getHierarchyLevels()).setValues(newValues);
     }
@@ -790,7 +798,7 @@ public class DefaultMetadata extends ISO
      *   and {@link DefaultMetadataScope#setName(InternationalString)}.
      */
     @Deprecated
-    public final void setHierarchyLevelNames(final Collection<? extends String> newValues) {
+    public void setHierarchyLevelNames(final Collection<? extends String> newValues) {
         checkWritePermission();
         ((LegacyPropertyAdapter<String,?>) getHierarchyLevelNames()).setValues(newValues);
     }
@@ -857,8 +865,8 @@ public class DefaultMetadata extends ISO
     @Override
     @Deprecated
     @XmlElement(name = "dateStamp", required = true)
-    public final Date getDateStamp() {
-        final Collection<CitationDate> dates = this.dates;
+    public Date getDateStamp() {
+        final Collection<CitationDate> dates = getDates();
         if (dates != null) {
             for (final CitationDate date : dates) {
                 if (DateType.CREATION.equals(date.getDateType())) {
@@ -877,16 +885,16 @@ public class DefaultMetadata extends ISO
      * @deprecated As of ISO 19115:2014, replaced by {@link #setDates(Collection)}.
      */
     @Deprecated
-    public final void setDateStamp(final Date newValue) {
+    public void setDateStamp(final Date newValue) {
         checkWritePermission();
-        Collection<CitationDate> dates = this.dates;
-        if (dates == null) {
+        Collection<CitationDate> newValues = dates; // See "Note about deprecated methods implementation"
+        if (newValues == null) {
             if (newValue == null) {
                 return;
             }
-            dates = new ArrayList<CitationDate>(1);
+            newValues = new ArrayList<CitationDate>(1);
         } else {
-            final Iterator<CitationDate> it = dates.iterator();
+            final Iterator<CitationDate> it = newValues.iterator();
             while (it.hasNext()) {
                 final CitationDate date = it.next();
                 if (DateType.CREATION.equals(date.getDateType())) {
@@ -903,8 +911,8 @@ public class DefaultMetadata extends ISO
                 }
             }
         }
-        dates.add(new DefaultCitationDate(newValue, DateType.CREATION));
-        setDates(dates);
+        newValues.add(new DefaultCitationDate(newValue, DateType.CREATION));
+        setDates(newValues);
     }
 
     /**
@@ -987,7 +995,7 @@ public class DefaultMetadata extends ISO
      * Implementation of legacy {@link #getMetadataStandardName()} and {@link #getMetadataStandardVersion()} methods.
      */
     private String getMetadataStandard(final boolean version) {
-        final Citation standard = LegacyPropertyAdapter.getSingleton(metadataStandards,
+        final Citation standard = LegacyPropertyAdapter.getSingleton(getMetadataStandards(),
                 Citation.class, null, DefaultMetadata.class, version ? "getMetadataStandardName" : "getMetadataStandardVersion");
         if (standard != null) {
             final InternationalString title = version ? standard.getEdition() : standard.getTitle();
@@ -1036,7 +1044,7 @@ public class DefaultMetadata extends ISO
     @Override
     @Deprecated
     @XmlElement(name = "metadataStandardName")
-    public final String getMetadataStandardName() {
+    public String getMetadataStandardName() {
         return getMetadataStandard(false);
     }
 
@@ -1049,7 +1057,7 @@ public class DefaultMetadata extends ISO
      *   followed by {@link DefaultCitation#setTitle(InternationalString)}.
      */
     @Deprecated
-    public final void setMetadataStandardName(final String newValue) {
+    public void setMetadataStandardName(final String newValue) {
         setMetadataStandard(false, newValue);
     }
 
@@ -1064,7 +1072,7 @@ public class DefaultMetadata extends ISO
     @Override
     @Deprecated
     @XmlElement(name = "metadataStandardVersion")
-    public final String getMetadataStandardVersion() {
+    public String getMetadataStandardVersion() {
         return getMetadataStandard(true);
     }
 
@@ -1077,7 +1085,7 @@ public class DefaultMetadata extends ISO
      *   followed by {@link DefaultCitation#setEdition(InternationalString)}.
      */
     @Deprecated
-    public final void setMetadataStandardVersion(final String newValue) {
+    public void setMetadataStandardVersion(final String newValue) {
         setMetadataStandard(true, newValue);
     }
 
@@ -1115,10 +1123,11 @@ public class DefaultMetadata extends ISO
     @Override
     @Deprecated
     @XmlElement(name = "dataSetURI")
-    public final String getDataSetUri() {
+    public String getDataSetUri() {
         String linkage = null;
-        if (identificationInfo != null) {
-            for (final Identification identification : identificationInfo) {
+        final Collection<Identification> info = getIdentificationInfo();
+        if (info != null) {
+            for (final Identification identification : info) {
                 final Citation citation = identification.getCitation();
                 if (citation instanceof DefaultCitation) {
                     final Collection<? extends OnlineResource> onlineResources = ((DefaultCitation) citation).getOnlineResources();
@@ -1154,11 +1163,11 @@ public class DefaultMetadata extends ISO
      *    followed by {@link DefaultCitation#setOnlineResources(Collection)}.
      */
     @Deprecated
-    public final void setDataSetUri(final String newValue) throws URISyntaxException {
+    public void setDataSetUri(final String newValue) throws URISyntaxException {
         final URI uri = new URI(newValue);
         checkWritePermission();
-        Collection<Identification> identificationInfo = this.identificationInfo;
-        AbstractIdentification firstId = AbstractIdentification.castOrCopy(OtherLocales.getFirst(identificationInfo));
+        Collection<Identification> info = identificationInfo; // See "Note about deprecated methods implementation"
+        AbstractIdentification firstId = AbstractIdentification.castOrCopy(OtherLocales.getFirst(info));
         if (firstId == null) {
             firstId = new DefaultDataIdentification();
         }
@@ -1175,8 +1184,8 @@ public class DefaultMetadata extends ISO
         onlineResources = OtherLocales.setFirst(onlineResources, firstOnline);
         citation.setOnlineResources(onlineResources);
         firstId.setCitation(citation);
-        identificationInfo = OtherLocales.setFirst(identificationInfo, firstId);
-        setIdentificationInfo(identificationInfo);
+        info = OtherLocales.setFirst(info, firstId);
+        setIdentificationInfo(info);
     }
 
     /**

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultContact.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultContact.java?rev=1634574&r1=1634573&r2=1634574&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultContact.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultContact.java [UTF-8] Mon Oct 27 15:25:53 2014
@@ -226,9 +226,10 @@ public class DefaultContact extends ISOM
     @Override
     @Deprecated
     @XmlElement(name = "phone")
-    public final Telephone getPhone() {
+    public Telephone getPhone() {
         Telephone phone = null;
-        if (phones != null) {
+        final Collection<Telephone> phones = getPhones();
+        if (phones != null) { // May be null on marshalling.
             TelephoneType ignored = null;
             for (final Telephone c : phones) {
                 if (c instanceof DefaultTelephone) {
@@ -259,7 +260,7 @@ public class DefaultContact extends ISOM
      * @deprecated As of ISO 19115:2014, replaced by {@link #setPhones(Collection)}.
      */
     @Deprecated
-    public final void setPhone(Telephone newValue) {
+    public void setPhone(Telephone newValue) {
         Collection<Telephone> newValues = null;
         if (newValue != null) {
             if (newValue instanceof DefaultTelephone) {
@@ -311,8 +312,8 @@ public class DefaultContact extends ISOM
     @Override
     @Deprecated
     @XmlElement(name = "address")
-    public final Address getAddress() {
-        return LegacyPropertyAdapter.getSingleton(addresses, Address.class, null, DefaultContact.class, "getAddress");
+    public Address getAddress() {
+        return LegacyPropertyAdapter.getSingleton(getAddresses(), Address.class, null, DefaultContact.class, "getAddress");
     }
 
     /**
@@ -324,7 +325,7 @@ public class DefaultContact extends ISOM
      * @deprecated As of ISO 19115:2014, replaced by {@link #setAddresses(Collection)}.
      */
     @Deprecated
-    public final void setAddress(final Address newValue) {
+    public void setAddress(final Address newValue) {
         setAddresses(LegacyPropertyAdapter.asCollection(newValue));
     }
 
@@ -363,7 +364,7 @@ public class DefaultContact extends ISOM
     @Deprecated
     @XmlElement(name = "onlineResource")
     public OnlineResource getOnlineResource() {
-        return LegacyPropertyAdapter.getSingleton(onlineResources, OnlineResource.class, null, DefaultContact.class, "getOnlineResource");
+        return LegacyPropertyAdapter.getSingleton(getOnlineResources(), OnlineResource.class, null, DefaultContact.class, "getOnlineResource");
     }
 
     /**

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultTelephone.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultTelephone.java?rev=1634574&r1=1634573&r2=1634574&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultTelephone.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultTelephone.java [UTF-8] Mon Oct 27 15:25:53 2014
@@ -298,7 +298,7 @@ public class DefaultTelephone extends IS
      *             with {@link TelephoneType#VOICE}.
      */
     @Deprecated
-    public final void setVoices(final Collection<? extends String> newValues) {
+    public void setVoices(final Collection<? extends String> newValues) {
         ((LegacyTelephones) getVoices()).setValues(newValues);
     }
 
@@ -330,7 +330,7 @@ public class DefaultTelephone extends IS
      *             with {@link TelephoneType#FACSIMILE}.
      */
     @Deprecated
-    public final void setFacsimiles(final Collection<? extends String> newValues) {
+    public void setFacsimiles(final Collection<? extends String> newValues) {
         ((LegacyTelephones) getFacsimiles()).setValues(newValues);
     }
 }

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultCoverageDescription.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultCoverageDescription.java?rev=1634574&r1=1634573&r2=1634574&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultCoverageDescription.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultCoverageDescription.java [UTF-8] Mon Oct 27 15:25:53 2014
@@ -17,11 +17,12 @@
 package org.apache.sis.metadata.iso.content;
 
 import java.util.Collection;
-import org.opengis.annotation.UML;
+import java.util.Collections;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlSeeAlso;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
+import org.opengis.annotation.UML;
 import org.opengis.metadata.Identifier;
 import org.opengis.metadata.content.CoverageContentType;
 import org.opengis.metadata.content.CoverageDescription;
@@ -240,10 +241,11 @@ public class DefaultCoverageDescription 
     @Override
     @Deprecated
     @XmlElement(name = "contentType", required = true)
-    public final CoverageContentType getContentType() {
+    public CoverageContentType getContentType() {
         CoverageContentType type = null;
-        if (attributeGroups != null) {
-            for (final DefaultAttributeGroup g : attributeGroups) {
+        final Collection<DefaultAttributeGroup> groups = getAttributeGroups();
+        if (groups != null) { // May be null on marshalling.
+            for (final DefaultAttributeGroup g : groups) {
                 final Collection<? extends CoverageContentType> contentTypes = g.getContentTypes();
                 if (contentTypes != null) { // May be null on marshalling.
                     for (final CoverageContentType t : contentTypes) {
@@ -270,19 +272,24 @@ public class DefaultCoverageDescription 
      * @deprecated As of ISO 19115:2014, moved to {@link DefaultAttributeGroup#setContentTypes(Collection)}.
      */
     @Deprecated
-    public final void setContentType(final CoverageContentType newValue) {
+    public void setContentType(final CoverageContentType newValue) {
         checkWritePermission();
         final Collection<CoverageContentType> newValues = LegacyPropertyAdapter.asCollection(newValue);
-        final Collection<DefaultAttributeGroup> groups = getAttributeGroups();
-        for (final DefaultAttributeGroup group : groups) {
-            if (group instanceof DefaultAttributeGroup) {
+        Collection<DefaultAttributeGroup> groups = attributeGroups;
+        if (groups != null) {
+            for (final DefaultAttributeGroup group : groups) {
                 group.setContentTypes(newValues);
-                return;
+                return; // Actually stop at the first instance.
             }
         }
         final DefaultAttributeGroup group = new DefaultAttributeGroup();
         group.setContentTypes(newValues);
-        groups.add(group);
+        if (groups != null) {
+            groups.add(group);
+        } else {
+            groups = Collections.<DefaultAttributeGroup>singleton(group);
+        }
+        setAttributeGroups(groups);
     }
 
     /**
@@ -331,7 +338,7 @@ public class DefaultCoverageDescription 
      * @deprecated As of ISO 19115:2014, moved to {@link DefaultAttributeGroup#setGroupAttributes(Collection)}.
      */
     @Deprecated
-    public final void setDimensions(final Collection<? extends RangeDimension> newValues) {
+    public void setDimensions(final Collection<? extends RangeDimension> newValues) {
         checkWritePermission();
         ((LegacyPropertyAdapter<RangeDimension,?>) getDimensions()).setValues(newValues);
     }

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureCatalogueDescription.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureCatalogueDescription.java?rev=1634574&r1=1634573&r2=1634574&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureCatalogueDescription.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureCatalogueDescription.java [UTF-8] Mon Oct 27 15:25:53 2014
@@ -286,7 +286,7 @@ public class DefaultFeatureCatalogueDesc
      * @deprecated As of ISO 19115:2014, replaced by {@link #setFeatureTypeInfo(Collection)}.
      */
     @Deprecated
-    public final void setFeatureTypes(final Collection<? extends GenericName> newValues) {
+    public void setFeatureTypes(final Collection<? extends GenericName> newValues) {
         checkWritePermission();
         ((LegacyPropertyAdapter<GenericName,?>) getFeatureTypes()).setValues(newValues);
     }

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultRangeDimension.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultRangeDimension.java?rev=1634574&r1=1634573&r2=1634574&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultRangeDimension.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultRangeDimension.java [UTF-8] Mon Oct 27 15:25:53 2014
@@ -196,7 +196,7 @@ public class DefaultRangeDimension exten
     @Override
     @Deprecated
     @XmlElement(name = "descriptor")
-    public final InternationalString getDescriptor() {
+    public InternationalString getDescriptor() {
         return getDescription();
     }
 
@@ -209,7 +209,7 @@ public class DefaultRangeDimension exten
      * @deprecated As of ISO 19115:2014, renamed {@link #setDescription(InternationalString)}.
      */
     @Deprecated
-    public final void setDescriptor(final InternationalString newValue) {
+    public void setDescriptor(final InternationalString newValue) {
         setDescription(newValue);
     }
 

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDigitalTransferOptions.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDigitalTransferOptions.java?rev=1634574&r1=1634573&r2=1634574&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDigitalTransferOptions.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDigitalTransferOptions.java [UTF-8] Mon Oct 27 15:25:53 2014
@@ -258,8 +258,8 @@ public class DefaultDigitalTransferOptio
     @Override
     @Deprecated
     @XmlElement(name = "offLine")
-    public final Medium getOffLine() {
-        return LegacyPropertyAdapter.getSingleton(offLines, Medium.class, null, DefaultDigitalTransferOptions.class, "getOffLine");
+    public Medium getOffLine() {
+        return LegacyPropertyAdapter.getSingleton(getOffLines(), Medium.class, null, DefaultDigitalTransferOptions.class, "getOffLine");
     }
 
     /**

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultFormat.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultFormat.java?rev=1634574&r1=1634573&r2=1634574&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultFormat.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultFormat.java [UTF-8] Mon Oct 27 15:25:53 2014
@@ -32,6 +32,8 @@ import org.apache.sis.metadata.iso.citat
 import org.apache.sis.metadata.iso.ISOMetadata;
 import org.apache.sis.util.iso.Types;
 
+// Branch-dependent imports
+import org.apache.sis.internal.jdk8.BiConsumer;
 import static org.opengis.annotation.Obligation.OPTIONAL;
 import static org.opengis.annotation.Obligation.MANDATORY;
 import static org.opengis.annotation.Specification.ISO_19115;
@@ -196,15 +198,24 @@ public class DefaultFormat extends ISOMe
     }
 
     /**
-     * Returns the {@link #formatSpecificationCitation} as a SIS implementation.
+     * Sets the specification title or version.
      */
-    private DefaultCitation getWritableCitation() {
-        Citation citation = getFormatSpecificationCitation();
-        if (!(citation instanceof DefaultCitation)) {
-            citation = new DefaultCitation(citation);
+    private <T> void setFormatSpecificationCitation(final BiConsumer<DefaultCitation,T> setter, final T value) {
+        Citation citation = formatSpecificationCitation;
+        if (citation != null || value != null) {
+            if (!(citation instanceof DefaultCitation)) {
+                citation = new DefaultCitation(citation);
+            }
+            setter.accept((DefaultCitation) citation, value);
+            if (value == null && ((DefaultCitation) citation).isEmpty()) {
+                citation = null;
+            }
+        }
+        // Invoke the non-deprecated setter method only if the reference changed,
+        // for consistency with other deprecated setter methods in metadata module.
+        if (citation != formatSpecificationCitation) {
             setFormatSpecificationCitation(citation);
         }
-        return (DefaultCitation) citation;
     }
 
     /**
@@ -235,7 +246,11 @@ public class DefaultFormat extends ISOMe
     @Deprecated
     public void setSpecification(final InternationalString newValue) {
         checkWritePermission();
-        getWritableCitation().setTitle(newValue);
+        setFormatSpecificationCitation(new BiConsumer<DefaultCitation,InternationalString>() {
+            @Override public void accept(DefaultCitation citation, InternationalString value) {
+                citation.setTitle(value);
+            }
+        }, newValue);
     }
 
     /**
@@ -250,7 +265,7 @@ public class DefaultFormat extends ISOMe
     @Override
     @Deprecated
     @XmlElement(name = "name", required = true)
-    public final InternationalString getName() {
+    public InternationalString getName() {
         final Citation citation = getFormatSpecificationCitation();
         if (citation != null) {
             return LegacyPropertyAdapter.getSingleton(citation.getAlternateTitles(),
@@ -271,7 +286,11 @@ public class DefaultFormat extends ISOMe
     @Deprecated
     public void setName(final InternationalString newValue) {
         checkWritePermission();
-        getWritableCitation().setAlternateTitles(LegacyPropertyAdapter.asCollection(newValue));
+        setFormatSpecificationCitation(new BiConsumer<DefaultCitation,InternationalString>() {
+            @Override public void accept(DefaultCitation citation, InternationalString value) {
+                citation.setAlternateTitles(LegacyPropertyAdapter.asCollection(value));
+            }
+        }, newValue);
     }
 
     /**
@@ -303,7 +322,11 @@ public class DefaultFormat extends ISOMe
     @Deprecated
     public void setVersion(final InternationalString newValue) {
         checkWritePermission();
-        getWritableCitation().setEdition(newValue);
+        setFormatSpecificationCitation(new BiConsumer<DefaultCitation,InternationalString>() {
+            @Override public void accept(DefaultCitation citation, InternationalString value) {
+                citation.setEdition(value);
+            }
+        }, newValue);
     }
 
     /**

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBox.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBox.java?rev=1634574&r1=1634573&r2=1634574&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBox.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBox.java [UTF-8] Mon Oct 27 15:25:53 2014
@@ -111,9 +111,7 @@ import org.apache.sis.internal.jdk7.Obje
     "northBoundLatitude"
 })
 @XmlRootElement(name = "EX_GeographicBoundingBox")
-public class DefaultGeographicBoundingBox extends AbstractGeographicExtent
-        implements GeographicBoundingBox
-{
+public class DefaultGeographicBoundingBox extends AbstractGeographicExtent implements GeographicBoundingBox {
     /**
      * Serial number for inter-operability with different versions.
      */

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultGeographicDescription.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultGeographicDescription.java?rev=1634574&r1=1634573&r2=1634574&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultGeographicDescription.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultGeographicDescription.java [UTF-8] Mon Oct 27 15:25:53 2014
@@ -46,9 +46,7 @@ import org.apache.sis.metadata.iso.Defau
  */
 @XmlType(name = "EX_GeographicDescription_Type")
 @XmlRootElement(name = "EX_GeographicDescription")
-public class DefaultGeographicDescription extends AbstractGeographicExtent
-        implements GeographicDescription
-{
+public class DefaultGeographicDescription extends AbstractGeographicExtent implements GeographicDescription {
     /**
      * Serial number for inter-operability with different versions.
      */

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java?rev=1634574&r1=1634573&r2=1634574&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java [UTF-8] Mon Oct 27 15:25:53 2014
@@ -238,6 +238,7 @@ public class DefaultAggregateInformation
      *
      * @deprecated As of ISO 19115:2014, replaced by an identifier of {@link #getAggregateDataSetName()}.
      */
+    @Deprecated
     public void setAggregateDataSetIdentifier(final Identifier newValue) {
         checkWritePermission();
         Citation name = getAggregateDataSetName();

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java?rev=1634574&r1=1634573&r2=1634574&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java [UTF-8] Mon Oct 27 15:25:53 2014
@@ -251,6 +251,8 @@ public class DefaultServiceIdentificatio
      * Returns information about the availability of the service.
      *
      * @return Information about the availability of the service, or {@code null} if none.
+     *
+     * @since 0.5
      */
 /// @XmlElement(name = "accessProperties", namespace = Namespaces.SRV)
     @UML(identifier="accessProperties", obligation=OPTIONAL, specification=ISO_19115)
@@ -263,6 +265,8 @@ public class DefaultServiceIdentificatio
      * Sets information about the availability of the service.
      *
      * @param newValue The new information about the availability of the service.
+     *
+     * @since 0.5
      */
     public void setAccessProperties(final StandardOrderProcess newValue) {
         checkWritePermission();
@@ -334,6 +338,8 @@ public class DefaultServiceIdentificatio
      * Returns the reference(s) to the resource on which the service operates.
      *
      * @return Reference(s) to the resource on which the service operates.
+     *
+     * @since 0.5
      */
 /// @XmlElement(name = "operatedDataset", namespace = Namespaces.SRV)
     @UML(identifier="operatedDataset", obligation=OPTIONAL, specification=ISO_19115)
@@ -345,6 +351,8 @@ public class DefaultServiceIdentificatio
      * Sets the reference(s) to the resource on which the service operates.
      *
      * @param newValues The new reference(s) to the resource on which the service operates.
+     *
+     * @since 0.5
      */
     public void setOperatedDatasets(final Collection<? extends Citation> newValues) {
         operatedDatasets = writeCollection(newValues, operatedDatasets, Citation.class);
@@ -354,6 +362,8 @@ public class DefaultServiceIdentificatio
      * Returns the profile(s) to which the service adheres.
      *
      * @return Profile(s) to which the service adheres.
+     *
+     * @since 0.5
      */
 /// @XmlElement(name = "profile", namespace = Namespaces.SRV)
     @UML(identifier="profile", obligation=OPTIONAL, specification=ISO_19115)
@@ -374,6 +384,8 @@ public class DefaultServiceIdentificatio
      * Returns the standard(s) to which the service adheres.
      *
      * @return Standard(s) to which the service adheres.
+     *
+     * @since 0.5
      */
 /// @XmlElement(name = "serviceStandard", namespace = Namespaces.SRV)
     @UML(identifier="serviceStandard", obligation=OPTIONAL, specification=ISO_19115)
@@ -385,6 +397,8 @@ public class DefaultServiceIdentificatio
      * Sets the standard(s) to which the service adheres.
      *
      * @param newValues The new standard(s) to which the service adheres.
+     *
+     * @since 0.5
      */
     public void setServiceStandards(final Collection<? extends Citation> newValues) {
         serviceStandards = writeCollection(newValues, serviceStandards, Citation.class);
@@ -449,6 +463,8 @@ public class DefaultServiceIdentificatio
      * </div>
      *
      * @return Information about the chain applied by the service.
+     *
+     * @since 0.5
      */
 /// @XmlElement(name = "containsChain", namespace = Namespaces.SRV)
     @UML(identifier="containsChain", obligation=OPTIONAL, specification=ISO_19115)
@@ -465,6 +481,8 @@ public class DefaultServiceIdentificatio
      * </div>
      *
      * @param newValues The new information about the chain applied by the service.
+     *
+     * @since 0.5
      */
     public void setContainsChain(final Collection<? extends DefaultOperationChainMetadata>  newValues) {
         containsChain = writeCollection(newValues, containsChain, DefaultOperationChainMetadata.class);

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultSource.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultSource.java?rev=1634574&r1=1634573&r2=1634574&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultSource.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultSource.java [UTF-8] Mon Oct 27 15:25:53 2014
@@ -17,6 +17,7 @@
 package org.apache.sis.metadata.iso.lineage;
 
 import java.util.Collection;
+import java.util.Collections;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlSeeAlso;
@@ -257,7 +258,7 @@ public class DefaultSource extends ISOMe
     @Override
     @Deprecated
     @XmlElement(name = "scaleDenominator")
-    public final RepresentativeFraction getScaleDenominator() {
+    public RepresentativeFraction getScaleDenominator() {
         final Resolution resolution = getSourceSpatialResolution();
         return (resolution != null) ? resolution.getEquivalentScale() : null;
     }
@@ -272,13 +273,21 @@ public class DefaultSource extends ISOMe
      * @deprecated As of ISO 19115:2014, moved to {@link DefaultResolution#setEquivalentScale(RepresentativeFraction)}.
      */
     @Deprecated
-    public final void setScaleDenominator(final RepresentativeFraction newValue)  {
+    public void setScaleDenominator(final RepresentativeFraction newValue)  {
         checkWritePermission();
-        Resolution resolution = getSourceSpatialResolution();
-        if (resolution instanceof DefaultResolution) {
-            ((DefaultResolution) resolution).setEquivalentScale(newValue);
-        } else if (newValue != null) {
-            setSourceSpatialResolution(new DefaultResolution(newValue));
+        Resolution resolution = null;
+        if (newValue != null) {
+            resolution = sourceSpatialResolution;
+            if (resolution instanceof DefaultResolution) {
+                ((DefaultResolution) resolution).setEquivalentScale(newValue);
+            } else {
+                resolution = new DefaultResolution(newValue);
+            }
+        }
+        // Invoke the non-deprecated setter method only if the reference changed,
+        // for consistency with other deprecated setter methods in metadata module.
+        if (resolution != sourceSpatialResolution) {
+            setSourceSpatialResolution(resolution);
         }
     }
 
@@ -387,11 +396,15 @@ public class DefaultSource extends ISOMe
     @Override
     @Deprecated
     @XmlElement(name = "sourceExtent")
-    public final Collection<Extent> getSourceExtents() {
+    public Collection<Extent> getSourceExtents() {
         Scope scope = getScope();
         if (!(scope instanceof DefaultScope)) {
-            scope = new DefaultScope(scope);
-            setScope(scope);
+            if (isModifiable()) {
+                scope = new DefaultScope(scope);
+                this.scope = scope;
+            } else {
+                return Collections.singleton(scope.getExtent());
+            }
         }
         return ((DefaultScope) scope).getExtents();
     }
@@ -405,8 +418,9 @@ public class DefaultSource extends ISOMe
      * @deprecated As of ISO 19115:2014, moved to {@link DefaultScope#setExtent(Extent)}.
      */
     @Deprecated
-    public final void setSourceExtents(final Collection<? extends Extent> newValues) {
-        Scope scope = getScope();
+    public void setSourceExtents(final Collection<? extends Extent> newValues) {
+        checkWritePermission();
+        Scope scope = this.scope;
         if (!(scope instanceof DefaultScope)) {
             scope = new DefaultScope(scope);
             setScope(scope);

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java?rev=1634574&r1=1634573&r2=1634574&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java [UTF-8] Mon Oct 27 15:25:53 2014
@@ -17,7 +17,9 @@
 package org.apache.sis.metadata.iso.maintenance;
 
 import java.util.Date;
+import java.util.Iterator;
 import java.util.Collection;
+import java.util.Collections;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
@@ -243,9 +245,10 @@ public class DefaultMaintenanceInformati
     @Override
     @Deprecated
     @XmlElement(name = "dateOfNextUpdate")
-    public final Date getDateOfNextUpdate() {
-        if (maintenanceDates != null) {
-            for (final CitationDate date : maintenanceDates) {
+    public Date getDateOfNextUpdate() {
+        final Collection<CitationDate> dates = getMaintenanceDates();
+        if (dates != null) { // May be null on XML marshalling.
+            for (final CitationDate date : dates) {
                 if (NEXT_UPDATE.equals(date.getDateType())) {
                     return date.getDate();
                 }
@@ -261,18 +264,32 @@ public class DefaultMaintenanceInformati
      * @param newValue The new date of next update.
      */
     @Deprecated
-    public final void setDateOfNextUpdate(final Date newValue) {
+    public void setDateOfNextUpdate(final Date newValue) {
         checkWritePermission();
-        if (newValue != null) {
-            if (maintenanceDates != null) {
-                for (final CitationDate date : maintenanceDates) {
-                    if (date instanceof DefaultCitationDate && NEXT_UPDATE.equals(date.getDateType())) {
+        Collection<CitationDate> dates = maintenanceDates;
+        if (dates != null) {
+            final Iterator<CitationDate> it = dates.iterator();
+            while (it.hasNext()) {
+                final CitationDate date = it.next();
+                if (NEXT_UPDATE.equals(date.getDateType())) {
+                    if (newValue == null) {
+                        it.remove();
+                        return;
+                    } else if (date instanceof DefaultCitationDate) {
                         ((DefaultCitationDate) date).setDate(newValue);
                         return;
                     }
                 }
             }
-            getMaintenanceDates().add(new DefaultCitationDate(newValue, NEXT_UPDATE));
+        }
+        if (newValue != null) {
+            final CitationDate date = new DefaultCitationDate(newValue, NEXT_UPDATE);
+            if (dates != null) {
+                dates.add(date);
+            } else {
+                dates = Collections.singleton(date);
+            }
+            setMaintenanceDates(dates);
         }
     }
 
@@ -366,7 +383,7 @@ public class DefaultMaintenanceInformati
      * @deprecated As of ISO 19115:2014, replaced by {@link #setMaintenanceScopes(Collection)}.
      */
     @Deprecated
-    public final void setUpdateScopes(final Collection<? extends ScopeCode> newValues) {
+    public void setUpdateScopes(final Collection<? extends ScopeCode> newValues) {
         checkWritePermission();
         ((LegacyPropertyAdapter<ScopeCode,?>) getUpdateScopes()).setValues(newValues);
     }
@@ -419,7 +436,7 @@ public class DefaultMaintenanceInformati
      * @deprecated As of ISO 19115:2014, replaced by {@link #setMaintenanceScopes(Collection)}.
      */
     @Deprecated
-    public final void setUpdateScopeDescriptions(final Collection<? extends ScopeDescription> newValues) {
+    public void setUpdateScopeDescriptions(final Collection<? extends ScopeDescription> newValues) {
         checkWritePermission();
         ((LegacyPropertyAdapter<ScopeDescription,?>) getUpdateScopeDescriptions()).setValues(newValues);
     }

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultScope.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultScope.java?rev=1634574&r1=1634573&r2=1634574&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultScope.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultScope.java [UTF-8] Mon Oct 27 15:25:53 2014
@@ -194,7 +194,7 @@ public class DefaultScope extends ISOMet
      */
     @Override
     @Deprecated
-    public final Extent getExtent() {
+    public Extent getExtent() {
         return LegacyPropertyAdapter.getSingleton(getExtents(), Extent.class, null, DefaultScope.class, "getExtent");
     }
 
@@ -207,7 +207,7 @@ public class DefaultScope extends ISOMet
      * @deprecated As of ISO 19115:2014, replaced by {@link #setExtents(Collection)}.
      */
     @Deprecated
-    public final void setExtent(final Extent newValue) {
+    public void setExtent(final Extent newValue) {
         setExtents(LegacyPropertyAdapter.asCollection(newValue));
     }
 

Modified: sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java?rev=1634574&r1=1634573&r2=1634574&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java [UTF-8] Mon Oct 27 15:25:53 2014
@@ -86,6 +86,7 @@ import org.junit.BeforeClass;
     org.apache.sis.metadata.iso.DefaultMetadataTest.class,
     org.apache.sis.metadata.iso.CustomMetadataTest.class,
     org.apache.sis.metadata.iso.AllMetadataTest.class,
+    org.apache.sis.metadata.iso.APIVerifier.class,
 
     org.apache.sis.io.wkt.ConventionTest.class,
     org.apache.sis.io.wkt.SymbolsTest.class,

Modified: sis/trunk/core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/api-changes.properties
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/api-changes.properties?rev=1634574&r1=1634573&r2=1634574&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/api-changes.properties [ISO-8859-1] (original)
+++ sis/trunk/core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/api-changes.properties [ISO-8859-1] Mon Oct 27 15:25:53 2014
@@ -9,6 +9,19 @@
 # branches implementing latest GeoAPI snapshots, and may be non-empty on the trunk
 # when the changes are not yet incorporated in a standard release.
 #
+# Legend:
+#   - Method has been deprecated.
+#   + Method has been added in an existing class. Shall be followed by a colon and UML identifier.
+#   ~ Comment out the next element (e.g. for a method that should have been deleted, but is kept for now).
+#
+# Example:
+# org.opengis.metadata.citation.Telephone=-getVoices -getFacsimiles +getNumber:number +getNumberType:numberType
+#
+# Above example means that the Telephone interface needs to have its getVoices() and getFacsimiles()
+# methods deprecated, and to have getNumber() and getNumberType() methods added in order to comply
+# with the changes in the international standard. The UML identifiers of added methods are "number"
+# and "numberType" respectively.
+#
 org.opengis.metadata.citation.Citation=-getCollectiveTitle +getGraphics:graphic +getOnlineResources:onlineResource
 org.opengis.metadata.citation.Contact=-getAddress +getAddresses:address +getContactType:contactType -getOnlineResource +getOnlineResources:onlineResource -getPhone +getPhones:phone
 org.opengis.metadata.citation.OnlineResource=+getProtocolRequest:protocolRequest

Modified: sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/TestSuite.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/TestSuite.java?rev=1634574&r1=1634573&r2=1634574&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/TestSuite.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/TestSuite.java [UTF-8] Mon Oct 27 15:25:53 2014
@@ -21,6 +21,7 @@ import java.util.Set;
 import java.util.HashSet;
 import java.util.List;
 import java.util.ArrayList;
+import java.util.Iterator;
 import java.io.File;
 import java.net.URL;
 import java.net.URISyntaxException;
@@ -40,7 +41,7 @@ import static org.junit.Assert.*;
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from geotk-3.16)
- * @version 0.4
+ * @version 0.5
  * @module
  */
 @RunWith(Suite.class)
@@ -55,6 +56,11 @@ public abstract strictfp class TestSuite
     };
 
     /**
+     * Expected suffix in name of test classes.
+     */
+    private static final String CLASSNAME_SUFFIX = "Test";
+
+    /**
      * {@code true} for disabling the search for missing tests. This is necessary
      * when the test suites are executed from an external project, for example during a
      * <a href="https://svn.apache.org/repos/asf/sis/release-test/maven">release test</a>.
@@ -119,6 +125,12 @@ public abstract strictfp class TestSuite
             assertTrue(declared.removeAll(tests));
             fail("Classes defined twice in " + suite.getSimpleName() + ": " + declared);
         }
+        // Ignore classes that are not really test, like "APIVerifier".
+        for (final Iterator<Class<?>> it=tests.iterator(); it.hasNext();) {
+            if (!it.next().getName().endsWith(CLASSNAME_SUFFIX)) {
+                it.remove();
+            }
+        }
         removeExistingTests(loader, root, new StringBuilder(120).append(root.getName()), tests);
         if (!tests.isEmpty()) {
             fail("Classes not found. Are they defined in an other module? " + tests);
@@ -141,7 +153,7 @@ public abstract strictfp class TestSuite
                     if (file.isDirectory()) {
                         removeExistingTests(loader, file, path, tests);
                     } else {
-                        if (name.endsWith("Test.class")) {
+                        if (name.endsWith(CLASSNAME_SUFFIX + ".class")) {
                             path.setLength(path.length() - 6); // Remove trailing ".class"
                             final String classname = path.toString();
                             final Class<?> test;

Modified: sis/trunk/ide-project/NetBeans/build.xml
URL: http://svn.apache.org/viewvc/sis/trunk/ide-project/NetBeans/build.xml?rev=1634574&r1=1634573&r2=1634574&view=diff
==============================================================================
--- sis/trunk/ide-project/NetBeans/build.xml (original)
+++ sis/trunk/ide-project/NetBeans/build.xml Mon Oct 27 15:25:53 2014
@@ -28,8 +28,8 @@
 
   <!--
     Called after compilation. Copies the "*.utf" resources files created by Maven.
-    Note that the Apache SIS project must have been build by Maven at least once it
-    can be built by the NetBeans IDE.
+    Note that the Apache SIS project must have been build by Maven at least once
+    before it can be built by the NetBeans IDE.
   -->
   <target name="-post-compile">
     <copy todir="${build.classes.dir}/org/apache/sis/util/iso">
@@ -100,6 +100,7 @@
   <target name="-post-compile-test">
     <copy todir="${build.test.classes.dir}">
       <fileset dir="${project.root}/core/sis-metadata/src/test/resources">
+        <include name="**/*.properties"/>
         <include name="**/*.xml"/>
       </fileset>
       <fileset dir="${project.root}/core/sis-referencing/src/test/resources">



Mime
View raw message