sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject [sis] 03/04: Renamed PolarizationOrientation as PolarisationOrientation for compliance with latest ISO 19115-2 revision. Part of https://github.com/opengeospatial/geoapi/issues/23
Date Wed, 01 May 2019 15:51:37 GMT
This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git

commit d6b85653cde368474ddee69695eeb959bb72fd4b
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Wed May 1 16:16:33 2019 +0200

    Renamed PolarizationOrientation as PolarisationOrientation for compliance with latest
ISO 19115-2 revision.
    Part of https://github.com/opengeospatial/geoapi/issues/23
---
 .../org/apache/sis/internal/book/GEOAPI.lst          |  2 +-
 .../resources/org/apache/sis/internal/book/OGC.lst   |  2 +-
 ...Code.java => MI_PolarisationOrientationCode.java} | 20 ++++++++++----------
 .../apache/sis/metadata/iso/content/DefaultBand.java | 14 +++++++-------
 .../sis/metadata/iso/content/package-info.java       |  6 +++---
 .../org/apache/sis/metadata/iso/AllMetadataTest.java |  2 +-
 .../sis/test/xml/AnnotationConsistencyCheck.java     |  4 ----
 7 files changed, 23 insertions(+), 27 deletions(-)

diff --git a/core/sis-build-helper/src/main/resources/org/apache/sis/internal/book/GEOAPI.lst
b/core/sis-build-helper/src/main/resources/org/apache/sis/internal/book/GEOAPI.lst
index 822f604..1959531 100644
--- a/core/sis-build-helper/src/main/resources/org/apache/sis/internal/book/GEOAPI.lst
+++ b/core/sis-build-helper/src/main/resources/org/apache/sis/internal/book/GEOAPI.lst
@@ -155,7 +155,7 @@ Platform
 PlatformPass
 Point
 PolarCS
-PolarizationOrientation
+PolarisationOrientation
 PortrayalCatalogueReference
 Position
 PositionalAccuracy
diff --git a/core/sis-build-helper/src/main/resources/org/apache/sis/internal/book/OGC.lst
b/core/sis-build-helper/src/main/resources/org/apache/sis/internal/book/OGC.lst
index 62bfaea..9aec1eb 100644
--- a/core/sis-build-helper/src/main/resources/org/apache/sis/internal/book/OGC.lst
+++ b/core/sis-build-helper/src/main/resources/org/apache/sis/internal/book/OGC.lst
@@ -200,7 +200,7 @@ MI_OperationTypeCode
 MI_Plan
 MI_Platform
 MI_PlatformPass
-MI_PolarizationOrientationCode
+MI_PolarisationOrientationCode
 MI_PriorityCode
 MI_RangeElementDescription
 MI_RequestedDate
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PolarizationOrientationCode.java
b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PolarisationOrientationCode.java
similarity index 79%
rename from core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PolarizationOrientationCode.java
rename to core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PolarisationOrientationCode.java
index 843926e..8a2f8a0 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PolarizationOrientationCode.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PolarisationOrientationCode.java
@@ -17,14 +17,14 @@
 package org.apache.sis.internal.jaxb.code;
 
 import javax.xml.bind.annotation.XmlElement;
-import org.opengis.metadata.content.PolarizationOrientation;
+import org.opengis.metadata.content.PolarisationOrientation;
 import org.apache.sis.internal.jaxb.cat.CodeListAdapter;
 import org.apache.sis.internal.jaxb.cat.CodeListUID;
 import org.apache.sis.xml.Namespaces;
 
 
 /**
- * JAXB adapter for {@link PolarizationOrientation}
+ * JAXB adapter for {@link PolarisationOrientation}
  * in order to wrap the value in an XML element as specified by ISO 19115-3 standard.
  * See package documentation for more information about the handling of {@code CodeList}
in ISO 19115-3.
  *
@@ -37,19 +37,19 @@ import org.apache.sis.xml.Namespaces;
  * @since 0.3
  * @module
  */
