sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1822427 - in /sis/branches/ISO-19115-3/core/sis-metadata/src: main/java/org/apache/sis/internal/jaxb/code/ test/java/org/apache/sis/metadata/iso/
Date Sat, 27 Jan 2018 16:37:07 GMT
Author: desruisseaux
Date: Sat Jan 27 16:37:06 2018
New Revision: 1822427

URL: http://svn.apache.org/viewvc?rev=1822427&view=rev
Log:
Apply namespace fixes to code lists.

Modified:
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DQ_EvaluationMethodTypeCode.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/LegacyCharacterSet.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_CellGeometryCode.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ClassificationCode.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_GeometricObjectTypeCode.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ImagingConditionCode.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_KeywordTypeCode.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumFormatCode.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumNameCode.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ObligationCode.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ProgressCode.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_SpatialRepresentationTypeCode.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopologyLevelCode.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_BandDefinition.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ContextCode.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_GeometryTypeCode.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ObjectiveTypeCode.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_OperationTypeCode.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PriorityCode.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_SequenceCode.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TransferFunctionTypeCode.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TriggerCode.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/PT_Locale.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/package-info.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/SchemaVerifier.java

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DQ_EvaluationMethodTypeCode.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DQ_EvaluationMethodTypeCode.java?rev=1822427&r1=1822426&r2=1822427&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DQ_EvaluationMethodTypeCode.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DQ_EvaluationMethodTypeCode.java
[UTF-8] Sat Jan 27 16:37:06 2018
@@ -16,10 +16,12 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
+import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.quality.EvaluationMethodType;
 import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
 import org.apache.sis.internal.jaxb.gmd.CodeListUID;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
@@ -28,10 +30,11 @@ import org.apache.sis.internal.jaxb.gmd.
  * See package documentation for more information about the handling of {@code CodeList}
