sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1642028 - /sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultContact.java
Date Thu, 27 Nov 2014 06:36:11 GMT
Author: desruisseaux
Date: Thu Nov 27 06:36:11 2014
New Revision: 1642028

URL: http://svn.apache.org/r1642028
Log:
Update for GeoAPI change (one more upgrade to ISO 19115:2014).

Modified:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultContact.java

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultContact.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultContact.java?rev=1642028&r1=1642027&r2=1642028&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultContact.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultContact.java
[UTF-8] Thu Nov 27 06:36:11 2014
@@ -86,7 +86,7 @@ public class DefaultContact extends ISOM
     /**
      * Time period (including time zone) when individuals can contact the organization or
individual.
      */
-    private InternationalString hoursOfService;
+    private Collection<InternationalString> hoursOfService;
 
     /**
      * Supplemental instructions on how or when to contact the individual or organization.
@@ -129,7 +129,7 @@ public class DefaultContact extends ISOM
             phones              = copyCollection(object.getPhones(), Telephone.class);
             addresses           = copyCollection(object.getAddresses(), Address.class);
             onlineResources     = copyCollection(object.getOnlineResources(), OnlineResource.class);
-            hoursOfService      = object.getHoursOfService();
+            hoursOfService      = copyCollection(object.getHoursOfService(), InternationalString.class);
             contactInstructions = object.getContactInstructions();
             contactType         = object.getContactType();
         }
@@ -371,22 +371,21 @@ public class DefaultContact extends ISOM
     /**
      * Returns the time period (including time zone) when individuals can contact the organization
or individual.
      *
-     * @return Time period when individuals can contact the organization or individual, or
{@code null}.
+     * @return Time period when individuals can contact the organization or individual.
      */
     @Override
     @XmlElement(name = "hoursOfService")
-    public InternationalString getHoursOfService() {
-        return hoursOfService;
+    public Collection<InternationalString> getHoursOfService() {
+        return hoursOfService = nonNullCollection(hoursOfService, InternationalString.class);
     }
 
     /**
      * Sets time period (including time zone) when individuals can contact the organization
or individual.
      *
-     * @param newValue The new hours of service, or {@code null} if none.
+     * @param newValues The new hours of service.
      */
-    public void setHoursOfService(final InternationalString newValue) {
-        checkWritePermission();
-        hoursOfService = newValue;
+    public void setHoursOfService(final Collection<? extends InternationalString> newValues)
{
+        hoursOfService = writeCollection(newValues, hoursOfService, InternationalString.class);
     }
 
     /**



Mime
View raw message