-public final class MI_PolarizationOrientationCode
-        extends CodeListAdapter<MI_PolarizationOrientationCode, PolarizationOrientation>
+public final class MI_PolarisationOrientationCode
+        extends CodeListAdapter<MI_PolarisationOrientationCode, PolarisationOrientation>
 {
     /**
      * Empty constructor for JAXB only.
      */
-    public MI_PolarizationOrientationCode() {
+    public MI_PolarisationOrientationCode() {
     }
 
     /**
      * Creates a new adapter for the given value.
      */
-    private MI_PolarizationOrientationCode(final CodeListUID value) {
+    private MI_PolarisationOrientationCode(final CodeListUID value) {
         super(value);
     }
 
@@ -59,8 +59,8 @@ public final class MI_PolarizationOrientationCode
      * @return the wrapper for the code list value.
      */
     @Override
-    protected MI_PolarizationOrientationCode wrap(final CodeListUID value) {
-        return new MI_PolarizationOrientationCode(value);
+    protected MI_PolarisationOrientationCode wrap(final CodeListUID value) {
+        return new MI_PolarisationOrientationCode(value);
     }
 
     /**
@@ -69,8 +69,8 @@ public final class MI_PolarizationOrientationCode
      * @return the code list class.
      */
     @Override
-    protected Class<PolarizationOrientation> getCodeListClass() {
-        return PolarizationOrientation.class;
+    protected Class<PolarisationOrientation> getCodeListClass() {
+        return PolarisationOrientation.class;
     }
 
     /**
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultBand.java
b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultBand.java
index 097160d..fa1c342 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultBand.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultBand.java
@@ -25,7 +25,7 @@ import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import org.opengis.metadata.content.Band;
 import org.opengis.metadata.content.BandDefinition;
-import org.opengis.metadata.content.PolarizationOrientation;
+import org.opengis.metadata.content.PolarisationOrientation;
 import org.opengis.metadata.content.TransferFunctionType;
 import org.apache.sis.measure.ValueRange;
 import org.apache.sis.internal.jaxb.gco.GO_Real;
@@ -113,12 +113,12 @@ public class DefaultBand extends DefaultSampleDimension implements Band
{
     /**
      * Polarization of the radiation transmitted.
      */
-    private PolarizationOrientation transmittedPolarisation;
+    private PolarisationOrientation transmittedPolarisation;
 
     /**
      * Polarization of the radiation detected.
      */
-    private PolarizationOrientation detectedPolarisation;
+    private PolarisationOrientation detectedPolarisation;
 
     /**
      * Constructs an initially empty band.
@@ -391,7 +391,7 @@ public class DefaultBand extends DefaultSampleDimension implements Band
{
      */
     @Override
     @XmlElement(name = "transmittedPolarisation")
-    public PolarizationOrientation getTransmittedPolarisation() {
+    public PolarisationOrientation getTransmittedPolarisation() {
         return transmittedPolarisation;
     }
 
@@ -400,7 +400,7 @@ public class DefaultBand extends DefaultSampleDimension implements Band
{
      *
      * @param  newValue  the new transmitted polarization.
      */
-    public void setTransmittedPolarisation(final PolarizationOrientation newValue) {
+    public void setTransmittedPolarisation(final PolarisationOrientation newValue) {
         checkWritePermission(transmittedPolarisation);
         transmittedPolarisation = newValue;
     }
@@ -412,7 +412,7 @@ public class DefaultBand extends DefaultSampleDimension implements Band
{
      */
     @Override
     @XmlElement(name = "detectedPolarisation")
-    public PolarizationOrientation getDetectedPolarisation() {
+    public PolarisationOrientation getDetectedPolarisation() {
         return detectedPolarisation;
     }
 
@@ -421,7 +421,7 @@ public class DefaultBand extends DefaultSampleDimension implements Band
{
      *
      * @param  newValue  the new detected polarization.
      */
-    public void setDetectedPolarisation(final PolarizationOrientation newValue) {
+    public void setDetectedPolarisation(final PolarisationOrientation newValue) {
         checkWritePermission(detectedPolarisation);
         detectedPolarisation = newValue;
     }
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/package-info.java
b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/package-info.java
index df35f3a..c3976f7 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/package-info.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/package-info.java
@@ -44,7 +44,7 @@
  * {@code  ├─} {@linkplain org.opengis.metadata.content.BandDefinition          Band
definition}<br>
  * {@code  ├─} {@linkplain org.opengis.metadata.content.CoverageContentType     Coverage
content type}<br>
  * {@code  ├─} {@linkplain org.opengis.metadata.content.ImagingCondition        Imaging
condition}<br>
- * {@code  ├─} {@linkplain org.opengis.metadata.content.PolarizationOrientation Polarization
orientation}<br>
+ * {@code  ├─} {@linkplain org.opengis.metadata.content.PolarisationOrientation Polarisation
orientation}<br>
  * {@code  └─} {@linkplain org.opengis.metadata.content.TransferFunctionType    Transfer
function type}<br>
  * </td><td class="sep" style="width: 50%; white-space: nowrap">
  *                 {@linkplain org.apache.sis.metadata.iso.content.AbstractContentInformation
        Content information} «abstract»<br>
@@ -57,7 +57,7 @@
  * {@code  └─}     {@linkplain org.apache.sis.metadata.iso.content.DefaultRangeElementDescription
    Range element description}<br>
  *                 {@linkplain org.apache.sis.metadata.iso.content.DefaultBand          
             Band}<br>
  * {@code  ├─}     {@linkplain org.opengis.metadata.content.BandDefinition         
                  Band definition} «code list»<br>
- * {@code  ├─}     {@linkplain org.opengis.metadata.content.PolarizationOrientation
                  Polarization orientation} «code list»<br>
+ * {@code  ├─}     {@linkplain org.opengis.metadata.content.PolarisationOrientation
                  Polarisation orientation} «code list»<br>
  * {@code  └─}     {@linkplain org.opengis.metadata.content.TransferFunctionType   
                  Transfer function type} «code list»<br>
  *                 {@linkplain org.apache.sis.metadata.iso.content.DefaultImageDescription
           Image description}<br>
  * {@code  └─}     {@linkplain org.opengis.metadata.content.ImagingCondition       
                  Imaging condition} «code list»<br>
@@ -109,7 +109,7 @@
     @XmlJavaTypeAdapter(MD_ImagingConditionCode.class),
     @XmlJavaTypeAdapter(MD_RangeDimension.class),
     @XmlJavaTypeAdapter(MI_BandDefinition.class),
-    @XmlJavaTypeAdapter(MI_PolarizationOrientationCode.class),
+    @XmlJavaTypeAdapter(MI_PolarisationOrientationCode.class),
     @XmlJavaTypeAdapter(MI_RangeElementDescription.class),
     @XmlJavaTypeAdapter(MI_TransferFunctionTypeCode.class),
     @XmlJavaTypeAdapter(PT_Locale.class),
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java
b/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java
index 464cdf2a..743974b 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java
@@ -106,7 +106,7 @@ public final strictfp class AllMetadataTest extends PropertyConsistencyCheck
{
             org.opengis.metadata.content.FeatureCatalogueDescription.class,
             org.opengis.metadata.content.ImageDescription.class,
             org.opengis.metadata.content.ImagingCondition.class,
-            org.opengis.metadata.content.PolarizationOrientation.class,
+            org.opengis.metadata.content.PolarisationOrientation.class,
             org.opengis.metadata.content.RangeDimension.class,
             org.opengis.metadata.content.RangeElementDescription.class,
             org.opengis.metadata.content.SampleDimension.class,
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/test/xml/AnnotationConsistencyCheck.java
b/core/sis-metadata/src/test/java/org/apache/sis/test/xml/AnnotationConsistencyCheck.java
index f6af7fe..06f4e56 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/test/xml/AnnotationConsistencyCheck.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/test/xml/AnnotationConsistencyCheck.java
@@ -372,10 +372,6 @@ public abstract strictfp class AnnotationConsistencyCheck extends TestCase
{
      */
     protected String getExpectedXmlRootElementName(final Stereotype stereotype, final UML
uml) {
         String name = uml.identifier();
-        switch (name) {
-            // This case can be removed if https://issues.apache.org/jira/browse/SIS-398
is fixed.
-            case "MI_PolarizationOrientationCode": name = "MI_PolarisationOrientationCode";
break;
-        }
         if (Stereotype.ABSTRACT.equals(stereotype)) {
             name = "Abstract".concat(name);
         }


Mime
View raw message