sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1495611 [1/3] - in /sis/trunk: ./ core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/ core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/ core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/ c...
Date Fri, 21 Jun 2013 22:02:34 GMT
Author: desruisseaux
Date: Fri Jun 21 22:02:32 2013
New Revision: 1495611

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

Added:
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/PT_Locale.java
      - copied unchanged from r1495607, sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/PT_Locale.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/TM_PeriodDuration.java
      - copied, changed from r1495607, sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/TM_PeriodDuration.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/direct/
      - copied from r1495607, sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/direct/
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/ObjectPair.java
      - copied unchanged from r1495607, sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/ObjectPair.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/RecursivityGuard.java
      - copied unchanged from r1495607, sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/RecursivityGuard.java
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/AbstractMetadataTest.java
      - copied unchanged from r1495607, sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/AbstractMetadataTest.java
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableFormatTest.java
      - copied unchanged from r1495607, sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableFormatTest.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/geoapi/temporal/PeriodDuration.java   (with props)
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/XmlUtilities.java
      - copied unchanged from r1495607, sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/XmlUtilities.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/DateAsLongAdapter.java
      - copied unchanged from r1495607, sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/DateAsLongAdapter.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_DateTime.java
      - copied unchanged from r1495607, sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_DateTime.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Distance.java
      - copied unchanged from r1495607, sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Distance.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Measure.java
      - copied unchanged from r1495607, sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Measure.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/Measure.java
      - copied unchanged from r1495607, sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/Measure.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/UnitAdapter.java
      - copied unchanged from r1495607, sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/UnitAdapter.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/GO_URL.java
      - copied unchanged from r1495607, sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/GO_URL.java
    sis/trunk/core/sis-utility/src/test/java/org/apache/sis/internal/jaxb/XmlUtilitiesTest.java
      - copied unchanged from r1495607, sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/internal/jaxb/XmlUtilitiesTest.java
    sis/trunk/core/sis-utility/src/test/java/org/apache/sis/internal/jaxb/gco/
      - copied from r1495607, sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/internal/jaxb/gco/
    sis/trunk/core/sis-utility/src/test/java/org/apache/sis/util/logging/DummyLogger.java
      - copied unchanged from r1495607, sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/util/logging/DummyLogger.java
    sis/trunk/core/sis-utility/src/test/java/org/apache/sis/util/logging/LoggerAdapterTest.java
      - copied unchanged from r1495607, sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/util/logging/LoggerAdapterTest.java
    sis/trunk/core/sis-utility/src/test/java/org/apache/sis/xml/ReferenceResolverMock.java
      - copied unchanged from r1495607, sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/xml/ReferenceResolverMock.java
Modified:
    sis/trunk/   (props changed)
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/RS_ReferenceSystem.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/Pruner.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/TreeTableView.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultEvent.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultOperation.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultPlatform.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultPlatformPass.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultRequirement.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/package-info.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/package-info.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/package-info.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultResolution.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultProcessing.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/package-info.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultScopeDescription.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/package-info.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/package-info.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultDimension.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/ValueMapTest.java
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/geoapi/temporal/TemporalFactory.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/Context.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapWithSpecialCases.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/SpecializedIdentifier.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/InternationalStringConverter.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/ObjectReference.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/PropertyType.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/StringAdapter.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/jaxb/gmd/Country.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/LanguageCode.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/LocaleAdapter.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/TemporalUtilities.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/io/IO.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTableFormat.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/WarningListener.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.properties
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages_fr.properties
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/MarshalContext.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/Pooled.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/ReferenceResolver.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/XML.java
    sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java
    sis/trunk/core/sis-utility/src/test/java/org/apache/sis/util/logging/EmptyWarningListeners.java
    sis/trunk/core/sis-utility/src/test/java/org/apache/sis/util/logging/WarningListenersTest.java
    sis/trunk/ide-project/NetBeans/nbproject/project.properties
    sis/trunk/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/ChannelDataInputTest.java

Propchange: sis/trunk/
------------------------------------------------------------------------------
  Merged /sis/branches/JDK7:r1493761-1495602
  Merged /sis/branches/JDK6:r1493763-1495607

Copied: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/TM_PeriodDuration.java (from r1495607, sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/TM_PeriodDuration.java)
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/TM_PeriodDuration.java?p2=sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/TM_PeriodDuration.java&p1=sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/TM_PeriodDuration.java&r1=1495607&r2=1495611&rev=1495611&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/TM_PeriodDuration.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/TM_PeriodDuration.java [UTF-8] Fri Jun 21 22:02:32 2013
@@ -23,7 +23,7 @@ import javax.xml.datatype.DatatypeFactor
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.datatype.DatatypeConfigurationException;
 import org.opengis.temporal.PeriodDuration;
-import org.opengis.temporal.TemporalFactory;
+import org.apache.sis.internal.geoapi.temporal.TemporalFactory;
 import org.opengis.util.InternationalString;
 import org.apache.sis.internal.jaxb.Context;
 import org.apache.sis.internal.jaxb.XmlUtilities;
