sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1480602 [11/15] - in /sis/branches/Android: ./ ide-project/ ide-project/NetBeans/ ide-project/NetBeans/nbproject/ ide-project/eclipse/ sis-app/src/main/java/org/apache/sis/cli/ sis-build-helper/ sis-build-helper/src/main/java/org/apache/si...
Date Thu, 09 May 2013 12:24:20 GMT
Modified: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/iso/ResourceInternationalString.java
URL: http://svn.apache.org/viewvc/sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/iso/ResourceInternationalString.java?rev=1480602&r1=1480601&r2=1480602&view=diff
==============================================================================
--- sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/iso/ResourceInternationalString.java [iso-8859-1] (original)
+++ sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/iso/ResourceInternationalString.java [UTF-8] Thu May  9 12:24:13 2013
@@ -25,38 +25,50 @@ import net.jcip.annotations.Immutable;
 
 import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
 
-// Related to JDK7
-import org.apache.sis.internal.util.Objects;
-
 
 /**
- * An international string backed by a {@linkplain ResourceBundle resource bundle}.
- * A resource bundle can be a Java class or a {@linkplain Properties properties} file,
- * one for each language. The constructor expects the fully qualified class name of the base
- * resource bundle (the one used when no resource was found in the client's language). The appropriate
- * resource bundle is loaded at runtime for the client's language by looking for a class or a
- * properties file with the right suffix, for example {@code "_en"} for English or {@code "_fr"}
- * for French. This mechanism is explained in J2SE javadoc for the
- * {@link ResourceBundle#getBundle(String, Locale, ClassLoader) getBundle(…)} static method.
+ * An international string backed by a {@link ResourceBundle}.
+ * Resource bundles can be Java classes or {@linkplain Properties properties} files, one for each
+ * language. The fully qualified class name of the base resource bundle (without locale suffix)
+ * is specified at {@linkplain #ResourceInternationalString(String, String) construction time}.
+ * The appropriate resource bundle is loaded at runtime for the client's language by looking for
+ * a class or a properties file with the right suffix, for example {@code "_en"} for English or
+ * {@code "_fr"} for French.
+ * See the {@link ResourceBundle#getBundle(String, Locale, ClassLoader) ResourceBundle.getBundle(…)}
+ * Javadoc for more information.
  *
  * {@section Example}
- * If a file named "{@code MyResources.properties}" exists in the package {@code org.mypackage}
- * and contains a line like "{@code MyKey = some value}", then an international string for
- * {@code "some value"} can be created using the following code:
+ * If a file named "{@code MyResources.properties}" exists in {@code org.mypackage}
+ * and contains the following line:
+ *
+ * {@preformat text
+ *     MyKey = some value
+ * }
+ *
+ * Then an international string for {@code "some value"} can be created using the following code:
  *
  * {@preformat java
  *     InternationalString value = new ResourceInternationalString("org.mypackage.MyResources", "MyKey");
  * }
  *
  * The {@code "some value"} string will be localized if the required properties files exist, for
- * example "{@code MyResources_fr.properties}" for French, "{@code MyResources_it.properties}"
+ * example "{@code MyResources_fr.properties}" for French, or "{@code MyResources_it.properties}"
  * for Italian, <i>etc</i>.
  * If needed, users can gain more control by overriding the {@link #getBundle(Locale)} method.
  *
+ * {@section Class loaders}
+ * Developers can specify explicitely the {@link ClassLoader} to use be overriding the
+ * {@link #getBundle(Locale)} method. This is recommended if the running environment
+ * loads modules in isolated class loaders, as OSGi does for instance.
+ *
+ * {@note We do not provide <code>ClassLoader</code> argument in the constructor of this class
+ *        because class loaders can often be hard-coded (thus avoiding the cost of an extra field)
+ *        and are usually not serializable.}
+ *
  * {@section Apache SIS resources}
  * Apache SIS has its own resources mechanism, built on top of the standard {@code ResourceBundle}
  * with the addition of type safety and optional arguments to be formatted in the localized string.
- * Those resource bundles provide {@code formatInternational(int, …)} static methods for creating
+ * Those resource bundles provide {@code formatInternational(int, …)} static methods for creating
  * international strings with the same functionality than this {@code ResourceInternationalString}.
  * See {@link org.apache.sis.util.resources} for more information.
  *
@@ -65,79 +77,88 @@ import org.apache.sis.internal.util.Obje
  * @since   0.3 (derived from geotk-2.1)
  * @version 0.3
  * @module
+ *
+ * @see ResourceBundle#getBundle(String, Locale)
  */
 @Immutable
 public class ResourceInternationalString extends AbstractInternationalString implements Serializable {
     /**
      * Serial number for inter-operability with different versions.
      */
-    private static final long serialVersionUID = 6339944890723487336L;
+    private static final long serialVersionUID = -8636012022904092254L;
 
     /**
-     * The name of the resource bundle from which to fetch the string.
+     * The name of the resource bundle, as a fully qualified class name.
+     * This value is given at construction time and can not be {@code null}.
      */
-    private final String resources;
+    protected final String resources;
 
     /**
      * The key for the resource to fetch.
+     * This value is given at construction time and can not be {@code null}.
      */
-    private final String key;
-
-    /**
-     * The class loader to use for loading the resources file, or {@code null} for the default
-     * class loader.
-     */
-    private final transient ClassLoader loader;
+    protected final String key;
 
     /**
-     * Creates a new international string from the specified resource bundle, key and class loader.
+     * Creates a new international string from the specified resource bundle and key.
+     * The class loader will be the one of the {@link #toString(Locale)} caller,
+     * unless the {@link #getBundle(Locale)} method is overridden.
      *
      * @param resources The name of the resource bundle, as a fully qualified class name.
-     * @param key The key for the resource to fetch.
-     * @param loader The class loader to use for loading the resources file,
-     *        or {@code null} for the default class loader.
+     * @param key       The key for the resource to fetch.
      */
-    public ResourceInternationalString(final String resources, final String key, final ClassLoader loader) {
+    public ResourceInternationalString(final String resources, final String key) {
         this.resources = resources;
         this.key       = key;
-        this.loader    = loader;
         ensureNonNull("resources", resources);
         ensureNonNull("key",       key);
     }
 
     /**
      * Returns the resource bundle for the given locale. The default implementation fetches the
-     * bundle from the name given at {@linkplain #ResourceInternationalString(String,String)
-     * construction time}. Subclasses can override this method if they need to fetch the
-     * bundle in an other way.
+     * bundle from the name given at {@linkplain #ResourceInternationalString construction time}.
+     * Subclasses can override this method if they need to fetch the bundle in an other way.
+     *
+     * {@section Class loaders}
+     * By default, this method loads the resources using the caller's class loader.
+     * Subclasses can override this method in order to specify a different class loader.
+     * For example, the code below works well if {@code MyResource} is a class defined
+     * in the same module than the one that contain the resources to load:
+     *
+     * {@preformat java
+     *     &#64;Override
+     *     protected ResourceBundle getBundle(final Locale locale) {
+     *         return ResourceBundle.getBundle(resources, locale, MyResource.class.getClassLoader());
+     *     }
+     * }
      *
      * @param  locale The locale for which to get the resource bundle.
      * @return The resource bundle for the given locale.
      *
-     * @see ResourceBundle#getBundle(String, Locale)
+     * @see ResourceBundle#getBundle(String, Locale, ClassLoader)
      */
     protected ResourceBundle getBundle(final Locale locale) {
-        return (loader == null) ? ResourceBundle.getBundle(resources, locale) :
-                ResourceBundle.getBundle(resources, locale, loader);
+        return ResourceBundle.getBundle(resources, locale);
     }
 
     /**
      * Returns a string in the specified locale. If there is no string for the specified
-     * {@code locale}, then this method search for a string in an other locale as
+     * {@code locale}, then this method searches for a string in an other locale as
      * specified in the {@link ResourceBundle} class description.
      *
-     * @param  locale The locale to look for, or {@code null} for an unlocalized version.
-     * @return The string in the specified locale, or in a default locale.
+     * {@section Handling of <code>null</code> argument value}
+     * In the default implementation, the {@code null} locale is handled as a synonymous of
+     * {@code Locale.ROOT}. However subclasses are free to use a different fallback. Client
+     * code are encouraged to specify only non-null values for more determinist behavior.
+     *
+     * @param  locale The desired locale for the string to be returned.
+     * @return The string in the specified locale, or in a fallback locale.
      * @throws MissingResourceException is the key given to the constructor is invalid.
      */
     @Override
     public String toString(Locale locale) throws MissingResourceException {
         if (locale == null) {
-            // The English locale (NOT the system default) is often used
-            // as the real identifier in OGC IdentifiedObject naming. If
-            // a user wants a string in the system default locale, he
-            // should invokes the 'toString()' method instead.
-            locale = Locale.ENGLISH;
+            locale = Locale.ROOT; // For consistency with DefaultInternationalString.
         }
         return getBundle(locale).getString(key);
     }
@@ -152,8 +173,7 @@ public class ResourceInternationalString
     public boolean equals(final Object object) {
         if (object != null && object.getClass() == getClass()) {
             final ResourceInternationalString that = (ResourceInternationalString) object;
-            return Objects.equals(this.key,       that.key) &&
-                   Objects.equals(this.resources, that.resources);
+            return key.equals(that.key) && resources.equals(that.resources);
         }
         return false;
     }

Propchange: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/iso/ResourceInternationalString.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Modified: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/iso/SimpleInternationalString.java
URL: http://svn.apache.org/viewvc/sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/iso/SimpleInternationalString.java?rev=1480602&r1=1480601&r2=1480602&view=diff
==============================================================================
--- sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/iso/SimpleInternationalString.java [iso-8859-1] (original)
+++ sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/iso/SimpleInternationalString.java [UTF-8] Thu May  9 12:24:13 2013
@@ -26,7 +26,7 @@ import net.jcip.annotations.Immutable;
 import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
 
 // Related to JDK7
-import org.apache.sis.internal.util.Objects;
+import org.apache.sis.internal.jdk7.Objects;
 
 
 /**
@@ -49,7 +49,7 @@ public class SimpleInternationalString e
     /**
      * Serial number for inter-operability with different versions.
      */
-    private static final long serialVersionUID = 3543963804501667578L;
+    private static final long serialVersionUID = 7600371840915793379L;
 
     /**
      * Creates a new instance from the given string. If the type of the text

Propchange: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/iso/SimpleInternationalString.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Modified: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java
URL: http://svn.apache.org/viewvc/sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java?rev=1480602&r1=1480601&r2=1480602&view=diff
==============================================================================
--- sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java [iso-8859-1] (original)
+++ sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java [UTF-8] Thu May  9 12:24:13 2013
@@ -51,8 +51,8 @@ import org.apache.sis.internal.util.Defa
  *       for creating name-related objects from various objects.</li>
  *   <li>{@link #getStandardName(Class)}, {@link #getListName(CodeList)} and {@link #getCodeName(CodeList)}
  *       for fetching ISO names if possible.</li>
- *   <li>{@link #getCodeTitle(CodeList, Locale)}, {@link #getDescription(CodeList, Locale)} and
- *       {@link #getDescription(Class, Locale)} for fetching human-readable descriptions.</li>
+ *   <li>{@link #getCodeTitle(CodeList)}, {@link #getDescription(CodeList)} and
+ *       {@link #getDescription(Class)} for fetching human-readable descriptions.</li>
  *   <li>{@link #forStandardName(String)} and {@link #forCodeName(Class, String, boolean)} for
  *       fetching an instance from a name (converse of above {@code get} methods).</li>
  * </ul>
@@ -64,13 +64,6 @@ import org.apache.sis.internal.util.Defa
  */
 public final class Types extends Static {
     /**
-     * The class loader to use for fetching GeoAPI resources.
-     * Since the resources are bundled in the GeoAPI JAR file,
-     * we use the instance that loaded GeoAPI for more determinist behavior.
-     */
-    private static final ClassLoader CLASSLOADER = UML.class.getClassLoader();
-
-    /**
      * The types for ISO 19115 UML identifiers. The keys are UML identifiers. Values
      * are either class names as {@link String} objects, or the {@link Class} instances.
      * This map will be built only when first needed.
@@ -113,7 +106,13 @@ public final class Types extends Static 
             if (uml != null) {
                 final String id = uml.identifier();
                 if (id != null && !id.isEmpty()) {
-                    return id;
+                    /*
+                     * Workaround: I though that annotation strings were interned like any other constants,
+                     * but it does not seem to be the case as of JDK7.  To verify if this explicit call to
+                     * String.intern() is still needed in a future JDK release, see the workaround comment
+                     * in the org.apache.sis.metadata.PropertyAccessor.name(…) method.
+                     */
+                    return id.intern();
                 }
             }
         }
