sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1627555 [1/3] - in /sis/trunk: ./ core/sis-build-helper/src/main/java/org/apache/sis/internal/doclet/ core/sis-build-helper/src/main/javadoc/ core/sis-feature/src/test/java/org/apache/sis/feature/ core/sis-metadata/src/main/java/org/apache...
Date Thu, 25 Sep 2014 14:55:51 GMT
Author: desruisseaux
Date: Thu Sep 25 14:55:49 2014
New Revision: 1627555

URL: http://svn.apache.org/r1627555
Log:
Merge from the JDK6 branch.

Added:
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/io/wkt/WKTFormatTest.java
      - copied unchanged from r1627546, sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/io/wkt/WKTFormatTest.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/HardCoded.java
      - copied unchanged from r1627546, sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/HardCoded.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultTemporalCRSTest.java
      - copied unchanged from r1627546, sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultTemporalCRSTest.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/BiFunction.java
      - copied unchanged from r1627546, sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/BiFunction.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleExtent.java
      - copied unchanged from r1627546, sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleExtent.java
Removed:
    sis/trunk/core/sis-build-helper/src/main/javadoc/stylesheet.css
    sis/trunk/core/sis-metadata/src/main/javadoc/stylesheet.css
    sis/trunk/core/sis-referencing/src/main/javadoc/stylesheet.css
    sis/trunk/core/sis-utility/src/main/javadoc/stylesheet.css
Modified:
    sis/trunk/   (props changed)
    sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/internal/doclet/Doclet.java
    sis/trunk/core/sis-feature/src/test/java/org/apache/sis/feature/CustomAttribute.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_DateTypeCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_OnLineFunctionCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_PresentationFormCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_RoleCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DQ_EvaluationMethodTypeCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DS_AssociationTypeCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DS_InitiativeTypeCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_CellGeometryCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ClassificationCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_CoverageContentTypeCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_DatatypeCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_DimensionNameTypeCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_GeometricObjectTypeCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ImagingConditionCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_KeywordTypeCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MaintenanceFrequencyCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumFormatCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumNameCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_PixelOrientationCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ProgressCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_RestrictionCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ScopeCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_SpatialRepresentationTypeCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopicCategoryCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopologyLevelCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_BandDefinition.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ContextCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_GeometryTypeCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ObjectiveTypeCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_OperationTypeCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PolarizationOrientationCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PriorityCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_SequenceCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TransferFunctionTypeCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TriggerCode.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/WKTFormat.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/AbstractMetadata.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/StandardImplementation.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultBand.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultSampleDimension.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultExtent.java
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/io/wkt/FormatterTest.java
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataStandardTest.java
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/PrunerTest.java
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeNodeTest.java
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableFormatTest.java
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/ValueMapTest.java
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/CustomMetadataTest.java
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/HardCodedCitations.java
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/constraint/DefaultLegalConstraintsTest.java
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/identification/DefaultDataIdentificationTest.java
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CS_AxisDirection.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CS_RangeMeaning.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeographicCRS.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterDescriptorGroupTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/CRSTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/CommonCRSTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultCompoundCRSTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultGeographicCRSTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/HardCodedCRS.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultTemporalDatumTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/HardCodedDatum.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/CodeListAdapter.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/CodeListProxy.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/JDK8.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/util/CollectionsExt.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/setup/About.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/RangeSet.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTableFormat.java
    sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/mock/IdentifiedObjectMock.java
    sis/trunk/core/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.java
    sis/trunk/core/sis-utility/src/test/java/org/apache/sis/util/collection/RangeSetTest.java
    sis/trunk/pom.xml
    sis/trunk/profiles/sis-french-profile/src/test/java/org/apache/sis/internal/profile/fra/DirectReferenceSystemTest.java
    sis/trunk/profiles/sis-french-profile/src/test/resources/org/apache/sis/internal/profile/fra/DirectReferenceSystem.xml
    sis/trunk/src/main/javadoc/stylesheet.css
    sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/XMLStore.java

Propchange: sis/trunk/
------------------------------------------------------------------------------
  Merged /sis/branches/JDK8:r1626367-1627536
  Merged /sis/branches/JDK7:r1626368-1627538
  Merged /sis/branches/JDK6:r1626370-1627546

Modified: sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/internal/doclet/Doclet.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/internal/doclet/Doclet.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/internal/doclet/Doclet.java [UTF-8] (original)
+++ sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/internal/doclet/Doclet.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -25,6 +25,7 @@ import java.io.InputStreamReader;
 import java.io.OutputStreamWriter;
 import java.io.BufferedReader;
 import java.io.BufferedWriter;
+import java.io.FilenameFilter;
 import com.sun.javadoc.RootDoc;
 import com.sun.tools.doclets.formats.html.HtmlDoclet;
 
@@ -77,7 +78,10 @@ public final class Doclet extends HtmlDo
         }
         final boolean status = HtmlDoclet.start(new FilteredRootDoc(root, Arrays.copyOf(filteredOptions, n)));
         if (stylesheetFile != null && outputDirectory != null) try {
-            copyStylesheet(new File(stylesheetFile), new File(outputDirectory));
+            final File input  = new File(stylesheetFile);
+            final File output = new File(outputDirectory);
+            copyStylesheet(input, output);
+            copyResources(input.getParentFile(), output);
         } catch (IOException e) {
             root.printError(e.toString());
             return false;
@@ -145,4 +149,38 @@ public final class Doclet extends HtmlDo
             in.close();
         }
     }
+
+    /**
+     * Creates links to Javadoc resources in the top-level directory (not from "{@code doc-files}" subdirectories).
+     * While the Maven documentation said that the "{@code src/main/javadoc}" directory is copied by default, or a
+     * directory can be specified with {@code <javadocResourcesDirectory>}, I have been unable to make it work even
+     * with absolute paths.
+     *
+     * @param  inputFile        The directory containing resources.
+     * @param  outputDirectory  The directory where to copy the resource files.
+     * @throws IOException      If an error occurred while reading or writing.
+     */
+    private static void copyResources(final File inputDirectory, final File outputDirectory) throws IOException {
+        final File[] inputFiles = inputDirectory.listFiles(new FilenameFilter() {
+            @Override public boolean accept(final File dir, final String name) {
+                return !name.startsWith(".") &&
+                       !name.equals("overview.html") &&
+                       !name.equals("stylesheet.css");
+            }
+        });
+        final byte[] buffer = new byte[4096];
+        for (final File input : inputFiles) {
+            final FileInputStream  in  = new FileInputStream(input);
+            final FileOutputStream out = new FileOutputStream(new File(outputDirectory, input.getName()));
+            try {
+                int c;
+                while ((c = in.read(buffer)) >= 0) {
+                    out.write(buffer, 0, c);
+                }
+            } finally {
+                out.close();
+                in.close();
+            }
+        }
+    }
 }

