sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tlpin...@apache.org
Subject svn commit: r1517321 [3/16] - in /sis/branches/Shapefile: ./ application/ application/sis-console/ application/sis-console/src/main/artifact/ application/sis-console/src/main/java/org/apache/sis/console/ application/sis-console/src/main/resources/org/a...
Date Sun, 25 Aug 2013 15:49:59 GMT
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_DatatypeCode.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_DatatypeCode.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_DatatypeCode.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_DatatypeCode.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -16,10 +16,10 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
-import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
-import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.Datatype;
+import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
+import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 
 
 /**
@@ -34,13 +34,6 @@ import org.opengis.metadata.Datatype;
  */
 public final class MD_DatatypeCode extends CodeListAdapter<MD_DatatypeCode, Datatype> {
     /**
-     * Ensures that the adapted code list class is loaded.
-     */
-    static {
-        ensureClassLoaded(Datatype.class);
-    }
-
-    /**
      * Empty constructor for JAXB only.
      */
     public MD_DatatypeCode() {

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_DimensionNameTypeCode.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_DimensionNameTypeCode.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_DimensionNameTypeCode.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_DimensionNameTypeCode.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -16,10 +16,10 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
-import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
-import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.spatial.DimensionNameType;
+import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
+import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 
 
 /**
@@ -36,13 +36,6 @@ public final class MD_DimensionNameTypeC
         extends CodeListAdapter<MD_DimensionNameTypeCode, DimensionNameType>
 {
     /**
-     * Ensures that the adapted code list class is loaded.
-     */
-    static {
-        ensureClassLoaded(DimensionNameType.class);
-    }
-
-    /**
      * Empty constructor for JAXB only.
      */
     public MD_DimensionNameTypeCode() {

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_GeometricObjectTypeCode.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_GeometricObjectTypeCode.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_GeometricObjectTypeCode.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_GeometricObjectTypeCode.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -16,10 +16,10 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
-import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
-import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 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.CodeListProxy;
 
 
 /**
@@ -36,13 +36,6 @@ public final class MD_GeometricObjectTyp
         extends CodeListAdapter<MD_GeometricObjectTypeCode, GeometricObjectType>
 {
     /**
-     * Ensures that the adapted code list class is loaded.
-     */
-    static {
-        ensureClassLoaded(GeometricObjectType.class);
-    }
-
-    /**
      * Empty constructor for JAXB only.
      */
     public MD_GeometricObjectTypeCode() {

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ImagingConditionCode.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ImagingConditionCode.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ImagingConditionCode.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ImagingConditionCode.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -16,10 +16,10 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
-import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
-import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 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.CodeListProxy;
 
 
 /**
@@ -36,13 +36,6 @@ public final class MD_ImagingConditionCo
         extends CodeListAdapter<MD_ImagingConditionCode, ImagingCondition>
 {
     /**
-     * Ensures that the adapted code list class is loaded.
-     */
-    static {
-        ensureClassLoaded(ImagingCondition.class);
-    }
-
-    /**
      * Empty constructor for JAXB only.
      */
     public MD_ImagingConditionCode() {

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_KeywordTypeCode.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_KeywordTypeCode.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_KeywordTypeCode.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_KeywordTypeCode.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -16,10 +16,10 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
-import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
-import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 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.CodeListProxy;
 
 
 /**
@@ -34,13 +34,6 @@ import org.opengis.metadata.identificati
  */
 public final class MD_KeywordTypeCode extends CodeListAdapter<MD_KeywordTypeCode, KeywordType> {
     /**
-     * Ensures that the adapted code list class is loaded.
-     */
-    static {
-        ensureClassLoaded(KeywordType.class);
-    }
-
-    /**
      * Empty constructor for JAXB only.
      */
     public MD_KeywordTypeCode() {

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MaintenanceFrequencyCode.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MaintenanceFrequencyCode.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MaintenanceFrequencyCode.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MaintenanceFrequencyCode.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -16,10 +16,10 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
-import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
-import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.maintenance.MaintenanceFrequency;
+import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
+import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 
 
 /**
@@ -36,13 +36,6 @@ public final class MD_MaintenanceFrequen
         extends CodeListAdapter<MD_MaintenanceFrequencyCode, MaintenanceFrequency>
 {
     /**
-     * Ensures that the adapted code list class is loaded.
-     */
-    static {
-        ensureClassLoaded(MaintenanceFrequency.class);
-    }
-
-    /**
      * Empty constructor for JAXB only.
      */
     public MD_MaintenanceFrequencyCode() {

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumFormatCode.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumFormatCode.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumFormatCode.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumFormatCode.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -16,10 +16,10 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
-import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
-import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 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.CodeListProxy;
 
 
 /**
@@ -34,13 +34,6 @@ import org.opengis.metadata.distribution
  */
 public final class MD_MediumFormatCode extends CodeListAdapter<MD_MediumFormatCode, MediumFormat> {
     /**
-     * Ensures that the adapted code list class is loaded.
-     */
-    static {
-        ensureClassLoaded(MediumFormat.class);
-    }
-
-    /**
      * Empty constructor for JAXB only.
      */
     public MD_MediumFormatCode() {

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumNameCode.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumNameCode.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumNameCode.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumNameCode.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -16,10 +16,10 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
-import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
-import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 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.CodeListProxy;
 
 
 /**
@@ -34,13 +34,6 @@ import org.opengis.metadata.distribution
  */
 public final class MD_MediumNameCode extends CodeListAdapter<MD_MediumNameCode, MediumName> {
     /**
-     * Ensures that the adapted code list class is loaded.
-     */
-    static {
-        ensureClassLoaded(MediumName.class);
-    }
-
-    /**
      * Empty constructor for JAXB only.
      */
     public MD_MediumNameCode() {

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_PixelOrientationCode.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_PixelOrientationCode.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_PixelOrientationCode.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_PixelOrientationCode.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -16,10 +16,10 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
-import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
-import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.spatial.PixelOrientation;
+import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
+import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 
 
 /**
@@ -36,13 +36,6 @@ public final class MD_PixelOrientationCo
         extends CodeListAdapter<MD_PixelOrientationCode, PixelOrientation>
 {
     /**
-     * Ensures that the adapted code list class is loaded.
-     */
-    static {
-        ensureClassLoaded(PixelOrientation.class);
-    }
-
-    /**
      * Empty constructor for JAXB only.
      */
     public MD_PixelOrientationCode() {

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ProgressCode.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ProgressCode.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ProgressCode.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ProgressCode.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -16,10 +16,10 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
-import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
-import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 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.CodeListProxy;
 
 
 /**
@@ -34,13 +34,6 @@ import org.opengis.metadata.identificati
  */
 public final class MD_ProgressCode extends CodeListAdapter<MD_ProgressCode, Progress> {
     /**
-     * Ensures that the adapted code list class is loaded.
-     */
-    static {
-        ensureClassLoaded(Progress.class);
-    }
-
-    /**
      * Empty constructor for JAXB only.
      */
     public MD_ProgressCode() {

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_RestrictionCode.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_RestrictionCode.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_RestrictionCode.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_RestrictionCode.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -16,10 +16,10 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
-import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
-import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.constraint.Restriction;
+import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
+import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 
 
 /**
@@ -34,13 +34,6 @@ import org.opengis.metadata.constraint.R
  */
 public final class MD_RestrictionCode extends CodeListAdapter<MD_RestrictionCode, Restriction> {
     /**
-     * Ensures that the adapted code list class is loaded.
-     */
-    static {
-        ensureClassLoaded(Restriction.class);
-    }
-
-    /**
      * Empty constructor for JAXB only.
      */
     public MD_RestrictionCode() {

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ScopeCode.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ScopeCode.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ScopeCode.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ScopeCode.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -16,10 +16,10 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
-import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
-import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.maintenance.ScopeCode;
+import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
+import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 
 
 /**
@@ -34,13 +34,6 @@ import org.opengis.metadata.maintenance.
  */
 public final class MD_ScopeCode extends CodeListAdapter<MD_ScopeCode, ScopeCode> {
     /**
-     * Ensures that the adapted code list class is loaded.
-     */
-    static {
-        ensureClassLoaded(ScopeCode.class);
-    }
-
-    /**
      * Empty constructor for JAXB only.
      */
     public MD_ScopeCode() {

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_SpatialRepresentationTypeCode.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_SpatialRepresentationTypeCode.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_SpatialRepresentationTypeCode.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_SpatialRepresentationTypeCode.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -16,10 +16,10 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
-import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
-import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 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.CodeListProxy;
 
 
 /**
@@ -36,13 +36,6 @@ public final class MD_SpatialRepresentat
         extends CodeListAdapter<MD_SpatialRepresentationTypeCode, SpatialRepresentationType>
 {
     /**
-     * Ensures that the adapted code list class is loaded.
-     */
-    static {
-        ensureClassLoaded(SpatialRepresentationType.class);
-    }
-
-    /**
      * Empty constructor for JAXB only.
      */
     public MD_SpatialRepresentationTypeCode() {

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopicCategoryCode.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopicCategoryCode.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopicCategoryCode.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopicCategoryCode.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -16,10 +16,10 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
-import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
-import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.identification.TopicCategory;
+import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
+import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 
 
 /**
@@ -36,13 +36,6 @@ import org.opengis.metadata.identificati
  */
 public final class MD_TopicCategoryCode extends CodeListAdapter<MD_TopicCategoryCode, TopicCategory> {
     /**
-     * Ensures that the adapted code list class is loaded.
-     */
-    static {
-        ensureClassLoaded(TopicCategory.class);
-    }
-
-    /**
      * Empty constructor for JAXB only.
      */
     public MD_TopicCategoryCode() {

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopologyLevelCode.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopologyLevelCode.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopologyLevelCode.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopologyLevelCode.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -16,10 +16,10 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
-import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
-import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 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.CodeListProxy;
 
 
 /**
@@ -34,13 +34,6 @@ import org.opengis.metadata.spatial.Topo
  */
 public final class MD_TopologyLevelCode extends CodeListAdapter<MD_TopologyLevelCode, TopologyLevel> {
     /**
-     * Ensures that the adapted code list class is loaded.
-     */
-    static {
-        ensureClassLoaded(TopologyLevel.class);
-    }
-
-    /**
      * Empty constructor for JAXB only.
      */
     public MD_TopologyLevelCode() {

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_BandDefinition.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_BandDefinition.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_BandDefinition.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_BandDefinition.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -16,10 +16,10 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
-import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
-import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.content.BandDefinition;
+import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
+import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 import org.apache.sis.xml.Namespaces;
 
 
@@ -35,13 +35,6 @@ import org.apache.sis.xml.Namespaces;
  */
 public final class MI_BandDefinition extends CodeListAdapter<MI_BandDefinition, BandDefinition> {
     /**
-     * Ensures that the adapted code list class is loaded.
-     */
-    static {
-        ensureClassLoaded(BandDefinition.class);
-    }
-
-    /**
      * Empty constructor for JAXB only.
      */
     public MI_BandDefinition() {

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ContextCode.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ContextCode.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ContextCode.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ContextCode.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -16,10 +16,10 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
-import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
-import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.acquisition.Context;
+import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
+import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 import org.apache.sis.xml.Namespaces;
 
 
@@ -35,13 +35,6 @@ import org.apache.sis.xml.Namespaces;
  */
 public final class MI_ContextCode extends CodeListAdapter<MI_ContextCode, Context> {
     /**
-     * Ensures that the adapted code list class is loaded.
-     */
-    static {
-        ensureClassLoaded(Context.class);
-    }
-
-    /**
      * Empty constructor for JAXB only.
      */
     public MI_ContextCode() {

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_GeometryTypeCode.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_GeometryTypeCode.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_GeometryTypeCode.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_GeometryTypeCode.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -16,10 +16,10 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
-import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
-import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.acquisition.GeometryType;
+import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
+import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 import org.apache.sis.xml.Namespaces;
 
 
@@ -35,13 +35,6 @@ import org.apache.sis.xml.Namespaces;
  */
 public final class MI_GeometryTypeCode extends CodeListAdapter<MI_GeometryTypeCode, GeometryType> {
     /**
-     * Ensures that the adapted code list class is loaded.
-     */
-    static {
-        ensureClassLoaded(GeometryType.class);
-    }
-
-    /**
      * Empty constructor for JAXB only.
      */
     public MI_GeometryTypeCode() {

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ObjectiveTypeCode.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ObjectiveTypeCode.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ObjectiveTypeCode.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ObjectiveTypeCode.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -16,10 +16,10 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
-import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
-import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.acquisition.ObjectiveType;
+import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
+import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 import org.apache.sis.xml.Namespaces;
 
 
@@ -35,13 +35,6 @@ import org.apache.sis.xml.Namespaces;
  */
 public final class MI_ObjectiveTypeCode extends CodeListAdapter<MI_ObjectiveTypeCode, ObjectiveType> {
     /**
-     * Ensures that the adapted code list class is loaded.
-     */
-    static {
-        ensureClassLoaded(ObjectiveType.class);
-    }
-
-    /**
      * Empty constructor for JAXB only.
      */
     public MI_ObjectiveTypeCode() {

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_OperationTypeCode.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_OperationTypeCode.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_OperationTypeCode.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_OperationTypeCode.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -16,10 +16,10 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
-import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
-import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.acquisition.OperationType;
+import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
+import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 import org.apache.sis.xml.Namespaces;
 
 
@@ -35,13 +35,6 @@ import org.apache.sis.xml.Namespaces;
  */
 public final class MI_OperationTypeCode extends CodeListAdapter<MI_OperationTypeCode, OperationType> {
     /**
-     * Ensures that the adapted code list class is loaded.
-     */
-    static {
-        ensureClassLoaded(OperationType.class);
-    }
-
-    /**
      * Empty constructor for JAXB only.
      */
     public MI_OperationTypeCode() {

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PolarizationOrientationCode.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PolarizationOrientationCode.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PolarizationOrientationCode.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PolarizationOrientationCode.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -16,10 +16,10 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
-import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
-import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.content.PolarizationOrientation;
+import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
+import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 import org.apache.sis.xml.Namespaces;
 
 
@@ -38,13 +38,6 @@ public final class MI_PolarizationOrient
         extends CodeListAdapter<MI_PolarizationOrientationCode, PolarizationOrientation>
 {
     /**
-     * Ensures that the adapted code list class is loaded.
-     */
-    static {
-        ensureClassLoaded(PolarizationOrientation.class);
-    }
-
-    /**
      * Empty constructor for JAXB only.
      */
     public MI_PolarizationOrientationCode() {

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PriorityCode.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PriorityCode.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PriorityCode.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PriorityCode.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -16,10 +16,10 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
-import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
-import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.acquisition.Priority;
+import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
+import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 import org.apache.sis.xml.Namespaces;
 
 
@@ -35,13 +35,6 @@ import org.apache.sis.xml.Namespaces;
  */
 public final class MI_PriorityCode extends CodeListAdapter<MI_PriorityCode, Priority> {
     /**
-     * Ensures that the adapted code list class is loaded.
-     */
-    static {
-        ensureClassLoaded(Priority.class);
-    }
-
-    /**
      * Empty constructor for JAXB only.
      */
     public MI_PriorityCode() {

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_SequenceCode.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_SequenceCode.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_SequenceCode.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_SequenceCode.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -16,10 +16,10 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
-import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
-import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.acquisition.Sequence;
+import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
+import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 import org.apache.sis.xml.Namespaces;
 
 
@@ -35,13 +35,6 @@ import org.apache.sis.xml.Namespaces;
  */
 public final class MI_SequenceCode extends CodeListAdapter<MI_SequenceCode, Sequence> {
     /**
-     * Ensures that the adapted code list class is loaded.
-     */
-    static {
-        ensureClassLoaded(Sequence.class);
-    }
-
-    /**
      * Empty constructor for JAXB only.
      */
     public MI_SequenceCode() {

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TransferFunctionTypeCode.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TransferFunctionTypeCode.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TransferFunctionTypeCode.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TransferFunctionTypeCode.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -16,10 +16,10 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
-import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
-import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.content.TransferFunctionType;
+import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
+import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 import org.apache.sis.xml.Namespaces;
 
 
@@ -37,13 +37,6 @@ public final class MI_TransferFunctionTy
         extends CodeListAdapter<MI_TransferFunctionTypeCode, TransferFunctionType>
 {
     /**
-     * Ensures that the adapted code list class is loaded.
-     */
-    static {
-        ensureClassLoaded(TransferFunctionType.class);
-    }
-
-    /**
      * Empty constructor for JAXB only.
      */
     public MI_TransferFunctionTypeCode() {

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TriggerCode.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TriggerCode.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TriggerCode.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TriggerCode.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -16,10 +16,10 @@
  */
 package org.apache.sis.internal.jaxb.code;
 
-import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
-import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.acquisition.Trigger;
+import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
+import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 import org.apache.sis.xml.Namespaces;
 
 
@@ -35,13 +35,6 @@ import org.apache.sis.xml.Namespaces;
  */
 public final class MI_TriggerCode extends CodeListAdapter<MI_TriggerCode, Trigger> {
     /**
-     * Ensures that the adapted code list class is loaded.
-     */
-    static {
-        ensureClassLoaded(Trigger.class);
-    }
-
-    /**
      * Empty constructor for JAXB only.
      */
     public MI_TriggerCode() {

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/package-info.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/package-info.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/package-info.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -38,8 +38,8 @@
  * @see org.opengis.util.CodeList
  */
 @XmlSchema(elementFormDefault = XmlNsForm.QUALIFIED, namespace = Namespaces.GMD, xmlns = {
-    @XmlNs(prefix = "gmi", namespaceURI = Namespaces.GMI),
     @XmlNs(prefix = "gmd", namespaceURI = Namespaces.GMD),
+    @XmlNs(prefix = "gmi", namespaceURI = Namespaces.GMI),
     @XmlNs(prefix = "gco", namespaceURI = Namespaces.GCO)
 })
 package org.apache.sis.internal.jaxb.code;

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/geometry/GM_Object.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/geometry/GM_Object.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/geometry/GM_Object.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/geometry/GM_Object.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -83,7 +83,7 @@ public class GM_Object extends XmlAdapte
      * The default implementation returns {@code null} if all cases. Subclasses
      * must override this method in order to provide useful marshalling.
      *
-     * @param value The value to marshall.
+     * @param value The value to marshal.
      * @return The adapter which covers the geometry value.
      */
     protected GM_Object wrap(Geometry value) {

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/package-info.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/package-info.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/package-info.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -36,10 +36,14 @@
  * @version 0.3
  * @module
  */
-@XmlSchema(elementFormDefault = XmlNsForm.QUALIFIED, namespace = Namespaces.GMI)
+@XmlSchema(elementFormDefault = XmlNsForm.QUALIFIED, namespace = Namespaces.GMI, xmlns = {
+    @XmlNs(prefix = "gmi", namespaceURI = Namespaces.GMI),
+    @XmlNs(prefix = "gco", namespaceURI = Namespaces.GCO)
+})
 @XmlAccessorType(XmlAccessType.NONE)
 package org.apache.sis.internal.jaxb.gmi;
 
+import javax.xml.bind.annotation.XmlNs;
 import javax.xml.bind.annotation.XmlNsForm;
 import javax.xml.bind.annotation.XmlSchema;
 import javax.xml.bind.annotation.XmlAccessType;

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/package-info.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/package-info.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/package-info.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -23,10 +23,14 @@
  * @version 0.3
  * @module
  */
-@XmlSchema(elementFormDefault = XmlNsForm.QUALIFIED, namespace = Namespaces.GTS)
+@XmlSchema(elementFormDefault = XmlNsForm.QUALIFIED, namespace = Namespaces.GTS, xmlns = {
+    @XmlNs(prefix = "gts", namespaceURI = Namespaces.GTS),
+    @XmlNs(prefix = "gco", namespaceURI = Namespaces.GCO)
+})
 @XmlAccessorType(XmlAccessType.NONE)
 package org.apache.sis.internal.jaxb.gts;
 
+import javax.xml.bind.annotation.XmlNs;
 import javax.xml.bind.annotation.XmlNsForm;
 import javax.xml.bind.annotation.XmlSchema;
 import javax.xml.bind.annotation.XmlAccessType;

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/RS_ReferenceSystem.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/RS_ReferenceSystem.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/RS_ReferenceSystem.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/RS_ReferenceSystem.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -50,9 +50,11 @@ public class RS_ReferenceSystem extends 
     }
 
     /**
-     * Constructor for the {@link #wrap} method only.
+     * Wraps a Reference System value in a {@code MD_ReferenceSystem} element at marshalling-time.
+     *
+     * @param metadata The metadata value to marshal.
      */
-    RS_ReferenceSystem(final ReferenceSystem metadata) {
+    protected RS_ReferenceSystem(final ReferenceSystem metadata) {
         super(metadata);
     }
 

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataUtilities.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataUtilities.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataUtilities.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataUtilities.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -19,23 +19,22 @@ package org.apache.sis.internal.metadata
 import java.util.Date;
 import java.util.logging.Level;
 import java.util.logging.LogRecord;
+import org.apache.sis.xml.NilReason;
 import org.apache.sis.util.Static;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.resources.Messages;
 import org.apache.sis.metadata.InvalidMetadataException;
+import org.apache.sis.internal.jaxb.PrimitiveTypeProperties;
 
 import static org.apache.sis.metadata.iso.ISOMetadata.LOGGER;
 
-// Related to JDK7
-import org.apache.sis.internal.jdk7.Objects;
-
 
 /**
  * Miscellaneous utility methods for metadata.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
- * @version 0.3
+ * @version 0.4
  * @module
  */
 public final class MetadataUtilities extends Static {
@@ -78,59 +77,22 @@ public final class MetadataUtilities ext
     }
 
     /**
-     * Sets the bit under the given mask for the given boolean value.
-     * This method uses two bits as below:
-     *
-     * <ul>
-     *   <li>{@code 00} - {@code null}</li>
-     *   <li>{@code 10} - {@code Boolean.FALSE}</li>
-     *   <li>{@code 11} - {@code Boolean.TRUE}</li>
-     * </ul>
-     *
-     * @param  flags The set of bits to modify for the given boolean value.
-     * @param  mask  The bit mask, which much have exactly two consecutive bits set.
-     * @param  value The boolean value to store in the {@code flags}, or {@code null}.
-     * @return The updated {@code flags}.
-     */
-    public static int setBoolean(int flags, final int mask, final Boolean value) {
-        assert 3 << Integer.numberOfTrailingZeros(mask) == mask : mask;
-        if (value == null) {
-            flags &= ~mask;
-        } else {
-            flags |= mask;
-            if (!value) {
-                flags &= ~(mask & (mask >>> 1));
-            }
-        }
-        assert Objects.equals(getBoolean(flags, mask), value) : value;
-        return flags;
-    }
-
-    /**
-     * Returns the boolean value for the bits under the given mask.
-     * This method is the reverse of {@link #setBoolean(int, int, Boolean)}.
-     *
-     * @param  flags The set of bits from which to read the boolean value under the given mask.
-     * @param  mask  The bit mask, which much have exactly two consecutive bits set.
-     * @return The boolean value under the given mask (may be {@code null}).
-     */
-    public static Boolean getBoolean(int flags, final int mask) {
-        flags &= mask;
-        return (flags == 0) ? null : Boolean.valueOf(flags == mask);
-    }
-
-    /**
-     * Makes sure that the given inclusion is non-null, then returns its value.
+     * Makes sure that the given inclusion is non-nil, then returns its value.
+     * If the given inclusion is {@code null}, then the default value is {@code true}.
      *
      * @param  value The {@link org.opengis.metadata.extent.GeographicBoundingBox#getInclusion()} value.
      * @return The given value as a primitive type.
-     * @throws InvalidMetadataException if the given value is null.
+     * @throws InvalidMetadataException if the given value is nil.
      */
     public static boolean getInclusion(final Boolean value) throws InvalidMetadataException {
         if (value == null) {
-            throw new InvalidMetadataException(Errors.format(Errors.Keys.MissingValueForProperty_1, "inclusion"));
+            return true;
+        }
+        final boolean p = value;
+        if (p || value == Boolean.FALSE || !(PrimitiveTypeProperties.property(value) instanceof NilReason)) {
+            return p;
         }
-        return value;
+        throw new InvalidMetadataException(Errors.format(Errors.Keys.MissingValueForProperty_1, "inclusion"));
     }
 
     /**

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/AbstractMetadata.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/AbstractMetadata.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/AbstractMetadata.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/AbstractMetadata.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -112,14 +112,15 @@ public abstract class AbstractMetadata i
     }
 
     /**
-     * Returns {@code true} if this metadata contains only {@code null} or empty properties.
-     * A property is considered empty in any of the following cases:
+     * Returns {@code true} if this metadata contains only {@code null},
+     * {@linkplain org.apache.sis.xml.NilObject nil} or empty properties.
+     * A non-null and non-nil property is considered empty in any of the following cases:
      *
      * <ul>
      *   <li>An empty {@linkplain CharSequence character sequences}.</li>
      *   <li>An {@linkplain java.util.Collection#isEmpty() empty collection} or an empty array.</li>
-     *   <li>A collection or array containing only {@code null} or empty elements.</li>
-     *   <li>An other metadata object containing only {@code null} or empty properties.</li>
+     *   <li>A collection or array containing only {@code null}, nil or empty elements.</li>
+     *   <li>An other metadata object containing only {@code null}, nil or empty properties.</li>
      * </ul>
      *
      * Note that empty properties can be removed by calling the {@link ModifiableMetadata#prune()}
@@ -314,13 +315,15 @@ public abstract class AbstractMetadata i
 
     /**
      * Computes a hash code value for this metadata using Java reflection. The hash code
-     * is defined as the sum of hash code values of all non-empty properties. This is a
-     * similar contract than {@link java.util.Set#hashCode()} and ensures that the hash code
-     * value is insensitive to the ordering of properties.
+     * is defined as the sum of hash code values of all non-empty properties, excluding
+     * cyclic dependencies. For acyclic metadata, this method contract is compatible with
+     * the {@link java.util.Set#hashCode()} one and ensures that the hash code value is
+     * insensitive to the ordering of properties.
      *
      * {@note This method does not cache the value because current implementation has no notification
      *        mechanism for tracking changes in children properties. If this metadata is known to be
-     *        immutable, then subclasses may consider caching the hash code value at their choice.}
+     *        immutable, then subclasses may consider caching the hash code value if performance is
+     *        important.}
      *
      * @see MetadataStandard#hashCode(Object)
      */

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -293,7 +293,12 @@ public class MetadataStandard implements
                     return null;
                 }
             }
-            final PropertyAccessor accessor = new PropertyAccessor(citation, type, implementation);
+            final PropertyAccessor accessor;
+            if (SpecialCases.isSpecialCase(type)) {
+                accessor = new SpecialCases(citation, type, implementation);
+            } else {
+                accessor = new PropertyAccessor(citation, type, implementation);
+            }
             accessors.put(implementation, accessor);
             return accessor;
         }
@@ -434,7 +439,7 @@ public class MetadataStandard implements
      * @param  type The interface, typically from the {@code org.opengis.metadata} package.
      * @return The implementation class, or {@code null} if none.
      */
-    protected Class<?> getImplementation(final Class<?> type) {
+    public Class<?> getImplementation(final Class<?> type) {
         return null;
     }
 
@@ -746,7 +751,25 @@ public class MetadataStandard implements
         if (accessor.type != findInterface(metadata2.getClass())) {
             return false;
         }
-        return accessor.equals(metadata1, metadata2, mode);
+        /*
+         * At this point, we have to perform the actual property-by-property comparison.
+         * Cycle may exist in metadata tree, so we have to keep trace of pair in process
+         * of being compared for avoiding infinite recursivity.
+         */
+        final ObjectPair pair = new ObjectPair(metadata1, metadata2);
+        final Set<ObjectPair> inProgress = ObjectPair.CURRENT.get();
+        if (inProgress.add(pair)) try {
+            return accessor.equals(metadata1, metadata2, mode);
+        } finally {
+            inProgress.remove(pair);
+        } else {
+            /*
+             * If we get here, a cycle has been found. Returns 'true' in order to allow the caller to continue
+             * comparing other properties. It is okay because someone else is comparing those two same objects,
+             * and that later comparison will do the actual check for property values.
+             */
+            return true;
+        }
     }
 
     /**
@@ -756,14 +779,28 @@ public class MetadataStandard implements
      * and ensures that the hash code value is insensitive to the ordering of properties.
      *
      * @param  metadata The metadata object to compute hash code.
-     * @return A hash code value for the specified metadata.
+     * @return A hash code value for the specified metadata, or 0 if the given metadata is null.
      * @throws ClassCastException if the metadata object doesn't implement a metadata
      *         interface of the expected package.
      *
      * @see AbstractMetadata#hashCode()
      */
     public int hashCode(final Object metadata) throws ClassCastException {
-        return getAccessor(metadata.getClass(), true).hashCode(metadata);
+        if (metadata != null) {
+            final Map<Object,Object> inProgress = RecursivityGuard.HASH_CODES.get();
+            if (inProgress.put(metadata, Boolean.TRUE) == null) try {
+                return getAccessor(metadata.getClass(), true).hashCode(metadata);
+            } finally {
+                inProgress.remove(metadata);
+            }
+            /*
+             * If we get there, a cycle has been found. We can not compute a hash code value for that metadata.
+             * However it should not be a problem since this metadata is part of a bigger metadata object, and
+             * that enclosing object has other properties for computing its hash code. We just need the result
+             * to be consistent, we should be the case if properties ordering is always the same.
+             */
+        }
+        return 0;
     }
 
     /**

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -18,13 +18,16 @@ package org.apache.sis.metadata;
 
 import java.util.Set;
 import java.util.List;
+import java.util.EnumSet;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.NoSuchElementException;
+import java.lang.reflect.Modifier;
 import org.opengis.util.CodeList;
 import org.apache.sis.util.ThreadSafe;
 import org.apache.sis.util.logging.Logging;
 import org.apache.sis.util.resources.Errors;
+import org.apache.sis.util.collection.CodeListSet;
 import org.apache.sis.internal.util.CheckedHashSet;
 import org.apache.sis.internal.util.CheckedArrayList;
 
@@ -122,6 +125,13 @@ public abstract class ModifiableMetadata
      * Returns {@code true} if this metadata is modifiable. This method returns
      * {@code false} if {@link #freeze()} has been invoked on this object.
      *
+     * <table width="80%" align="center" cellpadding="18" border="4" bgcolor="#FFE0B0">
+     *   <tr><td>
+     *     <b>Warning:</b> this method is likely to change. SIS 0.4 will probably uses a "state" enumeration
+     *     (modifiable, appendable, etc.).
+     *   </td></tr>
+     * </table>
+     *
      * @return {@code true} if this metadata is modifiable.
      *
      * @see #freeze()
@@ -159,6 +169,13 @@ public abstract class ModifiableMetadata
      *       {@linkplain #freeze() freeze} the clone before to return it.</li>
      * </ul>
      *
+     * <table width="80%" align="center" cellpadding="18" border="4" bgcolor="#FFE0B0">
+     *   <tr><td>
+     *     <b>Warning:</b> this method is likely to change. SIS 0.4 will probably uses a "state" enumeration
+     *     (modifiable, appendable, etc.).
+     *   </td></tr>
+     * </table>
+     *
      * @return An unmodifiable copy of this metadata.
      */
     public AbstractMetadata unmodifiable() {
@@ -197,6 +214,13 @@ public abstract class ModifiableMetadata
      * <p>Subclasses usually don't need to override this method since the default implementation
      * performs its work using Java reflection.</p>
      *
+     * <table width="80%" align="center" cellpadding="18" border="4" bgcolor="#FFE0B0">
+     *   <tr><td>
+     *     <b>Warning:</b> this method is likely to change. SIS 0.4 will probably uses a "state" enumeration
+     *     (modifiable, appendable, etc.).
+     *   </td></tr>
+     * </table>
+     *
      * @see #isModifiable()
      * @see #checkWritePermission()
      */
@@ -383,7 +407,7 @@ public abstract class ModifiableMetadata
                 } else {
                     final int capacity = source.size();
                     if (useSet(elementType)) {
-                        target = new CheckedHashSet<E>(elementType, capacity);
+                        target = createSet(elementType, capacity);
                     } else {
                         target = new CheckedArrayList<E>(elementType, capacity);
                     }
@@ -455,7 +479,7 @@ public abstract class ModifiableMetadata
         final Collection<E> target;
         final int capacity = source.size();
         if (useSet(elementType)) {
-            target = new CheckedHashSet<E>(elementType, capacity);
+            target = createSet(elementType, capacity);
         } else {
             target = new CheckedArrayList<E>(elementType, capacity);
         }
@@ -482,7 +506,7 @@ public abstract class ModifiableMetadata
         }
         final Collection<E> collection;
         if (useSet(elementType)) {
-            collection = new CheckedHashSet<E>(elementType, INITIAL_CAPACITY);
+            collection = createSet(elementType, INITIAL_CAPACITY);
         } else {
             collection = new CheckedArrayList<E>(elementType, INITIAL_CAPACITY);
         }
@@ -562,7 +586,7 @@ public abstract class ModifiableMetadata
         final boolean isModifiable = isModifiable();
         if (useSet(elementType)) {
             if (isModifiable) {
-                return new CheckedHashSet<E>(elementType, INITIAL_CAPACITY);
+                return createSet(elementType, INITIAL_CAPACITY);
             } else {
                 return Collections.emptySet();
             }
@@ -576,17 +600,28 @@ public abstract class ModifiableMetadata
     }
 
     /**
+     * Creates a modifiable set for elements of the given type. This method will create an {@link EnumSet},
+     * {@link CodeListSet} or {@link LinkedHashSet} depending on the {@code elementType} argument.
+     */
+    @SuppressWarnings({"unchecked","rawtypes"})
+    private <E> Set<E> createSet(final Class<E> elementType, final int capacity) {
+        if (Enum.class.isAssignableFrom(elementType)) {
+            return EnumSet.noneOf((Class) elementType);
+        }
+        if (CodeList.class.isAssignableFrom(elementType) && Modifier.isFinal(elementType.getModifiers())) {
+            return new CodeListSet((Class) elementType);
+        }
+        return new CheckedHashSet<E>(elementType, capacity);
+    }
+
+    /**
      * Returns {@code true} if we should use a {@link Set} instead than a {@link List}
      * for elements of the given type.
      */
     private <E> boolean useSet(final Class<E> elementType) {
         final Class<? extends Collection<E>> type = collectionType(elementType);
-        if (Set.class.isAssignableFrom(type)) {
-            return true;
-        }
-        if (List.class.isAssignableFrom(type)) {
-            return false;
-        }
+        if (Set .class == (Class) type) return true;
+        if (List.class == (Class) type) return false;
         throw new NoSuchElementException(Errors.format(Errors.Keys.UnsupportedType_1, type));
     }
 

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -82,7 +82,7 @@ import static org.apache.sis.util.collec
  * @module
  */
 @ThreadSafe
-final class PropertyAccessor {
+class PropertyAccessor {
     /**
      * Getters shared between many instances of this class. Two different implementations
      * may share the same getters but different setters.
@@ -535,7 +535,7 @@ final class PropertyAccessor {
      * @param  policy The kind of type to return.
      * @return The type of property values, or {@code null} if unknown.
      */
-    final Class<?> type(final int index, final TypeValuePolicy policy) {
+    Class<?> type(final int index, final TypeValuePolicy policy) {
         if (index >= 0 && index < standardCount) {
             switch (policy) {
                 case ELEMENT_TYPE: {
@@ -633,7 +633,7 @@ final class PropertyAccessor {
      * @return The value, or {@code null} if none or if the given is out of bounds.
      * @throws BackingStoreException If the implementation threw a checked exception.
      */
-    final Object get(final int index, final Object metadata) throws BackingStoreException {
+    Object get(final int index, final Object metadata) throws BackingStoreException {
         return (index >= 0 && index < standardCount) ? get(getters[index], metadata) : null;
     }
 
@@ -680,7 +680,7 @@ final class PropertyAccessor {
      *                        new collection in their existing instance.</li>
      *   <li>APPEND:          Set the value only if it doesn't overwrite an existing value, then returns
      *                        {@link Boolean#TRUE} if the metadata changed as a result of this method call,
-     *                        {@code Boolean#FALSE} if the metadata didn't changed or {@code null} if the
+     *                        {@link Boolean#FALSE} if the metadata didn't changed or {@code null} if the
      *                        value can not be set because an other value already exists.</li>
      * </ul>
      *
@@ -704,7 +704,7 @@ final class PropertyAccessor {
      * @throws ClassCastException if the given value is not of the expected type.
      * @throws BackingStoreException if the implementation threw a checked exception.
      */
-    final Object set(final int index, final Object metadata, final Object value, final int mode)
+    Object set(final int index, final Object metadata, final Object value, final int mode)
             throws UnmodifiableMetadataException, ClassCastException, BackingStoreException
     {
         if (index < 0 || index >= standardCount) {
@@ -884,9 +884,7 @@ final class PropertyAccessor {
                 // Other cases: let the collection unchanged. It is likely to
                 // cause an exception later. The message should be appropriate.
             }
-            // Getter type (targetType) shall be the same than the setter type (elementType).
-            assert elementType == Numbers.primitiveToWrapper(targetType) : elementType;
-            targetType = elementType; // Ensure that we use primitive wrapper.
+            targetType = Numbers.primitiveToWrapper(targetType);
         } else {
             /*
              * We expect a collection. Collections are handled in one of the two ways below:
@@ -1085,47 +1083,6 @@ final class PropertyAccessor {
     }
 
     /**
-     * Appends all non-empty metadata from source to target. The source can be any implementation
-     * of the metadata interface, but the target must be the implementation expected by this class.
-     *
-     * <p>If the source contains any null or empty properties, then those properties will
-     * not overwrite the corresponding properties in the destination metadata.</p>
-     *
-     * @param  source The metadata to copy.
-     * @param  target The target metadata where to append.
-     * @return {@code true} in case of success, or {@code false} if at least
-     *         one setter method was not found.
-     * @throws UnmodifiableMetadataException if the target metadata is unmodifiable.
-     * @throws BackingStoreException If the implementation threw a checked exception.
-     */
-    public boolean append(final Object source, final Object target)
-            throws UnmodifiableMetadataException, BackingStoreException
-    {
-        // Because this PropertyAccesssor is designed for the target, we must
-        // check if the extra methods are suitable for the source object.
-        assert type.isInstance(source) : Classes.getClass(source);
-        boolean success = true;
-        final Object[] arguments = new Object[1];
-        for (int i=0; i<standardCount; i++) {
-            final Method getter = getters[i];
-            arguments[0] = get(getter, source);
-            if (!isNullOrEmpty(arguments[0])) {
-                if (setters == null) {
-                    return false;
-                }
-                final Method setter = setters[i];
-                if (setter != null) {
-                    convert(getter, target, null, arguments, elementTypes[i], true);
-                    set(setter, target, arguments);
-                } else {
-                    success = false;
-                }
-            }
-        }
-        return success;
-    }
-
-    /**
      * Replaces every properties in the specified metadata by their
      * {@linkplain ModifiableMetadata#unmodifiable() unmodifiable variant}.
      *

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyInformation.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyInformation.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyInformation.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyInformation.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -121,7 +121,7 @@ final class PropertyInformation<E> exten
      * @param  getter      The getter method defined in the interface.
      * @param  elementType The value type, either the method return type if not a collection,
      *                     or the type of elements in the collection otherwise.
-     * @param  valueRange  The range of valid values, or {@code null} if none. This information is associated to the
+     * @param  range       The range of valid values, or {@code null} if none. This information is associated to the
      *                     implementation method rather than the interface one, because it is specific to SIS.
      */
     @SuppressWarnings({"unchecked","rawtypes"})
@@ -250,6 +250,8 @@ final class PropertyInformation<E> exten
      * Returns the case type of values to be stored in the property.
      * If the property type is an array or a collection, then this method
      * returns the type of elements in the array or collection.
+     *
+     * @see TypeValuePolicy#ELEMENT_TYPE
      */
     @Override
     public Class<E> getElementType() {

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/Pruner.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/Pruner.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/Pruner.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/Pruner.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -19,7 +19,6 @@ package org.apache.sis.metadata;
 import java.util.Map;
 import java.util.Iterator;
 import java.util.Collection;
-import java.util.IdentityHashMap;
 import org.opengis.util.CodeList;
 import org.apache.sis.internal.util.CollectionsExt;
 
@@ -27,19 +26,25 @@ import static org.apache.sis.metadata.Va
 
 
 /**
- * Implementation of {@link AbstractMetadata#isEmpty()} and {@link ModifiableMetadata#prune()}
- * methods.
+ * Implementation of {@link AbstractMetadata#isEmpty()} and {@link ModifiableMetadata#prune()} methods.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from geotk-3.20)
  * @version 0.3
  * @module
  */
-final class Pruner extends ThreadLocal<Map<Object,Boolean>> {
+final class Pruner {
     /**
-     * The thread-local map of metadata object already tested.
+     * The thread-local map of metadata objects already tested. The keys are metadata instances, and values
+     * are the results of the {@code metadata.isEmpty()} operation.
+     *
+     * If the final operation requested by the user is {@code isEmpty()}, then this map will contain at most
+     * one {@code false} value since the walk in the tree will stop at the first {@code false} value found.
+     *
+     * If the final operation requested by the user is {@code prune()}, then this map will contain a mix of
+     * {@code false} and {@code true} values since the operation will unconditionally walk through the entire tree.
      */
-    private static final Pruner INSTANCE = new Pruner();
+    private static final RecursivityGuard<Boolean> MAPS = new RecursivityGuard<Boolean>();
 
     /**
      * For internal usage only.
@@ -48,15 +53,6 @@ final class Pruner extends ThreadLocal<M
     }
 
     /**
-     * Creates an initially empty hash map when the {@code isEmpty()} or {@code prune()}
-     * method is invoked, before any recursive invocation.
-     */
-    @Override
-    protected Map<Object,Boolean> initialValue() {
-        return new IdentityHashMap<Object,Boolean>();
-    }
-
-    /**
      * Returns the metadata properties. When used for pruning empty values, the map needs to
      * include empty (but non-null) values in order to allow us to set them to {@code null}.
      */
@@ -87,14 +83,19 @@ final class Pruner extends ThreadLocal<M
      */
     static boolean isEmpty(final AbstractMetadata metadata, final boolean prune) {
         final Map<String,Object> properties = asMap(metadata.getStandard(), metadata, prune);
-        final Map<Object,Boolean> tested = INSTANCE.get();
+        final Map<Object,Boolean> tested = MAPS.get();
         if (!tested.isEmpty()) {
             return isEmpty(properties, tested, prune);
         } else try {
             tested.put(metadata, Boolean.FALSE);
             return isEmpty(properties, tested, prune);
         } finally {
-            INSTANCE.remove();
+            MAPS.remove();
+            /*
+             * Note: we could invoke 'tested.clear()' instead in order to recycle the existing
+             *       IdentityHashMap instance, but we presume that usage of this class will be
+             *       rare enough for not being worth to keep those objects around.
+             */
         }
     }
 

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/StandardImplementation.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/StandardImplementation.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/StandardImplementation.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/StandardImplementation.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -99,7 +99,7 @@ final class StandardImplementation exten
      * @return The implementation class, or {@code null} if none.
      */
     @Override
-    protected Class<?> getImplementation(final Class<?> type) {
+    public Class<?> getImplementation(final Class<?> type) {
         /*
          * We require the type to be an interface in order to exclude
          * CodeLists, Enums and Exceptions.

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNode.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNode.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNode.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNode.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -206,7 +206,8 @@ class TreeNode implements Node {
      * <p>The default implementation is suitable only for the root node - subclasses must override.</p>
      */
     CharSequence getName() {
-        return Classes.getShortClassName(metadata);
+        return CharSequences.camelCaseToSentence(Classes.getShortName(
+                table.standard.getInterface(metadata.getClass()))).toString();
     }
 
     /**

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNodeChildren.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNodeChildren.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNodeChildren.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNodeChildren.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -476,7 +476,8 @@ final class TreeNodeChildren extends Abs
      * are ignored.
      *
      * <p>If the identified property is a collection, then this method adds the value to that collection.
-     * Otherwise the new value will be set only if the previous value is null or empty.</p>
+     * Otherwise the new value will be set only if the previous value is null,
+     * {@linkplain org.apache.sis.xml.NilObject nil} or empty.</p>
      *
      * <p>This method does not iterate explicitly through the children list, because adding a metadata
      * object implicitly adds all its children.</p>

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeTableView.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeTableView.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeTableView.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeTableView.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -33,7 +33,7 @@ import org.apache.sis.internal.system.Lo
 
 /**
  * A tree table view over a metadata object.
- * The tree table is made of three columns:
+ * The tree table is made of the following columns:
  *
  * <ul>
  *   <li>{@link TableColumn#IDENTIFIER} - the property identifier as defined by the UML (if any).</li>

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/TypeValuePolicy.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/TypeValuePolicy.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/TypeValuePolicy.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/TypeValuePolicy.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -32,23 +32,32 @@ package org.apache.sis.metadata;
 public enum TypeValuePolicy {
     /**
      * The type of a property, as inferred from the
-     * {@linkplain java.lang.reflect.Method#getReturnType() return type} of the property method.
-     * Collections are not handled in any special way; if the return type is a collection, then
-     * the value is {@code Collection.class} (or a subclass).
+     * {@linkplain java.lang.reflect.Method#getReturnType() return type} of the property method
+     * defined in the interface.
+     *
+     * <p><b>Notes:</b></p>
+     * <ul>
+     *   <li>Collections are not handled in any special way: if the return type is a collection,
+     *       then the property type is {@code Collection.class} or any other declared return type.</li>
+     *   <li>As a special case, values of type {@code double} (the primitive type) in
+     *       {@link org.opengis.metadata.extent.GeographicBoundingBox} are wrapped in
+     *       {@link org.apache.sis.measure.Longitude} and {@link org.apache.sis.measure.Latitude}
+     *       objects instead of {@link Double}.</li>
+     * </ul>
      */
     PROPERTY_TYPE,
 
     /**
-     * The type of a property, or type of elements if the property is a collection. This is the
-     * same than {@link #PROPERTY_TYPE} except that collections are handled in a special way:
-     * if the property is a collection, then the value is the type of <em>elements</em> in that
-     * collection.
+     * The specialized type of a property, or type of elements if the property is a collection.
+     * This is the same type than {@link #PROPERTY_TYPE} except for the following:
      *
-     * {@note Current implementation has an additional slight difference: if the getter method
-     *        in the implementation class declares a more specific return value than the getter
-     *        method in the interface, and if the setter method (if any) expects the same specialized
-     *        type, then <code>ELEMENT_TYPE</code> will use that specialized type. This is different
-     *        than <code>PROPERTY_TYPE</code> which always use the type declared in the interface.}
+     * <ul>
+     *   <li>If the property is a collection, then the element type is the type of <em>elements</em> in that
+     *       collection. For example if the property type is {@code Collection<String>}, then the element type
+     *       is {@code String}.</li>
+     *   <li>If the implementation declares a more specific property type than the interface (as allowed by
+     *       <cite>covariant return type</cite>), then the element type will be that specialized type.</li>
+     * </ul>
      */
     ELEMENT_TYPE,
 

Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/ValueExistencePolicy.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/ValueExistencePolicy.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/ValueExistencePolicy.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/ValueExistencePolicy.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -19,26 +19,34 @@ package org.apache.sis.metadata;
 import java.util.Map;
 import java.util.Collection;
 import java.lang.reflect.Array;
+import org.apache.sis.xml.NilObject;
+import org.apache.sis.xml.NilReason;
 
 
 /**
- * Whatever {@link MetadataStandard#asValueMap MetadataStandard.asValueMap(…)} shall contain
- * entries for null or empty values. By default the map does not provide
- * {@linkplain java.util.Map.Entry entries} for {@code null} metadata properties or
+ * Whatever {@link MetadataStandard#asValueMap MetadataStandard.asValueMap(…)} shall contain entries for null,
+ * {@linkplain org.apache.sis.xml.NilObject nil} or empty values. By default the value map does not provide
+ * {@linkplain java.util.Map.Entry entries} for {@code null} metadata properties, nil objects or
  * {@linkplain java.util.Collection#isEmpty() empty collections}.
- * This enumeration allows control on this behavior.
+ * This enumeration allows to control this behavior.
+ *
+ * {@section Difference between null and nil}
+ * A null property is a reference which is {@code null} in the Java sense.
+ * Null references can be used for missing properties when no information is provided about why the property is missing.
+ * On the other hand, a nil object is a placeholder for a missing property similar in purpose to {@code null} references,
+ * except that an explanation about why the property is missing can be attached to those objects.
+ * Those explanations can be obtained by calls to the {@link org.apache.sis.xml.NilReason#forObject(Object)} method.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from geotk-3.03)
- * @version 0.3
+ * @version 0.4
  * @module
  *
  * @see MetadataStandard#asValueMap(Object, KeyNamePolicy, ValueExistencePolicy)
  */
 public enum ValueExistencePolicy {
     /**
-     * Includes all entries in the map, including those having a null value or an
-     * empty collection.
+     * Includes all entries in the map, including those having a null value or an empty collection.
      */
     ALL() {
         /** Never skip values. */
@@ -55,7 +63,10 @@ public enum ValueExistencePolicy {
 
     /**
      * Includes only the non-null properties.
+     * {@link org.apache.sis.xml.NilObject}s are included.
      * Collections are included no matter if they are empty or not.
+     *
+     * <p>The set of {@code NON_NULL} properties is a subset of {@link #ALL} properties.</p>
      */
     NON_NULL() {
         /** Skips all null values. */
@@ -71,8 +82,29 @@ public enum ValueExistencePolicy {
     },
 
     /**
-     * Includes only the properties that are non-null and non empty.
-     * A non-null property is considered empty if:
+     * Includes only the non-null and non-nil properties.
+     * Collections are included no matter if they are empty or not.
+     *
+     * <p>The set of {@code NON_NIL} properties is a subset of {@link #NON_NULL} properties.</p>
+     *
+     * @since 0.4
+     */
+    NON_NIL() {
+        /** Skips all null or nil values. */
+        @Override boolean isSkipped(final Object value) {
+            return (value == null) || (value instanceof NilObject) || NilReason.forObject(value) != null;
+        }
+
+        /** Substitutes empty collections by a null singleton element, but not
+            null references since they are supposed to be skipped by this policy. */
+        @Override boolean substituteByNullElement(final Collection<?> values) {
+            return (values != null) && values.isEmpty();
+        }
+    },
+
+    /**
+     * Includes only the properties that are non-null, non-nil and non empty.
+     * A non-null and non-nil property is considered empty in any of the following cases:
      *
      * <ul>
      *   <li>It is a character sequence containing only {@linkplain Character#isWhitespace(int) whitespaces}.</li>
@@ -82,6 +114,8 @@ public enum ValueExistencePolicy {
      * </ul>
      *
      * This is the default behavior of {@link AbstractMetadata#asMap()}.
+     *
+     * <p>The set of {@code NON_EMPTY} properties is a subset of {@link #NON_NIL} properties.</p>
      */
     NON_EMPTY() {
         /** Skips all null or empty values. */
@@ -118,11 +152,13 @@ public enum ValueExistencePolicy {
      * we would need to add a check against infinite recursivity.</p>
      */
     static boolean isNullOrEmpty(final Object value) {
-        return value == null
-                || ((value instanceof CharSequence)  && isEmpty((CharSequence) value))
-                || ((value instanceof Collection<?>) && ((Collection<?>) value).isEmpty())
-                || ((value instanceof Map<?,?>)      && ((Map<?,?>) value).isEmpty())
-                || (value.getClass().isArray()       && Array.getLength(value) == 0);
+        if (value == null)                  return true;
+        if (value instanceof NilObject)     return true;
+        if (value instanceof CharSequence)  return isEmpty((CharSequence) value);
+        if (value instanceof Collection<?>) return ((Collection<?>) value).isEmpty();
+        if (value instanceof Map<?,?>)      return ((Map<?,?>) value).isEmpty();
+        if (value.getClass().isArray())     return Array.getLength(value) == 0;
+        return NilReason.forObject(value) != null;
     }
 
     /**



Mime
View raw message