@@ -159,8 +158,9 @@ public final class Types extends Static 
      * @return The UML identifiers or programmatic name for the given code,
      *         or {@code null} if the given code is null.
      *
+     * @see #getCodeLabel(CodeList)
      * @see #getCodeTitle(CodeList)
-     * @see #getDescription(CodeList, Locale)
+     * @see #getDescription(CodeList)
      * @see #forCodeName(Class, String, boolean)
      */
     public static String getCodeName(final CodeList<?> code) {
@@ -175,7 +175,7 @@ public final class Types extends Static 
      * Returns a unlocalized title for the given code.
      * This method builds a title using heuristics rules, which should give reasonable
      * results without the need of resource bundles. For better results, consider using
-     * {@link #getCodeTitle(CodeList, Locale)} instead.
+     * {@link #getCodeTitle(CodeList)} instead.
      *
      * <p>The current heuristic implementation iterates over {@linkplain CodeList#names() all
      * code names}, selects the longest one excluding the {@linkplain CodeList#name() field name}
@@ -183,18 +183,19 @@ public final class Types extends Static 
      * from that name. Examples:</p>
      *
      * <ul>
-     *   <li>{@code getCodeTitle(AxisDirection.NORTH)} returns {@code "North"}.</li>
-     *   <li>{@code getCodeTitle(CharacterSet.UTF_8)} returns {@code "UTF-8"}.</li>
-     *   <li>{@code getCodeTitle(ImagingCondition.BLURRED_IMAGE)} returns {@code "Blurred image"}.</li>
+     *   <li>{@code getCodeLabel(AxisDirection.NORTH)} returns {@code "North"}.</li>
+     *   <li>{@code getCodeLabel(CharacterSet.UTF_8)} returns {@code "UTF-8"}.</li>
+     *   <li>{@code getCodeLabel(ImagingCondition.BLURRED_IMAGE)} returns {@code "Blurred image"}.</li>
      * </ul>
      *
      * @param  code The code from which to get a title, or {@code null}.
      * @return A unlocalized title for the given code, or {@code null} if the given code is null.
      *
      * @see #getCodeName(CodeList)
-     * @see #getDescription(CodeList, Locale)
+     * @see #getCodeTitle(CodeList)
+     * @see #getDescription(CodeList)
      */
-    public static String getCodeTitle(final CodeList<?> code) {
+    public static String getCodeLabel(final CodeList<?> code) {
         if (code == null) {
             return null;
         }
@@ -212,121 +213,197 @@ public final class Types extends Static 
     }
 
     /**
-     * Returns the localized title of the given code.
-     * Special cases:
-     *
-     * <ul>
-     *   <li>If {@code code} is {@code null}, then this method returns {@code null}.</li>
-     *   <li>If {@code locale} is {@code null}, then this method uses {@link Locale#US}
-     *       as a close approximation of "unlocalized" strings since OGC standards are
-     *       defined in English.</li>
-     *   <li>If there is no resources for the given code in the given language, then this method
-     *       fallback on other languages as described in {@link ResourceBundle} javadoc.</li>
-     *   <li>If there is no localized resources for the given code, then this method fallback
-     *       on {@link #getCodeTitle(CodeList)}.</li>
-     * </ul>
+     * Returns the title of the given code. Title are usually much shorter than descriptions.
+     * English titles are often the same than the {@linkplain #getCodeLabel(CodeList) code labels}.
      *
-     * @param  code   The code for which to get the localized name, or {@code null}.
-     * @param  locale The local, or {@code null} if none.
-     * @return The localized title, or {@code null} if the given code is null.
+     * @param  code The code for which to get the title, or {@code null}.
+     * @return The title, or {@code null} if the given code is null.
      *
-     * @see #getDescription(CodeList, Locale)
+     * @see #getDescription(CodeList)
      */
-    public static String getCodeTitle(final CodeList<?> code, Locale locale) {
-        if (code == null) {
-            return null;
-        }
-        if (locale == null) {
-            locale = Locale.US;
-        }
-        /*
-         * The code below is a duplicated - in a different way - of CodeListProxy(CodeList)
-         * constructor (org.apache.sis.internal.jaxb.code package). This duplication exists
-         * because CodeListProxy constructor stores more information in an opportunist way.
-         * If this method is updated, please update CodeListProxy(CodeList) accordingly.
-         */
-        final String key = getListName(code) + '.' + getCodeName(code);
-        try {
-            return ResourceBundle.getBundle("org.opengis.metadata.CodeLists", locale, CLASSLOADER).getString(key);
-        } catch (MissingResourceException e) {
-            Logging.recoverableException(Types.class, "getCodeTitle", e);
-            return getCodeTitle(code);
-        }
+    public static InternationalString getCodeTitle(final CodeList<?> code) {
+        return (code != null) ? new CodeTitle(code) : null;
     }
 
     /**
-     * Returns the localized description of the given code, or {@code null} if none.
-     * Special cases:
-     *
-     * <ul>
-     *   <li>If {@code code} is {@code null}, then this method returns {@code null}.</li>
-     *   <li>If {@code locale} is {@code null}, then this method uses the
-     *       {@linkplain Locale#getDefault() default locale} - there is no such thing
-     *       like "unlocalized" description.</li>
-     *   <li>If there is no resources for the given code in the given language, then this method
-     *       fallback on other languages as described in {@link ResourceBundle} javadoc.</li>
-     *   <li>If there is no localized resources for the given code, then this method returns
-     *       {@code null} - there is no fallback.</li>
-     * </ul>
-     *
+     * Returns the description of the given code, or {@code null} if none.
      * For a description of the code list as a whole instead than a particular code,
-     * see {@link Types#getDescription(Class, Locale)}.
+     * see {@link Types#getDescription(Class)}.
      *
-     * @param  code   The code for which to get the localized description, or {@code null}.
-     * @param  locale The desired local, or {@code null} for the default locale.
-     * @return The localized description, or {@code null} if the given code is null.
+     * @param  code The code for which to get the localized description, or {@code null}.
+     * @return The description, or {@code null} if none or if the given code is null.
      *
-     * @see #getCodeTitle(CodeList, Locale)
-     * @see #getDescription(Class, Locale)
+     * @see #getCodeTitle(CodeList)
+     * @see #getDescription(Class)
      */
-    public static String getDescription(final CodeList<?> code, final Locale locale) {
-        return (code != null) ? getDescription(getListName(code) + '.' + getCodeName(code), locale) : null;
+    public static InternationalString getDescription(final CodeList<?> code) {
+        if (code != null) {
+            final String resources = getResources(code.getClass().getName());
+            if (resources != null) {
+                return new Description(resources, getListName(code) + '.' + getCodeName(code));
+            }
+        }
+        return null;
     }
 
     /**
-     * Returns a localized description for the given class, or {@code null} if none.
+     * Returns a description for the given class, or {@code null} if none.
      * This method can be used for GeoAPI interfaces or {@link CodeList}.
-     * Special cases:
-     *
-     * <ul>
-     *   <li>If {@code code} is {@code null}, then this method returns {@code null}.</li>
-     *   <li>If {@code locale} is {@code null}, then this method uses the
-     *       {@linkplain Locale#getDefault() default locale} - there is no such thing
-     *       like "unlocalized" description.</li>
-     *   <li>If there is no resources for the given type in the given language, then this method
-     *       fallback on other languages as described in {@link ResourceBundle} javadoc.</li>
-     *   <li>If there is no localized resources for the given type, then this method returns
-     *       {@code null} - there is no fallback.</li>
-     * </ul>
      *
      * @param  type The GeoAPI interface or code list from which to get the description, or {@code null}.
-     * @param  locale The desired local, or {@code null} for the default locale.
-     * @return The ISO name for the given type, or {@code null} if none or if the type is {@code null}.
+     * @return The description, or {@code null} if none or if the given type is {@code null}.
      *
-     * @see #getDescription(CodeList, Locale)
+     * @see #getDescription(CodeList)
      */
-    public static String getDescription(final Class<?> type, final Locale locale) {
-        return getDescription(getStandardName(type), locale);
+    public static InternationalString getDescription(final Class<?> type) {
+        final String name = getStandardName(type);
+        if (name != null) {
+            final String resources = getResources(type.getName());
+            if (resources != null) {
+                return new Description(resources, name);
+            }
+        }
+        return null;
     }
 
     /**
-     * Returns the descriptions for the given key in the given locale.
-     *
-     * @param  key     The ISO identifier of a class, or a class property, or a code list value.
-     * @param  locale  The locale in which to get the description.
-     * @return The description, or {@code null} if none.
-     */
-    private static String getDescription(final String key, Locale locale) {
-        if (key != null) {
-            if (locale == null) {
-                locale = Locale.getDefault();
+     * Returns a description for the given property, or {@code null} if none.
+     * The given type shall be a GeoAPI interface, and the given property shall
+     * be a UML identifier. If any of the input argument is {@code null}, then
+     * this method returns {@code null}.
+     *
+     * @param  type     The GeoAPI interface from which to get the description of a property, or {@code null}.
+     * @param  property The ISO name of the property for which to get the description, or {@code null}.
+     * @return The description, or {@code null} if none or if the given type or property name is {@code null}.
+     */
+    public static InternationalString getDescription(final Class<?> type, final String property) {
+        if (property != null) {
+            final String name = getStandardName(type);
+            if (name != null) {
+                final String resources = getResources(type.getName());
+                if (resources != null) {
+                    return new Description(resources, name + '.' + property);
+                }
             }
+        }
+        return null;
+    }
+
+    /**
+     * The {@link InternationalString} returned by the {@code Types.getDescription(…)} methods.
+     *
+     * @author  Martin Desruisseaux (Geomatys)
+     * @since   0.3
+     * @version 0.3
+     * @module
+     */
+    private static class Description extends ResourceInternationalString {
+        /**
+         * For cross-version compatibility.
+         */
+        private static final long serialVersionUID = -6202647167398898834L;
+
+        /**
+         * The class loader to use for fetching GeoAPI resources.
+         * Since the resources are bundled in the GeoAPI JAR file,
+         * we use the instance that loaded GeoAPI for more determinist behavior.
+         */
+        private static final ClassLoader CLASSLOADER = UML.class.getClassLoader();
+
+        /**
+         * Creates a new international string from the specified resource bundle and key.
+         *
+         * @param resources The name of the resource bundle, as a fully qualified class name.
+         * @param key       The key for the resource to fetch.
+         */
+        Description(final String resources, final String key) {
+            super(resources, key);
+        }
+
+        /**
+         * Loads the resources using the class loader used for loading GeoAPI interfaces.
+         */
+        @Override
+        protected final ResourceBundle getBundle(final Locale locale) {
+            return ResourceBundle.getBundle(resources, locale, CLASSLOADER);
+        }
+
+        /**
+         * Returns the description for the given locale, or fallback on a default description
+         * if no resources exist for that locale.
+         */
+        @Override
+        public final String toString(final Locale locale) {
             try {
-                return ResourceBundle.getBundle("org.opengis.metadata.Descriptions", locale, CLASSLOADER).getString(key);
+                return super.toString(locale);
             } catch (MissingResourceException e) {
-                Logging.recoverableException(Types.class, "getDescription", e);
+                Logging.recoverableException(ResourceInternationalString.class, "toString", e);
+                return fallback();
             }
         }
+
+        /**
+         * Returns a fallback if no resource is found.
+         */
+        String fallback() {
+            return CharSequences.camelCaseToSentence(key.substring(key.lastIndexOf('.') + 1)).toString();
+        }
+    }
+
+    /**
+     * The {@link InternationalString} returned by the {@code Types.getCodeTitle(…)} method.
+     * The code below is a duplicated - in a different way - of {@code CodeListProxy(CodeList)}
+     * constructor ({@link org.apache.sis.internal.jaxb.code package}). This duplication exists
+     * because {@code CodeListProxy} constructor stores more information in an opportunist way.
+     * If this method is updated, please update {@code CodeListProxy(CodeList)} accordingly.
+     *
+     * @author  Martin Desruisseaux (Geomatys)
+     * @since   0.3
+     * @version 0.3
+     * @module
+     */
+    private static final class CodeTitle extends Description {
+        /**
+         * For cross-version compatibility.
+         */
+        private static final long serialVersionUID = 3306532357801489365L;
+
+        /**
+         * The code list for which to create a title.
+         */
+        private final CodeList<?> code;
+
+        /**
+         * Creates a new international string for the given code list element.
+         *
+         * @param code The code list for which to create a title.
+         */
+        CodeTitle(final CodeList<?> code) {
+            super("org.opengis.metadata.CodeLists", getListName(code) + '.' + getCodeName(code));
+            this.code = code;
+        }
+
+        /**
+         * Returns a fallback if no resource is found.
+         */
+        @Override
+        String fallback() {
+            return getCodeLabel(code);
+        }
+    }
+
+    /**
+     * Returns the resource name for the given GeoAPI type, or {@code null} if none.
+     *
+     * @param  classname The fully qualified name of the GeoAPI type.
+     * @return The resource bundle to load, or {@code null} if none.
+     */
+    static String getResources(final String classname) {
+        String resources = "org.opengis.metadata.Descriptions";
+        if (classname.regionMatches(0, resources, 0, 21)) { // 21 is the location after the last dot.
+            return resources;
+        }
+        // Add more checks here (maybe in a loop) if there is more resource candidates.
         return null;
     }
 
@@ -415,7 +492,7 @@ public final class Types extends Static 
 
     /**
      * Returns the code of the given type that matches the given name, or optionally returns a new
-     * one if none match it. This method performs the same work than the GeoAPI {@code valueOf(…)}
+     * one if none match it. This method performs the same work than the GeoAPI {@code valueOf(…)}
      * method, except that this method is more tolerant on string comparisons when looking for an
      * existing code:
      *

Propchange: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Propchange: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/iso/package-info.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Propchange: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/logging/DualLogger.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Propchange: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/logging/DualLoggerFactory.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Propchange: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/logging/LoggerAdapter.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Modified: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/logging/LoggerFactory.java
URL: http://svn.apache.org/viewvc/sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/logging/LoggerFactory.java?rev=1480602&r1=1480601&r2=1480602&view=diff
==============================================================================
--- sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/logging/LoggerFactory.java [iso-8859-1] (original)
+++ sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/logging/LoggerFactory.java [UTF-8] Thu May  9 12:24:13 2013
@@ -22,10 +22,21 @@ import org.apache.sis.util.collection.We
 
 
 /**
- * A factory for Java {@link Logger} wrapping an other logging framework. This factory is used
- * only when wanting to log to an other framework than JDK logging. The {@link #getLogger(String)}
- * method returns some subclass of {@link Logger} (typically {@link LoggerAdapter}) that forward
- * directly all log methods to an other framework.
+ * A factory for Java {@link Logger} wrapping an other logging framework.
+ * This factory is used only when an application wants to redirect SIS logs to an other framework
+ * than JDK logging. An instance of {@code LoggerFactory} can be registered to SIS in two ways:
+ *
+ * <ul>
+ *   <li>By declaring the fully qualified classname of the {@code LoggerFactory} implementation
+ *       in the {@code META-INF/services/org.apache.sis.util.logging.LoggerFactory} file.
+ *       Note that the {@code sis-logging-commons.jar} and {@code sis-logging-log4j.jar}
+ *       files provide such declaration.</li>
+ *   <li>By explicit invocation of {@link Logging#setLoggerFactory(LoggerFactory)}
+ *       at application initialization time.</li>
+ * </ul>
+ *
+ * The {@link #getLogger(String)} method shall return some {@link Logger} subclass
+ * (typically {@link LoggerAdapter}) which forwards directly all log methods to the other framework.
  *
  * @param <L> The type of loggers used for the implementation backend.
  *            This is the type used by external frameworks like Log4J.

Propchange: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/logging/LoggerFactory.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Modified: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java
URL: http://svn.apache.org/viewvc/sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java?rev=1480602&r1=1480601&r2=1480602&view=diff
==============================================================================
--- sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java [iso-8859-1] (original)
+++ sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java [UTF-8] Thu May  9 12:24:13 2013
@@ -16,11 +16,9 @@
  */
 package org.apache.sis.util.logging;
 
-import java.util.Comparator;
 import java.util.ServiceLoader;
 import java.util.logging.Level;
 import java.util.logging.Logger;
-import java.util.logging.Handler;
 import java.util.logging.LogRecord;
 
 import org.apache.sis.util.Configuration;
@@ -28,30 +26,24 @@ import org.apache.sis.util.Static;
 import org.apache.sis.util.Exceptions;
 import org.apache.sis.util.Classes;
 
-import static java.util.Arrays.binarySearch;
-import static org.apache.sis.util.Arrays.insert;
-
 
 /**
  * A set of utilities method for configuring loggings in SIS. Library implementors shall fetch
- * their logger using the {@link #getLogger(Class)} static method provided in this class rather
- * than {@link Logger#getLogger(String)}, in order to give SIS a chance to redirect the logging
- * to an other framework like <A HREF="http://commons.apache.org/logging/">Commons-logging</A> or
- * <A HREF="http://logging.apache.org/log4j">Log4J</A>.
- *
- * <p>This method provides also a {@link #log(Class, String, LogRecord)} convenience static method,
- * which {@linkplain LogRecord#setLoggerName set the logger name} of the given record before to log
- * it. An other worthy static method is {@link #unexpectedException(Class, String, Throwable)}, for
- * reporting an anomalous but nevertheless non-fatal exception.</p>
+ * their loggers using the {@link #getLogger(Class)} static method defined in this {@code Logging}
+ * class rather than the one defined in the standard {@link Logger} class, in order to give SIS a
+ * chance to redirect the logs to an other framework like
+ * <a href="http://commons.apache.org/logging/">Commons-logging</a> or
+ * <a href="http://logging.apache.org/log4j">Log4J</a>.
  *
- * {@section Configuration}
- * The log records can be redirected explicitly to an other logging framework using the
- * {@link #setLoggerFactory(LoggerFactory)} method.
- * Note however that this method call is performed automatically if the
- * {@code sis-logging-commons.jar} or the {@code sis-logging-log4j.jar} file is
- * found on the classpath, so it usually doesn't need to be invoked explicitely.
- * See the {@link #scanLoggerFactory()} method for more details on automatic logger
- * factory registration.
+ * <p>This class provides also some convenience static methods, including:</p>
+ * <ul>
+ *   <li>{@link #log(Class, String, LogRecord)} for {@linkplain LogRecord#setLoggerName(String) setting
+ *       the logger name}, {@linkplain LogRecord#setSourceClassName(String) source class name} and
+ *       {@linkplain LogRecord#setSourceMethodName(String) source method name} of the given record
+ *       before to log it.</li>
+ *   <li>{@link #unexpectedException(Class, String, Throwable)} for reporting an anomalous but
+ *       nevertheless non-fatal exception.</li>
+ * </ul>
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from geotk-2.4)
@@ -60,82 +52,113 @@ import static org.apache.sis.util.Arrays
  */
 public final class Logging extends Static {
     /**
-     * Compares {@link Logging} or {@link String} objects for alphabetical order.
+     * The factory for obtaining {@link Logger} instances, or {@code null} if none.
+     * If {@code null} (the default), then the standard JDK logging framework will be used.
+     * {@code Logging} scans the classpath for logger factories on class initialization.
+     * The fully qualified factory classname shall be declared in the following file:
+     *
+     * {@preformat text
+     *     META-INF/services/org.apache.sis.util.logging.LoggerFactory
+     * }
+     *
+     * The factory found on the classpath is assigned to the {@link #factory} field. If more than one factory
+     * is found, then the log messages will be sent to the logging frameworks managed by all those factories.
+     *
+     * {@note A previous version was providing a <code>scanForPlugins()</code> method allowing developers to
+     *        refresh the object state when new <code>LoggerFactory</code> instances become available on the
+     *        classpath of a running JVM. However it usually doesn't work since loggers are typically stored
+     *        in static final fields.}
+     *
+     * @see #setLoggerFactory(LoggerFactory)
      */
-    private static final Comparator<Object> COMPARATOR = new Comparator<Object>() {
-        @Override public int compare(final Object o1, final Object o2) {
-            final String n1 = (o1 instanceof Logging) ? ((Logging) o1).name : o1.toString();
-            final String n2 = (o2 instanceof Logging) ? ((Logging) o2).name : o2.toString();
-            return n1.compareTo(n2);
+    private static volatile LoggerFactory<?> factory;
+    static {
+        LoggerFactory<?> factory = null;
+        for (final LoggerFactory<?> found : ServiceLoader.load(LoggerFactory.class)) {
+            if (factory == null) {
+                factory = found;
+            } else {
+                factory = new DualLoggerFactory(factory, found);
+            }
         }
-    };
-
-    /**
-     * An empty array of loggings. Also used for locks.
-     */
-    private static final Logging[] EMPTY = new Logging[0];
-
-    /**
-     * Logging configuration that apply to all packages.
-     */
-    public static final Logging ALL = new Logging();
-    static { // Must be run after ALL assignation and before SIS (or any other Logging) creation.
-        ALL.scanLoggerFactory();
+        Logging.factory = factory;
     }
 
     /**
-     * Logging configuration that apply only to "{@code org.apache.sis}" packages.
-     */
-    public static final Logging SIS = getLogging("org.apache.sis");
-
-    /**
-     * The name of the base package.
+     * Do not allow instantiation of this class.
      */
-    public final String name;
+    private Logging() {
+    }
 
     /**
-     * The children {@link Logging} objects.
+     * Sets a new factory to use for obtaining {@link Logger} instances.
+     * If the given {@code factory} argument is {@code null} (the default),
+     * then the standard Logging framework will be used.
      *
-     * {@note The array used there is not efficient for adding new items (<code>ArrayList</code>
-     *        would be more efficient), but we assume that very few new items will be added.
-     *        Furthermore a plain array is efficient for reading, and the later is way more
-     *        common than the former.}
-     */
-    private Logging[] children = EMPTY;
-
-    /**
-     * The factory for creating loggers, or {@code null} if none. If {@code null}
-     * (the default), then the standard JDK logging framework will be used.
+     * {@section Limitation}
+     * SIS classes typically declare a logger constant like below:
      *
-     * @see #setLoggerFactory(LoggerFactory)
+     * {@preformat java
+     *     public static final Logger LOGGER = Logging.getLogger(TheClass.class);
+     * }
+     *
+     * Factory changes will take effect only if this method is invoked before the initialization
+     * of such classes.
+     *
+     * @param factory The new logger factory, or {@code null} if none.
      */
-    private LoggerFactory<?> factory;
+    @Configuration
+    public static void setLoggerFactory(final LoggerFactory<?> factory) {
+        Logging.factory = factory;
+    }
 
     /**
-     * {@code true} if every {@link Logging} instances use the same {@link LoggerFactory}.
-     * This is an optimization for a very common case.
+     * Returns the factory used for obtaining {@link Logger} instances, or {@code null} if none.
+     *
+     * @return The current logger factory, or {@code null} if none.
      */
-    private static boolean sameLoggerFactory = true;
+    public static LoggerFactory<?> getLoggerFactory() {
+        return factory;
+    }
 
     /**
-     * Creates an instance for the root logger. This constructor should not be used for anything
-     * else than {@link #ALL} construction; use the {@link #getLogging(String)} method instead.
+     * Returns a logger for the specified name. If a {@linkplain LoggerFactory logger factory} has
+     * been set, then this method first {@linkplain LoggerFactory#getLogger asks to the factory}.
+     * This rule gives SIS a chance to redirect logging events to
+     * <a href="http://commons.apache.org/logging/">commons-logging</a> or some equivalent framework.
+     * Only if no factory was found or if the factory choose to not redirect the loggings, then this
+     * method delegate to <code>{@linkplain Logger#getLogger Logger.getLogger}(name)</code>.
+     *
+     * @param  name The logger name.
+     * @return A logger for the specified name.
      */
-    private Logging() {
-        name = "";
+    public static Logger getLogger(final String name) {
+        final LoggerFactory<?> factory = Logging.factory;
+        if (factory != null) {
+            final Logger logger = factory.getLogger(name);
+            if (logger != null) {
+                return logger;
+            }
+        }
+        return Logger.getLogger(name);
     }
 
     /**
-     * Creates an instance for the specified base logger. This constructor should
-     * not be public; use the {@link #getLogging(String)} method instead.
+     * Returns a logger for the specified class. This convenience method invokes
+     * {@link #getLogger(String)} with the package name as the logger name.
      *
-     * @param parent The parent {@code Logging} instance.
-     * @param name   The logger name for the new instance.
+     * @param  classe The class for which to obtain a logger.
+     * @return A logger for the specified class.
      */
-    private Logging(final Logging parent, final String name) {
-        this.name = name;
-        factory = parent.factory;
-        assert name.startsWith(parent.name) : name;
+    public static Logger getLogger(Class<?> classe) {
+        Class<?> outer;
+        while ((outer = classe.getEnclosingClass()) != null) {
+            classe = outer;
+        }
+        String name = classe.getName();
+        final int separator = name.lastIndexOf('.');
+        name = (separator >= 1) ? name.substring(0, separator) : "";
+        return getLogger(name);
     }
 
     /**
@@ -168,208 +191,6 @@ public final class Logging extends Stati
     }
 
     /**
-     * Returns a logger for the specified class. This convenience method invokes
-     * {@link #getLogger(String)} with the package name as the logger name.
-     *
-     * @param  classe The class for which to obtain a logger.
-     * @return A logger for the specified class.
-     */
-    public static Logger getLogger(Class<?> classe) {
-        Class<?> outer;
-        while ((outer = classe.getEnclosingClass()) != null) {
-            classe = outer;
-        }
-        String name = classe.getName();
-        final int separator = name.lastIndexOf('.');
-        name = (separator >= 1) ? name.substring(0, separator) : "";
-        return getLogger(name);
-    }
-
-    /**
-     * Returns a logger for the specified name. If a {@linkplain LoggerFactory logger factory} has
-     * been set, then this method first {@linkplain LoggerFactory#getLogger ask to the factory}.
-     * It gives SIS a chance to redirect logging events to
-     * <A HREF="http://commons.apache.org/logging/">commons-logging</A>
-     * or some equivalent framework.
-     *
-     * <p>If no factory was found or if the factory choose to not redirect the loggings, then this
-     * method returns the usual <code>{@linkplain Logger#getLogger Logger.getLogger}(name)</code>.</p>
-     *
-     * @param  name The logger name.
-     * @return A logger for the specified name.
-     */
-    public static Logger getLogger(final String name) {
-        synchronized (EMPTY) {
-            final Logging logging = sameLoggerFactory ? ALL : getLogging(name, false);
-            if (logging != null) { // Paranoiac check ('getLogging' should not returns null).
-                final LoggerFactory<?> factory = logging.factory;
-                assert getLogging(name, false).factory == factory : name;
-                if (factory != null) {
-                    final Logger logger = factory.getLogger(name);
-                    if (logger != null) {
-                        return logger;
-                    }
-                }
-            }
-        }
-        return Logger.getLogger(name);
-    }
-
-    /**
-     * Returns a {@code Logging} instance for the specified base logger.
-     * This instance can be used for controlling logging configuration in SIS.
-     *
-     * <p>{@code Logging} instances follow the same hierarchy than {@link Logger}, i.e.
-     * {@code "org.apache.sis"} is the parent of {@code "org.apache.sis.referencing"},
-     * {@code "org.apache.sis.metadata"}, <i>etc</i>.</p>
-     *
-     * @param name The base logger name.
-     * @return The logging instance for the given name.
-     */
-    public static Logging getLogging(final String name) {
-        synchronized (EMPTY) {
-            return getLogging(name, true);
-        }
-    }
-
-    /**
-     * Returns a logging instance for the specified base logger. If no instance is found for
-     * the specified name and {@code create} is {@code true}, then a new instance will be
-     * created. Otherwise the nearest parent is returned.
-     *
-     * @param base The root logger name.
-     * @param create {@code true} if this method is allowed to create new {@code Logging} instance.
-     * @return The logging instance for the given name.
-     */
-    private static Logging getLogging(final String base, final boolean create) {
-        assert Thread.holdsLock(EMPTY);
-        Logging logging = ALL;
-        if (!base.isEmpty()) {
-            int offset = 0;
-            do {
-                Logging[] children = logging.children;
-                offset = base.indexOf('.', offset);
-                final String name = (offset >= 0) ? base.substring(0, offset) : base;
-                int i = binarySearch(children, name, COMPARATOR);
-                if (i < 0) {
-                    // No exact match found.
-                    if (!create) {
-                        // We are not allowed to create new Logging instance.
-                        // 'logging' is the nearest parent, so stop the loop now.
-                        break;
-                    }
-                    i = ~i;
-                    children = insert(children, i, 1);
-                    children[i] = new Logging(logging, name);
-                    logging.children = children;
-                }
-                logging = children[i];
-            } while (++offset != 0);
-        }
-        return logging;
-    }
-
-    /**
-     * Returns the logger factory, or {@code null} if none. This method returns the logger set
-     * by the last call to {@link #setLoggerFactory(LoggerFactory)} on this {@code Logging}
-     * instance or on one of its parent.
-     *
-     * @return The current logger factory.
-     */
-    public LoggerFactory<?> getLoggerFactory() {
-        synchronized (EMPTY) {
-            return factory;
-        }
-    }
-
-    /**
-     * Sets a new logger factory for this {@code Logging} instance and every children. The
-     * specified factory will be used by <code>{@linkplain #getLogger(String) getLogger}(name)</code>
-     * when {@code name} is this {@code Logging} name or one of its children.
-     *
-     * <p>If the factory is set to {@code null} (the default), then the standard Logging framework
-     * will be used.</p>
-     *
-     * @param factory The new logger factory, or {@code null} if none.
-     */
-    @Configuration
-    public void setLoggerFactory(final LoggerFactory<?> factory) {
-        synchronized (EMPTY) {
-            this.factory = factory;
-            for (int i=0; i<children.length; i++) {
-                children[i].setLoggerFactory(factory);
-            }
-            sameLoggerFactory = sameLoggerFactory(ALL.children, ALL.factory); // NOSONAR: really want static field.
-        }
-    }
-
-    /**
-     * Returns {@code true} if all children use the specified factory.
-     * Used in order to detect a possible optimization for this very common case.
-     */
-    private static boolean sameLoggerFactory(final Logging[] children, final LoggerFactory<?> factory) {
-        assert Thread.holdsLock(EMPTY);
-        for (int i=0; i<children.length; i++) {
-            final Logging logging = children[i];
-            if (logging.factory != factory || !sameLoggerFactory(logging.children, factory)) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    /**
-     * Scans the classpath for logger factories. The fully qualified factory classname shall be
-     * declared in the following file:
-     *
-     * {@preformat text
-     *     META-INF/services/org.apache.sis.util.logging.LoggerFactory
-     * }
-     *
-     * The factory found on the classpath is given to {@link #setLoggerFactory(LoggerFactory)}.
-     * If more than one factory is found, then the log messages will be sent to the logging
-     * frameworks managed by all those factories.
-     *
-     * <p>This method usually doesn't need to be invoked explicitly, since it is automatically
-     * invoked on {@code Logging} class initialization. However developers may invoke it if
-     * new {@code LoggerFactory}s are added later on the classpath of a running JVM.</p>
-     */
-    @Configuration
-    public void scanLoggerFactory() {
-        LoggerFactory<?> factory = null;
-        for (final LoggerFactory<?> found : ServiceLoader.load(LoggerFactory.class)) {
-            if (factory == null) {
-                factory = found;
-            } else {
-                factory = new DualLoggerFactory(factory, found);
-            }
-        }
-        setLoggerFactory(factory);
-    }
-
-    /**
-     * Flushes all {@linkplain Handler handlers} used by the logger named {@link #name}.
-     * If that logger {@linkplain Logger#getUseParentHandlers() uses parent handlers},
-     * then those handlers will be flushed as well.
-     *
-     * <p>If the log records seem to be interleaved with the content of {@link System#out}
-     * or {@link System#err}, invoking this method before to write to the standard streams
-     * may help.</p>
-     *
-     * @see Handler#flush()
-     */
-    public void flush() {
-        for (Logger logger=getLogger(name); logger!=null; logger=logger.getParent()) {
-            for (final Handler handler : logger.getHandlers()) {
-                handler.flush();
-            }
-            if (!logger.getUseParentHandlers()) {
-                break;
-            }
-        }
-    }
-
-    /**
      * Invoked when an unexpected error occurs. This method logs a message at the
      * {@link Level#WARNING WARNING} level to the specified logger. The originating
      * class name and method name are inferred from the error stack trace, using the

Propchange: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Modified: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/logging/PerformanceLevel.java
URL: http://svn.apache.org/viewvc/sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/logging/PerformanceLevel.java?rev=1480602&r1=1480601&r2=1480602&view=diff
==============================================================================
--- sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/logging/PerformanceLevel.java [iso-8859-1] (original)
+++ sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/logging/PerformanceLevel.java [UTF-8] Thu May  9 12:24:13 2013
@@ -57,7 +57,7 @@ public final class PerformanceLevel exte
     /**
      * For cross-version compatibility.
      */
-    private static final long serialVersionUID = 6055684381688936293L;
+    private static final long serialVersionUID = -6547125008284983701L;
 
     /*
      * IMPLEMENTATION NOTE: The level values used in the constants below are also used

Propchange: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/logging/PerformanceLevel.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Modified: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/logging/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/logging/package-info.java?rev=1480602&r1=1480601&r2=1480602&view=diff
==============================================================================
--- sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/logging/package-info.java [iso-8859-1] (original)
+++ sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/logging/package-info.java [UTF-8] Thu May  9 12:24:13 2013
@@ -33,19 +33,25 @@
  * The SIS project uses the standard {@link java.util.logging.Logger} API for its logging,
  * but this package allows redirection of logging messages to some other frameworks like
  * <a href="http://logging.apache.org/log4j/">Log4J</a>.
- *
- * <p>We recommend to stick to standard JDK logging when possible. However if inter-operability
+ * We recommend to stick to standard JDK logging when possible. However if inter-operability
  * with an other logging framework is required, then the only action needed is to include
- * <strong>one</strong> of the following JAR on the classpath:</p>
+ * <strong>one</strong> of the following JAR on the classpath:
+ *
+ * <ul>
+ *   <li>{@code sis-logging-commons.jar} for Apache logging</li>
+ *   <li>{@code sis-logging-log4j.jar} for Log4J logging</li>
+ *   <li>Any other JAR registering a {@link org.apache.sis.util.logging.LoggerFactory} implementation.</li>
+ * </ul>
  *
+ * {@section Apache SIS logger constants}
+ * Some static final {@code Logger} constant defined in Apache SIS are:
  * <ul>
- *   <li>{@code geotk-logging-commons.jar} for Apache logging</li>
- *   <li>{@code geotk-logging-log4j.jar} for Log4J logging</li>
+ *   <li>{@link org.apache.sis.metadata.iso.ISOMetadata#LOGGER} for the {@code org.apache.sis.metadata.iso.*} packages</li>
  * </ul>
  *
  * {@section Note for SIS developers}
  * All SIS code should fetch their logger through a call to our custom
- * {@link org.apache.sis.util.logging.Logging#getLogger(String)} method, <strong>not</strong>
+ * {@link org.apache.sis.util.logging.Logging#getLogger(String)} method instead than
  * the standard {@link java.util.logging.Logger#getLogger(String)} method. This is necessary in
  * order to give SIS a chance to redirect log events to an other logging framework.
  *

Propchange: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/logging/package-info.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Modified: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/package-info.java?rev=1480602&r1=1480601&r2=1480602&view=diff
==============================================================================
--- sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/package-info.java [iso-8859-1] (original)
+++ sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/package-info.java [UTF-8] Thu May  9 12:24:13 2013
@@ -29,7 +29,7 @@
  *         {@link org.apache.sis.util.Numbers},
  *         {@link org.apache.sis.util.Classes}.</li>
  *     <li>Arrays:
- *         {@link org.apache.sis.util.Arrays}.</li>
+ *         {@link org.apache.sis.util.ArraysExt}.</li>
  *     <li>Other standard Java types:
  *         {@link org.apache.sis.util.Exceptions}.</li>
  *   </ul></li>

Propchange: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/package-info.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Modified: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
URL: http://svn.apache.org/viewvc/sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java?rev=1480602&r1=1480601&r2=1480602&view=diff
==============================================================================
--- sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java [iso-8859-1] (original)
+++ sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java [UTF-8] Thu May  9 12:24:13 2013
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.util.resources;
 
+import java.net.URL;
 import java.util.Locale;
 import java.util.MissingResourceException;
 import org.opengis.util.InternationalString;
@@ -25,7 +26,7 @@ import org.opengis.util.InternationalStr
  * Locale-dependent resources for error messages.
  *
  * {@section Argument order convention}
- * This resource bundle applies the same convention than JUnit: for every {@code format(…)} method,
+ * This resource bundle applies the same convention than JUnit: for every {@code format(…)} method,
  * the first arguments provide information about the context in which the error occurred (e.g. the
  * name of a method argument or the range of valid values), while the erroneous values that caused
  * the error are last. Note that being the last programmatic parameter does not means that the value
@@ -62,32 +63,73 @@ public final class Errors extends Indexe
         }
 
         /**
+         * No element can be added to this set because properties ‘{0}’ and ‘{1}’ are mutually
+         * exclusive.
+         */
+        public static final int CanNotAddToExclusiveSet_2 = 87;
+
+        /**
          * Can not compute the derivative.
          */
         public static final int CanNotComputeDerivative = 44;
 
         /**
-         * Can not clone an object of type ‘{0}’.
+         * Can not convert from type ‘{0}’ to type ‘{1}’.
+         */
+        public static final int CanNotConvertFromType_2 = 72;
+
+        /**
+         * Can not convert value “{0}” to type ‘{1}’.
+         */
+        public static final int CanNotConvertValue_2 = 74;
+
+        /**
+         * Can not instantiate an object of type ‘{0}’.
+         */
+        public static final int CanNotInstantiate_1 = 81;
+
+        /**
+         * Can not set a value for property “{0}”.
+         */
+        public static final int CanNotSetPropertyValue_1 = 75;
+
+        /**
+         * Class ‘{0}’ is not final.
+         */
+        public static final int ClassNotFinal_1 = 71;
+
+        /**
+         * Can not clone an object of type ‘{0}’.
          */
         public static final int CloneNotSupported_1 = 42;
 
         /**
-         * Thread “{0}” is dead.
+         * Thread “{0}” is dead.
          */
         public static final int DeadThread_1 = 43;
 
         /**
-         * Value “{0}” is duplicated.
+         * Value “{0}” is duplicated.
          */
         public static final int DuplicatedValue_1 = 38;
 
         /**
-         * Element “{0}” is already present.
+         * Found {0} duplicated values.
+         */
+        public static final int DuplicatedValuesCount_1 = 78;
+
+        /**
+         * Duplicated values for the “{0}” property.
+         */
+        public static final int DuplicatedValuesForProperty_1 = 79;
+
+        /**
+         * Element “{0}” is already present.
          */
         public static final int ElementAlreadyPresent_1 = 36;
 
         /**
-         * Argument ‘{0}’ shall not be empty.
+         * Argument ‘{0}’ shall not be empty.
          */
         public static final int EmptyArgument_1 = 1;
 
@@ -97,44 +139,49 @@ public final class Errors extends Indexe
         public static final int EmptyDictionary = 54;
 
         /**
-         * Property named “{0}” shall not be empty.
+         * Envelope must be at least two-dimensional and non-empty.
+         */
+        public static final int EmptyEnvelope2D = 88;
+
+        /**
+         * Property named “{0}” shall not be empty.
          */
         public static final int EmptyProperty_1 = 55;
 
         /**
-         * Argument ‘{0}’ shall not contain more than {1} elements. A number of {2} is excessive.
+         * Argument ‘{0}’ shall not contain more than {1} elements. A number of {2} is excessive.
          */
         public static final int ExcessiveArgumentSize_3 = 52;
 
         /**
-         * Attribute “{0}” is not allowed for an object of type ‘{1}’.
+         * Attribute “{0}” is not allowed for an object of type ‘{1}’.
          */
         public static final int ForbiddenAttribute_2 = 21;
 
         /**
-         * Identifier “{0}” is already associated to another object.
+         * Identifier “{0}” is already associated to another object.
          */
         public static final int IdentifierAlreadyBound_1 = 50;
 
         /**
-         * Argument ‘{0}’ can not be an instance of ‘{1}’.
+         * Argument ‘{0}’ can not be an instance of ‘{1}’.
          */
         public static final int IllegalArgumentClass_2 = 17;
 
         /**
-         * Argument ‘{0}’ can not be an instance of ‘{2}’. Expected an instance of ‘{1}’ or derived
+         * Argument ‘{0}’ can not be an instance of ‘{2}’. Expected an instance of ‘{1}’ or derived
          * type.
          */
         public static final int IllegalArgumentClass_3 = 2;
 
         /**
-         * Argument ‘{0}’ can not take the “{1}” value, because the ‘{2}’ field can not take the “{3}”
+         * Argument ‘{0}’ can not take the “{1}” value, because the ‘{2}’ field can not take the “{3}”
          * value.
          */
         public static final int IllegalArgumentField_4 = 15;
 
         /**
-         * Argument ‘{0}’ can not take the “{1}” value.
+         * Argument ‘{0}’ can not take the “{1}” value.
          */
         public static final int IllegalArgumentValue_2 = 14;
 
@@ -144,37 +191,47 @@ public final class Errors extends Indexe
         public static final int IllegalBitsPattern_1 = 16;
 
         /**
-         * Class ‘{1}’ is illegal. It must be ‘{0}’ or a derived class.
+         * Class ‘{1}’ is illegal. It must be ‘{0}’ or a derived class.
          */
         public static final int IllegalClass_2 = 3;
 
         /**
-         * The “{1}” pattern can not be applied to formating of objects of type ‘{0}’.
+         * The “{1}” pattern can not be applied to formating of objects of type ‘{0}’.
          */
         public static final int IllegalFormatPatternForClass_2 = 29;
 
         /**
-         * The “{0}” language is not recognized.
+         * The “{0}” language is not recognized.
          */
         public static final int IllegalLanguageCode_1 = 12;
 
         /**
-         * The [{0} … {1}] range of ordinate values is not valid for the “{2}” axis.
+         * The [{0} … {1}] range of ordinate values is not valid for the “{2}” axis.
          */
         public static final int IllegalOrdinateRange_3 = 5;
 
         /**
-         * Property ‘{0}’ can be associated to an instance of ‘{1}’.
+         * Property ‘{0}’ can be associated to an instance of ‘{1}’.
          */
         public static final int IllegalPropertyClass_2 = 62;
 
         /**
-         * Range [{0} … {1}] is not valid.
+         * Range [{0} … {1}] is not valid.
          */
         public static final int IllegalRange_2 = 11;
 
         /**
-         * Value “{1}” of attribute ‘{0}’ is inconsistent with other attributes.
+         * Property “{0}” has an incompatible value.
+         */
+        public static final int IncompatiblePropertyValue_1 = 86;
+
+        /**
+         * Units “{0}” and “{1}” are incompatible.
+         */
+        public static final int IncompatibleUnits_2 = 67;
+
+        /**
+         * Value “{1}” of attribute ‘{0}’ is inconsistent with other attributes.
          */
         public static final int InconsistentAttribute_2 = 27;
 
@@ -189,7 +246,7 @@ public final class Errors extends Indexe
         public static final int IndexOutOfBounds_1 = 4;
 
         /**
-         * Argument ‘{0}’ can not take an infinite value.
+         * Argument ‘{0}’ can not take an infinite value.
          */
         public static final int InfiniteArgumentValue_1 = 45;
 
@@ -199,17 +256,17 @@ public final class Errors extends Indexe
         public static final int InfiniteRecursivity = 51;
 
         /**
-         * Argument ‘{0}’ shall contain at least {1} elements. A number of {2} is insufficient.
+         * Argument ‘{0}’ shall contain at least {1} elements. A number of {2} is insufficient.
          */
         public static final int InsufficientArgumentSize_3 = 53;
 
         /**
-         * A different value is already associated to the “{0}” key.
+         * A different value is already associated to the “{0}” key.
          */
         public static final int KeyCollision_1 = 19;
 
         /**
-         * Attribute “{0}” is mandatory for an object of type ‘{1}’.
+         * Attribute “{0}” is mandatory for an object of type ‘{1}’.
          */
         public static final int MandatoryAttribute_2 = 22;
 
@@ -224,82 +281,137 @@ public final class Errors extends Indexe
         public static final int MismatchedDimension_2 = 60;
 
         /**
-         * Argument ‘{0}’ has {2} dimension{2,choice,1#|2#s}, while {1} was expected.
+         * Argument ‘{0}’ has {2} dimension{2,choice,1#|2#s}, while {1} was expected.
          */
         public static final int MismatchedDimension_3 = 58;
 
         /**
-         * Argument ‘{0}’ shall not be negative. The given value was {1}.
+         * This operation requires the “{0}” module.
+         */
+        public static final int MissingRequiredModule_1 = 84;
+
+        /**
+         * Missing value for property “{0}”.
+         */
+        public static final int MissingValueForProperty_1 = 85;
+
+        /**
+         * Missing value in the “{0}” column.
+         */
+        public static final int MissingValueInColumn_1 = 77;
+
+        /**
+         * Argument ‘{0}’ shall not be negative. The given value was {1}.
          */
         public static final int NegativeArgument_2 = 8;
 
         /**
-         * Node “{0}” can not be a child of itself.
+         * No property named “{0}” has been found in “{1}”.
+         */
+        public static final int NoSuchProperty_2 = 73;
+
+        /**
+         * No unit of measurement has been specified.
+         */
+        public static final int NoUnit = 68;
+
+        /**
+         * Node “{0}” can not be a child of itself.
          */
         public static final int NodeChildOfItself_1 = 37;
 
         /**
-         * Node “{0}” already has another parent.
+         * Node “{0}” already has another parent.
          */
         public static final int NodeHasAnotherParent_1 = 35;
 
         /**
-         * Node “{0}” has no parent.
+         * Node “{0}” has no parent.
          */
         public static final int NodeHasNoParent_1 = 34;
 
         /**
-         * No “{0}” node found.
+         * Node “{0}” is a leaf.
+         */
+        public static final int NodeIsLeaf_1 = 90;
+
+        /**
+         * No “{0}” node found.
          */
         public static final int NodeNotFound_1 = 39;
 
         /**
-         * “{0}” is not an angular unit.
+         * “{0}” is not an angular unit.
          */
         public static final int NonAngularUnit_1 = 46;
 
         /**
-         * Missing a ‘{1}’ parenthesis in “{0}”.
+         * Missing a ‘{1}’ parenthesis in “{0}”.
          */
         public static final int NonEquilibratedParenthesis_2 = 59;
 
         /**
-         * “{0}” is not a linear unit.
+         * Conversion is not invertible.
+         */
+        public static final int NonInvertibleConversion = 82;
+
+        /**
+         * Transform is not invertible.
+         */
+        public static final int NonInvertibleTransform = 83;
+
+        /**
+         * “{0}” is not a linear unit.
          */
         public static final int NonLinearUnit_1 = 47;
 
         /**
-         * “{0}” is not a scale unit.
+         * “{0}” is not a scale unit.
          */
         public static final int NonScaleUnit_1 = 48;
 
         /**
-         * “{0}” is not a time unit.
+         * “{0}” is not a time unit.
          */
         public static final int NonTemporalUnit_1 = 49;
 
         /**
-         * Argument ‘{0}’ shall not be NaN (Not-a-Number).
+         * Argument ‘{0}’ shall not be NaN (Not-a-Number).
          */
         public static final int NotANumber_1 = 9;
 
         /**
-         * Class ‘{0}’ is not a primitive type wrapper.
+         * Class ‘{0}’ is not a primitive type wrapper.
          */
         public static final int NotAPrimitiveWrapper_1 = 10;
 
         /**
-         * Argument ‘{0}’ shall not be null.
+         * Class ‘{0}’ is not a comparable.
+         */
+        public static final int NotComparableClass_1 = 66;
+
+        /**
+         * Argument ‘{0}’ shall not be null.
          */
         public static final int NullArgument_1 = 0;
 
         /**
+         * Null key is not allowed in this dictionary.
+         */
+        public static final int NullMapKey = 64;
+
+        /**
+         * Null values are not allowed in this dictionary.
+         */
+        public static final int NullMapValue = 65;
+
+        /**
          * Array length is {0}, while we expected an even length.
          */
         public static final int OddArrayLength_1 = 61;
 
         /**
-         * Recursive call while creating an object for the “{0}” key.
+         * Recursive call while creating an object for the “{0}” key.
          */
         public static final int RecursiveCreateCallForKey_1 = 18;
 
@@ -309,21 +421,46 @@ public final class Errors extends Indexe
         public static final int RequireDecimalSeparator = 33;
 
         /**
-         * Unexpected change in ‘{0}’.
+         * Thread “{0}” seems stalled.
+         */
+        public static final int StalledThread_1 = 63;
+
+        /**
+         * Ordering between “{0}” and “{1}” elements is undefined.
+         */
+        public static final int UndefinedOrderingForElements_2 = 70;
+
+        /**
+         * Unexpected change in ‘{0}’.
          */
         public static final int UnexpectedChange_1 = 56;
 
         /**
-         * More characters were expected at the end of “{0}”.
+         * More characters were expected at the end of “{0}”.
          */
         public static final int UnexpectedEndOfString_1 = 30;
 
         /**
+         * Type of the “{0}” property is unknown.
+         */
+        public static final int UnknownTypeForProperty_1 = 80;
+
+        /**
+         * Type ‘{0}’ is unknown in this context.
+         */
+        public static final int UnknownType_1 = 76;
+
+        /**
          * This affine transform is unmodifiable.
          */
         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;
@@ -334,47 +471,52 @@ public final class Errors extends Indexe
         public static final int UnmodifiableMetadata = 25;
 
         /**
-         * Object ‘{0}’ is unmodifiable.
+         * Object ‘{0}’ is unmodifiable.
          */
         public static final int UnmodifiableObject_1 = 26;
 
         /**
-         * Text “{1}” can not be parsed as an object of type ‘{0}’.
+         * Text “{1}” can not be parsed as an object of type ‘{0}’.
          */
         public static final int UnparsableStringForClass_2 = 31;
 
         /**
-         * Text “{1}” can not be parsed as an object of type ‘{0}’, because of the “{2}” characters.
+         * Text “{1}” can not be parsed as an object of type ‘{0}’, because of the “{2}” characters.
          */
         public static final int UnparsableStringForClass_3 = 32;
 
         /**
-         * No format is specified for objects of class ‘{0}’.
+         * No format is specified for objects of class ‘{0}’.
          */
         public static final int UnspecifiedFormatForClass_1 = 41;
 
         /**
-         * Can not handle instances of ‘{0}’ because arbitrary implementations are not yet supported.
+         * Can not handle instances of ‘{0}’ because arbitrary implementations are not yet supported.
          */
         public static final int UnsupportedImplementation_1 = 28;
 
         /**
-         * The ‘{0}’ operation is unsupported.
+         * The ‘{0}’ operation is unsupported.
          */
         public static final int UnsupportedOperation_1 = 20;
 
         /**
-         * A value is already defined for “{0}”.
+         * The ‘{0}’ type is unsupported.
+         */
+        public static final int UnsupportedType_1 = 69;
+
+        /**
+         * A value is already defined for “{0}”.
          */
         public static final int ValueAlreadyDefined_1 = 13;
 
         /**
-         * Value ‘{0}’={1} is invalid. Expected a number greater than 0.
+         * Value ‘{0}’={1} is invalid. Expected a number greater than 0.
          */
         public static final int ValueNotGreaterThanZero_2 = 7;
 
         /**
-         * Value ‘{0}’={3} is invalid. Expected a value in the [{1} … {2}] range.
+         * Value ‘{0}’={3} is invalid. Expected a value in the [{1} … {2}] range.
          */
         public static final int ValueOutOfRange_4 = 6;
     }
@@ -382,10 +524,11 @@ public final class Errors extends Indexe
     /**
      * Constructs a new resource bundle loading data from the given UTF file.
      *
-     * @param filename The file or the JAR entry containing resources.
+     * @param resources The path of the binary file containing resources, or {@code null} if
+     *        there is no resources. The resources may be a file or an entry in a JAR file.
      */
-    Errors(final String filename) {
-        super(filename);
+    Errors(final URL resources) {
+        super(resources);
     }
 
     /**
@@ -494,7 +637,7 @@ public final class Errors extends Indexe
      * The international string to be returned by {@link formatInternational}.
      */
     private static final class International extends ResourceInternationalString {
-        private static final long serialVersionUID = -229348959712294902L;
+        private static final long serialVersionUID = -5355796215044405012L;
 
         International(int key)                   {super(key);}
         International(int key, Object args)      {super(key, args);}

Propchange: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=UTF-8

Modified: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
URL: http://svn.apache.org/viewvc/sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties?rev=1480602&r1=1480601&r2=1480602&view=diff
==============================================================================
--- sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties [iso-8859-1] (original)
+++ sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties [ISO-8859-1] Thu May  9 12:24:13 2013
@@ -24,14 +24,22 @@
 # programmatic parameters do not have to be last in the formatted text, since each localized message
 # can reorder the parameters as they want.
 #
-
+CanNotAddToExclusiveSet_2       = No element can be added to this set because properties \u2018{0}\u2019 and \u2018{1}\u2019 are mutually exclusive.
+CanNotConvertFromType_2         = Can not convert from type \u2018{0}\u2019 to type \u2018{1}\u2019.
+CanNotConvertValue_2            = Can not convert value \u201c{0}\u201d to type \u2018{1}\u2019.
 CanNotComputeDerivative         = Can not compute the derivative.
+CanNotInstantiate_1             = Can not instantiate an object of type \u2018{0}\u2019.
+CanNotSetPropertyValue_1        = Can not set a value for property \u201c{0}\u201d.
+ClassNotFinal_1                 = Class \u2018{0}\u2019 is not final.
 CloneNotSupported_1             = Can not clone an object of type \u2018{0}\u2019.
 DeadThread_1                    = Thread \u201c{0}\u201d is dead.
 DuplicatedValue_1               = Value \u201c{0}\u201d is duplicated.
+DuplicatedValuesForProperty_1   = Duplicated values for the \u201c{0}\u201d property.
+DuplicatedValuesCount_1         = Found {0} duplicated values.
 ElementAlreadyPresent_1         = Element \u201c{0}\u201d is already present.
 EmptyArgument_1                 = Argument \u2018{0}\u2019 shall not be empty.
 EmptyDictionary                 = The dictionary shall contains at least one entry.
+EmptyEnvelope2D                 = Envelope must be at least two-dimensional and non-empty.
 EmptyProperty_1                 = Property named \u201c{0}\u201d shall not be empty.
 ExcessiveArgumentSize_3         = Argument \u2018{0}\u2019 shall not contain more than {1} elements. A number of {2} is excessive.
 ForbiddenAttribute_2            = Attribute \u201c{0}\u201d is not allowed for an object of type \u2018{1}\u2019.
@@ -46,6 +54,8 @@ IllegalLanguageCode_1           = The \u
 IllegalOrdinateRange_3          = The [{0} \u2026 {1}] range of ordinate values is not valid for the \u201c{2}\u201d axis.
 IllegalPropertyClass_2          = Property \u2018{0}\u2019 can be associated to an instance of \u2018{1}\u2019.
 IllegalRange_2                  = Range [{0} \u2026 {1}] is not valid.
+IncompatiblePropertyValue_1     = Property \u201c{0}\u201d has an incompatible value.
+IncompatibleUnits_2             = Units \u201c{0}\u201d and \u201c{1}\u201d are incompatible.
 InconsistentAttribute_2         = Value \u201c{1}\u201d of attribute \u2018{0}\u2019 is inconsistent with other attributes.
 InconsistentTableColumns        = Inconsistent table columns.
 IdentifierAlreadyBound_1        = Identifier \u201c{0}\u201d is already associated to another object.
@@ -58,25 +68,42 @@ MandatoryAttribute_2            = Attrib
 MismatchedCRS                   = The coordinate reference system must be the same for all objects.
 MismatchedDimension_2           = Mismatched object dimension: {0}D and {1}D.
 MismatchedDimension_3           = Argument \u2018{0}\u2019 has {2} dimension{2,choice,1#|2#s}, while {1} was expected.
+MissingValueInColumn_1          = Missing value in the \u201c{0}\u201d column.
+MissingRequiredModule_1         = This operation requires the \u201c{0}\u201d module.
+MissingValueForProperty_1       = Missing value for property \u201c{0}\u201d.
 NegativeArgument_2              = Argument \u2018{0}\u2019 shall not be negative. The given value was {1}.
 NodeChildOfItself_1             = Node \u201c{0}\u201d can not be a child of itself.
 NodeHasAnotherParent_1          = Node \u201c{0}\u201d already has another parent.
 NodeHasNoParent_1               = Node \u201c{0}\u201d has no parent.
+NodeIsLeaf_1                    = Node \u201c{0}\u201d is a leaf.
 NodeNotFound_1                  = No \u201c{0}\u201d node found.
 NonEquilibratedParenthesis_2    = Missing a \u2018{1}\u2019 parenthesis in \u201c{0}\u201d.
+NonInvertibleConversion         = Conversion is not invertible.
+NonInvertibleTransform          = Transform is not invertible.
 NonAngularUnit_1                = \u201c{0}\u201d is not an angular unit.
 NonLinearUnit_1                 = \u201c{0}\u201d is not a linear unit.
 NonScaleUnit_1                  = \u201c{0}\u201d is not a scale unit.
 NonTemporalUnit_1               = \u201c{0}\u201d is not a time unit.
 NotANumber_1                    = Argument \u2018{0}\u2019 shall not be NaN (Not-a-Number).
 NotAPrimitiveWrapper_1          = Class \u2018{0}\u2019 is not a primitive type wrapper.
+NotComparableClass_1            = Class \u2018{0}\u2019 is not a comparable.
+NoSuchProperty_2                = No property named \u201c{0}\u201d has been found in \u201c{1}\u201d.
+NoUnit                          = No unit of measurement has been specified.
 NullArgument_1                  = Argument \u2018{0}\u2019 shall not be null.
+# Use the OGC/ISO "Dictionary" word instead of "Map" for avoiding confusion with geographic map.
+NullMapKey                      = Null key is not allowed in this dictionary.
+NullMapValue                    = Null values are not allowed in this dictionary.
 OddArrayLength_1                = Array length is {0}, while we expected an even length.
 RecursiveCreateCallForKey_1     = Recursive call while creating an object for the \u201c{0}\u201d key.
 RequireDecimalSeparator         = A decimal separator is required.
+StalledThread_1                 = Thread \u201c{0}\u201d seems stalled.
+UndefinedOrderingForElements_2  = Ordering between \u201c{0}\u201d and \u201c{1}\u201d elements is undefined.
 UnexpectedChange_1              = Unexpected change in \u2018{0}\u2019.
 UnexpectedEndOfString_1         = More characters were expected at the end of \u201c{0}\u201d.
+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.
@@ -85,6 +112,7 @@ UnparsableStringForClass_3      = Text \
 UnspecifiedFormatForClass_1     = No format is specified for objects of class \u2018{0}\u2019.
 UnsupportedImplementation_1     = Can not handle instances of \u2018{0}\u2019 because arbitrary implementations are not yet supported.
 UnsupportedOperation_1          = The \u2018{0}\u2019 operation is unsupported.
+UnsupportedType_1               = The \u2018{0}\u2019 type is unsupported.
 ValueAlreadyDefined_1           = A value is already defined for \u201c{0}\u201d.
 ValueNotGreaterThanZero_2       = Value \u2018{0}\u2019={1} is invalid. Expected a number greater than 0.
 ValueOutOfRange_4               = Value \u2018{0}\u2019={3} is invalid. Expected a value in the [{1} \u2026 {2}] range.

Propchange: sis/branches/Android/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Thu May  9 12:24:13 2013
@@ -1 +1 @@
-text/plain
+text/plain;charset=ISO-8859-1



Mime
View raw message