sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1471630 - in /sis/branches/JDK7: sis-metadata/src/main/java/org/apache/sis/metadata/ sis-utility/src/main/java/org/apache/sis/internal/util/ sis-utility/src/main/java/org/apache/sis/util/ sis-utility/src/main/java/org/apache/sis/util/colle...
Date Wed, 24 Apr 2013 20:13:58 GMT
Author: desruisseaux
Date: Wed Apr 24 20:13:58 2013
New Revision: 1471630

URL: http://svn.apache.org/r1471630
Log:
Various minor updates in preparation for the addition of MetadataTreeTable.

Modified:
    sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java
    sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java
    sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyMap.java
    sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/ValueExistencePolicy.java
    sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/ValueMap.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/util/UnmodifiableArrayList.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Classes.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/DefaultTreeTable.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/TableColumn.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTable.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTables.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties

Modified: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java?rev=1471630&r1=1471629&r2=1471630&view=diff
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java
[UTF-8] (original)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java
[UTF-8] Wed Apr 24 20:13:58 2013
@@ -431,13 +431,13 @@ public class MetadataStandard {
      * {@linkplain KeyNamePolicy#METHOD_NAME method names} or {@linkplain KeyNamePolicy#SENTENCE
      * sentences} (usually in English).
      *
-     * <p><b>Example:</b> The {@code value} in the following code is
-     * <code>"alternateTitle<u>s</u>"</code> (note the plural):</p>
+     * <p><b>Example:</b> the following code prints <code>"alternateTitle<u>s</u>"</code>
(note the plural):</p>
      *
      * {@preformat java
      *   MetadataStandard standard = MetadataStandard.ISO_19115;
      *   Map<String, String> names = standard.asNameMap(Citation.class, UML_IDENTIFIER,
JAVABEANS_PROPERTY);
-     *   String value = names.get("alternateTitle");  // alternateTitles
+     *   String value = names.get("alternateTitle");
+     *   System.out.println(value); // alternateTitles
      * }
      *
      * The {@code keyPolicy} argument specify only the string representation of keys returned
by the iterators.
@@ -471,12 +471,14 @@ public class MetadataStandard {
      * argument, which can be {@linkplain TypeValuePolicy#ELEMENT_TYPE element type} or the
      * {@linkplain TypeValuePolicy#DECLARING_INTERFACE declaring interface} among others.
      *
-     * <p><b>Example:</b> The {@code value} in the following code is {@code
InternationalString.class}:</p>
+     * <p><b>Example:</b> the following code prints the
+     * {@link org.opengis.util.InternationalString} class name:</p>
      *
      * {@preformat java
      *   MetadataStandard  standard = MetadataStandard.ISO_19115;
      *   Map<String,Class<?>> types = standard.asTypeMap(Citation.class, UML_IDENTIFIER,
ELEMENT_TYPE);
-     *   Class<?> value = names.get("alternateTitle");  // InternationalString.class
+     *   Class<?> value = types.get("alternateTitle");
+     *   System.out.println(value);  // class org.opengis.util.InternationalString
      * }
      *
      * @param  type        The interface or implementation class of a metadata.
@@ -521,15 +523,15 @@ public class MetadataStandard {
      *     <ul>
      *       <li>The {@linkplain CheckedContainer#getElementType() element type} is
the type of property values
      *           as defined by {@link TypeValuePolicy#ELEMENT_TYPE}.</li>
-     *
-     *       {@note The rational for implementing <code>CheckedContainer</code>
is to consider each
-     *       <code>ExtendedElementInformation</code> instance as the set of all
possible values for
-     *       the property. If the information had a <code>contains(E)</code>
method, it would return
-     *       <code>true</code> if the given value is valid for that property.}
      *     </ul>
      *   </li>
      * </ul>
      *
+     * {@note The rational for implementing <code>CheckedContainer</code> is
to consider each
+     * <code>ExtendedElementInformation</code> instance as the set of all possible
values for
+     * the property. If the information had a <code>contains(E)</code> method,
it would return
+     * <code>true</code> if the given value is valid for that property.}
+     *
      * In addition, for each map entry the value returned by {@link ExtendedElementInformation#getDomainValue()}
      * may optionally be an instance of any of the following classes:
      *
@@ -542,6 +544,8 @@ public class MetadataStandard {
      * @return Information about all properties defined in the given metadata type.
      * @throws ClassCastException if the given type doesn't implement a metadata
      *         interface of the expected package.
+     *
+     * @see org.apache.sis.metadata.iso.DefaultExtendedElementInformation
      */
     public Map<String,ExtendedElementInformation> asInformationMap(Class<?> type,
             final KeyNamePolicy keyPolicy) throws ClassCastException

Modified: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java?rev=1471630&r1=1471629&r2=1471630&view=diff
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java
[UTF-8] (original)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java
[UTF-8] Wed Apr 24 20:13:58 2013
@@ -432,6 +432,8 @@ final class PropertyAccessor {
 
     /**
      * Returns the number of properties that can be read.
+     *
+     * @see #count(Object, ValueExistencePolicy, int)
      */
     final int count() {
         return standardCount;
@@ -897,6 +899,34 @@ final class PropertyAccessor {
     }
 
     /**
+     * Counts the number of non-null or non-empty properties.
+     *
+     * @param  max Stop the count if we reach that value (indicative purpose only).
+     * @param  valuePolicy The behavior of the count toward null or empty values.
+     * @throws BackingStoreException If the implementation threw a checked exception.
+     *
+     * @see #count()
+     */
+    public int count(final Object metadata, final ValueExistencePolicy valuePolicy, final
int max)
+            throws BackingStoreException
+    {
+        assert type.isInstance(metadata) : metadata;
+        if (valuePolicy == ValueExistencePolicy.ALL) {
+            return count();
+        }
+        int count = 0;
+        for (int i=0; i<standardCount; i++) {
+            final Object value = get(getters[i], metadata);
+            if (!valuePolicy.isSkipped(value)) {
+                if (++count >= max) {
+                    break;
+                }
+            }
+        }
+        return count;
+    }
+
+    /**
      * Compares the two specified metadata objects. This method implements a <cite>shallow</cite>
      * comparison, i.e. all metadata properties are compared using their {@code properties.equals(…)}
      * method without explicit calls to this {@code accessor.equals(…)} method for children.
@@ -1033,23 +1063,4 @@ final class PropertyAccessor {
         }
         return code;
     }
-
-    /**
-     * Counts the number of non-empty properties.
-     *
-     * @param  max Stop the count if we reach that value.
-     * @throws BackingStoreException If the implementation threw a checked exception.
-     */
-    public int count(final Object metadata, final int max) throws BackingStoreException {
-        assert type.isInstance(metadata) : metadata;
-        int count = 0;
-        for (int i=0; i<standardCount; i++) {
-            if (!isNullOrEmpty(get(getters[i], metadata))) {
-                if (++count >= max) {
-                    break;
-                }
-            }
-        }
-        return count;
-    }
 }

Modified: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyMap.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyMap.java?rev=1471630&r1=1471629&r2=1471630&view=diff
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyMap.java
[UTF-8] (original)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyMap.java
[UTF-8] Wed Apr 24 20:13:58 2013
@@ -43,7 +43,7 @@ import java.util.Iterator;
  */
 abstract class PropertyMap<V> extends AbstractMap<String,V> {
     /**
-     * The accessor to use for the metadata.
+     * The accessor to use for accessing the property names, types or values.
      */
     final PropertyAccessor accessor;
 

Modified: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/ValueExistencePolicy.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/ValueExistencePolicy.java?rev=1471630&r1=1471629&r2=1471630&view=diff
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/ValueExistencePolicy.java
[UTF-8] (original)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/ValueExistencePolicy.java
[UTF-8] Wed Apr 24 20:13:58 2013
@@ -23,9 +23,9 @@ import java.lang.reflect.Array;
 
 /**
  * Whatever {@link MetadataStandard#asValueMap MetadataStandard.asValueMap(…)} shall contain
- * entries for null values or empty collections. By default the map does not provide
+ * entries for null or empty values. By default the map does not provide
  * {@linkplain java.util.Map.Entry entries} for {@code null} metadata properties or
- * {@linkplain java.util.Collection#isEmpty() empty} collections.
+ * {@linkplain java.util.Collection#isEmpty() empty collections}.
  * This enumeration allows control on this behavior.
  *
  * @author  Martin Desruisseaux (Geomatys)
@@ -40,21 +40,45 @@ public enum ValueExistencePolicy {
      * Includes all entries in the map, including those having a null value or an
      * empty collection.
      */
-    ALL,
+    ALL() {
+        @Override boolean isSkipped(final Object value) {
+            return false;
+        }
+    },
 
     /**
      * Includes only the non-null properties.
      * Collections are included no matter if they are empty or not.
      */
-    NON_NULL,
+    NON_NULL() {
+        @Override boolean isSkipped(final Object value) {
+            return (value == null);
+        }
+    },
 
     /**
-     * Includes only the properties that are non-null and, in the case of collections,
-     * non-{@linkplain java.util.Collection#isEmpty() empty}.
+     * Includes only the properties that are non-null and non empty.
+     * A non-null property is considered empty if:
+     *
+     * <ul>
+     *   <li>It is a character sequence containing only {@linkplain Character#isWhitespace(int)
whitespaces}.</li>
+     *   <li>It is an {@linkplain Collection#isEmpty() empty collection}.</li>
+     *   <li>It is an {@linkplain Map#isEmpty() empty map}.</li>
+     *   <li>It is an empty array (of length 0).</li>
+     * </ul>
+     *
      * This is the default behavior of {@link AbstractMetadata#asMap()}.
      */
-    NON_EMPTY;
+    NON_EMPTY() {
+        @Override boolean isSkipped(final Object value) {
+            return isNullOrEmpty(value);
+        }
+    };
 
+    /**
+     * Returns {@code true} if the given value shall be skipped for this policy.
+     */
+    abstract boolean isSkipped(Object value);
 
     /**
      * Returns {@code true} if the specified object is null or an empty collection, array
or string.

Modified: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/ValueMap.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/ValueMap.java?rev=1471630&r1=1471629&r2=1471630&view=diff
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/ValueMap.java [UTF-8]
(original)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/ValueMap.java [UTF-8]
Wed Apr 24 20:13:58 2013
@@ -49,7 +49,7 @@ final class ValueMap extends PropertyMap
     final ValueExistencePolicy valuePolicy;
 
     /**
-     * Creates a property map for the specified metadata and accessor.
+     * Creates a map of values for the specified metadata and accessor.
      *
      * @param metadata    The metadata object to wrap.
      * @param accessor    The accessor to use for the metadata.
@@ -65,18 +65,11 @@ final class ValueMap extends PropertyMap
     }
 
     /**
-     * Returns {@code true} if the given value should be ignored.
-     */
-    final boolean ignore(final Object value) {
-        return valuePolicy == ValueExistencePolicy.NON_EMPTY && ValueExistencePolicy.isNullOrEmpty(value);
-    }
-
-    /**
      * Returns {@code true} if this map contains no key-value mappings.
      */
     @Override
     public boolean isEmpty() {
-        return accessor.count(metadata, 1) == 0;
+        return accessor.count(metadata, valuePolicy, 1) == 0;
     }
 
     /**
@@ -84,7 +77,7 @@ final class ValueMap extends PropertyMap
      */
     @Override
     public int size() {
-        return accessor.count(metadata, Integer.MAX_VALUE);
+        return accessor.count(metadata, valuePolicy, Integer.MAX_VALUE);
     }
 
     /**
@@ -103,7 +96,7 @@ final class ValueMap extends PropertyMap
     public Object get(final Object key) {
         if (key instanceof String) {
             final Object value = accessor.get(accessor.indexOf((String) key, false), metadata);
-            if (!ignore(value)) {
+            if (!valuePolicy.isSkipped(value)) {
                 return value;
             }
         }
@@ -120,7 +113,7 @@ final class ValueMap extends PropertyMap
     @Override
     public Object put(final String key, final Object value) {
         final Object old = accessor.set(accessor.indexOf(key, true), metadata, value, true);
-        return ignore(old) ? null : old;
+        return valuePolicy.isSkipped(old) ? null : old;
     }
 
     /**
@@ -147,7 +140,7 @@ final class ValueMap extends PropertyMap
     public Object remove(final Object key) throws UnsupportedOperationException {
         if (key instanceof String) {
             final Object old = accessor.set(accessor.indexOf((String) key, false), metadata,
null, true);
-            if (!ignore(old)) {
+            if (!valuePolicy.isSkipped(old)) {
                 return old;
             }
         }
@@ -219,7 +212,7 @@ final class ValueMap extends PropertyMap
         @Override
         public Object getValue() {
             final Object value = accessor.get(index, metadata);
-            return ignore(value) ? null : value;
+            return valuePolicy.isSkipped(value) ? null : value;
         }
 
         /**
@@ -299,26 +292,7 @@ final class ValueMap extends PropertyMap
         private void move(int index) {
             final int count = accessor.count();
             while (index < count) {
-                final Object value = accessor.get(index, metadata);
-                final boolean skip;
-                switch (valuePolicy) {
-                    case ALL: {
-                        skip = false; // Never skip entries.
-                        break;
-                    }
-                    case NON_NULL: {
-                        skip = (value == null); // Skip only null values (not empty collections).
-                        break;
-                    }
-                    case NON_EMPTY: {
-                        skip = ValueExistencePolicy.isNullOrEmpty(value);
-                        break;
-                    }
-                    default: {
-                        throw new AssertionError(valuePolicy);
-                    }
-                }
-                if (!skip) {
+                if (!valuePolicy.isSkipped(accessor.get(index, metadata))) {
                     next = new Property(index);
                     return;
                 }

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/util/UnmodifiableArrayList.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/util/UnmodifiableArrayList.java?rev=1471630&r1=1471629&r2=1471630&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/util/UnmodifiableArrayList.java
[UTF-8] (original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/util/UnmodifiableArrayList.java
[UTF-8] Wed Apr 24 20:13:58 2013
@@ -79,14 +79,17 @@ public class UnmodifiableArrayList<E> ex
      * <p>This constructor is for sub-classing only. Users should invoke the {@link
#wrap(Object[])}
      * static method instead.</p>
      *
+     * <p>The argument type is intentionally {@code E[]} instead than {@code E...}
in order to force
+     * the caller to instantiate the array explicitely, in order to make sure that the array
type is
+     * the intended one.</p>
+     *
      * {@section WARNING! Type safety hole}
      * Callers <strong>must</strong> ensure that the type of array elements in
exactly {@code E},
      * not a subtype of {@code E}. See class javadoc for more information.
      *
      * @param array The array to wrap.
      */
-    @SafeVarargs
-    protected UnmodifiableArrayList(final E... array) {
+    protected UnmodifiableArrayList(final E[] array) { // NOT "E..." - see javadoc.
         this.array = Objects.requireNonNull(array);
     }
 
@@ -101,13 +104,16 @@ public class UnmodifiableArrayList<E> ex
      * should use {@link org.apache.sis.util.collection.Containers#unmodifiableList(E[])}
instead.
      * See class javadoc for more information.
      *
+     * <p>The argument type is intentionally {@code E[]} instead than {@code E...}
in order to force
+     * the caller to instantiate the array explicitely, in order to make sure that the array
type is
+     * the intended one.</p>
+     *
      * @param  <E> The type of elements in the list.
      * @param  array The array to wrap, or {@code null} if none.
      * @return The given array wrapped in an unmodifiable list, or {@code null} if the given
      *         array was null.
      */
-    @SafeVarargs
-    public static <E> UnmodifiableArrayList<E> wrap(final E... array) {
+    public static <E> UnmodifiableArrayList<E> wrap(final E[] array) { // NOT
"E..." - see javadoc.
         return (array != null) ? new UnmodifiableArrayList<>(array) : null;
     }
 
@@ -132,9 +138,7 @@ public class UnmodifiableArrayList<E> ex
      * @param  upper High endpoint (exclusive) of the sublist.
      * @return The given array wrapped in an unmodifiable list.
      */
-    public static <E> UnmodifiableArrayList<E> wrap(final E[] array, final int
lower, final int upper)
-            throws IndexOutOfBoundsException
-    {
+    public static <E> UnmodifiableArrayList<E> wrap(final E[] array, final int
lower, final int upper) {
         if (lower == 0 && upper == array.length) {
             return new UnmodifiableArrayList<>(array);
         }

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Classes.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Classes.java?rev=1471630&r1=1471629&r2=1471630&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Classes.java [UTF-8] (original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Classes.java [UTF-8] Wed
Apr 24 20:13:58 2013
@@ -61,7 +61,7 @@ public final class Classes extends Stati
     private static final Class<?>[] EMPTY_ARRAY = new Class<?>[0];
 
     /**
-     * Methods to be rejected by {@link #isGetter(Method)}. They are mostly methods inherited
+     * Methods to be rejected by {@link #isPossibleGetter(Method)}. They are mostly methods
inherited
      * from {@link Object}. Only no-argument methods having a non-void return value need
to be
      * declared in this list.
      *

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/DefaultTreeTable.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/DefaultTreeTable.java?rev=1471630&r1=1471629&r2=1471630&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/DefaultTreeTable.java
[UTF-8] (original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/DefaultTreeTable.java
[UTF-8] Wed Apr 24 20:13:58 2013
@@ -286,7 +286,7 @@ public class DefaultTreeTable implements
 
     /**
      * Returns a string representation of this tree table.
-     * The default implementation performs the same work than {@link TreeTables#toString(TreeTable)}.
+     * The current implementation uses a shared instance of {@link TreeTableFormat}.
      * This is okay for debugging or occasional usages. However for more extensive usages,
      * developers are encouraged to create and configure their own {@link TreeTableFormat}
      * instance.
@@ -568,7 +568,7 @@ public class DefaultTreeTable implements
          * @see #isEditable(TableColumn)
          */
         @Override
-        public <V> void setValue(final TableColumn<V> column, final V value)
{
+        public <V> void setValue(final TableColumn<V> column, final V value)
throws IllegalArgumentException {
             ArgumentChecks.ensureNonNull("column", column);
             final Integer index = columnIndices.get(column);
             if (index == null) {

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/TableColumn.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/TableColumn.java?rev=1471630&r1=1471629&r2=1471630&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/TableColumn.java
[UTF-8] (original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/TableColumn.java
[UTF-8] Wed Apr 24 20:13:58 2013
@@ -116,6 +116,17 @@ public class TableColumn<V> implements C
             (Class) Class.class, Vocabulary.Keys.Type);
 
     /**
+     * Frequently-used constant for a column of object values.
+     * The column {@linkplain #getHeader() header} is "<cite>Value</cite>" (eventually
localized) and
+     * the column elements can be instance of any kind of objects.
+     *
+     * @see #VALUE_AS_TEXT
+     * @see #VALUE_AS_NUMBER
+     */
+    public static final TableColumn<Object> VALUE = new Constant<>("VALUE",
+            Object.class, Vocabulary.Keys.Value);
+
+    /**
      * Frequently-used constant for a column of object textual values.
      * The column {@linkplain #getHeader() header} is "<cite>Value</cite>" (eventually
localized) and
      * the column elements are typically instances of {@link String} or {@link InternationalString},

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTable.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTable.java?rev=1471630&r1=1471629&r2=1471630&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTable.java
[UTF-8] (original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTable.java
[UTF-8] Wed Apr 24 20:13:58 2013
@@ -157,8 +157,9 @@ public interface TreeTable {
          * at whatever position they see fit.
          *
          * @return The new child.
+         * @throws UnsupportedOperationException If this node can not add new children.
          */
-        Node newChild();
+        Node newChild() throws UnsupportedOperationException;
 
         /**
          * Returns the value in the given column, or {@code null} if none.
@@ -187,7 +188,7 @@ public interface TreeTable {
          * @see #isEditable(TableColumn)
          * @category table
          */
-        <V> void setValue(TableColumn<V> column, V value);
+        <V> void setValue(TableColumn<V> column, V value) throws IllegalArgumentException,
UnsupportedOperationException;
 
         /**
          * Determines whether the value in the specified column is editable. If the given

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTables.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTables.java?rev=1471630&r1=1471629&r2=1471630&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTables.java
[UTF-8] (original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTables.java
[UTF-8] Wed Apr 24 20:13:58 2013
@@ -251,7 +251,7 @@ public final class TreeTables extends St
 
     /**
      * Returns a string representation of the given tree table.
-     * The default implementation uses a shared instance of {@link TreeTableFormat}.
+     * The current implementation uses a shared instance of {@link TreeTableFormat}.
      * This is okay for debugging or occasional usages. However for more extensive usages,
      * developers are encouraged to create and configure their own {@code TreeTableFormat}
      * instance.

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java?rev=1471630&r1=1471629&r2=1471630&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
[UTF-8] (original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
[UTF-8] Wed Apr 24 20:13:58 2013
@@ -451,6 +451,11 @@ public final class Errors extends Indexe
         public static final int UnmodifiableAffineTransform = 23;
 
         /**
+         * The cell at column “{1}” of row “{0}” is unmodifiable.
+         */
+        public static final int UnmodifiableCellValue_2 = 89;
+
+        /**
          * This geometry is unmodifiable.
          */
         public static final int UnmodifiableGeometry = 24;

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties?rev=1471630&r1=1471629&r2=1471630&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
[ISO-8859-1] (original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
[ISO-8859-1] Wed Apr 24 20:13:58 2013
@@ -102,6 +102,7 @@ UnexpectedEndOfString_1         = More c
 UnknownType_1                   = Type \u2018{0}\u2019 is unknown in this context.
 UnknownTypeForProperty_1        = Type of the \u201c{0}\u201d property is unknown.
 UnmodifiableAffineTransform     = This affine transform is unmodifiable.
+UnmodifiableCellValue_2         = The cell at column \u201c{1}\u201d of row \u201c{0}\u201d
is unmodifiable.
 UnmodifiableGeometry            = This geometry is unmodifiable.
 UnmodifiableMetadata            = This metadata is unmodifiable.
 UnmodifiableObject_1            = Object \u2018{0}\u2019 is unmodifiable.

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties?rev=1471630&r1=1471629&r2=1471630&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
[ISO-8859-1] (original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
[ISO-8859-1] Wed Apr 24 20:13:58 2013
@@ -91,6 +91,7 @@ UnexpectedEndOfString_1         = D\u201
 UnknownType_1                   = Le type \u2018{0}\u2019 n\u2019est pas reconnu dans ce
contexte.
 UnknownTypeForProperty_1        = Le type de la propri\u00e9t\u00e9 \u201c{0}\u201d est inconnu.
 UnmodifiableAffineTransform     = Cette transformation affine n\u2019est pas modifiable.
+UnmodifiableCellValue_2         = La cellule \u00e0 la colonne \u201c{1}\u201d de la ligne
\u201c{0}\u201d n\u2019est pas modifiable.
 UnmodifiableGeometry            = Cette g\u00e9om\u00e9trie n\u2019est pas modifiable.
 UnmodifiableMetadata            = Cette m\u00e9ta-donn\u00e9e n\u2019est pas modifiable.
 UnmodifiableObject_1            = L\u2019objet \u2018{0}\u2019 n\u2019est pas modifiable.



Mime
View raw message