@@ -87,14 +87,15 @@ public final class TM_PeriodDuration ext
      */
     @XmlElement(name = "TM_PeriodDuration")
     public Duration getElement() {
-        if (!skip()) try {
+        if (!skip() && metadata instanceof org.apache.sis.internal.geoapi.temporal.PeriodDuration) try {
             /*
              * Get the DatatypeFactory first because if not available, then we don't need to parse
              * the calendar fields. This has the side effect of not validating the calendar fields
              * syntax (which should be integer values), but maybe this is what the user wants.
              */
             final DatatypeFactory factory = XmlUtilities.getDatatypeFactory();
-            final PeriodDuration metadata = this.metadata;
+            final org.apache.sis.internal.geoapi.temporal.PeriodDuration metadata =
+                    (org.apache.sis.internal.geoapi.temporal.PeriodDuration) this.metadata;
             InternationalString value;
             BigInteger years = null;
             if ((value = metadata.getYears()) != null) {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/RS_ReferenceSystem.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/RS_ReferenceSystem.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/RS_ReferenceSystem.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/RS_ReferenceSystem.java [UTF-8] Fri Jun 21 22:02:32 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/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=1495611&r1=1495610&r2=1495611&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] Fri Jun 21 22:02:32 2013
@@ -314,13 +314,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/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=1495611&r1=1495610&r2=1495611&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] Fri Jun 21 22:02:32 2013
@@ -434,7 +434,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 +746,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 +774,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/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/Pruner.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/Pruner.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/Pruner.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/Pruner.java [UTF-8] Fri Jun 21 22:02:32 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/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/StandardImplementation.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/StandardImplementation.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/StandardImplementation.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/StandardImplementation.java [UTF-8] Fri Jun 21 22:02:32 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/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeTableView.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeTableView.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeTableView.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeTableView.java [UTF-8] Fri Jun 21 22:02:32 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/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java [UTF-8] Fri Jun 21 22:02:32 2013
@@ -41,7 +41,7 @@ import org.opengis.metadata.maintenance.
 import org.opengis.metadata.quality.DataQuality;
 import org.opengis.metadata.spatial.SpatialRepresentation;
 import org.opengis.referencing.ReferenceSystem;
-//import org.apache.sis.internal.jaxb.gmd.PT_Locale; // TODO
+import org.apache.sis.internal.jaxb.code.PT_Locale;
 import org.apache.sis.internal.jaxb.Context;
 import org.apache.sis.xml.Namespaces;
 
@@ -362,7 +362,7 @@ public class DefaultMetadata extends ISO
      */
     @Override
     @XmlElement(name = "locale")
-//    @XmlJavaTypeAdapter(PT_Locale.class) // TODO
+    @XmlJavaTypeAdapter(PT_Locale.class)
     public Collection<Locale> getLocales() {
         return locales = nonNullCollection(locales, Locale.class);
     }

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java [UTF-8] Fri Jun 21 22:02:32 2013
@@ -104,20 +104,24 @@ public class ISOMetadata extends Modifia
     /**
      * {@inheritDoc}
      *
-     * <p>The default implementation returns a wrapper around the list returned by {@link #getIdentifiers()}.
+     * <p>The default implementation returns a wrapper around the {@link #identifiers} list.
      * That map is <cite>live</cite>: changes in the identifiers list will be reflected in the map,
      * and conversely.</p>
      */
     @Override
     public IdentifierMap getIdentifierMap() {
         /*
-         * We do not cache (for now) the IdentifierMap because it is cheap to create, and if were
-         * caching it we would need anyway to check if 'identifiers' still references the same list.
+         * Do not invoke getIdentifiers(), because some subclasses like DefaultCitation and
+         * DefaultObjective override getIdentifiers() in order to return a filtered list.
          */
-        final Collection<Identifier> identifiers = getIdentifiers();
+        identifiers = nonNullCollection(identifiers, Identifier.class);
         if (identifiers == null) {
             return IdentifierMapWithSpecialCases.EMPTY;
         }
+        /*
+         * We do not cache (for now) the IdentifierMap because it is cheap to create, and if were
+         * caching it we would need anyway to check if 'identifiers' still references the same list.
+         */
         return new IdentifierMapWithSpecialCases(identifiers);
     }
 }

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultEvent.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultEvent.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultEvent.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultEvent.java [UTF-8] Fri Jun 21 22:02:32 2013
@@ -115,7 +115,7 @@ public class DefaultEvent extends ISOMet
      */
     public DefaultEvent(final Event object) {
         super(object);
-        identifiers        = singleton(object.getIdentifier(), Identifier.class); // TODO
+        identifiers        = singleton(object.getIdentifier(), Identifier.class);
         trigger            = object.getTrigger();
         context            = object.getContext();
         sequence           = object.getSequence();

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultOperation.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultOperation.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultOperation.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultOperation.java [UTF-8] Fri Jun 21 22:02:32 2013
@@ -133,7 +133,7 @@ public class DefaultOperation extends IS
         super(object);
         description       = object.getDescription();
         citation          = object.getCitation();
-        identifiers       = singleton(object.getIdentifier(), Identifier.class); // TODO
+        identifiers       = singleton(object.getIdentifier(), Identifier.class);
         status            = object.getStatus();
         type              = object.getType();
         childOperations   = copyCollection(object.getChildOperations(), Operation.class);

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultPlatform.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultPlatform.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultPlatform.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultPlatform.java [UTF-8] Fri Jun 21 22:02:32 2013
@@ -91,7 +91,7 @@ public class DefaultPlatform extends ISO
     public DefaultPlatform(final Platform object) {
         super(object);
         citation    = object.getCitation();
-        identifiers = singleton(object.getIdentifier(), Identifier.class); // TODO
+        identifiers = singleton(object.getIdentifier(), Identifier.class);
         description = object.getDescription();
         sponsors    = copyCollection(object.getSponsors(), ResponsibleParty.class);
         instruments = copyCollection(object.getInstruments(), Instrument.class);

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultPlatformPass.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultPlatformPass.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultPlatformPass.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultPlatformPass.java [UTF-8] Fri Jun 21 22:02:32 2013
@@ -76,7 +76,7 @@ public class DefaultPlatformPass extends
      */
     public DefaultPlatformPass(final PlatformPass object) {
         super(object);
-        identifiers   = singleton(object.getIdentifier(), Identifier.class); // TODO
+        identifiers   = singleton(object.getIdentifier(), Identifier.class);
         extent        = object.getExtent();
         relatedEvents = copyCollection(object.getRelatedEvents(), Event.class);
     }

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultRequirement.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultRequirement.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultRequirement.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultRequirement.java [UTF-8] Fri Jun 21 22:02:32 2013
@@ -116,7 +116,7 @@ public class DefaultRequirement extends 
     public DefaultRequirement(final Requirement object) {
         super(object);
         citation       = object.getCitation();
-        identifiers    = singleton(object.getIdentifier(), Identifier.class); // TODO
+        identifiers    = singleton(object.getIdentifier(), Identifier.class);
         requestors     = copyCollection(object.getRequestors(), ResponsibleParty.class);
         recipients     = copyCollection(object.getRecipients(), ResponsibleParty.class);
         priority       = object.getPriority();

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/package-info.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/package-info.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/package-info.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/package-info.java [UTF-8] Fri Jun 21 22:02:32 2013
@@ -122,7 +122,7 @@
     @XmlJavaTypeAdapter(MI_TriggerCode.class),
 
     // Java types, primitive types and basic OGC types handling
-//  @XmlJavaTypeAdapter(GO_DateTime.class), // TODO
+    @XmlJavaTypeAdapter(GO_DateTime.class),
     @XmlJavaTypeAdapter(StringAdapter.class),
     @XmlJavaTypeAdapter(InternationalStringAdapter.class)
 })

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java [UTF-8] Fri Jun 21 22:02:32 2013
@@ -33,6 +33,7 @@ import org.apache.sis.util.iso.SimpleInt
 import org.apache.sis.internal.jaxb.NonMarshalledAuthority;
 import org.apache.sis.metadata.iso.ISOMetadata;
 import org.apache.sis.xml.IdentifierSpace;
+import org.apache.sis.xml.IdentifierMap;
 
 import static org.apache.sis.util.collection.Containers.isNullOrEmpty;
 import static org.apache.sis.internal.metadata.MetadataUtilities.toDate;
@@ -221,8 +222,13 @@ public class DefaultCitation extends ISO
         series                  = object.getSeries();
         otherCitationDetails    = object.getOtherCitationDetails();
         collectiveTitle         = object.getCollectiveTitle();
-// TODO ISBN                    = object.getISBN();
-// TODO ISSN                    = object.getISSN();
+        final String id1        = object.getISBN();
+        final String id2        = object.getISSN();
+        if (id1 != null || id2 != null) {
+            final IdentifierMap map = super.getIdentifierMap();
+            if (id1 != null) map.putSpecialized(ISBN, id1);
+            if (id2 != null) map.putSpecialized(ISSN, id2);
+        }
     }
 
     /**

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/package-info.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/package-info.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/package-info.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/package-info.java [UTF-8] Fri Jun 21 22:02:32 2013
@@ -111,8 +111,8 @@
     @XmlJavaTypeAdapter(MD_Identifier.class),
 
     // Java types, primitive types and basic OGC types handling
-//    @XmlJavaTypeAdapter(GO_URL.class), // TODO
-//    @XmlJavaTypeAdapter(GO_DateTime.class), // TODO
+    @XmlJavaTypeAdapter(GO_URL.class),
+    @XmlJavaTypeAdapter(GO_DateTime.class),
     @XmlJavaTypeAdapter(StringAdapter.class),
     @XmlJavaTypeAdapter(InternationalStringAdapter.class)
 })

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/package-info.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/package-info.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/package-info.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/package-info.java [UTF-8] Fri Jun 21 22:02:32 2013
@@ -106,7 +106,7 @@
     @XmlJavaTypeAdapter(MI_TransferFunctionTypeCode.class),
 
     // Java types, primitive types and basic OGC types handling
-//  @XmlJavaTypeAdapter(UnitAdapter.class), // TODO
+    @XmlJavaTypeAdapter(UnitAdapter.class),
     @XmlJavaTypeAdapter(LocaleAdapter.class),
     @XmlJavaTypeAdapter(InternationalStringAdapter.class),
     @XmlJavaTypeAdapter(GO_GenericName.class),

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java [UTF-8] Fri Jun 21 22:02:32 2013
@@ -91,10 +91,10 @@
     @XmlJavaTypeAdapter(MD_StandardOrderProcess.class),
 
     // Java types, primitive types and basic OGC types handling
-//  @XmlJavaTypeAdapter(UnitAdapter.class), // TODO
+    @XmlJavaTypeAdapter(UnitAdapter.class),
     @XmlJavaTypeAdapter(LocalNameAdapter.class),
     @XmlJavaTypeAdapter(InternationalStringAdapter.class),
-//  @XmlJavaTypeAdapter(GO_DateTime.class), // TODO
+    @XmlJavaTypeAdapter(GO_DateTime.class),
     @XmlJavaTypeAdapter(GO_Decimal.class), @XmlJavaTypeAdapter(type=double.class, value=GO_Decimal.class),
     @XmlJavaTypeAdapter(GO_Integer.class), @XmlJavaTypeAdapter(type=int.class,    value=GO_Integer.class)
 })

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultResolution.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultResolution.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultResolution.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultResolution.java [UTF-8] Fri Jun 21 22:02:32 2013
@@ -22,11 +22,11 @@ import javax.xml.bind.annotation.XmlRoot
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import org.opengis.metadata.identification.RepresentativeFraction;
 import org.opengis.metadata.identification.Resolution;
-// import org.apache.sis.internal.jaxb.gco.GO_Distance; // TODO
+import org.apache.sis.internal.jaxb.gco.GO_Distance;
+import org.apache.sis.internal.metadata.MetadataUtilities;
 import org.apache.sis.metadata.iso.ISOMetadata;
 import org.apache.sis.measure.ValueRange;
 import org.apache.sis.util.resources.Messages;
-import org.apache.sis.internal.metadata.MetadataUtilities;
 
 
 /**
@@ -46,10 +46,7 @@ import org.apache.sis.internal.metadata.
  * @version 0.3
  * @module
  */
-@XmlType(name = "MD_Resolution_Type", propOrder = {
-    "equivalentScale",
-// TODO    "distance"
-})
+@XmlType(name = "MD_Resolution_Type") // No need for propOrder since this structure is a union (see javadoc).
 @XmlRootElement(name = "MD_Resolution")
 public class DefaultResolution extends ISOMetadata implements Resolution {
     /**
@@ -169,8 +166,8 @@ public class DefaultResolution extends I
      */
     @Override
     @ValueRange(minimum=0, isMinIncluded=false)
-//    @XmlJavaTypeAdapter(GO_Distance.class) // TODO
-//    @XmlElement(name = "distance")
+    @XmlJavaTypeAdapter(GO_Distance.class)
+    @XmlElement(name = "distance")
     public Double getDistance() {
         return isDistance() ? (Double) scaleOrDistance : null;
     }

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java [UTF-8] Fri Jun 21 22:02:32 2013
@@ -122,7 +122,7 @@
     @XmlJavaTypeAdapter(LocaleAdapter.class),
     @XmlJavaTypeAdapter(StringAdapter.class),
     @XmlJavaTypeAdapter(InternationalStringAdapter.class),
-//  @XmlJavaTypeAdapter(GO_DateTime.class), TODO
+    @XmlJavaTypeAdapter(GO_DateTime.class),
     @XmlJavaTypeAdapter(GO_Decimal.class),        @XmlJavaTypeAdapter(type=double.class, value=GO_Decimal.class),
     @XmlJavaTypeAdapter(GO_Integer.AsLong.class), @XmlJavaTypeAdapter(type=long.class,   value=GO_Integer.AsLong.class)
 })

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultProcessing.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultProcessing.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultProcessing.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultProcessing.java [UTF-8] Fri Jun 21 22:02:32 2013
@@ -99,7 +99,7 @@ public class DefaultProcessing extends I
      */
     public DefaultProcessing(final Processing object) {
         super(object);
-        identifiers          = singleton(object.getIdentifier(), Identifier.class); // TODO
+        identifiers          = singleton(object.getIdentifier(), Identifier.class);
         softwareReferences   = copyCollection(object.getSoftwareReferences(), Citation.class);
         procedureDescription = object.getProcedureDescription();
         documentations       = copyCollection(object.getDocumentations(), Citation.class);

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/package-info.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/package-info.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/package-info.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/package-info.java [UTF-8] Fri Jun 21 22:02:32 2013
@@ -89,7 +89,7 @@
     @XmlJavaTypeAdapter(MD_RepresentativeFraction.class),
 
     // Java types, primitive types and basic OGC types handling
-//    @XmlJavaTypeAdapter(GO_DateTime.class), // TODO
+    @XmlJavaTypeAdapter(GO_DateTime.class),
     @XmlJavaTypeAdapter(InternationalStringAdapter.class)
 })
 package org.apache.sis.metadata.iso.lineage;

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java [UTF-8] Fri Jun 21 22:02:32 2013
@@ -48,7 +48,7 @@ import static org.apache.sis.internal.me
 @XmlType(name = "MD_MaintenanceInformation_Type", propOrder = {
     "maintenanceAndUpdateFrequency",
     "dateOfNextUpdate",
-// TODO    "userDefinedMaintenanceFrequency",
+    "userDefinedMaintenanceFrequency",
     "updateScopes",
     "updateScopeDescriptions",
     "maintenanceNotes",
@@ -205,11 +205,9 @@ public class DefaultMaintenanceInformati
 
     /**
      * Returns the maintenance period other than those defined.
-     *
-     * @todo needs an implementation of org.opengis.temporal modules to anntote this parameter.
      */
     @Override
-    // TODO @XmlElement(name = "userDefinedMaintenanceFrequency")
+    @XmlElement(name = "userDefinedMaintenanceFrequency")
     public PeriodDuration getUserDefinedMaintenanceFrequency() {
         return userDefinedMaintenanceFrequency;
     }

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultScopeDescription.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultScopeDescription.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultScopeDescription.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultScopeDescription.java [UTF-8] Fri Jun 21 22:02:32 2013
@@ -48,10 +48,7 @@ import static org.apache.sis.util.collec
  * @version 0.3
  * @module
  */
-@XmlType(name = "MD_ScopeDescription_Type", propOrder = {
-    "dataset",
-    "other"
-})
+@XmlType(name = "MD_ScopeDescription_Type") // No need for propOrder since this structure is a union (see javadoc).
 @XmlRootElement(name = "MD_ScopeDescription")
 public class DefaultScopeDescription extends ISOMetadata implements ScopeDescription {
     /**

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/package-info.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/package-info.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/package-info.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/package-info.java [UTF-8] Fri Jun 21 22:02:32 2013
@@ -75,10 +75,10 @@
     @XmlJavaTypeAdapter(MD_MaintenanceInformation.class),
     @XmlJavaTypeAdapter(MD_ScopeCode.class),
     @XmlJavaTypeAdapter(MD_ScopeDescription.class),
-//    @XmlJavaTypeAdapter(TM_PeriodDuration.class), // TODO
+    @XmlJavaTypeAdapter(TM_PeriodDuration.class),
 
     // Java types, primitive types and basic OGC types handling
-//    @XmlJavaTypeAdapter(GO_DateTime.class), // TODO
+    @XmlJavaTypeAdapter(GO_DateTime.class),
     @XmlJavaTypeAdapter(StringAdapter.class),
     @XmlJavaTypeAdapter(InternationalStringAdapter.class)
 })
@@ -95,5 +95,5 @@ import javax.xml.bind.annotation.adapter
 import org.apache.sis.xml.Namespaces;
 import org.apache.sis.internal.jaxb.gco.*;
 import org.apache.sis.internal.jaxb.code.*;
-//import org.apache.sis.internal.jaxb.gts.TM_PeriodDuration; // TODO
+import org.apache.sis.internal.jaxb.gts.TM_PeriodDuration;
 import org.apache.sis.internal.jaxb.metadata.*;

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java [UTF-8] Fri Jun 21 22:02:32 2013
@@ -118,7 +118,7 @@
     @XmlJavaTypeAdapter(LocaleAdapter.class),
     @XmlJavaTypeAdapter(StringAdapter.class),
     @XmlJavaTypeAdapter(InternationalStringAdapter.class),
-//    @XmlJavaTypeAdapter(GO_DateTime.class), // TODO
+    @XmlJavaTypeAdapter(GO_DateTime.class),
     @XmlJavaTypeAdapter(GO_Boolean.class), @XmlJavaTypeAdapter(type=boolean.class, value=GO_Boolean.class),
     @XmlJavaTypeAdapter(GO_Integer.class), @XmlJavaTypeAdapter(type=int.class,     value=GO_Integer.class)
 })

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/package-info.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/package-info.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/package-info.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/package-info.java [UTF-8] Fri Jun 21 22:02:32 2013
@@ -139,10 +139,10 @@
     @XmlJavaTypeAdapter(MX_DataFile.class),
 
     // Java types, primitive types and basic OGC types handling
-//    @XmlJavaTypeAdapter(UnitAdapter.class), // TODO
+    @XmlJavaTypeAdapter(UnitAdapter.class),
     @XmlJavaTypeAdapter(StringAdapter.class),
     @XmlJavaTypeAdapter(InternationalStringAdapter.class),
-//    @XmlJavaTypeAdapter(GO_DateTime.class), // TODO
+    @XmlJavaTypeAdapter(GO_DateTime.class),
 //    @XmlJavaTypeAdapter(GO_RecordType.class), // TODO
     @XmlJavaTypeAdapter(GO_Boolean.class), @XmlJavaTypeAdapter(type=boolean.class, value=GO_Boolean.class)
 })

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultDimension.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultDimension.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultDimension.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultDimension.java [UTF-8] Fri Jun 21 22:02:32 2013
@@ -22,8 +22,8 @@ import javax.xml.bind.annotation.XmlRoot
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import org.opengis.metadata.spatial.Dimension;
 import org.opengis.metadata.spatial.DimensionNameType;
+import org.apache.sis.internal.jaxb.gco.GO_Measure;
 import org.apache.sis.metadata.iso.ISOMetadata;
-//import org.apache.sis.internal.jaxb.gco.GO_Measure;
 import org.apache.sis.measure.ValueRange;
 
 
@@ -166,7 +166,7 @@ public class DefaultDimension extends IS
      */
     @Override
     @ValueRange(minimum=0, isMinIncluded=false)
-//  @XmlJavaTypeAdapter(GO_Measure.class) // TODO
+    @XmlJavaTypeAdapter(GO_Measure.class)
     @XmlElement(name = "resolution")
     public Double getResolution() {
         return resolution;

Modified: sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataStandardTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataStandardTest.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataStandardTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataStandardTest.java [UTF-8] Fri Jun 21 22:02:32 2013
@@ -24,6 +24,8 @@ import org.opengis.metadata.citation.Cit
 import org.opengis.metadata.quality.Completeness;
 import org.apache.sis.metadata.iso.citation.DefaultCitation;
 import org.apache.sis.metadata.iso.citation.HardCodedCitations;
+import org.apache.sis.metadata.iso.acquisition.DefaultPlatform;
+import org.apache.sis.metadata.iso.acquisition.DefaultInstrument;
 import org.apache.sis.metadata.iso.quality.AbstractCompleteness;
 import org.apache.sis.util.iso.SimpleInternationalString;
 import org.apache.sis.util.ComparisonMode;
@@ -33,6 +35,7 @@ import org.apache.sis.test.TestCase;
 import org.junit.Test;
 
 import static org.apache.sis.test.Assert.*;
+import static org.apache.sis.test.TestUtilities.getSingleton;
 
 
 /**
@@ -109,6 +112,36 @@ public final strictfp class MetadataStan
     }
 
     /**
+     * Creates a metadata object having a cyclic association. The cycle is between
+     * {@code platform.instrument} and {@code instrument.isMountedOn}.
+     */
+    static DefaultPlatform createCyclicMetadata() {
+        final DefaultInstrument instrument = new DefaultInstrument();
+        instrument.setType(new SimpleInternationalString("An instrument type."));
+        final DefaultPlatform platform = new DefaultPlatform();
+        platform.setDescription(new SimpleInternationalString("A platform."));
+        instrument.setMountedOn(platform);
+        platform.getInstruments().add(instrument);
+        return platform;
+    }
+
+    /**
+     * Tests the {@link MetadataStandard#equals(Object, Object, ComparisonMode)} method on an object
+     * having cyclic associations. In absence of safety guard against infinite recursivity, this test
+     * would produce {@link StackOverflowError}.
+     */
+    @Test
+    @DependsOnMethod("testEquals")
+    public void testEqualsOnCyclicMetadata() {
+        final DefaultPlatform p1 = createCyclicMetadata();
+        final DefaultPlatform p2 = createCyclicMetadata();
+        assertTrue(p1.equals(p2));
+        ((DefaultInstrument) getSingleton(p2.getInstruments()))
+                .setType(new SimpleInternationalString("An other instrument type."));
+        assertFalse(p1.equals(p2));
+    }
+
+    /**
      * Tests the {@link MetadataStandard#asValueMap(Object, KeyNamePolicy, ValueExistencePolicy)} implementation.
      * This test duplicates {@link ValueMapTest}, but is done here again as an integration test and because many
      * {@code MetadataStandard} methods depend on it ({@code equals}, {@code hashCode}, {@code prune}, <i>etc.</i>).
@@ -164,6 +197,24 @@ public final strictfp class MetadataStan
     }
 
     /**
+     * Tests the {@link MetadataStandard#hashCode(Object)} method on an object having cyclic associations.
+     * In absence of safety guard against infinite recursivity, this test would produce {@link StackOverflowError}.
+     *
+     * @see AbstractMetadataTest#testHashCodeOnCyclicMetadata()
+     */
+    @Test
+    @DependsOnMethod("testHashCode")
+    public void testHashCodeOnCyclicMetadata() {
+        final MetadataStandard std = MetadataStandard.ISO_19115;
+        final int code = std.hashCode(createCyclicMetadata());
+        /*
+         * Following line checks that the hash code is stable, just for doing something with the code.
+         * The real test was actually to ensure that the above line didn't threw a StackOverflowError.
+         */
+        assertEquals(code, std.hashCode(createCyclicMetadata()));
+    }
+
+    /**
      * Tests serialization of pre-defined constants.
      */
     @Test

Modified: sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/PrunerTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/PrunerTest.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/PrunerTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/PrunerTest.java [UTF-8] Fri Jun 21 22:02:32 2013
@@ -21,6 +21,8 @@ import org.apache.sis.metadata.iso.citat
 import org.apache.sis.metadata.iso.extent.DefaultExtent;
 import org.apache.sis.metadata.iso.extent.DefaultGeographicBoundingBox;
 import org.apache.sis.metadata.iso.identification.DefaultDataIdentification;
+import org.apache.sis.metadata.iso.acquisition.DefaultAcquisitionInformation;
+import org.apache.sis.test.DependsOnMethod;
 import org.apache.sis.test.DependsOn;
 import org.apache.sis.test.TestCase;
 import org.junit.Test;
@@ -116,9 +118,32 @@ public final strictfp class PrunerTest e
     }
 
     /**
+     * Adds to the {@link #metadata} an object having a cyclic association.
+     * The cycle is between {@code platform.instrument} and {@code instrument.isMountedOn}.
+     */
+    private void createCyclicMetadata() {
+        final DefaultAcquisitionInformation acquisition = new DefaultAcquisitionInformation();
+        acquisition.getPlatforms().add(MetadataStandardTest.createCyclicMetadata());
+        metadata.getAcquisitionInformation().add(acquisition);
+    }
+
+    /**
+     * Tests the {@link AbstractMetadata#isEmpty()} method on a metadata object having a cycle association.
+     * In absence of safety guard against infinite recursivity, this test would produce {@link StackOverflowError}.
+     */
+    @Test
+    @DependsOnMethod("testIsEmpty")
+    public void testIsEmptyOnCyclicMetadata() {
+        assertTrue(metadata.isEmpty());
+        createCyclicMetadata();
+        assertFalse(metadata.isEmpty());
+    }
+
+    /**
      * Tests the {@link ModifiableMetadata#prune()} method.
      */
     @Test
+    @DependsOnMethod("testIsEmpty")
     public void testPrune() {
         metadata.setFileIdentifier("A file identifiers");
         identification.setCitation(new DefaultCitation("A citation title"));
@@ -149,4 +174,19 @@ public final strictfp class PrunerTest e
         assertTrue(extent.getGeographicElements().isEmpty());
         assertTrue(metadata.isEmpty());
     }
+
+    /**
+     * Tests the {@link AbstractMetadata#prune()} method on a metadata object having a cycle association.
+     * In absence of safety guard against infinite recursivity, this test would produce {@link StackOverflowError}.
+     */
+    @Test
+    @DependsOnMethod({"testPrune", "testIsEmptyOnCyclicMetadata"})
+    public void testPruneOnCyclicMetadata() {
+        createCyclicMetadata();
+        assertEquals(1, metadata.getIdentificationInfo()    .size());
+        assertEquals(1, metadata.getAcquisitionInformation().size());
+        metadata.prune();
+        assertEquals(0, metadata.getIdentificationInfo()    .size());
+        assertEquals(1, metadata.getAcquisitionInformation().size());
+    }
 }

Modified: sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/ValueMapTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/ValueMapTest.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/ValueMapTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/ValueMapTest.java [UTF-8] Fri Jun 21 22:02:32 2013
@@ -74,10 +74,10 @@ public final strictfp class ValueMapTest
      *
      * {@preformat text
      *     Citation
-     *     ├───Title…………………………………………………… Undercurrent
-     *     ├───Cited Responsible Parties
-     *     │   └───Individual Name……………… Testsuya Toyoda
-     *     └───ISBN……………………………………………………… 9782505004509
+     *       ├─Title…………………………………………………… Undercurrent
+     *       ├─Cited Responsible Parties
+     *       │   └─Individual Name……………… Testsuya Toyoda
+     *       └─ISBN……………………………………………………… 9782505004509
      * }
      *
      * The citation instance is stored in the {@link #citation} field.
@@ -120,11 +120,11 @@ public final strictfp class ValueMapTest
      *
      * {@preformat text
      *     Citation
-     *     ├───Title…………………………………………………… Undercurrent
-     *     ├───Identifiers…………………………………… 9782505004509
-     *     ├───Cited Responsible Parties
-     *     │   └───Individual Name……………… Testsuya Toyoda
-     *     └───ISBN……………………………………………………… 9782505004509
+     *       ├─Title…………………………………………………… Undercurrent
+     *       ├─Identifiers…………………………………… 9782505004509
+     *       ├─Cited Responsible Parties
+     *       │   └─Individual Name……………… Testsuya Toyoda
+     *       └─ISBN……………………………………………………… 9782505004509
      * }
      *
      * Note that this test is intentionally sensitive to iteration order.
@@ -212,9 +212,9 @@ public final strictfp class ValueMapTest
          * Remove the ISBN value. Result shall be:
          *
          * Citation
-         * ├───Title…………………………………………………… Undercurrent
-         * └───Cited Responsible Parties
-         *     └───Individual Name……………… Testsuya Toyoda
+         *   ├─Title…………………………………………………… Undercurrent
+         *   └─Cited Responsible Parties
+         *       └─Individual Name……………… Testsuya Toyoda
          */
         assertEquals("9782505004509", map.remove("ISBN"));
         assertNull("ISBN shall have been removed.", citation.getISBN());
@@ -227,10 +227,10 @@ public final strictfp class ValueMapTest
          * Add a value. Result shall be:
          *
          * Citation
-         * ├───Title…………………………………………………… Undercurrent
-         * ├───Cited Responsible Parties
-         * │   └───Individual Name……………… Testsuya Toyoda
-         * └───Presentation Forms………………… document hardcopy
+         *   ├─Title…………………………………………………… Undercurrent
+         *   ├─Cited Responsible Parties
+         *   │   └─Individual Name……………… Testsuya Toyoda
+         *   └─Presentation Forms………………… document hardcopy
          */
         assertNull(map.put("presentationForm", DOCUMENT_HARDCOPY));
         assertEquals(DOCUMENT_HARDCOPY, getSingleton(citation.getPresentationForms()));
@@ -243,12 +243,12 @@ public final strictfp class ValueMapTest
          * Add back the ISBN value. Result shall be:
          *
          * Citation
-         * ├───Title…………………………………………………… Undercurrent
-         * ├───Identifiers…………………………………… 9782505004509
-         * ├───Cited Responsible Parties
-         * │   └───Individual Name……………… Testsuya Toyoda
-         * ├───Presentation Forms………………… document hardcopy
-         * └───ISBN……………………………………………………… 9782505004509
+         *   ├─Title…………………………………………………… Undercurrent
+         *   ├─Identifiers…………………………………… 9782505004509
+         *   ├─Cited Responsible Parties
+         *   │   └─Individual Name……………… Testsuya Toyoda
+         *   ├─Presentation Forms………………… document hardcopy
+         *   └─ISBN……………………………………………………… 9782505004509
          */
         assertNull(map.put("ISBN", "9782505004509"));
         assertEquals("9782505004509", citation.getISBN());

Modified: sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java [UTF-8] Fri Jun 21 22:02:32 2013
@@ -49,8 +49,10 @@ import org.junit.BeforeClass;
     org.apache.sis.metadata.TreeNodeChildrenTest.class,
     org.apache.sis.metadata.TreeNodeTest.class,
     org.apache.sis.metadata.TreeTableViewTest.class,
+    org.apache.sis.metadata.TreeTableFormatTest.class,
     org.apache.sis.metadata.MetadataStandardTest.class,
     org.apache.sis.metadata.PrunerTest.class,
+    org.apache.sis.metadata.AbstractMetadataTest.class,
     org.apache.sis.metadata.iso.AllMetadataTest.class
 })
 public final strictfp class MetadataTestSuite extends TestSuite {

Added: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/geoapi/temporal/PeriodDuration.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/geoapi/temporal/PeriodDuration.java?rev=1495611&view=auto
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/geoapi/temporal/PeriodDuration.java (added)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/geoapi/temporal/PeriodDuration.java [UTF-8] Fri Jun 21 22:02:32 2013
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.internal.geoapi.temporal;
+
+import org.opengis.util.InternationalString;
+
+
+/**
+ * Placeholder for a GeoAPI interfaces which is still incomplete in GeoAPI 3.0.0.
+ * We reproduce here the GeoAPI 3.1-pending API. Note that at the time of writing,
+ * this is a bad API (values shall not be instances of {@link InternationalString}).
+ * This will be fixed in a future GeoAPI version.
+ *
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.3
+ * @version 0.3
+ * @module
+ */
+public interface PeriodDuration extends org.opengis.temporal.PeriodDuration {
+    /**
+     * A positive integer, followed by the character "Y",
+     * which indicated the number of years in the period.
+     */
+    InternationalString getYears();
+
+    /**
+     * A positive integer, followed by the character "M",
+     * which indicated the number of months in the period.
+     */
+    InternationalString getMonths();
+
+    /**
+     * A positive integer, followed by the character "D",
+     * which indicated the number of days in the period.
+     */
+    InternationalString getDays();
+
+    /**
+     * A positive integer, followed by the character "H",
+     * which indicated the number of hours in the period.
+     */
+    InternationalString getHours();
+
+    /**
+     * A positive integer, followed by the character "M",
+     * which indicated the number of minutes in the period.
+     */
+    InternationalString getMinutes();
+
+    /**
+     * A positive integer, followed by the character "S",
+     * which indicated the number of seconds in the period.
+     */
+    InternationalString getSeconds();
+}

Propchange: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/geoapi/temporal/PeriodDuration.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/geoapi/temporal/PeriodDuration.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/geoapi/temporal/TemporalFactory.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/geoapi/temporal/TemporalFactory.java?rev=1495611&r1=1495610&r2=1495611&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/geoapi/temporal/TemporalFactory.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/geoapi/temporal/TemporalFactory.java [UTF-8] Fri Jun 21 22:02:32 2013
@@ -17,6 +17,7 @@
 package org.apache.sis.internal.geoapi.temporal;
 
 import java.util.Date;
+import org.opengis.util.InternationalString;
 
 
 /**
@@ -33,4 +34,8 @@ public interface TemporalFactory {
     Instant createInstant(Position instant);
 
     Period createPeriod(Instant begin, Instant end);
+
+    PeriodDuration createPeriodDuration(InternationalString years, InternationalString months,
+            InternationalString week, InternationalString days, InternationalString hours,
+            InternationalString minutes, InternationalString seconds);
 }



Mime
View raw message