sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1822206 - in /sis/branches/ISO-19115-3/core: sis-build-helper/src/main/resources/org/apache/sis/internal/book/ sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/ sis-metadata/src/main/java/org/apache/sis/metadata/iso/ sis-me...
Date Thu, 25 Jan 2018 15:15:20 GMT
Author: desruisseaux
Date: Thu Jan 25 15:15:20 2018
New Revision: 1822206

URL: http://svn.apache.org/viewvc?rev=1822206&view=rev
Log:
Fix errors in @XmlRootElement identified by SchemaVerifier.
Remove the deprecated DefaultFeatureTypeList class since its XML form is not defined.

Removed:
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_FeatureTypeList.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultFeatureTypeList.java
Modified:
    sis/branches/ISO-19115-3/core/sis-build-helper/src/main/resources/org/apache/sis/internal/book/GEOAPI.lst
    sis/branches/ISO-19115-3/core/sis-build-helper/src/main/resources/org/apache/sis/internal/book/OGC.lst
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/AbstractParty.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/AbstractContentInformation.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureTypeInfo.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/AbstractGeographicExtent.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/AbstractIdentification.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractCompleteness.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractElement.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractLogicalConsistency.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractPositionalAccuracy.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractResult.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractTemporalAccuracy.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractThematicAccuracy.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/AbstractGeolocationInformation.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/AbstractSpatialRepresentation.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/SchemaVerifier.java
    sis/branches/ISO-19115-3/core/sis-utility/src/main/resources/org/apache/sis/xml/NamespaceContent.txt

Modified: sis/branches/ISO-19115-3/core/sis-build-helper/src/main/resources/org/apache/sis/internal/book/GEOAPI.lst
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-build-helper/src/main/resources/org/apache/sis/internal/book/GEOAPI.lst?rev=1822206&r1=1822205&r2=1822206&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-build-helper/src/main/resources/org/apache/sis/internal/book/GEOAPI.lst
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-build-helper/src/main/resources/org/apache/sis/internal/book/GEOAPI.lst
[UTF-8] Thu Jan 25 15:15:20 2018
@@ -74,7 +74,6 @@ Factory
 FactoryException
 FeatureCatalogueDescription
 FeatureTypeInfo
-FeatureTypeList
 Format
 FormatConsistency
 Formula

Modified: sis/branches/ISO-19115-3/core/sis-build-helper/src/main/resources/org/apache/sis/internal/book/OGC.lst
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-build-helper/src/main/resources/org/apache/sis/internal/book/OGC.lst?rev=1822206&r1=1822205&r2=1822206&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-build-helper/src/main/resources/org/apache/sis/internal/book/OGC.lst
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-build-helper/src/main/resources/org/apache/sis/internal/book/OGC.lst
[UTF-8] Thu Jan 25 15:15:20 2018
@@ -133,7 +133,6 @@ MD_Distributor
 MD_ExtendedElementInformation
 MD_FeatureCatalogueDescription
 MD_FeatureTypeInfo
-MD_FeatureTypeList
 MD_Format
 MD_GeometricObjectTypeCode
 MD_GeometricObjects

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/AbstractParty.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/AbstractParty.java?rev=1822206&r1=1822205&r2=1822206&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/AbstractParty.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/AbstractParty.java
[UTF-8] Thu Jan 25 15:15:20 2018
@@ -60,7 +60,7 @@ import org.apache.sis.util.iso.Types;
     "name",
     "contactInfo"
 })
