sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1634266 - in /sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso: DefaultMetadata.java DefaultMetadataScope.java
Date Sun, 26 Oct 2014 01:51:19 GMT
Author: desruisseaux
Date: Sun Oct 26 01:51:18 2014
New Revision: 1634266

URL: http://svn.apache.org/r1634266
Log:
Post-merge cleanup.

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

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=1634266&r1=1634265&r2=1634266&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] Sun Oct 26 01:51:18 2014
@@ -55,6 +55,7 @@ import org.opengis.metadata.spatial.Spat
 import org.opengis.referencing.ReferenceSystem;
 import org.opengis.util.InternationalString;
 import org.apache.sis.util.iso.SimpleInternationalString;
+import org.apache.sis.metadata.AbstractMetadata;
 import org.apache.sis.metadata.iso.citation.DefaultCitation;
 import org.apache.sis.metadata.iso.citation.DefaultCitationDate;
 import org.apache.sis.metadata.iso.citation.DefaultOnlineResource;
@@ -388,9 +389,13 @@ public class DefaultMetadata extends ISO
     public final void setFileIdentifier(final String newValue) {
         DefaultIdentifier identifier = DefaultIdentifier.castOrCopy(getMetadataIdentifier());
         if (identifier == null) {
+            if (newValue == null) return;
             identifier = new DefaultIdentifier();
         }
         identifier.setCode(newValue);
+        if (newValue == null && (identifier instanceof AbstractMetadata) &&
((AbstractMetadata) identifier).isEmpty()) {
+            identifier = null;
+        }
         setMetadataIdentifier(identifier);
     }
 

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=1634266&r1=1634265&r2=1634266&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] Sun Oct 26 01:51:18 2014
@@ -20,9 +20,9 @@ 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;
+import org.apache.sis.util.iso.Types;
 
 
 /**



Mime
View raw message