Modified: sis/trunk/core/sis-feature/src/test/java/org/apache/sis/feature/CustomAttribute.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-feature/src/test/java/org/apache/sis/feature/CustomAttribute.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-feature/src/test/java/org/apache/sis/feature/CustomAttribute.java [UTF-8] (original)
+++ sis/trunk/core/sis-feature/src/test/java/org/apache/sis/feature/CustomAttribute.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -23,7 +23,7 @@ import org.apache.sis.metadata.iso.quali
 import org.apache.sis.util.iso.SimpleInternationalString;
 import org.apache.sis.referencing.NamedIdentifier;
 
-import static org.junit.Assert.*;
+import static java.util.Collections.singleton;
 
 
 /**
@@ -81,8 +81,8 @@ final strictfp class CustomAttribute<V> 
         final DefaultQuantitativeResult result  = new DefaultQuantitativeResult();
         result.setErrorStatistic(new SimpleInternationalString(ADDITIONAL_QUALITY_INFO));
         report.setMeasureIdentification(new NamedIdentifier(getName()));
-        assertTrue(report .getResults().add(result));
-        assertTrue(quality.getReports().add(report));
+        report .setResults(singleton(result));
+        quality.setReports(singleton(report));
         return quality;
     }
 }

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_DateTypeCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_DateTypeCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_DateTypeCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_DateTypeCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -48,6 +48,8 @@ public final class CI_DateTypeCode exten
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected CI_DateTypeCode wrap(CodeListProxy proxy) {
@@ -56,6 +58,8 @@ public final class CI_DateTypeCode exten
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<DateType> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_OnLineFunctionCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_OnLineFunctionCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_OnLineFunctionCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_OnLineFunctionCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -50,6 +50,8 @@ public final class CI_OnLineFunctionCode
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected CI_OnLineFunctionCode wrap(CodeListProxy proxy) {
@@ -58,6 +60,8 @@ public final class CI_OnLineFunctionCode
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<OnLineFunction> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_PresentationFormCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_PresentationFormCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_PresentationFormCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_PresentationFormCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -50,6 +50,8 @@ public final class CI_PresentationFormCo
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected CI_PresentationFormCode wrap(CodeListProxy proxy) {
@@ -58,6 +60,8 @@ public final class CI_PresentationFormCo
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<PresentationForm> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_RoleCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_RoleCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_RoleCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_RoleCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -48,6 +48,8 @@ public final class CI_RoleCode extends C
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected CI_RoleCode wrap(CodeListProxy proxy) {
@@ -56,6 +58,8 @@ public final class CI_RoleCode extends C
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<Role> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DQ_EvaluationMethodTypeCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DQ_EvaluationMethodTypeCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DQ_EvaluationMethodTypeCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DQ_EvaluationMethodTypeCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -50,6 +50,8 @@ public final class DQ_EvaluationMethodTy
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected DQ_EvaluationMethodTypeCode wrap(CodeListProxy proxy) {
@@ -58,6 +60,8 @@ public final class DQ_EvaluationMethodTy
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<EvaluationMethodType> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DS_AssociationTypeCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DS_AssociationTypeCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DS_AssociationTypeCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DS_AssociationTypeCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -48,6 +48,8 @@ public final class DS_AssociationTypeCod
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected DS_AssociationTypeCode wrap(CodeListProxy proxy) {
@@ -56,6 +58,8 @@ public final class DS_AssociationTypeCod
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<AssociationType> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DS_InitiativeTypeCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DS_InitiativeTypeCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DS_InitiativeTypeCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DS_InitiativeTypeCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -48,6 +48,8 @@ public final class DS_InitiativeTypeCode
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected DS_InitiativeTypeCode wrap(CodeListProxy proxy) {
@@ -56,6 +58,8 @@ public final class DS_InitiativeTypeCode
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<InitiativeType> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_CellGeometryCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_CellGeometryCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_CellGeometryCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_CellGeometryCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -48,6 +48,8 @@ public final class MD_CellGeometryCode e
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected MD_CellGeometryCode wrap(CodeListProxy proxy) {
@@ -56,6 +58,8 @@ public final class MD_CellGeometryCode e
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<CellGeometry> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ClassificationCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ClassificationCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ClassificationCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ClassificationCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -48,6 +48,8 @@ public final class MD_ClassificationCode
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected MD_ClassificationCode wrap(CodeListProxy proxy) {
@@ -56,6 +58,8 @@ public final class MD_ClassificationCode
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<Classification> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_CoverageContentTypeCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_CoverageContentTypeCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_CoverageContentTypeCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_CoverageContentTypeCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -50,6 +50,8 @@ public final class MD_CoverageContentTyp
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected MD_CoverageContentTypeCode wrap(CodeListProxy proxy) {
@@ -58,6 +60,8 @@ public final class MD_CoverageContentTyp
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<CoverageContentType> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_DatatypeCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_DatatypeCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_DatatypeCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_DatatypeCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -48,6 +48,8 @@ public final class MD_DatatypeCode exten
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected MD_DatatypeCode wrap(CodeListProxy proxy) {
@@ -56,6 +58,8 @@ public final class MD_DatatypeCode exten
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<Datatype> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_DimensionNameTypeCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_DimensionNameTypeCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_DimensionNameTypeCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_DimensionNameTypeCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -50,6 +50,8 @@ public final class MD_DimensionNameTypeC
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected MD_DimensionNameTypeCode wrap(CodeListProxy proxy) {
@@ -58,6 +60,8 @@ public final class MD_DimensionNameTypeC
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<DimensionNameType> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_GeometricObjectTypeCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_GeometricObjectTypeCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_GeometricObjectTypeCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_GeometricObjectTypeCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -50,6 +50,8 @@ public final class MD_GeometricObjectTyp
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected MD_GeometricObjectTypeCode wrap(CodeListProxy proxy) {
@@ -58,6 +60,8 @@ public final class MD_GeometricObjectTyp
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<GeometricObjectType> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ImagingConditionCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ImagingConditionCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ImagingConditionCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ImagingConditionCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -50,6 +50,8 @@ public final class MD_ImagingConditionCo
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected MD_ImagingConditionCode wrap(CodeListProxy proxy) {
@@ -58,6 +60,8 @@ public final class MD_ImagingConditionCo
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<ImagingCondition> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_KeywordTypeCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_KeywordTypeCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_KeywordTypeCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_KeywordTypeCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -48,6 +48,8 @@ public final class MD_KeywordTypeCode ex
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected MD_KeywordTypeCode wrap(CodeListProxy proxy) {
@@ -56,6 +58,8 @@ public final class MD_KeywordTypeCode ex
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<KeywordType> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MaintenanceFrequencyCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MaintenanceFrequencyCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MaintenanceFrequencyCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MaintenanceFrequencyCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -50,6 +50,8 @@ public final class MD_MaintenanceFrequen
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected MD_MaintenanceFrequencyCode wrap(CodeListProxy proxy) {
@@ -58,6 +60,8 @@ public final class MD_MaintenanceFrequen
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<MaintenanceFrequency> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumFormatCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumFormatCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumFormatCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumFormatCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -48,6 +48,8 @@ public final class MD_MediumFormatCode e
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected MD_MediumFormatCode wrap(CodeListProxy proxy) {
@@ -56,6 +58,8 @@ public final class MD_MediumFormatCode e
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<MediumFormat> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumNameCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumNameCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumNameCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumNameCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -48,6 +48,8 @@ public final class MD_MediumNameCode ext
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected MD_MediumNameCode wrap(CodeListProxy proxy) {
@@ -56,6 +58,8 @@ public final class MD_MediumNameCode ext
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<MediumName> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_PixelOrientationCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_PixelOrientationCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_PixelOrientationCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_PixelOrientationCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -50,6 +50,8 @@ public final class MD_PixelOrientationCo
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected MD_PixelOrientationCode wrap(CodeListProxy proxy) {
@@ -58,6 +60,8 @@ public final class MD_PixelOrientationCo
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<PixelOrientation> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ProgressCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ProgressCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ProgressCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ProgressCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -48,6 +48,8 @@ public final class MD_ProgressCode exten
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected MD_ProgressCode wrap(CodeListProxy proxy) {
@@ -56,6 +58,8 @@ public final class MD_ProgressCode exten
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<Progress> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_RestrictionCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_RestrictionCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_RestrictionCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_RestrictionCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -54,7 +54,7 @@ public final class MD_RestrictionCode ex
      * marshalling shall use the previous spelling until XML schema are updated.</p>
      *
      * @param proxy The proxy version of {@link CodeList}, to be marshalled.
-     * @return The adapter that wraps the proxy value.
+     * @return The wrapper for the code list value.
      */
     @Override
     protected MD_RestrictionCode wrap(CodeListProxy proxy) {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ScopeCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ScopeCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ScopeCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ScopeCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -48,6 +48,8 @@ public final class MD_ScopeCode extends 
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected MD_ScopeCode wrap(CodeListProxy proxy) {
@@ -56,6 +58,8 @@ public final class MD_ScopeCode extends 
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<ScopeCode> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_SpatialRepresentationTypeCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_SpatialRepresentationTypeCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_SpatialRepresentationTypeCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_SpatialRepresentationTypeCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -50,6 +50,8 @@ public final class MD_SpatialRepresentat
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected MD_SpatialRepresentationTypeCode wrap(CodeListProxy proxy) {
@@ -58,6 +60,8 @@ public final class MD_SpatialRepresentat
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<SpatialRepresentationType> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopicCategoryCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopicCategoryCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopicCategoryCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopicCategoryCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -50,6 +50,8 @@ public final class MD_TopicCategoryCode 
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected MD_TopicCategoryCode wrap(CodeListProxy proxy) {
@@ -58,6 +60,8 @@ public final class MD_TopicCategoryCode 
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<TopicCategory> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopologyLevelCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopologyLevelCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopologyLevelCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopologyLevelCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -48,6 +48,8 @@ public final class MD_TopologyLevelCode 
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected MD_TopologyLevelCode wrap(CodeListProxy proxy) {
@@ -56,6 +58,8 @@ public final class MD_TopologyLevelCode 
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<TopologyLevel> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_BandDefinition.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_BandDefinition.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_BandDefinition.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_BandDefinition.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -49,6 +49,8 @@ public final class MI_BandDefinition ext
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected MI_BandDefinition wrap(CodeListProxy proxy) {
@@ -57,6 +59,8 @@ public final class MI_BandDefinition ext
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<BandDefinition> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ContextCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ContextCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ContextCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ContextCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -49,6 +49,8 @@ public final class MI_ContextCode extend
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected MI_ContextCode wrap(CodeListProxy proxy) {
@@ -57,6 +59,8 @@ public final class MI_ContextCode extend
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<Context> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_GeometryTypeCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_GeometryTypeCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_GeometryTypeCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_GeometryTypeCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -49,6 +49,8 @@ public final class MI_GeometryTypeCode e
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected MI_GeometryTypeCode wrap(CodeListProxy proxy) {
@@ -57,6 +59,8 @@ public final class MI_GeometryTypeCode e
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<GeometryType> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ObjectiveTypeCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ObjectiveTypeCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ObjectiveTypeCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ObjectiveTypeCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -49,6 +49,8 @@ public final class MI_ObjectiveTypeCode 
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected MI_ObjectiveTypeCode wrap(CodeListProxy proxy) {
@@ -57,6 +59,8 @@ public final class MI_ObjectiveTypeCode 
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<ObjectiveType> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_OperationTypeCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_OperationTypeCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_OperationTypeCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_OperationTypeCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -49,6 +49,8 @@ public final class MI_OperationTypeCode 
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected MI_OperationTypeCode wrap(CodeListProxy proxy) {
@@ -57,6 +59,8 @@ public final class MI_OperationTypeCode 
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<OperationType> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PolarizationOrientationCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PolarizationOrientationCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PolarizationOrientationCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PolarizationOrientationCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -52,6 +52,8 @@ public final class MI_PolarizationOrient
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected MI_PolarizationOrientationCode wrap(CodeListProxy proxy) {
@@ -60,6 +62,8 @@ public final class MI_PolarizationOrient
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<PolarizationOrientation> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PriorityCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PriorityCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PriorityCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PriorityCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -49,6 +49,8 @@ public final class MI_PriorityCode exten
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected MI_PriorityCode wrap(CodeListProxy proxy) {
@@ -57,6 +59,8 @@ public final class MI_PriorityCode exten
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<Priority> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_SequenceCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_SequenceCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_SequenceCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_SequenceCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -49,6 +49,8 @@ public final class MI_SequenceCode exten
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected MI_SequenceCode wrap(CodeListProxy proxy) {
@@ -57,6 +59,8 @@ public final class MI_SequenceCode exten
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<Sequence> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TransferFunctionTypeCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TransferFunctionTypeCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TransferFunctionTypeCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TransferFunctionTypeCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -51,6 +51,8 @@ public final class MI_TransferFunctionTy
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected MI_TransferFunctionTypeCode wrap(CodeListProxy proxy) {
@@ -59,6 +61,8 @@ public final class MI_TransferFunctionTy
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<TransferFunctionType> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TriggerCode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TriggerCode.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TriggerCode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TriggerCode.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -49,6 +49,8 @@ public final class MI_TriggerCode extend
 
     /**
      * {@inheritDoc}
+     *
+     * @return The wrapper for the code list value.
      */
     @Override
     protected MI_TriggerCode wrap(CodeListProxy proxy) {
@@ -57,6 +59,8 @@ public final class MI_TriggerCode extend
 
     /**
      * {@inheritDoc}
+     *
+     * @return The code list class.
      */
     @Override
     protected Class<Trigger> getCodeListClass() {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -23,6 +23,7 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Locale;
+import java.util.TimeZone;
 import java.util.Date;
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
@@ -39,6 +40,8 @@ import javax.measure.quantity.Quantity;
 import org.opengis.util.InternationalString;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.metadata.extent.Extent;
+import org.opengis.metadata.extent.VerticalExtent;
+import org.opengis.metadata.extent.TemporalExtent;
 import org.opengis.metadata.extent.GeographicBoundingBox;
 import org.opengis.parameter.GeneralParameterDescriptor;
 import org.opengis.referencing.IdentifiedObject;
@@ -62,6 +65,7 @@ import org.apache.sis.util.CharSequences
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.internal.util.Citations;
+import org.apache.sis.internal.simple.SimpleExtent;
 import org.apache.sis.internal.metadata.ReferencingServices;
 import org.apache.sis.measure.Range;
 import org.apache.sis.measure.MeasurementRange;
@@ -84,8 +88,8 @@ import org.apache.sis.metadata.iso.exten
  * </ul>
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
- * @since   0.5 (derived from geotk-2.0)
- * @version 0.4
+ * @since   0.4 (derived from geotk-2.0)
+ * @version 0.5
  * @module
  */
 public class Formatter implements Localized {
@@ -99,7 +103,13 @@ public class Formatter implements Locali
      * Maximal accuracy of vertical extents, in number of fraction digits.
      * The value used here is arbitrary and may change in any future SIS version.
      */
-    private static final int VERTICAL_ACCURACY = 3;
+    private static final int VERTICAL_ACCURACY = 9;
+
+    /**
+     * The time span threshold for switching between the {@code "yyyy-MM-dd'T'HH:mm:ss.SX"}
+     * and {@code "yyyy-MM-dd"} date pattern when formatting a temporal extent.
+     */
+    private static final long TEMPORAL_THRESHOLD = 24 * 60 * 60 * 1000L;
 
     /**
      * The value of {@code X364.FOREGROUND_DEFAULT.sequence()}, hard-coded for avoiding
@@ -315,9 +325,10 @@ public class Formatter implements Locali
         this.lineSeparator = this.symbols.lineSeparator();
         this.indentation   = (byte) indentation;
         this.numberFormat  = symbols.createNumberFormat();
-        this.dateFormat    = new SimpleDateFormat(WKTFormat.DATE_PATTERN, symbols.getLocale());
+        this.dateFormat    = new SimpleDateFormat(WKTFormat.DATE_PATTERN + "'Z'", symbols.getLocale());
         this.unitFormat    = UnitFormat.getInstance(symbols.getLocale());
         this.buffer        = new StringBuffer();
+        dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
     }
 
     /**
@@ -723,32 +734,8 @@ public class Formatter implements Locali
         if (area != null) {
             appendOnNewLine("Area", area.getDescription(), ElementKind.EXTENT);
             append(Extents.getGeographicBoundingBox(area), BBOX_ACCURACY);
-            final MeasurementRange<Double> range = Extents.getVerticalRange(area);
-            if (range != null) {
-                openElement(true, "VerticalExtent");
-                setColor(ElementKind.EXTENT);
-                numberFormat.setMinimumFractionDigits(0);
-                numberFormat.setMaximumFractionDigits(VERTICAL_ACCURACY);
-                numberFormat.setRoundingMode(RoundingMode.FLOOR);
-                appendPreset(range.getMinDouble());
-                numberFormat.setRoundingMode(RoundingMode.CEILING);
-                appendPreset(range.getMaxDouble());
-                final Unit<?> unit = range.unit();
-                if (!convention.isSimplified() || !SI.METRE.equals(unit)) {
-                    append(unit); // Unit are optional if they are metres.
-                }
-                resetColor();
-                closeElement(true);
-            }
-            final Range<Date> timeRange = Extents.getTimeRange(area);
-            if (timeRange != null) {
-                openElement(true, "TimeExtent");
-                setColor(ElementKind.EXTENT);
-                append(timeRange.getMinValue());
-                append(timeRange.getMaxValue());
-                resetColor();
-                closeElement(true);
-            }
+            appendVerticalExtent(Extents.getVerticalRange(area));
+            appendTemporalExtent(Extents.getTimeRange(area));
         }
     }
 
@@ -784,6 +771,82 @@ public class Formatter implements Locali
     }
 
     /**
+     * Appends the given vertical extent, if non-null.
+     * This method chooses an accuracy from the vertical span.
+     * Examples:
+     *
+     * <ul>
+     *   <li>“{@code VerticalExtent[102, 108, LengthUnit["m", 1]]}”       (Δz =   6)</li>
+     *   <li>“{@code VerticalExtent[100.2, 100.8, LengthUnit["m", 1]]}”   (Δz = 0.6)</li>
+     * </ul>
+     */
+    private void appendVerticalExtent(final MeasurementRange<Double> range) {
+        if (range != null) {
+            final double min = range.getMinDouble();
+            final double max = range.getMaxDouble();
+            int minimumFractionDigits = Math.max(0, DecimalFunctions.fractionDigitsForDelta(max - min, false));
+            int maximumFractionDigits = minimumFractionDigits + 2; // Arbitrarily allow 2 more digits.
+            if (maximumFractionDigits > VERTICAL_ACCURACY) {
+                maximumFractionDigits = VERTICAL_ACCURACY;
+                minimumFractionDigits = 0;
+            }
+            openElement(true, "VerticalExtent");
+            setColor(ElementKind.EXTENT);
+            numberFormat.setMinimumFractionDigits(minimumFractionDigits);
+            numberFormat.setMaximumFractionDigits(maximumFractionDigits);
+            numberFormat.setRoundingMode(RoundingMode.FLOOR);   appendPreset(min);
+            numberFormat.setRoundingMode(RoundingMode.CEILING); appendPreset(max);
+            final Unit<?> unit = range.unit();
+            if (!convention.isSimplified() || !SI.METRE.equals(unit)) {
+                append(unit); // Unit are optional if they are metres.
+            }
+            resetColor();
+            closeElement(true);
+        }
+    }
+
+    /**
+     * Appends the given temporal extents, if non-null.
+     * This method uses a simplified format if the time span is large enough.
+     * Examples:
+     *
+     * <ul>
+     *   <li>“{@code TemporalExtent[1980-04-12, 1980-04-18]}” (Δt = 6 days)</li>
+     *   <li>“{@code TemporalExtent[1980-04-12T18:00:00.0Z, 1980-04-12T21:00:00.0Z]}” (Δt = 3 hours)</li>
+     * </ul>
+     */
+    private void appendTemporalExtent(final Range<Date> range) {
+        if (range != null) {
+            final Date min = range.getMinValue();
+            final Date max = range.getMaxValue();
+            if (min != null && max != null) {
+                String pattern = null;
+                if (dateFormat instanceof SimpleDateFormat && (max.getTime() - min.getTime()) >= TEMPORAL_THRESHOLD) {
+                    final String p = ((SimpleDateFormat) dateFormat).toPattern();
+                    if (p.length() > WKTFormat.SHORT_DATE_PATTERN.length() &&
+                        p.startsWith(WKTFormat.SHORT_DATE_PATTERN))
+                    {
+                        pattern = p;
+                        ((SimpleDateFormat) dateFormat).applyPattern(WKTFormat.SHORT_DATE_PATTERN);
+                    }
+                }
+                openElement(true, "TimeExtent");
+                setColor(ElementKind.EXTENT);
+                try {
+                    append(min);
+                    append(max);
+                } finally {
+                    if (pattern != null) {
+                        ((SimpleDateFormat) dateFormat).applyPattern(pattern);
+                    }
+                }
+                resetColor();
+                closeElement(true);
+            }
+        }
+    }
+
+    /**
      * Appends the given math transform, typically (but not necessarily) in a {@code PARAM_MT[…]} element.
      *
      * @param transform The transform object to append to the WKT, or {@code null} if none.
@@ -1165,11 +1228,17 @@ public class Formatter implements Locali
         } else if (value instanceof IdentifiedObject) {
             append(ReferencingServices.getInstance().toFormattableObject((IdentifiedObject) value));
         }
-        else if (value instanceof GeographicBoundingBox) append((GeographicBoundingBox) value, BBOX_ACCURACY);
         else if (value instanceof MathTransform)         append((MathTransform)         value);
         else if (value instanceof Matrix)                append((Matrix)                value);
         else if (value instanceof Unit<?>)               append((Unit<?>)               value);
-        else return false;
+        else if (value instanceof GeographicBoundingBox) append((GeographicBoundingBox) value, BBOX_ACCURACY);
+        else if (value instanceof VerticalExtent) {
+            appendVerticalExtent(Extents.getVerticalRange(new SimpleExtent(null, (VerticalExtent) value, null)));
+        } else if (value instanceof TemporalExtent) {
+            appendTemporalExtent(Extents.getTimeRange(new SimpleExtent(null, null, (TemporalExtent) value)));
+        } else {
+            return false;
+        }
         return true;
     }
 

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/WKTFormat.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/WKTFormat.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/WKTFormat.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/WKTFormat.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -101,9 +101,22 @@ public class WKTFormat extends CompoundF
     /**
      * The pattern of dates.
      *
+     * The JDK7 branch have a 'X' pattern at the end of this format. But JDK6 does not support that pattern.
+     * As a workaround, code using this pattern will append a hard-coded {@code "'Z'"} if the timezone is
+     * known to be UTC.
+     *
      * @see #createFormat(Class)
      */
-    static final String DATE_PATTERN = "yyyy-MM-dd";
+    static final String DATE_PATTERN = "yyyy-MM-dd'T'HH:mm:ss.S";
+
+    /**
+     * Short version of {@link #DATE_PATTERN}, to be used when formatting temporal extents
+     * if the duration is at least {@link Formatter#TEMPORAL_THRESHOLD}. This pattern must
+     * be a prefix of {@link #DATE_PATTERN}, since we will use that condition for deciding
+     * if this pattern is really shorter (the user could have created his own date format
+     * with a different pattern).
+     */
+    static final String SHORT_DATE_PATTERN = "yyyy-MM-dd";
 
     /**
      * The symbols to use for this formatter.
@@ -368,9 +381,12 @@ public class WKTFormat extends CompoundF
     /**
      * Formats the specified object as a Well Know Text. The formatter accepts at least the following types:
      * {@link FormattableObject}, {@link IdentifiedObject},
-     * {@link org.opengis.metadata.extent.GeographicBoundingBox},
      * {@link org.opengis.referencing.operation.MathTransform},
-     * {@link org.opengis.referencing.operation.Matrix} and {@link Unit}.
+     * {@link org.opengis.referencing.operation.Matrix}
+     * {@link org.opengis.metadata.extent.GeographicBoundingBox},
+     * {@link org.opengis.metadata.extent.VerticalExtent},
+     * {@link org.opengis.metadata.extent.TemporalExtent}
+     * and {@link Unit}.
      *
      * @param  object     The object to format.
      * @param  toAppendTo Where the text is to be appended.
@@ -438,8 +454,10 @@ public class WKTFormat extends CompoundF
             return symbols.createNumberFormat();
         }
         if (valueType == Date.class) {
-            final DateFormat format = new SimpleDateFormat(DATE_PATTERN, symbols.getLocale());
-            format.setTimeZone(getTimeZone());
+            final TimeZone timezone = getTimeZone();
+            final DateFormat format = new SimpleDateFormat("UTC".equals(timezone.getID()) ?
+                    DATE_PATTERN + "'Z'" : DATE_PATTERN, symbols.getLocale());
+            format.setTimeZone(timezone);
             return format;
         }
         return super.createFormat(valueType);

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/AbstractMetadata.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/AbstractMetadata.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/AbstractMetadata.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/AbstractMetadata.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -279,24 +279,7 @@ public abstract class AbstractMetadata i
      */
     @Override
     public boolean equals(final Object object, final ComparisonMode mode) {
-        if (object == this) {
-            return true;
-        }
-        if (object == null) {
-            return false;
-        }
-        if (mode == ComparisonMode.STRICT) {
-            if (object.getClass() != getClass()) {
-                return false;
-            }
-        }
-        final MetadataStandard standard = getStandard();
-        if (mode != ComparisonMode.STRICT) {
-            if (!getInterface().isInstance(object)) {
-                return false;
-            }
-        }
-        return standard.equals(this, object, mode);
+        return getStandard().equals(this, object, mode);
     }
 
     /**

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java?rev=1627555&r1=1627554&r2=1627555&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java [UTF-8] Thu Sep 25 14:55:49 2014
@@ -18,10 +18,11 @@ package org.apache.sis.metadata;
 
 import java.util.Set;
 import java.util.Map;
-import java.util.IdentityHashMap;
 import java.util.LinkedHashSet;
 import java.util.Collection;
 import java.util.Iterator;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.ConcurrentHashMap;
 import java.io.IOException;
 import java.io.Serializable;
 import java.io.ObjectInputStream;
@@ -40,6 +41,11 @@ import org.apache.sis.internal.system.Sy
 import org.apache.sis.internal.simple.SimpleCitation;
 
 import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
+import static org.apache.sis.util.ArgumentChecks.ensureNonNullElement;
+
+// Branch-specific imports
+import org.apache.sis.internal.jdk8.JDK8;
+import org.apache.sis.internal.jdk8.BiFunction;
 
 
 /**
@@ -137,10 +143,10 @@ public class MetadataStandard implements
         final String[] acronyms = {"CoordinateSystem", "CS", "CoordinateReferenceSystem", "CRS"};
 
         // If new StandardImplementation instances are added below, please update StandardImplementation.readResolve().
-        ISO_19111 = new StandardImplementation("ISO 19111", "org.opengis.referencing.", "org.apache.sis.referencing.", prefix, acronyms);
-        ISO_19115 = new StandardImplementation("ISO 19115", "org.opengis.metadata.", "org.apache.sis.metadata.iso.", prefix, null);
-        ISO_19119 = new MetadataStandard      ("ISO 19119", "org.opengis.service.");
-        ISO_19123 = new MetadataStandard      ("ISO 19123", "org.opengis.coverage.");
+        ISO_19115 = new StandardImplementation("ISO 19115", "org.opengis.metadata.", "org.apache.sis.metadata.iso.", prefix, null, null);
+        ISO_19111 = new StandardImplementation("ISO 19111", "org.opengis.referencing.", "org.apache.sis.referencing.", prefix, acronyms, new MetadataStandard[] {ISO_19115});
+        ISO_19119 = new MetadataStandard      ("ISO 19119", "org.opengis.service.", ISO_19111.dependencies);
+        ISO_19123 = new MetadataStandard      ("ISO 19123", "org.opengis.coverage.", new MetadataStandard[] {ISO_19111});
         INSTANCES = new MetadataStandard[] {
             ISO_19111,
             ISO_19115,
@@ -162,37 +168,54 @@ public class MetadataStandard implements
     final Citation citation;
 
     /**
-     * The root packages for metadata interfaces. Must have a trailing {@code '.'}.
+     * The root package for metadata interfaces. Must have a trailing {@code '.'}.
      */
     final String interfacePackage;
 
     /**
+     * The dependencies, or {@code null} if none.
+     *
+     * Note: the {@code null} value is for serialization compatibility.
+     */
+    private final MetadataStandard[] dependencies;
+
+    /**
      * Accessors for the specified implementations.
      * The only legal value types are:
      *
      * <ul>
-     *   <li>{@link Class} if we have determined the standard interface for a given type
-     *       but did not yet created the {@link PropertyAccessor} for it.</li>
+     *   <li>{@link MetadataStandard} if type is handled by {@linkplain #dependencies} rather than this standard.</li>
+     *   <li>{@link Class} if we found the interface for the type but did not yet created the {@link PropertyAccessor}.</li>
      *   <li>{@link PropertyAccessor} otherwise.</li>
      * </ul>
      */
-    private final transient Map<Class<?>, Object> accessors; // written by reflection on deserialization.
+    private final transient ConcurrentMap<Class<?>, Object> accessors; // written by reflection on deserialization.
 
     /**
      * Creates a new instance working on implementation of interfaces defined in the specified package.
      *
-     * <p><b>Example:</b>: For the ISO 19115 standard reflected by GeoAPI interfaces,
-     * {@code interfacePackage} shall be the {@link org.opengis.metadata} package.</p>
+     * <div class="note"><b>Example:</b>: For the ISO 19115 standard reflected by GeoAPI interfaces,
+     * {@code interfacePackage} shall be the {@link org.opengis.metadata} package.</div>
      *
      * @param citation         Bibliographical reference to the international standard.
      * @param interfacePackage The root package for metadata interfaces.
+     * @param dependencies     The dependencies to other metadata standards.
      */
-    public MetadataStandard(final Citation citation, final Package interfacePackage) {
-        ensureNonNull("citation", citation);
+    public MetadataStandard(final Citation citation, final Package interfacePackage, MetadataStandard... dependencies) {
+        ensureNonNull("citation",         citation);
         ensureNonNull("interfacePackage", interfacePackage);
+        ensureNonNull("dependencies",     dependencies);
         this.citation         = citation;
         this.interfacePackage = interfacePackage.getName() + '.';
-        this.accessors        = new IdentityHashMap<Class<?>,Object>(); // Also defined in readObject(…)
+        this.accessors        = new ConcurrentHashMap<Class<?>,Object>(); // Also defined in readObject(…)
+        if (dependencies.length == 0) {
+            this.dependencies = null;
+        } else {
+            this.dependencies = dependencies = dependencies.clone();
+            for (int i=0; i<dependencies.length; i++) {
+                ensureNonNullElement("dependencies", i, dependencies[i]);
+            }
+        }
     }
 
     /**
@@ -201,11 +224,25 @@ public class MetadataStandard implements
      *
      * @param citation         Bibliographical reference to the international standard.
      * @param interfacePackage The root package for metadata interfaces.
+     * @param dependencies     The dependencies to other metadata standards, or {@code null} if none.
      */
-    MetadataStandard(final String citation, final String interfacePackage) {
+    MetadataStandard(final String citation, final String interfacePackage, final MetadataStandard[] dependencies) {
         this.citation         = new SimpleCitation(citation);
         this.interfacePackage = interfacePackage;
-        this.accessors        = new IdentityHashMap<Class<?>,Object>();
+        this.accessors        = new ConcurrentHashMap<Class<?>,Object>();
+        this.dependencies     = dependencies; // No clone, since this constructor is for internal use only.
+    }
+
+    /**
+     * Returns {@code true} if class or interface of the given name is supported by this standard.
+     * This method verifies if the class is a member of the package given at construction time or
+     * a sub-package. This method does not verify if the type is supported by a dependency.
+     *
+     * @param  classname The name of the type to verify.
+     * @return {@code true} if the given type is supported by this standard.
+     */
+    final boolean isSupported(final String classname) {
+        return classname.startsWith(interfacePackage);
     }
 
     /**
@@ -221,16 +258,16 @@ public class MetadataStandard implements
      * @return The metadata standard for the given type, or {@code null} if not found.
      */
     public static MetadataStandard forClass(final Class<?> type) {
-        String name = type.getName();
+        String classname = type.getName();
         for (final MetadataStandard candidate : INSTANCES) {
-            if (name.startsWith(candidate.interfacePackage)) {
+            if (candidate.isSupported(classname)) {
                 return candidate;
             }
         }
         for (final Class<?> interf : Classes.getAllInterfaces(type)) {
-            name = interf.getName();
+            classname = interf.getName();
             for (final MetadataStandard candidate : INSTANCES) {
-                if (name.startsWith(candidate.interfacePackage)) {
+                if (candidate.isSupported(classname)) {
                     return candidate;
                 }
             }
@@ -244,9 +281,7 @@ public class MetadataStandard implements
      */
     static void clearCache() {
         for (final MetadataStandard standard : INSTANCES) {
-            synchronized (standard.accessors) {
-                standard.accessors.clear();
-            }
+            standard.accessors.clear();
         }
     }
 
@@ -280,48 +315,77 @@ public class MetadataStandard implements
      *         of the expected package and {@code mandatory} is {@code true}.
      */
     final PropertyAccessor getAccessor(final Class<?> implementation, final boolean mandatory) {
-        synchronized (accessors) {
-            // Check for previously created accessors.
-            final Object value = accessors.get(implementation);
-            if (value instanceof PropertyAccessor) {
-                return (PropertyAccessor) value;
-            }
-            // Check if we started some computation that we can finish.
-            final Class<?> type;
-            if (value != null) {
-                type = (Class<?>) value;
-            } else {
-                // Nothing were computed. Try to compute now.
-                type = findInterface(implementation);
-                if (type == null) {
-                    if (mandatory) {
-                        throw new ClassCastException(Errors.format(Errors.Keys.UnknownType_1, implementation));
+        /*
+         * Check for accessors created by previous call to this method.
+         * Values are added to this cache but never cleared.
+         */
+        final Object value = accessors.get(implementation);
+        if (value instanceof PropertyAccessor) {
+            return (PropertyAccessor) value;
+        }
+        /*
+         * Check if we started some computation that we can finish. A partial computation exists
+         * when we already found the Class<?> for the interface, but didn't created the accessor.
+         */
+        final Class<?> type;
+        if (value instanceof Class<?>) {
+            type = (Class<?>) value; // Stored result of previous call to findInterface(…).
+            assert type == findInterface(implementation) : implementation;
+        } else {
+            /*
+             * Nothing was computed, we need to start from scratch. The first step is to find
+             * the interface implemented by the given class. If we can not find an interface,
+             * we will delegate to the dependencies and store the result for avoiding redoing
+             * this search next time.
+             */
+            type = findInterface(implementation);
+            if (type == null) {
+                if (dependencies != null) {
+                    for (final MetadataStandard dependency : dependencies) {
+                        final PropertyAccessor accessor = dependency.getAccessor(implementation, false);
+                        if (accessor != null) {
+                            accessors.put(implementation, accessor); // Ok to overwrite existing instance here.
+                            return accessor;
+                        }
                     }
-                    return null;
                 }
+                if (mandatory) {
+                    throw new ClassCastException(Errors.format(Errors.Keys.UnknownType_1, implementation));
+                }
+                return null;
             }
-            final PropertyAccessor accessor;
-            if (SpecialCases.isSpecialCase(type)) {
-                accessor = new SpecialCases(citation, type, implementation);
-            } else {
-                /*
-                 * If "multi-value returns" was allowed in the Java language, the 'onlyUML' boolean would
-                 * be returned by 'findInterface(Class)' method when it falls in the special case for the
-                 * UML annotation on implementation class. But since we do not have multi-values, we have
-                 * to infer it from our knownledge of how 'findInterface(Class)' is implemented.
-                 */
-                final boolean onlyUML = (type == implementation && !type.isInterface());
-                accessor = new PropertyAccessor(citation, type, implementation, onlyUML);
-            }
-            accessors.put(implementation, accessor);
-            return accessor;
         }
+        /*
+         * Found the interface for which to create an accessor. Creates the accessor now, unless an accessor
+         * has been created concurrently in another thread in which case the later will be returned.
+         */
+        return (PropertyAccessor) JDK8.compute(accessors, implementation, new BiFunction<Class<?>, Object, Object>() {
+            @Override public Object apply(final Class<?> k, final Object v) {
+                if (v instanceof PropertyAccessor) {
+                    return v;
+                }
+                final PropertyAccessor accessor;
+                if (SpecialCases.isSpecialCase(type)) {
+                    accessor = new SpecialCases(citation, type, implementation);
+                } else {
+                    /*
+                     * If "multi-value returns" was allowed in the Java language, the 'onlyUML' boolean would
+                     * be returned by 'findInterface(Class)' method when it falls in the special case for the
+                     * UML annotation on implementation class. But since we do not have multi-values, we have
+                     * to infer it from our knownledge of how 'findInterface(Class)' is implemented.
+                     */
+                    final boolean onlyUML = (type == implementation && !type.isInterface());
+                    accessor = new PropertyAccessor(citation, type, implementation, onlyUML);
+                }
+                return accessor;
+            }
+        });
     }
 
     /**
-     * Returns {@code true} if the given type is assignable to a type from this standard.
-     * If this method returns {@code true}, then invoking {@link #getInterface(Class)} is
-     * guaranteed to succeed without throwing an exception.
+     * Returns {@code true} if the given type is assignable to a type from this standard or one of its dependencies.
+     * If this method returns {@code true}, then invoking {@link #getInterface(Class)} is guaranteed to succeed
+     * without throwing an exception.
      *
      * @param  type The implementation class (can be {@code null}).
      * @return {@code true} if the given class is an interface of this standard,
@@ -329,16 +393,27 @@ public class MetadataStandard implements
      */
     public boolean isMetadata(final Class<?> type) {
         if (type != null) {
-            synchronized (accessors) {
-                if (accessors.containsKey(type)) {
-                    return true;
-                }
-                final Class<?> standardType = findInterface(type);
-                if (standardType != null) {
-                    accessors.put(type, standardType);
-                    return true;
+            if (accessors.containsKey(type)) {
+                return true;
+            }
+            if (dependencies != null) {
+                for (final MetadataStandard dependency : dependencies) {
+                    if (dependency.isMetadata(type)) {
+                        accessors.putIfAbsent(type, dependency);
+                        return true;
+                    }
                 }
             }
+            /*
+             * At this point, all cached values (including those in dependencies) have been checked.
+             * Performs the 'findInterface' computation only in last resort. Current implementation
+             * does not store negative results in order to avoid filling the cache with unrelated classes.
+             */
+            final Class<?> standardType = findInterface(type);
+            if (standardType != null) {
+                accessors.putIfAbsent(type, standardType);
+                return true;
+            }
         }
         return false;
     }
@@ -360,13 +435,15 @@ public class MetadataStandard implements
      * Only one metadata interface can be implemented. If the given type is already
      * an interface from the standard, then it is returned directly.
      *
+     * <p>This method ignores dependencies. Fallback on metadata standard dependencies shall be done by the caller.</p>
+     *
      * @param  type The standard interface or the implementation class.
      * @return The single interface, or {@code null} if none where found.
      */
     private Class<?> findInterface(final Class<?> type) {
         if (type != null) {
             if (type.isInterface()) {
-                if (type.getName().startsWith(interfacePackage)) {
+                if (isSupported(type.getName())) {
                     return type;
                 }
             } else {
@@ -424,7 +501,7 @@ public class MetadataStandard implements
      */
     private void getInterfaces(final Class<?> type, final Collection<Class<?>> interfaces) {
         for (final Class<?> candidate : type.getInterfaces()) {
-            if (candidate.getName().startsWith(interfacePackage)) {
+            if (isSupported(candidate.getName())) {
                 interfaces.add(candidate);
             }
             getInterfaces(candidate, interfaces);
@@ -453,25 +530,32 @@ public class MetadataStandard implements
     @SuppressWarnings("unchecked")
     public <T> Class<? super T> getInterface(final Class<T> type) throws ClassCastException {
         ensureNonNull("type", type);
-        final Class<?> standard;
-        synchronized (accessors) {
-            final Object value = accessors.get(type);
-            if (value != null) {
-                if (value instanceof PropertyAccessor) {
-                    standard = ((PropertyAccessor) value).type;
-                } else {
-                    standard = (Class<?>) value;
-                }
+        final Class<?> interf;
+        final Object value = accessors.get(type);
+        if (value instanceof PropertyAccessor) {
+            interf = ((PropertyAccessor) value).type;
+        } else if (value instanceof Class<?>) {
+            interf = (Class<?>) value;
+        } else if (value instanceof MetadataStandard) {
+            interf = ((MetadataStandard) value).getInterface(type);
+        } else {
+            interf = findInterface(type);
+            if (interf != null) {
+                accessors.putIfAbsent(type, interf);
             } else {
-                standard = findInterface(type);
-                if (standard == null) {
-                    throw new ClassCastException(Errors.format(Errors.Keys.UnknownType_1, type));
+                if (dependencies != null) {
+                    for (final MetadataStandard dependency : dependencies) {
+                        if (dependency.isMetadata(type)) {
+                            accessors.putIfAbsent(type, dependency);
+                            return dependency.getInterface(type);
+                        }
+                    }
                 }
-                accessors.put(type, standard);
+                throw new ClassCastException(Errors.format(Errors.Keys.UnknownType_1, type));
             }
         }
-        assert standard.isAssignableFrom(type) : type;
-        return (Class<? super T>) standard;
+        assert interf.isAssignableFrom(type) : type;
+        return (Class<? super T>) interf;
     }
 
     /**
@@ -794,8 +878,17 @@ public class MetadataStandard implements
         if (metadata1 == null || metadata2 == null) {
             return false;
         }
-        final PropertyAccessor accessor = getAccessor(metadata1.getClass(), true);
-        if (accessor.type != findInterface(metadata2.getClass())) {
+        final Class<?> type1 = metadata1.getClass();
+        final Class<?> type2 = metadata2.getClass();
+        if (type1 != type2 && mode == ComparisonMode.STRICT) {
+            return false;
+        }
+        final PropertyAccessor accessor = getAccessor(type1, true);
+        if (type1 != type2 && (!accessor.type.isAssignableFrom(type2) || accessor.type != getAccessor(type2, false).type)) {
+            /*
+             * Note: the check for (accessor.type != getAccessor(…).type) would have been enough, but checking
+             * for isAssignableFrom(…) first can avoid the (relatively costly) creation of new PropertyAccessor.
+             */
             return false;
         }
         /*
@@ -864,11 +957,12 @@ public class MetadataStandard implements
      * Assigns an {@link IdentityHashMap} instance to the given field.
      * Used on deserialization only.
      */
+    @SuppressWarnings("rawtypes")
     final void setMapForField(final Class<?> classe, final String name) {
         try {
             final Field field = classe.getDeclaredField(name);
             field.setAccessible(true);
-            field.set(this, new IdentityHashMap());
+            field.set(this, new ConcurrentHashMap());
         } catch (Exception e) { // (ReflectiveOperationException) on JDK7 branch.
             throw new AssertionError(e); // Should never happen (tested by MetadataStandardTest).
         }



Mime
View raw message