-@XmlRootElement(name = "CI_Party")
+@XmlRootElement(name = "AbstractCI_Party")
 @XmlSeeAlso({
     DefaultIndividual.class,
     DefaultOrganisation.class

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/AbstractContentInformation.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/AbstractContentInformation.java?rev=1822206&r1=1822205&r2=1822206&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/AbstractContentInformation.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/AbstractContentInformation.java
[UTF-8] Thu Jan 25 15:15:20 2018
@@ -46,7 +46,7 @@ import org.apache.sis.metadata.iso.ISOMe
  */
 @SuppressWarnings("CloneableClassWithoutClone")                 // ModifiableMetadata needs
shallow clones.
 @XmlType(name = "AbstractMD_ContentInformation_Type")
-@XmlRootElement(name = "MD_ContentInformation")
+@XmlRootElement(name = "AbstractMD_ContentInformation")
 @XmlSeeAlso({
     DefaultCoverageDescription.class,
     DefaultFeatureCatalogueDescription.class

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureTypeInfo.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureTypeInfo.java?rev=1822206&r1=1822205&r2=1822206&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureTypeInfo.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureTypeInfo.java
[UTF-8] Thu Jan 25 15:15:20 2018
@@ -52,7 +52,7 @@ import static org.apache.sis.internal.me
  */
 @SuppressWarnings("CloneableClassWithoutClone")                 // ModifiableMetadata needs
shallow clones.
 @TitleProperty(name = "featureTypeName")
-@XmlType(name = "MD_FeatureTypeInfo", propOrder = {
+@XmlType(name = "MD_FeatureTypeInfo_Type", propOrder = {
     "featureTypeName",
     "featureInstanceCount"
 })

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/AbstractGeographicExtent.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/AbstractGeographicExtent.java?rev=1822206&r1=1822205&r2=1822206&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/AbstractGeographicExtent.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/AbstractGeographicExtent.java
[UTF-8] Thu Jan 25 15:15:20 2018
@@ -48,7 +48,7 @@ import org.apache.sis.metadata.iso.ISOMe
  */
 @SuppressWarnings("CloneableClassWithoutClone")                 // ModifiableMetadata needs
shallow clones.
 @XmlType(name = "AbstractEX_GeographicExtent_Type")
-@XmlRootElement(name = "EX_GeographicExtent")
+@XmlRootElement(name = "AbstractEX_GeographicExtent")
 @XmlSeeAlso({
     DefaultGeographicBoundingBox.class,
     DefaultBoundingPolygon.class,

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/AbstractIdentification.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/AbstractIdentification.java?rev=1822206&r1=1822205&r2=1822206&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/AbstractIdentification.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/AbstractIdentification.java
[UTF-8] Thu Jan 25 15:15:20 2018
@@ -115,7 +115,7 @@ import org.apache.sis.util.iso.Types;
      *       tolerant to different order (this relaxation is needed only for legacy XML).
      */
 })
-@XmlRootElement(name = "MD_Identification")
+@XmlRootElement(name = "AbstractMD_Identification")
 @XmlSeeAlso({
     DefaultDataIdentification.class,
     DefaultServiceIdentification.class

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java?rev=1822206&r1=1822205&r2=1822206&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java
[UTF-8] Thu Jan 25 15:15:20 2018
@@ -74,7 +74,7 @@ import org.apache.sis.xml.Namespaces;
  * @module
  */
 @SuppressWarnings("CloneableClassWithoutClone")                 // ModifiableMetadata needs
shallow clones.
-@XmlType(name = "MD_ServiceIdentification_Type", namespace = Namespaces.SRV, propOrder =
{
+@XmlType(name = "SV_ServiceIdentification_Type", namespace = Namespaces.SRV, propOrder =
{
     "serviceType",
     "serviceTypeVersions",
     "accessProperties",

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java?rev=1822206&r1=1822205&r2=1822206&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java
[UTF-8] Thu Jan 25 15:15:20 2018
@@ -112,7 +112,6 @@
     @XmlJavaTypeAdapter(MD_DatatypeCode.class),
     @XmlJavaTypeAdapter(MD_Distribution.class),
     @XmlJavaTypeAdapter(MD_ExtendedElementInformation.class),
-    @XmlJavaTypeAdapter(MD_FeatureTypeList.class),
     @XmlJavaTypeAdapter(MD_Identification.class),
     @XmlJavaTypeAdapter(MD_Identifier.class),
     @XmlJavaTypeAdapter(MD_MaintenanceInformation.class),

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractCompleteness.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractCompleteness.java?rev=1822206&r1=1822205&r2=1822206&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractCompleteness.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractCompleteness.java
[UTF-8] Thu Jan 25 15:15:20 2018
@@ -48,7 +48,7 @@ import org.opengis.metadata.quality.Comp
  */
 @SuppressWarnings("CloneableClassWithoutClone")                 // ModifiableMetadata needs
shallow clones.
 @XmlType(name = "AbstractDQ_Completeness_Type")
-@XmlRootElement(name = "DQ_Completeness")
+@XmlRootElement(name = "AbstractDQ_Completeness")
 @XmlSeeAlso({
     DefaultCompletenessCommission.class,
     DefaultCompletenessOmission.class

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractElement.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractElement.java?rev=1822206&r1=1822205&r2=1822206&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractElement.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractElement.java
[UTF-8] Thu Jan 25 15:15:20 2018
@@ -79,7 +79,7 @@ import static org.apache.sis.util.collec
     "dates",
     "results"
 })
-@XmlRootElement(name = "DQ_Element")
+@XmlRootElement(name = "AbstractDQ_Element")
 @XmlSeeAlso({
     AbstractCompleteness.class,
     AbstractLogicalConsistency.class,

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractLogicalConsistency.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractLogicalConsistency.java?rev=1822206&r1=1822205&r2=1822206&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractLogicalConsistency.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractLogicalConsistency.java
[UTF-8] Thu Jan 25 15:15:20 2018
@@ -51,7 +51,7 @@ import org.opengis.metadata.quality.Conc
  */
 @SuppressWarnings("CloneableClassWithoutClone")                 // ModifiableMetadata needs
shallow clones.
 @XmlType(name = "AbstractDQ_LogicalConsistency_Type")
-@XmlRootElement(name = "DQ_LogicalConsistency")
+@XmlRootElement(name = "AbstractDQ_LogicalConsistency")
 @XmlSeeAlso({
     DefaultConceptualConsistency.class,
     DefaultDomainConsistency.class,

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractPositionalAccuracy.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractPositionalAccuracy.java?rev=1822206&r1=1822205&r2=1822206&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractPositionalAccuracy.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractPositionalAccuracy.java
[UTF-8] Thu Jan 25 15:15:20 2018
@@ -50,7 +50,7 @@ import org.opengis.metadata.quality.Rela
  */
 @SuppressWarnings("CloneableClassWithoutClone")                 // ModifiableMetadata needs
shallow clones.
 @XmlType(name = "AbstractDQ_PositionalAccuracy_Type")
-@XmlRootElement(name = "DQ_PositionalAccuracy")
+@XmlRootElement(name = "AbstractDQ_PositionalAccuracy")
 @XmlSeeAlso({
     DefaultAbsoluteExternalPositionalAccuracy.class,
     DefaultGriddedDataPositionalAccuracy.class,

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractResult.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractResult.java?rev=1822206&r1=1822205&r2=1822206&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractResult.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractResult.java
[UTF-8] Thu Jan 25 15:15:20 2018
@@ -46,7 +46,7 @@ import org.apache.sis.metadata.iso.ISOMe
  */
 @SuppressWarnings("CloneableClassWithoutClone")                 // ModifiableMetadata needs
shallow clones.
 @XmlType(name = "AbstractDQ_Result_Type")
-@XmlRootElement(name = "DQ_Result")
+@XmlRootElement(name = "AbstractDQ_Result")
 @XmlSeeAlso({
     DefaultConformanceResult.class,
     DefaultQuantitativeResult.class,

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractTemporalAccuracy.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractTemporalAccuracy.java?rev=1822206&r1=1822205&r2=1822206&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractTemporalAccuracy.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractTemporalAccuracy.java
[UTF-8] Thu Jan 25 15:15:20 2018
@@ -49,7 +49,7 @@ import org.opengis.metadata.quality.Accu
  */
 @SuppressWarnings("CloneableClassWithoutClone")                 // ModifiableMetadata needs
shallow clones.
 @XmlType(name = "AbstractDQ_TemporalAccuracy_Type")
-@XmlRootElement(name = "DQ_TemporalAccuracy")
+@XmlRootElement(name = "AbstractDQ_TemporalAccuracy")
 @XmlSeeAlso({
     DefaultAccuracyOfATimeMeasurement.class,
     DefaultTemporalConsistency.class,

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractThematicAccuracy.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractThematicAccuracy.java?rev=1822206&r1=1822205&r2=1822206&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractThematicAccuracy.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractThematicAccuracy.java
[UTF-8] Thu Jan 25 15:15:20 2018
@@ -50,7 +50,7 @@ import org.opengis.metadata.quality.Quan
  */
 @SuppressWarnings("CloneableClassWithoutClone")                 // ModifiableMetadata needs
shallow clones.
 @XmlType(name = "AbstractDQ_ThematicAccuracy_Type")
-@XmlRootElement(name = "DQ_ThematicAccuracy")
+@XmlRootElement(name = "AbstractDQ_ThematicAccuracy")
 @XmlSeeAlso({
     DefaultThematicClassificationCorrectness.class,
     DefaultNonQuantitativeAttributeAccuracy.class,

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/AbstractGeolocationInformation.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/AbstractGeolocationInformation.java?rev=1822206&r1=1822205&r2=1822206&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/AbstractGeolocationInformation.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/AbstractGeolocationInformation.java
[UTF-8] Thu Jan 25 15:15:20 2018
@@ -25,7 +25,6 @@ import org.opengis.metadata.quality.Data
 import org.opengis.metadata.spatial.GCPCollection;
 import org.opengis.metadata.spatial.GeolocationInformation;
 import org.apache.sis.metadata.iso.ISOMetadata;
-import org.apache.sis.xml.Namespaces;
 
 
 /**
@@ -48,8 +47,8 @@ import org.apache.sis.xml.Namespaces;
  * @module
  */
 @SuppressWarnings("CloneableClassWithoutClone")                 // ModifiableMetadata needs
shallow clones.
-@XmlType(name = "AbstractMI_GeolocationInformation_Type", namespace = Namespaces.GMI)
-@XmlRootElement(name = "MI_GeolocationInformation", namespace = Namespaces.GMI)
+@XmlType(name = "AbstractMI_GeolocationInformation_Type")
+@XmlRootElement(name = "AbstractMI_GeolocationInformation")
 @XmlSeeAlso(DefaultGCPCollection.class)
 public class AbstractGeolocationInformation extends ISOMetadata implements GeolocationInformation
{
     /**

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/AbstractSpatialRepresentation.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/AbstractSpatialRepresentation.java?rev=1822206&r1=1822205&r2=1822206&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/AbstractSpatialRepresentation.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/AbstractSpatialRepresentation.java
[UTF-8] Thu Jan 25 15:15:20 2018
@@ -46,7 +46,7 @@ import org.apache.sis.metadata.iso.ISOMe
  */
 @SuppressWarnings("CloneableClassWithoutClone")                 // ModifiableMetadata needs
shallow clones.
 @XmlType(name = "AbstractMD_SpatialRepresentation_Type")
-@XmlRootElement(name = "MD_SpatialRepresentation")
+@XmlRootElement(name = "AbstractMD_SpatialRepresentation")
 @XmlSeeAlso({
     DefaultGridSpatialRepresentation.class,
     DefaultVectorSpatialRepresentation.class

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=1822206&r1=1822205&r2=1822206&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] Thu Jan 25 15:15:20 2018
@@ -28,8 +28,10 @@ import java.util.Deque;
 import java.util.HashMap;
 import java.util.ArrayDeque;
 import javax.xml.XMLConstants;
-import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlSchema;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 import org.w3c.dom.Node;
@@ -45,6 +47,18 @@ import org.apache.sis.util.StringBuilder
  * to <a href="http://standards.iso.org/iso/19115/-3/">http://standards.iso.org/iso/19115/-3/</a>.
  * All classes in a given directory are scanned.
  *
+ * <div class="section">Limitations</div>
+ * Current implementation ignores the XML prefix (e.g. {@code "cit:"} in {@code "cit:CI_Citation"}).
+ * We assume that there is no name collision, especially given that {@code "CI_"} prefix
in front of
+ * most OGC/ISO class names have the effect of a namespace. If a collision nevertheless happen,
then
+ * an exception will be thrown.
+ *
+ * <p>Current implementation assumes that XML element name, type name, property name
and property type
+ * name follow some naming convention. For example type names are suffixed with {@code "_Type"}
in OGC
+ * schemas, while property type names are suffixed with {@code "_PropertyType"}.  This class
throws an
+ * exception if a type does not follow the expected naming convention. This requirement makes
+ * implementation easier, by reducing the amount of {@link Map}s that we need to manage.</p>
+ *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 1.0
  * @since   1.0
@@ -52,6 +66,12 @@ import org.apache.sis.util.StringBuilder
  */
 public final strictfp class SchemaVerifier {
     /**
+     * The prefix of XML type names for properties. In ISO/OGC schemas, this prefix does
not appear
+     * in the definition of class types but may appear in the definition of property types.
+     */
+    private static final String ABSTRACT_PREFIX = "Abstract_";
+
+    /**
      * The suffix of XML type names for classes.
      * This is used by convention in OGC/ISO standards (but not necessarily in other XSD).
      */
@@ -211,7 +231,8 @@ public final strictfp class SchemaVerifi
                 case "element": {
                     final String type = getMandatoryAttribute(node, "type");
                     if (!TYPE_TO_IGNORE.equals(type)) {
-                        verifyNamingConvention(getMandatoryAttribute(node, "name"), type,
TYPE_SUFFIX);
+                        verifyNamingConvention(schemaLocations.getLast(),
+                                getMandatoryAttribute(node, "name"), type, TYPE_SUFFIX);
                     }
                     return;                             // Ignore children (they are about
documentation).
                 }
@@ -255,7 +276,9 @@ public final strictfp class SchemaVerifi
                 final String name = getMandatoryAttribute(node, "name").intern();
                 final String old = currentProperties.put(name, type);
                 if (old != null && !old.equals(type)) {
-                    throw new SchemaException("\"" + name + "\" is already associated to
\"" + old + "\". Can not associated to \"" + type + "\".");
+                    throw new SchemaException("Error while parsing " + schemaLocations.getLast()
+ ":\n"
+                            + "Property \"" + name + "\" is associated to type \"" + type
+ "\", but that "
+                            + "property was already associated to \"" + old + "\".");
                 }
                 return;
             }
@@ -277,7 +300,8 @@ public final strictfp class SchemaVerifi
     private void verifyPropertyType(final Node node) throws SAXException {
         if (XMLConstants.W3C_XML_SCHEMA_NS_URI.equals(node.getNamespaceURI())) {
             if ("element".equals(node.getNodeName())) {
-                verifyNamingConvention(getMandatoryAttribute(node, "ref"), currentPropertyType,
PROPERTY_TYPE_SUFFIX);
+                verifyNamingConvention(schemaLocations.getLast(),
+                        getMandatoryAttribute(node, "ref"), currentPropertyType, PROPERTY_TYPE_SUFFIX);
                 return;
             }
         }
@@ -295,19 +319,25 @@ public final strictfp class SchemaVerifi
      * @param  suffix  the expected suffix at the end of {@code type}.
      * @throws SchemaException if the given {@code name} and {@code type} are not compliant
with expected convention.
      */
-    private static void verifyNamingConvention(final String name, final String type, final
String suffix) throws SchemaException {
+    private static void verifyNamingConvention(final String enclosing,
+            final String name, final String type, final String suffix) throws SchemaException
+    {
         if (type.endsWith(suffix)) {
-            final int nameStart = name.indexOf(PREFIX_SEPARATOR) + 1;        // Skip "mdb:"
or similar prefix.
-            final int typeStart = type.indexOf(PREFIX_SEPARATOR) + 1;
-            final int length    = name.length() - nameStart;
+            int nameStart = name.indexOf(PREFIX_SEPARATOR) + 1;        // Skip "mdb:" or
similar prefix.
+            int typeStart = type.indexOf(PREFIX_SEPARATOR) + 1;
+            final int plg = ABSTRACT_PREFIX.length();
+            if (name.regionMatches(nameStart, ABSTRACT_PREFIX, 0, plg)) nameStart += plg;
+            if (type.regionMatches(typeStart, ABSTRACT_PREFIX, 0, plg)) typeStart += plg;
+            final int length = name.length() - nameStart;
             if (type.length() - typeStart - suffix.length() == length &&
                     type.regionMatches(typeStart, name, nameStart, length))
             {
                 return;
             }
         }
-        throw new SchemaException("<element name=\"" + name + "\" type=\"" + type + "\">:
"
-                + "'type' should be 'name' with \"" + suffix + "\" suffix.");
+        throw new SchemaException("Error in " + enclosing + ":\n"
+                + "The type name should be the name with \"" + suffix + "\" suffix, "
+                + "but found name=\"" + name + "\" and type=\"" + type + "\">.");
     }
 
     /**
@@ -343,11 +373,12 @@ public final strictfp class SchemaVerifi
                 }
             }
         }
-        throw new SchemaException("Node " + node.getNodeName() + " should have an attribute
'" + name + "'.");
+        throw new SchemaException("Node " + node.getNodeName() + " should have a '" + name
+ "' attribute.");
     }
 
     /**
      * Verifies the {@link XmlElement} annotation on the given class.
+     * This method downloads and parses the XSD files (the schemas) as needed.
      *
      * @param  type  the class on which to verify annotations.
      */
@@ -361,6 +392,16 @@ public final strictfp class SchemaVerifi
             }
             loadSchema(location);
         }
-        // TODO
+        /*
+         * Verify @XmlType and @XmlRootElement on the class.
+         */
+        final XmlType xmlType = type.getDeclaredAnnotation(XmlType.class);
+        if (xmlType != null) {
+            final XmlRootElement root = type.getDeclaredAnnotation(XmlRootElement.class);
+            if (root == null) {
+                throw new SchemaException("Missing @XmlRootElement in " + type.getSimpleName()
+ " class.");
+            }
+            verifyNamingConvention(type.getName(), root.name(), xmlType.name(), TYPE_SUFFIX);
+        }
     }
 }

Modified: sis/branches/ISO-19115-3/core/sis-utility/src/main/resources/org/apache/sis/xml/NamespaceContent.txt
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/resources/org/apache/sis/xml/NamespaceContent.txt?rev=1822206&r1=1822205&r2=1822206&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-utility/src/main/resources/org/apache/sis/xml/NamespaceContent.txt
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-utility/src/main/resources/org/apache/sis/xml/NamespaceContent.txt
[UTF-8] Thu Jan 25 15:15:20 2018
@@ -350,10 +350,6 @@ http://standards.iso.org/iso/19115/-3/md
     <type>
   MD_ClassificationCode
     <type>
-  MD_FeatureTypeList
-    <type>
-    spatialObject
-    spatialSchemaName
   MD_GeometricObjectTypeCode
     <type>
   MD_ImagingConditionCode



Mime
View raw message