sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1651592 - in /sis/branches/JDK8: core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/ core/sis-referencing/src/test/java/org/apache/sis/test/integration/ core/sis-utility...
Date Wed, 14 Jan 2015 08:37:30 GMT
Author: desruisseaux
Date: Wed Jan 14 08:37:29 2015
New Revision: 1651592

URL: http://svn.apache.org/r1651592
Log:
Renamed DefaultMetadata.getDates() as getDateInfo() for compliance with ISO 19115:2014 identifier
name, which is "dateInfo".

Modified:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.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-utility/src/test/java/org/apache/sis/test/mock/MetadataMock.java
    sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/MetadataReader.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=1651592&r1=1651591&r2=1651592&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] Wed Jan 14 08:37:29 2015
@@ -163,7 +163,7 @@ public class DefaultMetadata extends ISO
     /**
      * Date(s) associated with the metadata.
      */
-    private Collection<CitationDate> dates;
+    private Collection<CitationDate> dateInfo;
 
     /**
      * Citation(s) for the standard(s) to which the metadata conform.
@@ -271,7 +271,7 @@ public class DefaultMetadata extends ISO
         this.contacts  = singleton(contact, Responsibility.class);
         this.identificationInfo = singleton(identificationInfo, Identification.class);
         if (dateStamp != null) {
-            dates = singleton(new DefaultCitationDate(dateStamp, DateType.CREATION), CitationDate.class);
+            dateInfo = singleton(new DefaultCitationDate(dateStamp, DateType.CREATION), CitationDate.class);
         }
     }
 
@@ -293,7 +293,7 @@ public class DefaultMetadata extends ISO
             characterSets                 = copyCollection(object.getCharacterSets(),   
             Charset.class);
             metadataScopes                = copyCollection(object.getMetadataScopes(),  
             MetadataScope.class);
             contacts                      = copyCollection(object.getContacts(),        
             Responsibility.class);
-            dates                         = copyCollection(object.getDates(),           
             CitationDate.class);
+            dateInfo                      = copyCollection(object.getDateInfo(),        
             CitationDate.class);
             metadataStandards             = copyCollection(object.getMetadataStandards(),
            Citation.class);
             metadataProfiles              = copyCollection(object.getMetadataProfiles(),
             Citation.class);
             alternativeMetadataReferences = copyCollection(object.getAlternativeMetadataReferences(),
Citation.class);
@@ -799,8 +799,8 @@ public class DefaultMetadata extends ISO
      * @since 0.5
      */
     @Override
-    public Collection<CitationDate> getDates() {
-        return dates = nonNullCollection(dates, CitationDate.class);
+    public Collection<CitationDate> getDateInfo() {
+        return dateInfo = nonNullCollection(dateInfo, CitationDate.class);
     }
 
     /**
@@ -811,8 +811,8 @@ public class DefaultMetadata extends ISO
      *
      * @since 0.5
      */
-    public void setDates(final Collection<? extends CitationDate> newValues) {
-        dates = writeCollection(newValues, dates, CitationDate.class);
+    public void setDateInfo(final Collection<? extends CitationDate> newValues) {
+        dateInfo = writeCollection(newValues, dateInfo, CitationDate.class);
     }
 
     /**
@@ -826,7 +826,7 @@ public class DefaultMetadata extends ISO
     @Deprecated
     @XmlElement(name = "dateStamp", required = true)
     public Date getDateStamp() {
-        final Collection<CitationDate> dates = getDates();
+        final Collection<CitationDate> dates = getDateInfo();
         if (dates != null) {
             for (final CitationDate date : dates) {
                 if (DateType.CREATION.equals(date.getDateType())) {
@@ -847,7 +847,7 @@ public class DefaultMetadata extends ISO
     @Deprecated
     public void setDateStamp(final Date newValue) {
         checkWritePermission();
-        Collection<CitationDate> newValues = dates; // See "Note about deprecated methods
implementation"
+        Collection<CitationDate> newValues = dateInfo; // See "Note about deprecated
methods implementation"
         if (newValues == null) {
             if (newValue == null) {
                 return;
@@ -872,7 +872,7 @@ public class DefaultMetadata extends ISO
             }
         }
         newValues.add(new DefaultCitationDate(newValue, DateType.CREATION));
-        setDates(newValues);
+        setDateInfo(newValues);
     }
 
     /**

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=1651592&r1=1651591&r2=1651592&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultMetadataTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultMetadataTest.java
[UTF-8] Wed Jan 14 08:37:29 2015
@@ -284,7 +284,7 @@ public final strictfp class DefaultMetad
                 new DefaultCitationDate(date("2014-10-09 00:00:00"), DateType.LAST_UPDATE),
                 new DefaultCitationDate(creation, DateType.CREATION)
         };
-        metadata.setDates(Arrays.asList(dates));
+        metadata.setDateInfo(Arrays.asList(dates));
         assertEquals("dateStamp", creation, metadata.getDateStamp());
         /*
          * Invoking the deprecated setters shall modify the CitationDate object
@@ -293,7 +293,7 @@ public final strictfp class DefaultMetad
         creation = date("2014-10-06 00:00:00");
         metadata.setDateStamp(creation);
         assertEquals("citationDates[1].date", creation, dates[1].getDate());
-        assertArrayEquals("dates", dates, metadata.getDates().toArray());
+        assertArrayEquals("dates", dates, metadata.getDateInfo().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=1651592&r1=1651591&r2=1651592&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] Wed Jan 14 08:37:29 2015
@@ -108,7 +108,7 @@ public strictfp class DefaultMetadataTes
         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)));
+        metadata.setDateInfo(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. Note that we need to create an instance of the deprecated
class,

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=1651592&r1=1651591&r2=1651592&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] Wed Jan 14 08:37:29 2015
@@ -82,7 +82,7 @@ public final strictfp class ReferencingI
         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());
+        assertEquals("dateStamp",      xmlDate("2014-01-04 00:00:00"), getSingleton(metadata.getDateInfo()).getDate());
         /*
          * <gmd:contact>
          *   <gmd:CI_ResponsibleParty>

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=1651592&r1=1651591&r2=1651592&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] Wed Jan 14 08:37:29 2015
@@ -215,7 +215,7 @@ public final strictfp class MetadataMock
      * @return {@code null}.
      */
     @Override
-    public Collection<? extends CitationDate> getDates() {
+    public Collection<? extends CitationDate> getDateInfo() {
         return null;
     }
 

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=1651592&r1=1651591&r2=1651592&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] Wed Jan 14 08:37:29 2015
@@ -946,7 +946,7 @@ final class MetadataReader {
         metadata.setMetadataIdentifier(identifier);
         final Date creation = decoder.dateValue(METADATA_CREATION);
         if (creation != null) {
-            metadata.setDates(singleton(new DefaultCitationDate(creation, DateType.CREATION)));
+            metadata.setDateInfo(singleton(new DefaultCitationDate(creation, DateType.CREATION)));
         }
         metadata.setMetadataScopes(singleton(new DefaultMetadataScope(ScopeCode.DATASET,
null)));
         for (final String service : SERVICES) {



Mime
View raw message