sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1635190 - in /sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis: internal/metadata/MetadataTypes.java metadata/iso/citation/AbstractParty.java metadata/iso/citation/DefaultResponsibility.java
Date Wed, 29 Oct 2014 16:18:32 GMT
Author: desruisseaux
Date: Wed Oct 29 16:18:32 2014
New Revision: 1635190

URL: http://svn.apache.org/r1635190
Log:
Replace explicit declaration of DefaultResponsibleParty by a @XmlSeeAlso annotation.
This allow less surprising behavior for applications that use Apache SIS with their own JAXBContext.
Credit: this is a proposal from Guilhem Legal.

Modified:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataTypes.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/AbstractParty.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibility.java

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataTypes.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataTypes.java?rev=1635190&r1=1635189&r2=1635190&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataTypes.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataTypes.java
[UTF-8] Wed Oct 29 16:18:32 2014
@@ -19,7 +19,6 @@ package org.apache.sis.internal.metadata
 import java.util.Collection;
 import org.apache.sis.internal.jaxb.TypeRegistration;
 import org.apache.sis.metadata.iso.DefaultMetadata;
-import org.apache.sis.metadata.iso.citation.DefaultResponsibleParty;
 
 
 /**
@@ -38,6 +37,5 @@ public final class MetadataTypes extends
     @Override
     public void getTypes(final Collection<Class<?>> addTo) {
         addTo.add(DefaultMetadata.class);
-        addTo.add(DefaultResponsibleParty.class);
     }
 }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/AbstractParty.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/AbstractParty.java?rev=1635190&r1=1635189&r2=1635190&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/AbstractParty.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/AbstractParty.java
[UTF-8] Wed Oct 29 16:18:32 2014
@@ -17,9 +17,10 @@
 package org.apache.sis.metadata.iso.citation;
 
 import java.util.Collection;
+import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlSeeAlso;
 import org.opengis.util.InternationalString;
 import org.opengis.metadata.citation.Contact;
 import org.opengis.metadata.citation.Individual;
@@ -52,6 +53,10 @@ import org.apache.sis.util.iso.Types;
     "contactInfo"
 })
 @XmlRootElement(name = "CI_Party")
+@XmlSeeAlso({
+    DefaultIndividual.class,
+    DefaultOrganisation.class
+})
 public class AbstractParty extends ISOMetadata implements Party {
     /**
      * Serial number for compatibility with different versions.

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibility.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibility.java?rev=1635190&r1=1635189&r2=1635190&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibility.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibility.java
[UTF-8] Wed Oct 29 16:18:32 2014
@@ -17,9 +17,10 @@
 package org.apache.sis.metadata.iso.citation;
 
 import java.util.Collection;
+import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlSeeAlso;
 import org.opengis.metadata.citation.Party;
 import org.opengis.metadata.citation.Responsibility;
 import org.opengis.metadata.citation.Role;
@@ -51,6 +52,9 @@ import org.apache.sis.metadata.iso.ISOMe
 /// "parties"
 })
 @XmlRootElement(name = "CI_Responsibility")
+@XmlSeeAlso({
+    DefaultResponsibleParty.class
+})
 public class DefaultResponsibility extends ISOMetadata implements Responsibility {
     /**
      * Serial number for inter-operability with different versions.



Mime
View raw message