sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1634607 - in /sis/branches/JDK7: ./ core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/ core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ core/sis-...
Date Mon, 27 Oct 2014 17:20:58 GMT
Author: desruisseaux
Date: Mon Oct 27 17:20:58 2014
New Revision: 1634607

URL: http://svn.apache.org/r1634607
Log:
Merge update for GeoAPI change.

Added:
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/LegacyCharacterSet.java
      - copied unchanged from r1634605, sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/LegacyCharacterSet.java
Modified:
    sis/branches/JDK7/   (props changed)
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataTypes.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultPlatform.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultRequirement.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/package-info.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultSeries.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java
    sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/mock/MetadataMock.java

Propchange: sis/branches/JDK7/
------------------------------------------------------------------------------
  Merged /sis/branches/JDK8:r1634545-1634605

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataTypes.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataTypes.java?rev=1634607&r1=1634606&r2=1634607&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataTypes.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataTypes.java
[UTF-8] Mon Oct 27 17:20:58 2014
@@ -19,6 +19,7 @@ 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;
 
 
 /**
@@ -37,5 +38,6 @@ public final class MetadataTypes extends
     @Override
     public void getTypes(final Collection<Class<?>> addTo) {
         addTo.add(DefaultMetadata.class);
+        addTo.add(DefaultResponsibleParty.class);
     }
 }

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java?rev=1634607&r1=1634606&r2=1634607&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
[UTF-8] Mon Oct 27 17:20:58 2014
@@ -46,6 +46,7 @@ import org.opengis.metadata.citation.Res
 import org.opengis.metadata.constraint.Constraints;
 import org.opengis.metadata.content.ContentInformation;
 import org.opengis.metadata.distribution.Distribution;
+import org.opengis.metadata.identification.CharacterSet;
 import org.opengis.metadata.identification.Identification;
 import org.opengis.metadata.maintenance.MaintenanceInformation;
 import org.opengis.metadata.maintenance.ScopeCode;
@@ -554,8 +555,21 @@ public class DefaultMetadata extends ISO
     @Override
     @Deprecated
     @XmlElement(name = "characterSet")
-    public Charset getCharacterSet() {
-        return LegacyPropertyAdapter.getSingleton(getCharacterSets(), Charset.class, null,
DefaultMetadata.class, "getCharacterSet");
+    public CharacterSet getCharacterSet() {
+        final Charset cs = LegacyPropertyAdapter.getSingleton(getCharacterSets(),
+                Charset.class, null, DefaultMetadata.class, "getCharacterSet");
+        if (cs == null) {
+            return null;
+        }
+        final String name = cs.name();
+        for (final CharacterSet candidate : CharacterSet.values()) {
+            for (final String n : candidate.names()) {
+                if (name.equals(n)) {
+                    return candidate;
+                }
+            }
+        }
+        return CharacterSet.valueOf(name);
     }
 
     /**
@@ -566,8 +580,8 @@ public class DefaultMetadata extends ISO
      * @deprecated As of GeoAPI 3.1, replaced by {@link #setCharacterSets(Collection)}.
      */
     @Deprecated