in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
+@XmlType(namespace = Namespaces.MDQ)
 public final class DQ_EvaluationMethodTypeCode
         extends CodeListAdapter<DQ_EvaluationMethodTypeCode, EvaluationMethodType>
 {

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/LegacyCharacterSet.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/LegacyCharacterSet.java?rev=1822427&r1=1822426&r2=1822427&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/LegacyCharacterSet.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/LegacyCharacterSet.java
[UTF-8] Sat Jan 27 16:37:06 2018
@@ -16,10 +16,12 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
+import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.identification.CharacterSet;
 import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
 import org.apache.sis.internal.jaxb.gmd.CodeListUID;
+import org.apache.sis.internal.jaxb.LegacyNamespaces;
 
 
 /**
@@ -28,11 +30,12 @@ import org.apache.sis.internal.jaxb.gmd.
  * See package documentation for more information about the handling of {@code CodeList}
in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.5
+ * @version 1.0
  * @since   0.3
  * @module
  */
 @SuppressWarnings("deprecation")
+@XmlType(namespace = LegacyNamespaces.GMD)
 public final class LegacyCharacterSet extends CodeListAdapter<LegacyCharacterSet, CharacterSet>
{
     /**
      * Empty constructor for JAXB only.

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_CellGeometryCode.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_CellGeometryCode.java?rev=1822427&r1=1822426&r2=1822427&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_CellGeometryCode.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_CellGeometryCode.java
[UTF-8] Sat Jan 27 16:37:06 2018
@@ -16,10 +16,12 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
+import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.spatial.CellGeometry;
 import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
 import org.apache.sis.internal.jaxb.gmd.CodeListUID;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
@@ -28,10 +30,11 @@ import org.apache.sis.internal.jaxb.gmd.
  * See package documentation for more information about the handling of {@code CodeList}
in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
+@XmlType(namespace = Namespaces.MSR)
 public final class MD_CellGeometryCode extends CodeListAdapter<MD_CellGeometryCode, CellGeometry>
{
     /**
      * Empty constructor for JAXB only.

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ClassificationCode.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ClassificationCode.java?rev=1822427&r1=1822426&r2=1822427&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ClassificationCode.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ClassificationCode.java
[UTF-8] Sat Jan 27 16:37:06 2018
@@ -16,10 +16,12 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
+import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.constraint.Classification;
 import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
 import org.apache.sis.internal.jaxb.gmd.CodeListUID;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
@@ -33,6 +35,7 @@ import org.apache.sis.internal.jaxb.gmd.
  * @since   0.3
  * @module
  */
+@XmlType(namespace = Namespaces.MCO)
 public final class MD_ClassificationCode extends CodeListAdapter<MD_ClassificationCode,
Classification> {
     /**
      * Empty constructor for JAXB only.

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_GeometricObjectTypeCode.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_GeometricObjectTypeCode.java?rev=1822427&r1=1822426&r2=1822427&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_GeometricObjectTypeCode.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_GeometricObjectTypeCode.java
[UTF-8] Sat Jan 27 16:37:06 2018
@@ -16,10 +16,12 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
+import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.spatial.GeometricObjectType;
 import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
 import org.apache.sis.internal.jaxb.gmd.CodeListUID;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
@@ -28,10 +30,11 @@ import org.apache.sis.internal.jaxb.gmd.
  * See package documentation for more information about the handling of {@code CodeList}
in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
+@XmlType(namespace = Namespaces.MSR)
 public final class MD_GeometricObjectTypeCode
         extends CodeListAdapter<MD_GeometricObjectTypeCode, GeometricObjectType>
 {

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ImagingConditionCode.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ImagingConditionCode.java?rev=1822427&r1=1822426&r2=1822427&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ImagingConditionCode.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ImagingConditionCode.java
[UTF-8] Sat Jan 27 16:37:06 2018
@@ -16,10 +16,12 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
+import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.content.ImagingCondition;
 import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
 import org.apache.sis.internal.jaxb.gmd.CodeListUID;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
@@ -28,10 +30,11 @@ import org.apache.sis.internal.jaxb.gmd.
  * See package documentation for more information about the handling of {@code CodeList}
in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
+@XmlType(namespace = Namespaces.MRC)
 public final class MD_ImagingConditionCode
         extends CodeListAdapter<MD_ImagingConditionCode, ImagingCondition>
 {

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_KeywordTypeCode.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_KeywordTypeCode.java?rev=1822427&r1=1822426&r2=1822427&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_KeywordTypeCode.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_KeywordTypeCode.java
[UTF-8] Sat Jan 27 16:37:06 2018
@@ -16,10 +16,12 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
+import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.identification.KeywordType;
 import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
 import org.apache.sis.internal.jaxb.gmd.CodeListUID;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
@@ -28,10 +30,11 @@ import org.apache.sis.internal.jaxb.gmd.
  * See package documentation for more information about the handling of {@code CodeList}
in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
+@XmlType(namespace = Namespaces.MRI)
 public final class MD_KeywordTypeCode extends CodeListAdapter<MD_KeywordTypeCode, KeywordType>
{
     /**
      * Empty constructor for JAXB only.

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumFormatCode.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumFormatCode.java?rev=1822427&r1=1822426&r2=1822427&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumFormatCode.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumFormatCode.java
[UTF-8] Sat Jan 27 16:37:06 2018
@@ -16,10 +16,12 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
+import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.distribution.MediumFormat;
 import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
 import org.apache.sis.internal.jaxb.gmd.CodeListUID;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
@@ -28,10 +30,11 @@ import org.apache.sis.internal.jaxb.gmd.
  * See package documentation for more information about the handling of {@code CodeList}
in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
+@XmlType(namespace = Namespaces.MRD)
 public final class MD_MediumFormatCode extends CodeListAdapter<MD_MediumFormatCode, MediumFormat>
{
     /**
      * Empty constructor for JAXB only.

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumNameCode.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumNameCode.java?rev=1822427&r1=1822426&r2=1822427&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumNameCode.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumNameCode.java
[UTF-8] Sat Jan 27 16:37:06 2018
@@ -16,10 +16,12 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
+import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.distribution.MediumName;
 import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
 import org.apache.sis.internal.jaxb.gmd.CodeListUID;
+import org.apache.sis.internal.jaxb.LegacyNamespaces;
 
 
 /**
@@ -28,10 +30,11 @@ import org.apache.sis.internal.jaxb.gmd.
  * See package documentation for more information about the handling of {@code CodeList}
in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
+@XmlType(namespace = LegacyNamespaces.GMD)
 public final class MD_MediumNameCode extends CodeListAdapter<MD_MediumNameCode, MediumName>
{
     /**
      * Empty constructor for JAXB only.

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ObligationCode.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ObligationCode.java?rev=1822427&r1=1822426&r2=1822427&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ObligationCode.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ObligationCode.java
[UTF-8] Sat Jan 27 16:37:06 2018
@@ -16,9 +16,11 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
+import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.annotation.Obligation;
 import org.apache.sis.internal.jaxb.gmd.EnumAdapter;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
@@ -27,10 +29,11 @@ import org.apache.sis.internal.jaxb.gmd.
  * See package documentation for more information about the handling of {@code CodeList}
in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.5
+ * @version 1.0
  * @since   0.3
  * @module
  */
+@XmlType(namespace = Namespaces.MEX)
 public final class MD_ObligationCode extends EnumAdapter<MD_ObligationCode, Obligation>
{
     /**
      * The enumeration value.

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ProgressCode.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ProgressCode.java?rev=1822427&r1=1822426&r2=1822427&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ProgressCode.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ProgressCode.java
[UTF-8] Sat Jan 27 16:37:06 2018
@@ -16,10 +16,12 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
+import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.identification.Progress;
 import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
 import org.apache.sis.internal.jaxb.gmd.CodeListUID;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
@@ -28,10 +30,11 @@ import org.apache.sis.internal.jaxb.gmd.
  * See package documentation for more information about the handling of {@code CodeList}
in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
+@XmlType(namespace = Namespaces.MCC)
 public final class MD_ProgressCode extends CodeListAdapter<MD_ProgressCode, Progress>
{
     /**
      * Empty constructor for JAXB only.

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_SpatialRepresentationTypeCode.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_SpatialRepresentationTypeCode.java?rev=1822427&r1=1822426&r2=1822427&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_SpatialRepresentationTypeCode.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_SpatialRepresentationTypeCode.java
[UTF-8] Sat Jan 27 16:37:06 2018
@@ -16,10 +16,12 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
+import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.spatial.SpatialRepresentationType;
 import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
 import org.apache.sis.internal.jaxb.gmd.CodeListUID;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
@@ -28,10 +30,11 @@ import org.apache.sis.internal.jaxb.gmd.
  * See package documentation for more information about the handling of {@code CodeList}
in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
+@XmlType(namespace = Namespaces.MCC)
 public final class MD_SpatialRepresentationTypeCode
         extends CodeListAdapter<MD_SpatialRepresentationTypeCode, SpatialRepresentationType>
 {

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopologyLevelCode.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopologyLevelCode.java?rev=1822427&r1=1822426&r2=1822427&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopologyLevelCode.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopologyLevelCode.java
[UTF-8] Sat Jan 27 16:37:06 2018
@@ -16,10 +16,12 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
+import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.spatial.TopologyLevel;
 import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
 import org.apache.sis.internal.jaxb.gmd.CodeListUID;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
@@ -28,10 +30,11 @@ import org.apache.sis.internal.jaxb.gmd.
  * See package documentation for more information about the handling of {@code CodeList}
in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
+@XmlType(namespace = Namespaces.MSR)
 public final class MD_TopologyLevelCode extends CodeListAdapter<MD_TopologyLevelCode,
TopologyLevel> {
     /**
      * Empty constructor for JAXB only.

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_BandDefinition.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_BandDefinition.java?rev=1822427&r1=1822426&r2=1822427&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_BandDefinition.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_BandDefinition.java
[UTF-8] Sat Jan 27 16:37:06 2018
@@ -34,7 +34,7 @@ import org.apache.sis.xml.Namespaces;
  * @since   0.3
  * @module
  */
-@XmlType(namespace = Namespaces.GMI)
+@XmlType(namespace = Namespaces.MRC)
 public final class MI_BandDefinition extends CodeListAdapter<MI_BandDefinition, BandDefinition>
{
     /**
      * Empty constructor for JAXB only.

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ContextCode.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ContextCode.java?rev=1822427&r1=1822426&r2=1822427&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ContextCode.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ContextCode.java
[UTF-8] Sat Jan 27 16:37:06 2018
@@ -34,7 +34,7 @@ import org.apache.sis.xml.Namespaces;
  * @since   0.3
  * @module
  */
-@XmlType(namespace = Namespaces.GMI)
+@XmlType(namespace = Namespaces.MAC)
 public final class MI_ContextCode extends CodeListAdapter<MI_ContextCode, Context>
{
     /**
      * Empty constructor for JAXB only.

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_GeometryTypeCode.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_GeometryTypeCode.java?rev=1822427&r1=1822426&r2=1822427&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_GeometryTypeCode.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_GeometryTypeCode.java
[UTF-8] Sat Jan 27 16:37:06 2018
@@ -34,7 +34,7 @@ import org.apache.sis.xml.Namespaces;
  * @since   0.3
  * @module
  */
-@XmlType(namespace = Namespaces.GMI)
+@XmlType(namespace = Namespaces.MAC)
 public final class MI_GeometryTypeCode extends CodeListAdapter<MI_GeometryTypeCode, GeometryType>
{
     /**
      * Empty constructor for JAXB only.

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ObjectiveTypeCode.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ObjectiveTypeCode.java?rev=1822427&r1=1822426&r2=1822427&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ObjectiveTypeCode.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ObjectiveTypeCode.java
[UTF-8] Sat Jan 27 16:37:06 2018
@@ -34,7 +34,7 @@ import org.apache.sis.xml.Namespaces;
  * @since   0.3
  * @module
  */
-@XmlType(namespace = Namespaces.GMI)
+@XmlType(namespace = Namespaces.MAC)
 public final class MI_ObjectiveTypeCode extends CodeListAdapter<MI_ObjectiveTypeCode,
ObjectiveType> {
     /**
      * Empty constructor for JAXB only.

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_OperationTypeCode.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_OperationTypeCode.java?rev=1822427&r1=1822426&r2=1822427&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_OperationTypeCode.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_OperationTypeCode.java
[UTF-8] Sat Jan 27 16:37:06 2018
@@ -34,7 +34,7 @@ import org.apache.sis.xml.Namespaces;
  * @since   0.3
  * @module
  */
-@XmlType(namespace = Namespaces.GMI)
+@XmlType(namespace = Namespaces.MAC)
 public final class MI_OperationTypeCode extends CodeListAdapter<MI_OperationTypeCode,
OperationType> {
     /**
      * Empty constructor for JAXB only.

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PriorityCode.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PriorityCode.java?rev=1822427&r1=1822426&r2=1822427&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PriorityCode.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PriorityCode.java
[UTF-8] Sat Jan 27 16:37:06 2018
@@ -34,7 +34,7 @@ import org.apache.sis.xml.Namespaces;
  * @since   0.3
  * @module
  */
-@XmlType(namespace = Namespaces.GMI)
+@XmlType(namespace = Namespaces.MAC)
 public final class MI_PriorityCode extends CodeListAdapter<MI_PriorityCode, Priority>
{
     /**
      * Empty constructor for JAXB only.

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_SequenceCode.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_SequenceCode.java?rev=1822427&r1=1822426&r2=1822427&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_SequenceCode.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_SequenceCode.java
[UTF-8] Sat Jan 27 16:37:06 2018
@@ -34,7 +34,7 @@ import org.apache.sis.xml.Namespaces;
  * @since   0.3
  * @module
  */
-@XmlType(namespace = Namespaces.GMI)
+@XmlType(namespace = Namespaces.MAC)
 public final class MI_SequenceCode extends CodeListAdapter<MI_SequenceCode, Sequence>
{
     /**
      * Empty constructor for JAXB only.

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TransferFunctionTypeCode.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TransferFunctionTypeCode.java?rev=1822427&r1=1822426&r2=1822427&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TransferFunctionTypeCode.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TransferFunctionTypeCode.java
[UTF-8] Sat Jan 27 16:37:06 2018
@@ -34,7 +34,7 @@ import org.apache.sis.xml.Namespaces;
  * @since   0.3
  * @module
  */
-@XmlType(namespace = Namespaces.GMI)
+@XmlType(namespace = Namespaces.MRC)
 public final class MI_TransferFunctionTypeCode
         extends CodeListAdapter<MI_TransferFunctionTypeCode, TransferFunctionType>
 {

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TriggerCode.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TriggerCode.java?rev=1822427&r1=1822426&r2=1822427&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TriggerCode.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TriggerCode.java
[UTF-8] Sat Jan 27 16:37:06 2018
@@ -34,7 +34,7 @@ import org.apache.sis.xml.Namespaces;
  * @since   0.3
  * @module
  */
-@XmlType(namespace = Namespaces.GMI)
+@XmlType(namespace = Namespaces.MAC)
 public final class MI_TriggerCode extends CodeListAdapter<MI_TriggerCode, Trigger>
{
     /**
      * Empty constructor for JAXB only.

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/PT_Locale.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/PT_Locale.java?rev=1822427&r1=1822426&r2=1822427&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/PT_Locale.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/PT_Locale.java
[UTF-8] Sat Jan 27 16:37:06 2018
@@ -80,7 +80,9 @@ public final class PT_Locale extends Xml
     /**
      * Wraps the {@code "locale"} attributes in a {@code "PT_Locale"} element.
      */
-    @XmlType(name = "PT_Locale", namespace = Namespaces.LAN, propOrder = {"languageCode",
"language", "country", "characterEncoding"})
+    @XmlType(name = "PT_Locale_Type", namespace = Namespaces.LAN, propOrder = {
+        "languageCode", "language", "country", "characterEncoding"
+    })
     private static final class Wrapper {
         /**
          * The language code, or {@code null} if none.

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/package-info.java?rev=1822427&r1=1822426&r2=1822427&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/package-info.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/package-info.java
[UTF-8] Sat Jan 27 16:37:06 2018
@@ -40,7 +40,7 @@
  * @since 0.3
  * @module
  */
-@XmlSchema(elementFormDefault = XmlNsForm.QUALIFIED, namespace = Namespaces.MDB, xmlns =
{
+@XmlSchema(elementFormDefault = XmlNsForm.QUALIFIED, xmlns = {
     @XmlNs(prefix = "mdb", namespaceURI = Namespaces.MDB),
     @XmlNs(prefix = "cit", namespaceURI = Namespaces.CIT),
     @XmlNs(prefix = "lan", namespaceURI = Namespaces.LAN),

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/SchemaVerifier.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/SchemaVerifier.java?rev=1822427&r1=1822426&r2=1822427&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/SchemaVerifier.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/SchemaVerifier.java
[UTF-8] Sat Jan 27 16:37:06 2018
@@ -46,7 +46,6 @@ import org.apache.sis.util.StringBuilder
 import org.apache.sis.internal.jaxb.LegacyNamespaces;
 
 
-
 /**
  * Compares the {@link XmlElement} against the ISO 19115 schema. This test requires a connection
  * to <a href="http://standards.iso.org/iso/19115/-3/">http://standards.iso.org/iso/19115/-3/</a>.
@@ -105,7 +104,7 @@ public final strictfp class SchemaVerifi
      * Those collisions occur because code lists are defined as links to the same file,
      * with only different anchor positions.
      */
-    private static final String TYPE_TO_IGNORE = "gco:CodeListValue_Type";
+    private static final String CODELIST_TYPE = "gco:CodeListValue_Type";
 
     /**
      * Separator between XML prefix and the actual name.
@@ -300,7 +299,11 @@ public final strictfp class SchemaVerifi
                 case "element": {
                     final String name = getMandatoryAttribute(node, "name");
                     final String type = getMandatoryAttribute(node, "type");
-                    if (!TYPE_TO_IGNORE.equals(type)) {
+                    if (CODELIST_TYPE.equals(type)) {
+                        if (typeDefinitions.put(name, Collections.singletonMap(null, new
Info(null, targetNamespace))) != null) {
+                            throw new SchemaException("Code list " + name + " defined twice.");
+                        }
+                    } else {
                         verifyNamingConvention(schemaLocations.getLast(), name, type, TYPE_SUFFIX);
                         preparePropertyDefinitions(type);
                         addProperty(null, type);
@@ -492,38 +495,47 @@ public final strictfp class SchemaVerifi
          * (type name should be same as root element name with "_Type" suffix appended).
Then,
          * we verify that the name exists in the schema, and finally we check its namespace.
          */
-        final String         className   = type.getSimpleName();
-        final XmlType        xmlType     = type.getDeclaredAnnotation(XmlType.class);
-        final XmlRootElement rootElement = type.getDeclaredAnnotation(XmlRootElement.class);
-        if (xmlType == null && rootElement == null) {
+        final XmlType        xmlType   = type.getDeclaredAnnotation(XmlType.class);
+        final XmlRootElement xmlRoot   = type.getDeclaredAnnotation(XmlRootElement.class);
+        final String         className;  // ISO class name (not the same than Java class
name).
+        if (xmlRoot == null && xmlType == null) {
             return;
-        }
-        if (xmlType == null || rootElement == null) {
-            throw new SchemaException("Missing @XmlType or @XmlRootElement in " + className
+ " class.");
         } else {
-            final String ns = xmlType.namespace();
-            if (!ns.equals(rootElement.namespace())) {
-                throw new SchemaException("Mismatched namespace in @XmlType and @XmlRootElement
of " + className + " class.");
+            final String ns;
+            if (xmlRoot != null) {
+                ns = xmlRoot.namespace();
+                className = xmlRoot.name();
+                if (xmlType != null) {
+                    if (!ns.equals(xmlType.namespace())) {
+                        throw new SchemaException("Mismatched namespace in @XmlType and @XmlRootElement
of " + type);
+                    }
+                    verifyNamingConvention(type.getName(), className, xmlType.name(), TYPE_SUFFIX);
+                }
+            } else {
+                ns = xmlType.namespace();
+                final String name = xmlType.name();
+                className = name.equals("##default") ? type.getSimpleName() : trim(name,
TYPE_SUFFIX);
             }
             if (!ns.equals("##default")) {
                 namespace = ns;
+            } else if (ns.equals(namespace)) {
+                throw new SchemaException("Redundant namespace declaration in " + type);
             }
         }
-        verifyNamingConvention(type.getName(), rootElement.name(), xmlType.name(), TYPE_SUFFIX);
         final boolean isDeprecated = DEPRECATED_NAMESPACES.contains(namespace);
         if (!isDeprecated && type.isAnnotationPresent(Deprecated.class)) {
-            throw new SchemaException("Unexpected deprecation status of " + className + "
class.");
+            throw new SchemaException("Unexpected deprecation status of " + type);
         }
-        final Map<String,Info> properties = typeDefinitions.get(rootElement.name());
+        final Map<String,Info> properties = typeDefinitions.get(className);
         if (properties == null) {
             if (!isDeprecated) {
-                throw new SchemaException("Unknown name declared in @XmlRootElement of "
+ className + " class.");
+                throw new SchemaException("Unknown name declared in @XmlRootElement of "
+ type);
             }
         } else {
             // By convention, null key is associated to class information.
             final String expectedNS = properties.get(null).namespace;
             if (!namespace.equals(expectedNS)) {
-                throw new SchemaException("Class " + className + " shall be associated to
namespace " + expectedNS);
+                throw new SchemaException(className + " shall be associated to namespace
" + expectedNS);
             }
             // TODO: scan for properties here.
         }



Mime
View raw message