sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1770950 - in /sis/branches/JDK8/core: sis-feature/src/main/java/org/apache/sis/feature/ sis-feature/src/main/java/org/apache/sis/feature/builder/ sis-feature/src/main/java/org/apache/sis/internal/feature/ sis-feature/src/test/java/org/apac...
Date Wed, 23 Nov 2016 12:04:09 GMT
Author: desruisseaux
Date: Wed Nov 23 12:04:08 2016
New Revision: 1770950

URL: http://svn.apache.org/viewvc?rev=1770950&view=rev
Log:
Add support for deprecated properties in a FeatureType.

Modified:
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAssociation.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAttribute.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractIdentifiedType.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractOperation.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAttributeType.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeatureType.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureFormat.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/Field.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/FieldType.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/PropertyView.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AssociationRoleBuilder.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AttributeTypeBuilder.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/CharacteristicTypeBuilder.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/FeatureTypeBuilder.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/OperationWrapper.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/TypeBuilder.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/AttributeConvention.java
    sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/FeatureFormatTest.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/Deprecable.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAssociation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAssociation.java?rev=1770950&r1=1770949&r2=1770950&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAssociation.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAssociation.java [UTF-8] Wed Nov 23 12:04:08 2016
@@ -49,7 +49,7 @@ import org.opengis.feature.MultiValuedPr
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.5
- * @version 0.6
+ * @version 0.8
  * @module
  *
  * @see AbstractFeature