-    public void setCharacterSet(final Charset newValue) {
-        setCharacterSets(LegacyPropertyAdapter.asCollection(newValue));
+    public void setCharacterSet(final CharacterSet newValue) {
+        setCharacterSets(LegacyPropertyAdapter.asCollection((newValue != null) ? newValue.toCharset()
: null));
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultPlatform.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultPlatform.java?rev=1634607&r1=1634606&r2=1634607&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultPlatform.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultPlatform.java
[UTF-8] Mon Oct 27 17:20:58 2014
@@ -24,7 +24,7 @@ import org.opengis.metadata.Identifier;
 import org.opengis.metadata.acquisition.Instrument;
 import org.opengis.metadata.acquisition.Platform;
 import org.opengis.metadata.citation.Citation;
-import org.opengis.metadata.citation.ResponsibleParty;
+import org.opengis.metadata.citation.Responsibility;
 import org.opengis.util.InternationalString;
 import org.apache.sis.metadata.iso.ISOMetadata;
 import org.apache.sis.internal.jaxb.NonMarshalledAuthority;
@@ -75,7 +75,7 @@ public class DefaultPlatform extends ISO
     /**
      * Organization responsible for building, launch, or operation of the platform.
      */
-    private Collection<ResponsibleParty> sponsors;
+    private Collection<Responsibility> sponsors;
 
     /**
      * Instrument(s) mounted on a platform.
@@ -103,7 +103,7 @@ public class DefaultPlatform extends ISO
             citation    = object.getCitation();
             identifiers = singleton(object.getIdentifier(), Identifier.class);
             description = object.getDescription();
-            sponsors    = copyCollection(object.getSponsors(), ResponsibleParty.class);
+            sponsors    = copyCollection(object.getSponsors(), Responsibility.class);
             instruments = copyCollection(object.getInstruments(), Instrument.class);
         }
     }
@@ -204,8 +204,8 @@ public class DefaultPlatform extends ISO
      */
     @Override
     @XmlElement(name = "sponsor")
-    public Collection<ResponsibleParty> getSponsors() {
-        return sponsors = nonNullCollection(sponsors, ResponsibleParty.class);
+    public Collection<Responsibility> getSponsors() {
+        return sponsors = nonNullCollection(sponsors, Responsibility.class);
     }
 
     /**
@@ -213,8 +213,8 @@ public class DefaultPlatform extends ISO
      *
      * @param newValues The new sponsors values;
      */
-    public void setSponsors(final Collection<? extends ResponsibleParty> newValues)
{
-        sponsors = writeCollection(newValues, sponsors, ResponsibleParty.class);
+    public void setSponsors(final Collection<? extends Responsibility> newValues) {
+        sponsors = writeCollection(newValues, sponsors, Responsibility.class);
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultRequirement.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultRequirement.java?rev=1634607&r1=1634606&r2=1634607&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultRequirement.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultRequirement.java
[UTF-8] Mon Oct 27 17:20:58 2014
@@ -27,7 +27,7 @@ import org.opengis.metadata.acquisition.
 import org.opengis.metadata.acquisition.RequestedDate;
 import org.opengis.metadata.acquisition.Requirement;
 import org.opengis.metadata.citation.Citation;
-import org.opengis.metadata.citation.ResponsibleParty;
+import org.opengis.metadata.citation.Responsibility;
 import org.apache.sis.metadata.iso.ISOMetadata;
 import org.apache.sis.internal.jaxb.NonMarshalledAuthority;
 
@@ -78,12 +78,12 @@ public class DefaultRequirement extends 
     /**
      * Origin of requirement.
      */
-    private Collection<ResponsibleParty> requestors;
+    private Collection<Responsibility> requestors;
 
     /**
      * Person(s), or body(ies), to receive results of requirement.
      */
-    private Collection<ResponsibleParty> recipients;
+    private Collection<Responsibility> recipients;
 
     /**
      * Relative ordered importance, or urgency, of the requirement.
@@ -126,8 +126,8 @@ public class DefaultRequirement extends 
         if (object != null) {
             citation       = object.getCitation();
             identifiers    = singleton(object.getIdentifier(), Identifier.class);
-            requestors     = copyCollection(object.getRequestors(), ResponsibleParty.class);
-            recipients     = copyCollection(object.getRecipients(), ResponsibleParty.class);
+            requestors     = copyCollection(object.getRequestors(), Responsibility.class);
+            recipients     = copyCollection(object.getRecipients(), Responsibility.class);
             priority       = object.getPriority();
             requestedDate  = object.getRequestedDate();
             expiryDate     = toMilliseconds(object.getExpiryDate());
@@ -211,8 +211,8 @@ public class DefaultRequirement extends 
      */
     @Override
     @XmlElement(name = "requestor", required = true)
-    public Collection<ResponsibleParty> getRequestors() {
-        return requestors = nonNullCollection(requestors, ResponsibleParty.class);
+    public Collection<Responsibility> getRequestors() {
+        return requestors = nonNullCollection(requestors, Responsibility.class);
     }
 
     /**
@@ -220,8 +220,8 @@ public class DefaultRequirement extends 
      *
      * @param newValues The new requestors values.
      */
-    public void setRequestors(final Collection<? extends ResponsibleParty> newValues)
{
-        requestors = writeCollection(newValues, requestors, ResponsibleParty.class);
+    public void setRequestors(final Collection<? extends Responsibility> newValues)
{
+        requestors = writeCollection(newValues, requestors, Responsibility.class);
     }
 
     /**
@@ -231,8 +231,8 @@ public class DefaultRequirement extends 
      */
     @Override
     @XmlElement(name = "recipient", required = true)
-    public Collection<ResponsibleParty> getRecipients() {
-        return recipients = nonNullCollection(recipients, ResponsibleParty.class);
+    public Collection<Responsibility> getRecipients() {
+        return recipients = nonNullCollection(recipients, Responsibility.class);
     }
 
     /**
@@ -240,8 +240,8 @@ public class DefaultRequirement extends 
      *
      * @param newValues The new recipients values.
      */
-    public void setRecipients(final Collection<? extends ResponsibleParty> newValues)
{
-        recipients = writeCollection(newValues, recipients, ResponsibleParty.class);
+    public void setRecipients(final Collection<? extends Responsibility> newValues)
{
+        recipients = writeCollection(newValues, recipients, Responsibility.class);
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/package-info.java?rev=1634607&r1=1634606&r2=1634607&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/package-info.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/package-info.java
[UTF-8] Mon Oct 27 17:20:58 2014
@@ -87,7 +87,7 @@
  * @author  Cédric Briançon (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from geotk-3.03)
- * @version 0.3
+ * @version 0.5
  * @module
  */
 @XmlSchema(elementFormDefault = XmlNsForm.QUALIFIED, namespace = Namespaces.GMI, xmlns =
{
@@ -99,6 +99,7 @@
 @XmlAccessorType(XmlAccessType.NONE)
 @XmlJavaTypeAdapters({
     @XmlJavaTypeAdapter(CI_Citation.class),
+    @XmlJavaTypeAdapter(CI_Responsibility.class),
     @XmlJavaTypeAdapter(CI_ResponsibleParty.class),
     @XmlJavaTypeAdapter(EX_Extent.class),
     @XmlJavaTypeAdapter(GM_Object.class),

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultSeries.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultSeries.java?rev=1634607&r1=1634606&r2=1634607&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultSeries.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultSeries.java
[UTF-8] Mon Oct 27 17:20:58 2014
@@ -40,7 +40,7 @@ import org.apache.sis.util.iso.Types;
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @author  Cédric Briançon (Geomatys)
  * @since   0.3 (derived from geotk-2.1)
- * @version 0.3
+ * @version 0.5
  * @module
  */
 @XmlType(name = "CI_Series_Type", propOrder = {
@@ -53,7 +53,7 @@ public class DefaultSeries extends ISOMe
     /**
      * Serial number for inter-operability with different versions.
      */
-    private static final long serialVersionUID = 7061644572814855051L;
+    private static final long serialVersionUID = -1584743260325409070L;
 
     /**
      * Name of the series, or aggregate dataset, of which the dataset is a part.
@@ -63,12 +63,12 @@ public class DefaultSeries extends ISOMe
     /**
      * Information identifying the issue of the series.
      */
-    private String issueIdentification;
+    private InternationalString issueIdentification;
 
     /**
      * Details on which pages of the publication the article was published.
      */
-    private String page;
+    private InternationalString page;
 
     /**
      * Constructs a default series.
@@ -156,7 +156,7 @@ public class DefaultSeries extends ISOMe
      */
     @Override
     @XmlElement(name = "issueIdentification")
-    public String getIssueIdentification() {
+    public InternationalString getIssueIdentification() {
         return issueIdentification;
     }
 
@@ -165,7 +165,7 @@ public class DefaultSeries extends ISOMe
      *
      * @param newValue The new issue identification, or {@code null} if none.
      */
-    public void setIssueIdentification(final String newValue) {
+    public void setIssueIdentification(final InternationalString newValue) {
         checkWritePermission();
         issueIdentification = newValue;
     }
@@ -177,7 +177,7 @@ public class DefaultSeries extends ISOMe
      */
     @Override
     @XmlElement(name = "page")
-    public String getPage() {
+    public InternationalString getPage() {
         return page;
     }
 
@@ -186,7 +186,7 @@ public class DefaultSeries extends ISOMe
      *
      * @param newValue The new page, or {@code null} if none.
      */
-    public void setPage(final String newValue) {
+    public void setPage(final InternationalString newValue) {
         checkWritePermission();
         page = newValue;
     }

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java?rev=1634607&r1=1634606&r2=1634607&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java
[UTF-8] Mon Oct 27 17:20:58 2014
@@ -102,6 +102,7 @@
     @XmlJavaTypeAdapter(DQ_DataQuality.class),
     @XmlJavaTypeAdapter(MD_ApplicationSchemaInformation.class),
     @XmlJavaTypeAdapter(MD_CharacterSetCode.class),
+    @XmlJavaTypeAdapter(LegacyCharacterSet.class),
     @XmlJavaTypeAdapter(MD_Constraints.class),
     @XmlJavaTypeAdapter(MD_ContentInformation.class),
     @XmlJavaTypeAdapter(MD_DatatypeCode.class),

Modified: sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/mock/MetadataMock.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/mock/MetadataMock.java?rev=1634607&r1=1634606&r2=1634607&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/mock/MetadataMock.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/mock/MetadataMock.java
[UTF-8] Mon Oct 27 17:20:58 2014
@@ -38,6 +38,7 @@ import org.opengis.metadata.citation.Res
 import org.opengis.metadata.constraint.Constraints;
 import org.opengis.metadata.content.ContentInformation;
 import org.opengis.metadata.distribution.Distribution;
+import org.opengis.metadata.identification.CharacterSet;
 import org.opengis.metadata.identification.Identification;
 import org.opengis.metadata.maintenance.MaintenanceInformation;
 import org.opengis.metadata.maintenance.ScopeCode;
@@ -148,7 +149,7 @@ public final strictfp class MetadataMock
      */
     @Override
     @Deprecated
-    public Charset getCharacterSet() {
+    public CharacterSet getCharacterSet() {
         return null;
     }
 



Mime
View raw message