@@ -229,7 +229,7 @@ public abstract class AbstractAssociatio
     public String toString() {
         final String pt = DefaultAssociationRole.getTitleProperty(role);
         final Iterator<Feature> it = getValues().iterator();
-        return FieldType.toString("FeatureAssociation", role.getName(),
+        return FieldType.toString(isDeprecated(role), "FeatureAssociation", role.getName(),
                 DefaultAssociationRole.getValueTypeName(role), new Iterator<Object>()
         {
             @Override public boolean hasNext() {

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAttribute.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAttribute.java?rev=1770950&r1=1770949&r2=1770950&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAttribute.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAttribute.java [UTF-8] Wed Nov 23 12:04:08 2016
@@ -69,7 +69,7 @@ import org.opengis.feature.MultiValuedPr
  * @author  Johann Sorel (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.5
- * @version 0.6
+ * @version 0.8
  * @module
  *
  * @see AbstractFeature
@@ -464,7 +464,7 @@ public abstract class AbstractAttribute<
     @Debug
     @Override
     public String toString() {
-        final StringBuilder buffer = FieldType.toString("Attribute", type.getName(),
+        final StringBuilder buffer = FieldType.toString(isDeprecated(type), "Attribute", type.getName(),
                 Classes.getShortName(type.getValueClass()), getValues().iterator());
         if (characteristics != null && !characteristics.isEmpty()) {
             buffer.append(System.lineSeparator());

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractIdentifiedType.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractIdentifiedType.java?rev=1770950&r1=1770949&r2=1770950&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractIdentifiedType.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractIdentifiedType.java [UTF-8] Wed Nov 23 12:04:08 2016
@@ -18,18 +18,19 @@ package org.apache.sis.feature;
 
 import java.util.Map;
 import java.util.Locale;
+import java.util.Objects;
 import java.io.Serializable;
 import org.opengis.util.NameFactory;
 import org.opengis.util.GenericName;
 import org.opengis.util.InternationalString;
 import org.apache.sis.internal.system.DefaultFactories;
 import org.apache.sis.util.resources.Errors;
+import org.apache.sis.util.Deprecable;
 import org.apache.sis.util.iso.Types;
 
 import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
 
 // Branch-dependent imports
-import java.util.Objects;
 import org.opengis.feature.IdentifiedType;
 
 
@@ -38,10 +39,10 @@ import org.opengis.feature.IdentifiedTyp
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.5
- * @version 0.6
+ * @version 0.8
  * @module
  */
-public class AbstractIdentifiedType implements IdentifiedType, Serializable {
+public class AbstractIdentifiedType implements IdentifiedType, Deprecable, Serializable {
     /**
      * For cross-version compatibility.
      */
@@ -80,6 +81,19 @@ public class AbstractIdentifiedType impl
     public static final String DESCRIPTION_KEY = "description";
 
     /**
+     * Key for the <code>{@value}</code> property to be given to the constructor.
+     * This is used for setting the value to be returned by {@link #isDeprecated()}.
+     *
+     * <p>If this property is set to {@code true}, then the value associated to {@link #DESCRIPTION_KEY}
+     * should give the replacement (e.g. <cite>"superceded by …"</cite>).</p>
+     *
+     * @see #isDeprecated()
+     *
+     * @since 0.8
+     */
+    public static final String DEPRECATED_KEY = "deprecated";
+
+    /**
      * The name of this type.
      *
      * @see #getName()
@@ -114,6 +128,14 @@ public class AbstractIdentifiedType impl
     private final InternationalString description;
 
     /**
+     * {@code true} if this type is deprecated.
+     *
+     * @see #isDeprecated()
+     * @see #DEPRECATED_KEY
+     */
+    final boolean deprecated;
+
+    /**
      * Constructs a type from the given properties. Keys are strings from the table below.
      * The map given in argument shall contain an entry at least for the {@value #NAME_KEY}.
      * Other entries listed in the table below are optional.
@@ -144,6 +166,10 @@ public class AbstractIdentifiedType impl
      *     <td>{@value #DESCRIPTION_KEY}</td>
      *     <td>{@link InternationalString} or {@link String}</td>
      *     <td>{@link #getDescription()}</td>
+     *   <tr>
+     *     <td>{@value #DEPRECATED_KEY}</td>
+     *     <td>{@link Boolean}</td>
+     *     <td>{@link #isDeprecated()}</td>
      *   </tr>
      *   <tr>
      *     <td>{@value org.apache.sis.referencing.AbstractIdentifiedObject#LOCALE_KEY}</td>
@@ -177,12 +203,29 @@ public class AbstractIdentifiedType impl
         } else if (value instanceof GenericName) {
             name = (GenericName) value;
         } else {
-            throw new IllegalArgumentException(Errors.getResources(identification).getString(
-                    Errors.Keys.IllegalPropertyValueClass_2, NAME_KEY, value.getClass()));
+            throw illegalPropertyType(identification, NAME_KEY, value);
         }
-        definition  = Types.toInternationalString(identification, DEFINITION_KEY );
+        definition  = Types.toInternationalString(identification, DEFINITION_KEY);
         designation = Types.toInternationalString(identification, DESIGNATION_KEY);
         description = Types.toInternationalString(identification, DESCRIPTION_KEY);
+        value = identification.get(DEPRECATED_KEY);
+        if (value == null) {
+            deprecated = false;
+        } else if (value instanceof Boolean) {
+            deprecated = (Boolean) value;
+        } else {
+            throw illegalPropertyType(identification, DEPRECATED_KEY, value);
+        }
+    }
+
+    /**
+     * Returns the exception to be thrown when a property is of illegal type.
+     */
+    private static IllegalArgumentException illegalPropertyType(final Map<String,?> identification,
+            final String key, final Object value)
+    {
+        return new IllegalArgumentException(Errors.getResources(identification).getString(
+                Errors.Keys.IllegalPropertyValueClass_2, key, value.getClass()));
     }
 
     /**
@@ -241,6 +284,9 @@ public class AbstractIdentifiedType impl
      * Returns optional information beyond that required for concise definition of the element.
      * The description may assist in understanding the element scope and application.
      *
+     * <p>If this type {@linkplain #isDeprecated() is deprecated}, then the description should give
+     * indication about the replacement (e.g. <cite>"superceded by …"</cite>).</p>
+     *
      * @return information beyond that required for concise definition of the element, or {@code null} if none.
      */
     @Override
@@ -248,6 +294,40 @@ public class AbstractIdentifiedType impl
         return description;
     }
 
+    /**
+     * Returns comments on or information about this type.
+     * The default implementation performs the following choice:
+     *
+     * <ul>
+     *   <li>If this type {@linkplain #isDeprecated() is deprecated}, returns the
+     *       {@linkplain #getDescription() description}. The description of deprecated types
+     *       should give indication about the replacement (e.g. <cite>"superceded by …"</cite>).</li>
+     *   <li>Otherwise returns {@code null} since remarks are not part of the ISO 19109 feature model.</li>
+     * </ul>
+     *
+     * @return the remarks, or {@code null} if none.
+     *
+     * @since 0.8
+     */
+    @Override
+    public InternationalString getRemarks() {
+        return deprecated ? description : null;
+    }
+
+    /**
+     * Returns {@code true} if this type is deprecated.
+     * If this method returns {@code true}, then the {@linkplain #getRemarks() remarks} should give
+     * indication about the replacement (e.g. <cite>"superceded by …"</cite>).
+     *
+     * @return whether this type is deprecated.
+     *
+     * @since 0.8
+     */
+    @Override
+    public boolean isDeprecated() {
+        return deprecated;
+    }
+
     /*
      * ISO 19109 properties omitted for now:
      *
@@ -267,7 +347,7 @@ public class AbstractIdentifiedType impl
      */
     @Override
     public int hashCode() {
-        return Objects.hash(name, definition, designation, description);
+        return Objects.hash(name, definition, designation, description, deprecated);
     }
 
     /**
@@ -283,7 +363,8 @@ public class AbstractIdentifiedType impl
             return Objects.equals(name,        that.name) &&
                    Objects.equals(definition,  that.definition) &&
                    Objects.equals(designation, that.designation) &&
-                   Objects.equals(description, that.description);
+                   Objects.equals(description, that.description) &&
+                   deprecated == that.deprecated;
         }
         return false;
     }

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractOperation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractOperation.java?rev=1770950&r1=1770949&r2=1770950&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractOperation.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractOperation.java [UTF-8] Wed Nov 23 12:04:08 2016
@@ -85,6 +85,41 @@ public abstract class AbstractOperation
     /**
      * Constructs an operation from the given properties. The identification map is given unchanged to
      * the {@linkplain AbstractIdentifiedType#AbstractIdentifiedType(Map) super-class constructor}.
+     * The following table is a reminder of main (not all) recognized map entries:
+     *
+     * <table class="sis">
+     *   <caption>Recognized map entries (non exhaustive list)</caption>
+     *   <tr>
+     *     <th>Map key</th>
+     *     <th>Value type</th>
+     *     <th>Returned by</th>
+     *   </tr>
+     *   <tr>
+     *     <td>{@value org.apache.sis.feature.AbstractIdentifiedType#NAME_KEY}</td>
+     *     <td>{@link GenericName} or {@link String}</td>
+     *     <td>{@link #getName()}</td>
+     *   </tr>
+     *   <tr>
+     *     <td>{@value org.apache.sis.feature.AbstractIdentifiedType#DEFINITION_KEY}</td>
+     *     <td>{@link InternationalString} or {@link String}</td>
+     *     <td>{@link #getDefinition()}</td>
+     *   </tr>
+     *   <tr>
+     *     <td>{@value org.apache.sis.feature.AbstractIdentifiedType#DESIGNATION_KEY}</td>
+     *     <td>{@link InternationalString} or {@link String}</td>
+     *     <td>{@link #getDesignation()}</td>
+     *   </tr>
+     *   <tr>
+     *     <td>{@value org.apache.sis.feature.AbstractIdentifiedType#DESCRIPTION_KEY}</td>
+     *     <td>{@link InternationalString} or {@link String}</td>
+     *     <td>{@link #getDescription()}</td>
+     *   </tr>
+     *   <tr>
+     *     <td>{@value org.apache.sis.feature.AbstractIdentifiedType#DEPRECATED_KEY}</td>
+     *     <td>{@link Boolean}</td>
+     *     <td>{@link #isDeprecated()}</td>
+     *   </tr>
+     * </table>
      *
      * @param  identification  the name and other information to be given to this operation.
      */

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java?rev=1770950&r1=1770949&r2=1770950&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java [UTF-8] Wed Nov 23 12:04:08 2016
@@ -114,6 +114,11 @@ public class DefaultAssociationRole exte
      *     <td>{@link InternationalString} or {@link String}</td>
      *     <td>{@link #getDescription()}</td>
      *   </tr>
+     *   <tr>
+     *     <td>{@value org.apache.sis.feature.AbstractIdentifiedType#DEPRECATED_KEY}</td>
+     *     <td>{@link Boolean}</td>
+     *     <td>{@link #isDeprecated()}</td>
+     *   </tr>
      * </table>
      *
      * @param identification  the name and other information to be given to this association role.
@@ -481,6 +486,6 @@ public class DefaultAssociationRole exte
     @Debug
     @Override
     public String toString() {
-        return toString("FeatureAssociationRole", getName(), valueType.getName()).toString();
+        return toString(deprecated, "FeatureAssociationRole", getName(), valueType.getName()).toString();
     }
 }

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAttributeType.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAttributeType.java?rev=1770950&r1=1770949&r2=1770950&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAttributeType.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAttributeType.java [UTF-8] Wed Nov 23 12:04:08 2016
@@ -99,7 +99,7 @@ import org.opengis.feature.AttributeType
  * @author  Johann Sorel (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.5
- * @version 0.5
+ * @version 0.8
  * @module
  *
  * @see DefaultFeatureType
@@ -165,6 +165,11 @@ public class DefaultAttributeType<V> ext
      *     <td>{@link InternationalString} or {@link String}</td>
      *     <td>{@link #getDescription()}</td>
      *   </tr>
+     *   <tr>
+     *     <td>{@value org.apache.sis.feature.AbstractIdentifiedType#DEPRECATED_KEY}</td>
+     *     <td>{@link Boolean}</td>
+     *     <td>{@link #isDeprecated()}</td>
+     *   </tr>
      * </table>
      *
      * @param identification   the name and other information to be given to this attribute type.
@@ -361,6 +366,6 @@ public class DefaultAttributeType<V> ext
     @Debug
     @Override
     public String toString() {
-        return toString("AttributeType", getName(), Classes.getShortName(valueClass)).toString();
+        return toString(deprecated, "AttributeType", getName(), Classes.getShortName(valueClass)).toString();
     }
 }

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeatureType.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeatureType.java?rev=1770950&r1=1770949&r2=1770950&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeatureType.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeatureType.java [UTF-8] Wed Nov 23 12:04:08 2016
@@ -237,6 +237,11 @@ public class DefaultFeatureType extends
      *     <td>{@link InternationalString} or {@link String}</td>
      *     <td>{@link #getDescription()}</td>
      *   </tr>
+     *   <tr>
+     *     <td>{@value org.apache.sis.feature.AbstractIdentifiedType#DEPRECATED_KEY}</td>
+     *     <td>{@link Boolean}</td>
+     *     <td>{@link #isDeprecated()}</td>
+     *   </tr>
      * </table>
      *
      * @param identification  the name and other information to be given to this feature type.

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureFormat.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureFormat.java?rev=1770950&r1=1770949&r2=1770950&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureFormat.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureFormat.java [UTF-8] Wed Nov 23 12:04:08 2016
@@ -16,6 +16,8 @@
  */
 package org.apache.sis.feature;
 
+import java.util.List;
+import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.Locale;
 import java.util.TimeZone;
@@ -30,6 +32,7 @@ import org.opengis.util.InternationalStr
 import org.opengis.util.GenericName;
 import org.apache.sis.io.TableAppender;
 import org.apache.sis.io.TabularFormat;
+import org.apache.sis.util.Deprecable;
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.resources.Errors;
@@ -48,6 +51,7 @@ import org.opengis.feature.Feature;
 import org.opengis.feature.FeatureType;
 import org.opengis.feature.FeatureAssociationRole;
 import org.opengis.feature.Operation;
+import org.apache.sis.util.Characters;
 
 
 /**
@@ -195,12 +199,13 @@ public class FeatureFormat extends Tabul
          * In none we will ommit the "characteristics" column, which is the last column.
          */
         boolean hasCharacteristics = false;
+        boolean hasDeprecatedTypes = false;
         for (final PropertyType propertyType : featureType.getProperties(true)) {
-            if (propertyType instanceof AttributeType<?>) {
-                if (!((AttributeType<?>) propertyType).characteristics().isEmpty()) {
-                    hasCharacteristics = true;
-                    break;
-                }
+            if (!hasCharacteristics && propertyType instanceof AttributeType<?>) {
+                hasCharacteristics = !((AttributeType<?>) propertyType).characteristics().isEmpty();
+            }
+            if (!hasDeprecatedTypes && propertyType instanceof Deprecable) {
+                hasDeprecatedTypes = ((Deprecable) propertyType).isDeprecated();
             }
         }
         /*
@@ -229,15 +234,10 @@ header: for (int i=0; ; i++) {
                 case 1:  nextColumn(table); key = Vocabulary.Keys.Type; break;
                 case 2:  nextColumn(table); key = Vocabulary.Keys.Cardinality; break;
                 case 3:  nextColumn(table); key = (feature != null) ? Vocabulary.Keys.Value : Vocabulary.Keys.DefaultValue; break;
-                case 4: {
-                    if (hasCharacteristics) {
-                        nextColumn(table);
-                        key = Vocabulary.Keys.Characteristics;
-                        break;
-                    } else {
-                        break header;
-                    }
-                }
+                case 4:  if (!hasCharacteristics) continue;
+                         nextColumn(table); key = Vocabulary.Keys.Characteristics; break;
+                case 5:  if (!hasDeprecatedTypes) continue;
+                         nextColumn(table); key = Vocabulary.Keys.Remarks; break;
                 default: break header;
             }
             table.append(resources.getString(key));
@@ -250,6 +250,7 @@ header: for (int i=0; ; i++) {
          */
         final StringBuffer  buffer  = new StringBuffer();
         final FieldPosition dummyFP = new FieldPosition(-1);
+        final List<String>  remarks = new ArrayList<>();
         for (final PropertyType propertyType : featureType.getProperties(true)) {
             Object value = null;
             if (feature != null) {
@@ -389,10 +390,32 @@ header: for (int i=0; ; i++) {
                     }
                 }
             }
+            /*
+             * Column 5 - Deprecation
+             */
+            if (hasDeprecatedTypes) {
+                nextColumn(table);
+                if (org.apache.sis.feature.Field.isDeprecated(propertyType)) {
+                    table.append(resources.getString(Vocabulary.Keys.Deprecated));
+                    final InternationalString r = ((Deprecable) propertyType).getRemarks();
+                    if (r != null) {
+                        remarks.add(r.toString(displayLocale));
+                        appendSuperscript(remarks.size(), table);
+                    }
+                }
+            }
             table.nextLine();
         }
         table.nextLine('─');
         table.flush();
+        /*
+         * If there is any remarks, write them below the table.
+         */
+        final int n = remarks.size();
+        for (int i=0; i<n; i++) {
+            appendSuperscript(i+1, toAppendTo);
+            toAppendTo.append(' ').append(remarks.get(i)).append(lineSeparator);
+        }
     }
 
     /**
@@ -444,6 +467,17 @@ header: for (int i=0; ; i++) {
         }
     }
 
+    /**
+     * Appends the given number as an superscript if possible, or as an ordinary number otherwise.
+     */
+    private static void appendSuperscript(final int n, final Appendable toAppendTo) throws IOException {
+        if (n >= 0 && n < 10) {
+            toAppendTo.append(Characters.toSuperScript((char) ('0' + n)));
+        } else {
+            toAppendTo.append('(').append(String.valueOf(n)).append(')');
+        }
+    }
+
     /**
      * Formats the given object using a shared instance of {@code ParameterFormat}.
      * This is used for {@link DefaultParameterDescriptorGroup#toString()} implementation.

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/Field.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/Field.java?rev=1770950&r1=1770949&r2=1770950&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/Field.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/Field.java [UTF-8] Wed Nov 23 12:04:08 2016
@@ -23,8 +23,10 @@ import org.apache.sis.util.resources.Err
 
 // Branch-dependent imports
 import org.opengis.feature.Property;
+import org.opengis.feature.PropertyType;
 import org.opengis.feature.MultiValuedPropertyException;
 import org.opengis.feature.InvalidPropertyValueException;
+import org.apache.sis.util.Deprecable;
 
 
 /**
@@ -33,7 +35,7 @@ import org.opengis.feature.InvalidProper
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.5
- * @version 0.6
+ * @version 0.8
  * @module
  */
 abstract class Field<V> implements Property {
@@ -106,4 +108,11 @@ abstract class Field<V> implements Prope
         }
         setValue(value);
     }
+
+    /**
+     * Returns whether the given property is deprecated.
+     */
+    static boolean isDeprecated(final PropertyType type) {
+        return (type instanceof Deprecable) && ((Deprecable) type).isDeprecated();
+    }
 }

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/FieldType.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/FieldType.java?rev=1770950&r1=1770949&r2=1770950&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/FieldType.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/FieldType.java [UTF-8] Wed Nov 23 12:04:08 2016
@@ -130,12 +130,17 @@ abstract class FieldType extends Abstrac
      *     PropertyType[“name” : ValueClass]
      * }
      *
-     * @param className  the interface name of the object on which {@code toString()} is invoked.
-     * @param name       the property type name, sometime {@link #getName()} or sometime the name of another object.
-     * @param valueType  the name of value class (attribute), or the feature type name (association).
+     * @param deprecated  whether the type to format is deprecated.
+     * @param className   the interface name of the object on which {@code toString()} is invoked.
+     * @param name        the property type name, sometime {@link #getName()} or sometime the name of another object.
+     * @param valueType   the name of value class (attribute), or the feature type name (association).
      */
-    static StringBuilder toString(final String className, final GenericName name, final Object valueType) {
-        final StringBuilder buffer = new StringBuilder(40).append(className).append('[');
+    static StringBuilder toString(final boolean deprecated, final String className, final GenericName name, final Object valueType) {
+        final StringBuilder buffer = new StringBuilder(40);
+        if (deprecated) {
+            buffer.append("Deprecated");
+        }
+        buffer.append(className).append('[');
         if (name != null) {
             buffer.append('“');
         }
@@ -154,13 +159,16 @@ abstract class FieldType extends Abstrac
      *     Property[“name” : ValueClass] = {value1, value2, ...}
      * }
      *
-     * @param className  the interface name of the object on which {@code toString()} is invoked.
-     * @param name       the property type name, sometime {@link #getName()} or sometime the name of another object.
-     * @param valueType  the name of value class (attribute), or the feature type name (association).
-     * @param values     the actual values.
+     * @param deprecated  whether the type to format is deprecated.
+     * @param className   the interface name of the object on which {@code toString()} is invoked.
+     * @param name        the property type name, sometime {@link #getName()} or sometime the name of another object.
+     * @param valueType   the name of value class (attribute), or the feature type name (association).
+     * @param values      the actual values.
      */
-    static StringBuilder toString(final String className, final GenericName name, final Object valueType, final Iterator<?> values) {
-        final StringBuilder buffer = toString(className, name, valueType);
+    static StringBuilder toString(final boolean deprecated, final String className, final GenericName name,
+            final Object valueType, final Iterator<?> values)
+    {
+        final StringBuilder buffer = toString(deprecated, className, name, valueType);
         if (values.hasNext()) {
             final Object value = values.next();
             final boolean isMultiValued = values.hasNext();

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/PropertyView.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/PropertyView.java?rev=1770950&r1=1770949&r2=1770950&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/PropertyView.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/PropertyView.java [UTF-8] Wed Nov 23 12:04:08 2016
@@ -210,7 +210,7 @@ abstract class PropertyView<V> extends F
     @Debug
     @Override
     public final String toString() {
-        return FieldType.toString(getClass().getSimpleName(), getName(),
+        return FieldType.toString(false, getClass().getSimpleName(), getName(),
                 Classes.getShortName(getValueClass()), getValues().iterator()).toString();
     }
 }

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AssociationRoleBuilder.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AssociationRoleBuilder.java?rev=1770950&r1=1770949&r2=1770950&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AssociationRoleBuilder.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AssociationRoleBuilder.java [UTF-8] Wed Nov 23 12:04:08 2016
@@ -214,6 +214,15 @@ public final class AssociationRoleBuilde
     }
 
     /**
+     * {@inheritDoc}
+     */
+    @Override
+    public AssociationRoleBuilder setDeprecated(final boolean deprecated) {
+        super.setDeprecated(deprecated);
+        return this;
+    }
+
+    /**
      * Builds the association role from the information specified to this builder.
      * If a role has already been built and this builder state has not changed since the role creation,
      * then the previously created {@code FeatureAssociationRole} instance is returned.

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AttributeTypeBuilder.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AttributeTypeBuilder.java?rev=1770950&r1=1770949&r2=1770950&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AttributeTypeBuilder.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AttributeTypeBuilder.java [UTF-8] Wed Nov 23 12:04:08 2016
@@ -22,6 +22,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.Objects;
 import java.lang.reflect.Array;
 import org.opengis.util.GenericName;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
@@ -39,7 +40,6 @@ import org.apache.sis.util.ObjectConvert
 import org.apache.sis.util.UnconvertibleObjectException;
 
 // Branch-dependent imports
-import java.util.Objects;
 import org.opengis.feature.AttributeType;
 
 
@@ -646,6 +646,15 @@ public final class AttributeTypeBuilder<
         return this;
     }
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public AttributeTypeBuilder<V> setDeprecated(final boolean deprecated) {
+        super.setDeprecated(deprecated);
+        return this;
+    }
+
     /**
      * Appends a text inside the value returned by {@link #toString()}, before the closing bracket.
      */

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/CharacteristicTypeBuilder.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/CharacteristicTypeBuilder.java?rev=1770950&r1=1770949&r2=1770950&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/CharacteristicTypeBuilder.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/CharacteristicTypeBuilder.java [UTF-8] Wed Nov 23 12:04:08 2016
@@ -282,6 +282,15 @@ public final class CharacteristicTypeBui
     }
 
     /**
+     * {@inheritDoc}
+     */
+    @Override
+    public CharacteristicTypeBuilder<V> setDeprecated(final boolean deprecated) {
+        super.setDeprecated(deprecated);
+        return this;
+    }
+
+    /**
      * Builds the characteristic type from the information specified to this builder.
      * If a type has already been built and this builder state has not changed since the type creation,
      * then the previously created {@code AttributeType} instance is returned.

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/FeatureTypeBuilder.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/FeatureTypeBuilder.java?rev=1770950&r1=1770949&r2=1770950&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/FeatureTypeBuilder.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/FeatureTypeBuilder.java [UTF-8] Wed Nov 23 12:04:08 2016
@@ -659,6 +659,15 @@ public class FeatureTypeBuilder extends
     }
 
     /**
+     * {@inheritDoc}
+     */
+    @Override
+    public FeatureTypeBuilder setDeprecated(final boolean deprecated) {
+        super.setDeprecated(deprecated);
+        return this;
+    }
+
+    /**
      * Builds the feature type from the information and properties specified to this builder.
      * One of the {@code setName(…)} methods must have been invoked before this {@code build()} method (mandatory).
      * All other methods are optional, but some calls to a {@code add} method are usually needed.

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/OperationWrapper.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/OperationWrapper.java?rev=1770950&r1=1770949&r2=1770950&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/OperationWrapper.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/OperationWrapper.java [UTF-8] Wed Nov 23 12:04:08 2016
@@ -70,6 +70,7 @@ final class OperationWrapper extends Pro
     @Override public TypeBuilder setDefinition (CharSequence definition)  {throw readOnly();}
     @Override public TypeBuilder setDesignation(CharSequence designation) {throw readOnly();}
     @Override public TypeBuilder setDescription(CharSequence description) {throw readOnly();}
+    @Override public TypeBuilder setDeprecated (boolean deprecated)       {throw readOnly();}
 
     /**
      * Returns the exception to be thrown for read-only wrapper.

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/TypeBuilder.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/TypeBuilder.java?rev=1770950&r1=1770949&r2=1770950&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/TypeBuilder.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/TypeBuilder.java [UTF-8] Wed Nov 23 12:04:08 2016
@@ -20,6 +20,7 @@ import java.util.Map;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Locale;
+import java.util.Objects;
 import org.opengis.util.ScopedName;
 import org.opengis.util.GenericName;
 import org.apache.sis.internal.feature.Resources;
@@ -27,12 +28,12 @@ import org.apache.sis.feature.AbstractId
 import org.apache.sis.util.resources.Vocabulary;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.NullArgumentException;
+import org.apache.sis.util.Deprecable;
 import org.apache.sis.util.Localized;
 import org.apache.sis.util.Classes;
 import org.apache.sis.util.Debug;
 
 // Branch-dependent imports
-import java.util.Objects;
 import org.opengis.feature.IdentifiedType;
 import org.opengis.feature.PropertyNotFoundException;
 
@@ -88,6 +89,9 @@ public abstract class TypeBuilder implem
             putIfNonNull(AbstractIdentifiedType.DEFINITION_KEY,  template.getDefinition());
             putIfNonNull(AbstractIdentifiedType.DESIGNATION_KEY, template.getDesignation());
             putIfNonNull(AbstractIdentifiedType.DESCRIPTION_KEY, template.getDescription());
+            if (template instanceof Deprecable && ((Deprecable) template).isDeprecated()) {
+                identification.put(AbstractIdentifiedType.DEPRECATED_KEY, Boolean.TRUE);
+            }
         }
     }
 
@@ -313,6 +317,8 @@ public abstract class TypeBuilder implem
     /**
      * Sets optional information beyond that required for concise definition of the element.
      * The description may assist in understanding the feature scope and application.
+     * If the type {@linkplain #isDeprecated() is deprecated}, then the description should
+     * give indication about the replacement (e.g. <cite>"superceded by …"</cite>).
      *
      * @param  description  information beyond that required for concise definition of the element, or {@code null} if none.
      * @return {@code this} for allowing method calls chaining.
@@ -328,6 +334,42 @@ public abstract class TypeBuilder implem
     }
 
     /**
+     * Returns {@code true} if the type is deprecated.
+     * If this method returns {@code true}, then the {@linkplain #getDescription() description} should give
+     * indication about the replacement (e.g. <cite>"superceded by …"</cite>).
+     *
+     * @return whether this type is deprecated.
+     *
+     * @see AbstractIdentifiedType#isDeprecated()
+     */
+    public boolean isDeprecated() {
+        return Boolean.TRUE.equals(identification.get(AbstractIdentifiedType.DEPRECATED_KEY));
+    }
+
+    /**
+     * Sets whether the type is deprecated.
+     * If the type is deprecated, then the {@linkplain #setDescription(CharSequence) description}
+     * should be set to an indication about the replacement (e.g. <cite>"superceded by …"</cite>).
+     *
+     * @param  deprecated  whether this type is deprecated.
+     * @return {@code this} for allowing method calls chaining.
+     *
+     * @see #isDeprecated()
+     * @see AbstractIdentifiedType#DEPRECATED_KEY
+     */
+    public TypeBuilder setDeprecated(final boolean deprecated) {
+        final Boolean wrapper = deprecated;
+        Object previous = identification.put(AbstractIdentifiedType.DEPRECATED_KEY, wrapper);
+        if (previous == null) {
+            previous = Boolean.FALSE;
+        }
+        if (!Objects.equals(wrapper, previous)) {
+            clearCache();
+        }
+        return this;
+    }
+
+    /**
      * Returns the element of the given name in the given list. The given name does not need to contains
      * all elements of a {@link ScopedName}; it can be only the tip (for example {@code "myName"} instead
      * of {@code "myScope:myName"}) provided that ignoring the name head does not create ambiguity.
@@ -337,6 +379,7 @@ public abstract class TypeBuilder implem
      * @return element of the given name, or {@code null} if none were found.
      * @throws IllegalArgumentException if the given name is ambiguous.
      */
+    @SuppressWarnings("null")
     final <E extends TypeBuilder> E forName(final List<E> types, final String name) {
         E best      = null;                     // Best type found so far.
         E ambiguity = null;                     // If two types are found at the same depth, the other type.

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/AttributeConvention.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/AttributeConvention.java?rev=1770950&r1=1770949&r2=1770950&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/AttributeConvention.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/AttributeConvention.java [UTF-8] Wed Nov 23 12:04:08 2016
@@ -167,7 +167,7 @@ public final class AttributeConvention e
     static {
         final NameFactory factory = DefaultFactories.forBuildin(NameFactory.class);
         NAMESPACE                     = factory.createGenericName(null, "Apache", Constants.SIS);
-        NameSpace ns                  = factory.createNameSpace(NAMESPACE, null);
+        final NameSpace ns            = factory.createNameSpace(NAMESPACE, null);
         IDENTIFIER_PROPERTY           = factory.createLocalName(ns, "@identifier");
         GEOMETRY_PROPERTY             = factory.createLocalName(ns, "@geometry");
         ENVELOPE_PROPERTY             = factory.createLocalName(ns, "@envelope");

Modified: sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/FeatureFormatTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/FeatureFormatTest.java?rev=1770950&r1=1770949&r2=1770950&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/FeatureFormatTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/FeatureFormatTest.java [UTF-8] Wed Nov 23 12:04:08 2016
@@ -20,6 +20,7 @@ import java.util.Arrays;
 import java.util.Collections;
 import java.util.Locale;
 import java.util.Map;
+import java.util.HashMap;
 import java.util.Random;
 import org.apache.sis.test.DependsOn;
 import org.apache.sis.test.TestCase;
@@ -101,6 +102,32 @@ public final strictfp class FeatureForma
     }
 
     /**
+     * Tests the formatting of a {@link DefaultFeatureType} that contains deprecated properties.
+     */
+    @Test
+    @SuppressWarnings("serial")
+    public void testFeatureTypeWithDeprecatedProperties() {
+        DefaultFeatureType feature = DefaultFeatureTypeTest.city();
+        final Map<String,Object> properties = new HashMap<>(name("highway"));
+        properties.put(DefaultAttributeType.DEPRECATED_KEY, Boolean.TRUE);
+        properties.put(DefaultAttributeType.DESCRIPTION_KEY, "Replaced by pedestrian areas.");
+        feature = new DefaultFeatureType(name("City for human"), false, new DefaultFeatureType[] {feature},
+                new DefaultAttributeType<>(properties, String.class, 0, 2, null));
+
+        final FeatureFormat format = new FeatureFormat(Locale.US, null);
+        final String text = format.format(feature);
+        assertMultilinesEquals("City for human ⇾ City\n" +
+                "┌────────────┬─────────┬─────────────┬───────────────┬─────────────┐\n" +
+                "│ Name       │ Type    │ Cardinality │ Default value │ Remarks     │\n" +
+                "├────────────┼─────────┼─────────────┼───────────────┼─────────────┤\n" +
+                "│ city       │ String  │ [1 … 1]     │ Utopia        │             │\n" +
+                "│ population │ Integer │ [1 … 1]     │               │             │\n" +
+                "│ highway    │ String  │ [0 … 2]     │               │ Deprecated¹ │\n" +
+                "└────────────┴─────────┴─────────────┴───────────────┴─────────────┘\n" +
+                "¹ Replaced by pedestrian areas.\n", text);
+    }
+
+    /**
      * Tests the formatting of an {@link AbstractFeature}.
      */
     @Test

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java?rev=1770950&r1=1770949&r2=1770950&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java [UTF-8] Wed Nov 23 12:04:08 2016
@@ -314,7 +314,7 @@ public class AbstractIdentifiedObject ex
      * while information provided in explicit arguments to the sub-class constructors have an impact on coordinate
      * transformation results. See {@link #equals(Object, ComparisonMode)} for more information.
      *
-     * @param  properties The properties to be given to this identified object.
+     * @param  properties  the properties to be given to this identified object.
      * @throws IllegalArgumentException if a property has an invalid value.
      */
     public AbstractIdentifiedObject(final Map<String,?> properties) throws IllegalArgumentException {
@@ -403,7 +403,7 @@ public class AbstractIdentifiedObject ex
      *
      * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p>
      *
-     * @param object The object to shallow copy.
+     * @param object  the object to shallow copy.
      */
     protected AbstractIdentifiedObject(final IdentifiedObject object) {
         ensureNonNull("object", object);
@@ -442,8 +442,8 @@ public class AbstractIdentifiedObject ex
      *       properties contained in the given object are not recursively copied.</li>
      * </ul>
      *
-     * @param  object The object to get as a SIS implementation, or {@code null} if none.
-     * @return A SIS implementation containing the values of the given object (may be the
+     * @param  object  the object to get as a SIS implementation, or {@code null} if none.
+     * @return a SIS implementation containing the values of the given object (may be the
      *         given object itself), or {@code null} if the argument was null.
      */
     public static AbstractIdentifiedObject castOrCopy(final IdentifiedObject object) {
@@ -467,7 +467,7 @@ public class AbstractIdentifiedObject ex
      *       Note that the converse does not need to hold.</li>
      * </ul>
      *
-     * @return The GeoAPI interface implemented by this class.
+     * @return the GeoAPI interface implemented by this class.
      */
     public Class<? extends IdentifiedObject> getInterface() {
         return IdentifiedObject.class;
@@ -476,7 +476,7 @@ public class AbstractIdentifiedObject ex
     /**
      * Returns the primary name by which this object is identified.
      *
-     * @return The primary name.
+     * @return the primary name.
      *
      * @see IdentifiedObjects#getName(IdentifiedObject, Citation)
      */
@@ -488,7 +488,7 @@ public class AbstractIdentifiedObject ex
     /**
      * Returns alternative names by which this object is identified.
      *
-     * @return The aliases, or an empty collection if there is none.
+     * @return the aliases, or an empty collection if there is none.
      *
      * @see #getName()
      */
@@ -501,7 +501,7 @@ public class AbstractIdentifiedObject ex
      * Returns identifiers which references elsewhere the object's defining information.
      * Alternatively identifiers by which this object can be referenced.
      *
-     * @return This object identifiers, or an empty set if there is none.
+     * @return this object identifiers, or an empty set if there is none.
      *
      * @see IdentifiedObjects#getIdentifier(IdentifiedObject, Citation)
      */
@@ -518,7 +518,7 @@ public class AbstractIdentifiedObject ex
      * {@linkplain org.apache.sis.metadata.iso.ImmutableIdentifier#getDescription() description}
      * provided by this object's {@linkplain #getName() name}.
      *
-     * @return A narrative explanation of the role of this object, or {@code null} if none.
+     * @return a narrative explanation of the role of this object, or {@code null} if none.
      *
      * @see org.apache.sis.metadata.iso.ImmutableIdentifier#getDescription()
      *
@@ -534,7 +534,7 @@ public class AbstractIdentifiedObject ex
      * If this object {@linkplain #isDeprecated() is deprecated}, then the remarks should give
      * indication about the replacement (e.g. <cite>"superceded by …"</cite>).
      *
-     * @return The remarks, or {@code null} if none.
+     * @return the remarks, or {@code null} if none.
      */
     @Override
     @XmlElement(name = "remarks")
@@ -614,7 +614,7 @@ public class AbstractIdentifiedObject ex
      * with different data producers. Those rules may be adjusted in any future SIS version according experience
      * gained while working with more data producers.
      *
-     * @param  name The name to compare with the object name or aliases.
+     * @param  name  the name to compare with the object name or aliases.
      * @return {@code true} if the primary name or at least one alias matches the specified {@code name}.
      *
      * @see IdentifiedObjects#isHeuristicMatchForName(IdentifiedObject, String)
@@ -674,8 +674,8 @@ public class AbstractIdentifiedObject ex
      * <cite>transitive</cite>. See {@link LenientComparable#equals(Object, ComparisonMode) LenientComparable}
      * for more information.
      *
-     * @param  object The object to compare to {@code this}.
-     * @param  mode The strictness level of the comparison.
+     * @param  object  the object to compare to {@code this}.
+     * @param  mode    the strictness level of the comparison.
      * @return {@code true} if both objects are equal according the given comparison mode.
      *
      * @see #computeHashCode()
@@ -764,7 +764,7 @@ public class AbstractIdentifiedObject ex
      *
      * Subclasses shall override {@link #equals(Object, ComparisonMode)} instead than this method.
      *
-     * @param  object The other object (may be {@code null}).
+     * @param  object  the other object (may be {@code null}).
      * @return {@code true} if both objects are equal.
      */
     @Override
@@ -786,10 +786,10 @@ public class AbstractIdentifiedObject ex
      * This method invokes {@link #computeHashCode()} when first needed, then caches the result.
      * Subclasses shall override {@link #computeHashCode()} instead than this method.
      *
-     * @return The hash code value. This value may change in any future Apache SIS version.
+     * @return the hash code value. This value may change in any future Apache SIS version.
      */
     @Override
-    public final int hashCode() { // No need to synchronize; ok if invoked twice.
+    public final int hashCode() {                       // No need to synchronize; ok if invoked twice.
         int hash = hashCode;
         if (hash == 0) {
             hash = Numerics.hashCode(computeHashCode());
@@ -821,7 +821,7 @@ public class AbstractIdentifiedObject ex
      *     }
      * }
      *
-     * @return The hash code value. This value may change in any future Apache SIS version.
+     * @return the hash code value. This value may change in any future Apache SIS version.
      */
     protected long computeHashCode() {
         return Objects.hash(name, nonNull(alias), nonNull(identifiers), remarks) ^ getInterface().hashCode();
@@ -866,8 +866,8 @@ public class AbstractIdentifiedObject ex
      * <p>Alternatively, the implementation may also have no WKT keyword for this object.
      * In such case, this method shall return {@code null}.</p>
      *
-     * @param  formatter The formatter where to format the inner content of this WKT element.
-     * @return The {@linkplain org.apache.sis.io.wkt.KeywordCase#CAMEL_CASE CamelCase} keyword
+     * @param  formatter  the formatter where to format the inner content of this WKT element.
+     * @return the {@linkplain org.apache.sis.io.wkt.KeywordCase#CAMEL_CASE CamelCase} keyword
      *         for the WKT element, or {@code null} if unknown.
      *
      * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#21">WKT 2 specification §7</a>

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/Deprecable.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/Deprecable.java?rev=1770950&r1=1770949&r2=1770950&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/Deprecable.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/Deprecable.java [UTF-8] Wed Nov 23 12:04:08 2016
@@ -60,9 +60,8 @@ public interface Deprecable {
      *
      * <div class="note"><b>Example:</b> "superseded by code XYZ".</div>
      *
-     * @return Comments about this instance, or {@code null} if none. Shall be the
-     *         reason for deprecation or the alternative to use if this instance
-     *         {@linkplain #isDeprecated() is deprecated}.
+     * @return comments about this instance, or {@code null} if none. Shall be the reason for deprecation
+     *         or the alternative to use if this instance {@linkplain #isDeprecated() is deprecated}.
      */
     InternationalString getRemarks();
 }

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java?rev=1770950&r1=1770949&r2=1770950&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java [UTF-8] Wed Nov 23 12:04:08 2016
@@ -197,6 +197,11 @@ public final class Vocabulary extends In
         public static final short DefaultValue = 71;
 
         /**
+         * Deprecated
+         */
+        public static final short Deprecated = 117;
+
+        /**
          * Derived from {0}
          */
         public static final short DerivedFrom_1 = 108;
@@ -487,6 +492,11 @@ public final class Vocabulary extends In
         public static final short Quoted_1 = 86;
 
         /**
+         * Remarks
+         */
+        public static final short Remarks = 116;
+
+        /**
          * Remote configuration
          */
         public static final short RemoteConfiguration = 93;

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties?rev=1770950&r1=1770949&r2=1770950&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties [ISO-8859-1] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties [ISO-8859-1] Wed Nov 23 12:04:08 2016
@@ -42,6 +42,7 @@ Datum                   = Datum
 DatumShift              = Datum shift
 DaylightTime            = Daylight time
 DefaultValue            = Default value
+Deprecated              = Deprecated
 DerivedFrom_1           = Derived from {0}
 Description             = Description
 Destination             = Destination
@@ -100,6 +101,7 @@ Others                  = Others
 OtherSurface            = Other surface
 Paths                   = Paths
 Quoted_1                = \u201c{0}\u201d
+Remarks                 = Remarks
 RemoteConfiguration     = Remote configuration
 Root                    = Root
 RootMeanSquare          = Root Mean Square

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties?rev=1770950&r1=1770949&r2=1770950&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties [ISO-8859-1] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties [ISO-8859-1] Wed Nov 23 12:04:08 2016
@@ -49,6 +49,7 @@ Datum                   = R\u00e9f\u00e9
 DatumShift              = Changement de r\u00e9f\u00e9rentiel
 DaylightTime            = Heure normale
 DefaultValue            = Valeur par d\u00e9faut
+Deprecated              = Obsol\u00e8te
 DerivedFrom_1           = D\u00e9riv\u00e9 de {0}
 Description             = Description
 Destination             = Destination
@@ -107,6 +108,7 @@ Others                  = Autres
 OtherSurface            = Autre surface
 Paths                   = Chemins
 Quoted_1                = \u00ab\u202f{0}\u202f\u00bb
+Remarks                 = Remarques
 RemoteConfiguration     = Configuration distante
 Root                    = Racine
 RootMeanSquare          = Moyenne quadratique



Mime
View raw message