sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1493766 - in /sis/trunk: ./ application/sis-console/ core/sis-metadata/ core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ core/sis-metadata/src/main/java/org/apache/sis/metadata/ core/sis-referencing/ core/sis-utility/ core...
Date Mon, 17 Jun 2013 14:08:21 GMT
Author: desruisseaux
Date: Mon Jun 17 14:08:20 2013
New Revision: 1493766

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

Added:
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/LocalizedStaticObject.java
      - copied unchanged from r1493762, sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/system/LocalizedStaticObject.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/Modules.java
      - copied unchanged from r1493762, sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/system/Modules.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/QuietLogRecord.java
      - copied unchanged from r1493762, sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/logging/QuietLogRecord.java
Modified:
    sis/trunk/   (props changed)
    sis/trunk/application/sis-console/pom.xml
    sis/trunk/core/sis-metadata/pom.xml
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ReferencingServices.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeTableView.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/ValueMap.java
    sis/trunk/core/sis-referencing/pom.xml
    sis/trunk/core/sis-utility/pom.xml
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SurjectiveConverter.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemRegistry.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/SpecializedIdentifier.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/TypeRegistration.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/LocalisedCharacterString.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/TextGroup.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleCitation.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleReferenceIdentifier.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/DefaultFactories.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/OSGiActivator.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/SystemListener.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/setup/About.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultNameSpace.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/DualLoggerFactory.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/LoggerFactory.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/WarningListeners.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/XML.java
    sis/trunk/ide-project/NetBeans/nbproject/project.properties
    sis/trunk/ide-project/NetBeans/nbproject/project.xml
    sis/trunk/pom.xml
    sis/trunk/storage/sis-netcdf/pom.xml
    sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/ChannelDecoder.java
    sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/DecoderWrapper.java
    sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStore.java
    sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStoreProvider.java
    sis/trunk/storage/sis-storage/pom.xml
    sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/storage/StorageConnector.java

Propchange: sis/trunk/
------------------------------------------------------------------------------
  Merged /sis/branches/JDK7:r1493151-1493760
  Merged /sis/branches/JDK6:r1493168-1493762

Modified: sis/trunk/application/sis-console/pom.xml
URL: http://svn.apache.org/viewvc/sis/trunk/application/sis-console/pom.xml?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/application/sis-console/pom.xml (original)
+++ sis/trunk/application/sis-console/pom.xml Mon Jun 17 14:08:20 2013
@@ -92,6 +92,7 @@ Console application.
               org.apache.sis.console
             </Export-Package>
             <Main-Class>org.apache.sis.console.Command</Main-Class>
+            <Bundle-SymbolicName>org.apache.sis.console</Bundle-SymbolicName>
           </instructions>
         </configuration>
       </plugin>

Modified: sis/trunk/core/sis-metadata/pom.xml
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/pom.xml?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/pom.xml (original)
+++ sis/trunk/core/sis-metadata/pom.xml Mon Jun 17 14:08:20 2013
@@ -121,6 +121,17 @@ Implementations of metadata derived from
           </execution>
         </executions>
       </plugin>
+
+      <!-- Package as OSGi bundle -->
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <configuration>
+          <instructions>
+            <Bundle-SymbolicName>org.apache.sis.metadata</Bundle-SymbolicName>
+          </instructions>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ReferencingServices.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ReferencingServices.java?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ReferencingServices.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ReferencingServices.java [UTF-8] Mon Jun 17 14:08:20 2013
@@ -24,6 +24,7 @@ import org.apache.sis.metadata.iso.exten
 import org.apache.sis.metadata.iso.extent.DefaultGeographicBoundingBox;
 import org.apache.sis.metadata.iso.extent.DefaultSpatialTemporalExtent;
 import org.apache.sis.internal.system.SystemListener;
+import org.apache.sis.internal.system.Modules;
 import org.apache.sis.util.resources.Errors;
 
 
@@ -48,6 +49,7 @@ public abstract class ReferencingService
      * in order to force a new {@code ReferencingServices} lookup if the classpath changes.
      */
     protected ReferencingServices() {
+        super(Modules.METADATA);
         SystemListener.add(this);
     }
 

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java [UTF-8] Mon Jun 17 14:08:20 2013
@@ -29,12 +29,14 @@ import java.lang.reflect.Field;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.metadata.ExtendedElementInformation;
 import org.opengis.referencing.ReferenceIdentifier;
+import org.apache.sis.util.Debug;
 import org.apache.sis.util.Classes;
 import org.apache.sis.util.ThreadSafe;
 import org.apache.sis.util.ComparisonMode;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.collection.TreeTable;
 import org.apache.sis.util.collection.CheckedContainer;
+import org.apache.sis.internal.system.Modules;
 import org.apache.sis.internal.system.SystemListener;
 import org.apache.sis.internal.simple.SimpleCitation;
 
@@ -138,7 +140,7 @@ public class MetadataStandard implements
             ISO_19119,
             ISO_19123
         };
-        SystemListener.add(new SystemListener() {
+        SystemListener.add(new SystemListener(Modules.METADATA) {
             @Override protected void classpathChanged() {
                 clearCache();
             }
@@ -768,6 +770,7 @@ public class MetadataStandard implements
      * Returns a string representation of this metadata standard.
      * This is for debugging purpose only and may change in any future version.
      */
+    @Debug
     @Override
     public String toString() {
         return Classes.getShortClassName(this) + '[' + citation.getTitle() + ']';

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeTableView.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeTableView.java?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeTableView.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeTableView.java [UTF-8] Mon Jun 17 14:08:20 2013
@@ -28,6 +28,7 @@ import org.apache.sis.util.collection.Tr
 import org.apache.sis.util.collection.TableColumn;
 import org.apache.sis.util.collection.TreeTableFormat;
 import org.apache.sis.internal.util.UnmodifiableArrayList;
+import org.apache.sis.internal.system.LocalizedStaticObject;
 
 
 /**
@@ -66,8 +67,10 @@ final class TreeTableView implements Tre
 
     /**
      * The {@link TreeTableFormat} to use for the {@link #toString()} method implementation.
-     * Created when first needed.
+     * Created when first needed. Would need to be reset to {@code null} on locale or timezone
+     * changes, but we do not yet have any listener for such information.
      */
+    @LocalizedStaticObject
     private static Format format;
 
     /**

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/ValueMap.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/ValueMap.java?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/ValueMap.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/ValueMap.java [UTF-8] Mon Jun 17 14:08:20 2013
@@ -21,6 +21,7 @@ import java.util.Set;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
 import org.apache.sis.util.CharSequences;
+import org.apache.sis.util.Debug;
 
 import static org.apache.sis.metadata.PropertyAccessor.RETURN_NULL;
 import static org.apache.sis.metadata.PropertyAccessor.RETURN_PREVIOUS;
@@ -256,6 +257,7 @@ final class ValueMap extends PropertyMap
          * Returns a string representation of this entry.
          * This method is mostly for debugging purpose.
          */
+        @Debug
         @Override
         public String toString() {
             String value = String.valueOf(getValue());

Modified: sis/trunk/core/sis-referencing/pom.xml
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/pom.xml?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/pom.xml (original)
+++ sis/trunk/core/sis-referencing/pom.xml Mon Jun 17 14:08:20 2013
@@ -91,6 +91,17 @@ Implementations of Coordinate Reference 
           </execution>
         </executions>
       </plugin>
+
+      <!-- Package as OSGi bundle -->
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <configuration>
+          <instructions>
+            <Bundle-SymbolicName>org.apache.sis.referencing</Bundle-SymbolicName>
+          </instructions>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 

Modified: sis/trunk/core/sis-utility/pom.xml
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/pom.xml?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/pom.xml (original)
+++ sis/trunk/core/sis-utility/pom.xml Mon Jun 17 14:08:20 2013
@@ -153,6 +153,7 @@ Miscellaneous utilities.
         <artifactId>maven-bundle-plugin</artifactId>
         <configuration>
           <instructions>
+            <Bundle-SymbolicName>org.apache.sis.utility</Bundle-SymbolicName>
             <Bundle-Activator>org.apache.sis.internal.system.OSGiActivator</Bundle-Activator>
           </instructions>
         </configuration>

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SurjectiveConverter.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SurjectiveConverter.java?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SurjectiveConverter.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SurjectiveConverter.java [UTF-8] Mon Jun 17 14:08:20 2013
@@ -20,6 +20,7 @@ import java.util.Set;
 import java.util.EnumSet;
 import org.apache.sis.util.ObjectConverter;
 import org.apache.sis.math.FunctionProperty;
+import org.apache.sis.util.Debug;
 import org.apache.sis.util.Classes;
 import org.apache.sis.util.resources.Errors;
 
@@ -73,6 +74,7 @@ public abstract class SurjectiveConverte
     /**
      * Returns a string representation of this converter for debugging purpose.
      */
+    @Debug
     @Override
     public String toString() {
         return Classes.getShortClassName(this) + '[' +

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemRegistry.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemRegistry.java?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemRegistry.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemRegistry.java [UTF-8] Mon Jun 17 14:08:20 2013
@@ -24,6 +24,7 @@ import org.apache.sis.util.ThreadSafe;
 import org.apache.sis.util.ObjectConverter;
 import org.apache.sis.util.UnconvertibleObjectException;
 import org.apache.sis.internal.system.SystemListener;
+import org.apache.sis.internal.system.Modules;
 
 
 /**
@@ -72,7 +73,7 @@ public final class SystemRegistry extend
          * then those converters are lost. This is of concern only for applications using
          * a modularization framework like OSGi. See package javadoc for more information.
          */
-        SystemListener.add(new SystemListener() {
+        SystemListener.add(new SystemListener(Modules.UTILITIES) {
             @Override protected void classpathChanged() {
                 INSTANCE.clear();
             }

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java [UTF-8] Mon Jun 17 14:08:20 2013
@@ -27,6 +27,7 @@ import java.util.NoSuchElementException;
 import java.io.Serializable;
 import org.opengis.metadata.Identifier;
 import org.opengis.metadata.citation.Citation;
+import org.apache.sis.util.Debug;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.xml.IdentifierMap;
 import org.apache.sis.xml.IdentifierSpace;
@@ -541,6 +542,7 @@ public class IdentifierMapAdapter extend
      *
      * @see SpecializedIdentifier#toString()
      */
+    @Debug
     @Override
     public String toString() {
 	final StringBuilder buffer = new StringBuilder(50).append('{');

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java [UTF-8] Mon Jun 17 14:08:20 2013
@@ -28,6 +28,7 @@ import org.opengis.metadata.Identifier;
 import org.opengis.metadata.citation.Citation;
 import org.apache.sis.internal.simple.SimpleCitation;
 import org.apache.sis.internal.util.UnmodifiableArrayList;
+import org.apache.sis.util.Debug;
 import org.apache.sis.util.logging.Logging;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.xml.IdentifierSpace;
@@ -123,6 +124,7 @@ public final class NonMarshalledAuthorit
     /**
      * Returns a string representation of this identifier space.
      */
+    @Debug
     @Override
     public String toString() {
         return "IdentifierSpace[" + title + ']';

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/SpecializedIdentifier.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/SpecializedIdentifier.java?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/SpecializedIdentifier.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/SpecializedIdentifier.java [UTF-8] Mon Jun 17 14:08:20 2013
@@ -25,6 +25,7 @@ import org.opengis.metadata.citation.Cit
 import org.apache.sis.xml.XLink;
 import org.apache.sis.xml.IdentifierMap;
 import org.apache.sis.xml.IdentifierSpace;
+import org.apache.sis.util.Debug;
 import org.apache.sis.util.logging.Logging;
 import org.apache.sis.internal.util.Citations;
 
@@ -201,6 +202,7 @@ public final class SpecializedIdentifier
      *
      * @see IdentifierMapAdapter#toString()
      */
+    @Debug
     @Override
     public String toString() {
         final StringBuilder buffer = new StringBuilder(60).append("Identifier[");

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/TypeRegistration.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/TypeRegistration.java?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/TypeRegistration.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/TypeRegistration.java [UTF-8] Mon Jun 17 14:08:20 2013
@@ -23,6 +23,7 @@ import java.lang.ref.Reference;
 import java.lang.ref.WeakReference;
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.JAXBException;
+import org.apache.sis.internal.system.Modules;
 import org.apache.sis.internal.system.SystemListener;
 
 
@@ -50,7 +51,7 @@ public abstract class TypeRegistration {
      */
     private static Reference<JAXBContext> context;
     static {
-        SystemListener.add(new SystemListener() {
+        SystemListener.add(new SystemListener(Modules.UTILITIES) {
             @Override protected void classpathChanged() {
                 context = null;
             }

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/LocalisedCharacterString.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/LocalisedCharacterString.java?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/LocalisedCharacterString.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/LocalisedCharacterString.java [UTF-8] Mon Jun 17 14:08:20 2013
@@ -20,6 +20,7 @@ import java.util.Locale;
 import javax.xml.bind.annotation.XmlValue;
 import javax.xml.bind.annotation.XmlAttribute;
 import org.apache.sis.internal.jaxb.Context;
+import org.apache.sis.util.Debug;
 
 // Related to JDK7
 import org.apache.sis.internal.jdk7.Objects;
@@ -133,6 +134,7 @@ final class LocalisedCharacterString {
      *
      * @see TextGroup#toString()
      */
+    @Debug
     @Override
     public String toString() {
         final StringBuilder buffer = new StringBuilder(80)

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/TextGroup.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/TextGroup.java?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/TextGroup.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/TextGroup.java [UTF-8] Mon Jun 17 14:08:20 2013
@@ -18,6 +18,7 @@ package org.apache.sis.internal.jaxb.gmd
 
 import java.util.Locale;
 import javax.xml.bind.annotation.XmlElement;
+import org.apache.sis.util.Debug;
 
 // Related to JDK7
 import org.apache.sis.internal.jdk7.JDK7;
@@ -123,6 +124,7 @@ final class TextGroup {
      *
      * @see LocalisedCharacterString#toString()
      */
+    @Debug
     @Override
     public String toString() {
         final String lineSeparator = JDK7.lineSeparator();

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleCitation.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleCitation.java?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleCitation.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleCitation.java [UTF-8] Mon Jun 17 14:08:20 2013
@@ -29,6 +29,7 @@ import org.opengis.metadata.citation.Res
 import org.opengis.metadata.citation.Series;
 import org.opengis.util.InternationalString;
 import org.apache.sis.util.iso.SimpleInternationalString;
+import org.apache.sis.util.Debug;
 
 // Related to JDK7
 import org.apache.sis.internal.jdk7.Objects;
@@ -111,8 +112,9 @@ public class SimpleCitation implements C
     }
 
     /**
-     * Returns a string representation of this citation.
+     * Returns a string representation of this citation for debugging purpose.
      */
+    @Debug
     @Override
     public String toString() {
         return "Citation[\"" + title + "\"]";

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleReferenceIdentifier.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleReferenceIdentifier.java?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleReferenceIdentifier.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleReferenceIdentifier.java [UTF-8] Mon Jun 17 14:08:20 2013
@@ -23,6 +23,7 @@ import org.opengis.metadata.citation.Cit
 import org.apache.sis.internal.util.Citations;
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.util.Classes;
+import org.apache.sis.util.Debug;
 
 import static org.apache.sis.util.iso.DefaultNameSpace.DEFAULT_SEPARATOR;
 
@@ -157,6 +158,7 @@ public class SimpleReferenceIdentifier i
     /**
      * Returns a string representation of this identifier.
      */
+    @Debug
     @Override
     public String toString() {
         final String classname = Classes.getShortClassName(this);

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/DefaultFactories.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/DefaultFactories.java?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/DefaultFactories.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/DefaultFactories.java [UTF-8] Mon Jun 17 14:08:20 2013
@@ -51,6 +51,7 @@ public final class DefaultFactories exte
      * For the singleton system listener only.
      */
     private DefaultFactories() {
+        super(Modules.UTILITIES);
     }
 
     /**

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/OSGiActivator.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/OSGiActivator.java?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/OSGiActivator.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/OSGiActivator.java [UTF-8] Mon Jun 17 14:08:20 2013
@@ -74,9 +74,14 @@ public final class OSGiActivator impleme
     @Override
     public void bundleChanged(final BundleEvent event) {
         switch (event.getType()) {
-            case BundleEvent.STARTED:
+            case BundleEvent.STARTED: {
+                SystemListener.fireClasspathChanged();
+                break;
+            }
             case BundleEvent.STOPPED: {
                 SystemListener.fireClasspathChanged();
+                SystemListener.removeModule(event.getBundle().getSymbolicName());
+                break;
             }
         }
     }

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/SystemListener.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/SystemListener.java?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/SystemListener.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/SystemListener.java [UTF-8] Mon Jun 17 14:08:20 2013
@@ -38,6 +38,23 @@ public abstract class SystemListener imp
     private static SystemListener[] listeners;
 
     /**
+     * The OSGi module symbolic name, as declared in the {@code Bundle-SymbolicName} entry of the
+     * {@code META-INF/MANIFEST.MF} file. Shall be one of {@link Modules} constants. This is used
+     * in order to detect which listeners to remove when a module is uninstalled.
+     */
+    private final String module;
+
+    /**
+     * Creates a nes listener.
+     *
+     * @param module The OSGi module symbolic name, as declared in the {@code Bundle-SymbolicName}
+     *        entry of the {@code META-INF/MANIFEST.MF} file. Shall be one of {@link Modules} constants.
+     */
+    protected SystemListener(final String module) {
+        this.module = module;
+    }
+
+    /**
      * Adds the given listener to the list of listeners to notify when a change occurs.
      * This method doesn't check if the given listener is already present in the array,
      * unless assertions are enabled.
@@ -62,10 +79,6 @@ public abstract class SystemListener imp
      * a paranoiac check.`
      *
      * @param listener The listener to remove.
-     *
-     * @todo Not yet used. Given that the intend of this method is to remove all listeners
-     *       registered by a specific module, a possible approach would be to remove all
-     *       listeners associated to that through some module identifier.
      */
     public static synchronized void remove(final SystemListener listener) {
         SystemListener[] list = listeners;
@@ -80,18 +93,31 @@ public abstract class SystemListener imp
     }
 
     /**
-     * For sub-classes constructors.
+     * Removes all listeners for the module of the given name.
+     * This method is invoked by {@link OSGiActivator}.
+     *
+     * @param name The name of the module for which to remove listeners, or {@code null} if the module
+     *        to uninstall does not have symbolic name (in which case it is probably not a SIS module).
      */
-    protected SystemListener() {
+    static synchronized void removeModule(final String name) {
+        if (name != null) {
+            final SystemListener[] list = listeners;
+            if (list != null) {
+                int count = 0;
+                final SystemListener[] modified = new SystemListener[list.length];
+                for (final SystemListener listener : list) {
+                    if (!name.equals(listener.module)) {
+                        modified[count++] = listener;
+                    }
+                }
+                if (count != list.length) {
+                    listeners = Arrays.copyOf(modified, count);
+                }
+            }
+        }
     }
 
     /**
-     * Invoked when the classpath is likely to have changed.
-     * Any classes using {@link java.util.ServiceLoader} are advised to clear their cache.
-     */
-    protected abstract void classpathChanged();
-
-    /**
      * Notifies all registered listeners that the classpath may have changed.
      */
     public static void fireClasspathChanged() {
@@ -105,4 +131,10 @@ public abstract class SystemListener imp
             }
         }
     }
+
+    /**
+     * Invoked when the classpath is likely to have changed.
+     * Any classes using {@link java.util.ServiceLoader} are advised to clear their cache.
+     */
+    protected abstract void classpathChanged();
 }

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/setup/About.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/setup/About.java?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/setup/About.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/setup/About.java [UTF-8] Mon Jun 17 14:08:20 2013
@@ -41,6 +41,7 @@ import org.apache.sis.util.ArgumentCheck
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.util.Version;
 import org.apache.sis.util.logging.Logging;
+import org.apache.sis.util.logging.LoggerFactory;
 import org.apache.sis.util.resources.Vocabulary;
 import org.apache.sis.util.collection.TreeTable;
 import org.apache.sis.util.collection.TreeTables;
@@ -98,6 +99,11 @@ public enum About {
     LOCALIZATION(Vocabulary.Keys.Localization),
 
     /**
+     * Information about logging.
+     */
+    LOGGING(Vocabulary.Keys.Logging),
+
+    /**
      * Information about user home directory, java installation directory or other kind of data.
      * This section includes:
      *
@@ -276,6 +282,15 @@ fill:   for (int i=0; ; i++) {
                     break;
                 }
                 case 7: {
+                    newSection = LOGGING;
+                    if (sections.contains(LOGGING)) {
+                        nameKey = Vocabulary.Keys.Implementation;
+                        final LoggerFactory<?> factory = Logging.getLoggerFactory();
+                        value = (factory != null) ? factory.getName() : "java.util.logging";
+                    }
+                    break;
+                }
+                case 8: {
                     newSection = PATHS;
                     if (sections.contains(PATHS)) {
                         nameKey = Vocabulary.Keys.UserHome;
@@ -283,28 +298,28 @@ fill:   for (int i=0; ; i++) {
                     }
                     break;
                 }
-                case 8: {
+                case 9: {
                     if (sections.contains(PATHS)) {
                         nameKey = Vocabulary.Keys.CurrentDirectory;
                         value = getProperty("user.dir");
                     }
                     break;
                 }
-                case 9: {
+                case 10: {
                     if (sections.contains(PATHS)) {
                         nameKey = Vocabulary.Keys.TemporaryFiles;
                         value = getProperty("java.io.tmpdir");
                     }
                     break;
                 }
-                case 10: {
+                case 11: {
                     if (sections.contains(PATHS)) {
                         nameKey = Vocabulary.Keys.JavaHome;
                         value = javaHome = getProperty("java.home");
                     }
                     break;
                 }
-                case 11: {
+                case 12: {
                     newSection = LIBRARIES;
                     if (sections.contains(LIBRARIES)) {
                         nameKey = Vocabulary.Keys.JavaExtensions;
@@ -312,7 +327,7 @@ fill:   for (int i=0; ; i++) {
                     }
                     break;
                 }
-                case 12: {
+                case 13: {
                     if (sections.contains(LIBRARIES)) {
                         nameKey = Vocabulary.Keys.Classpath;
                         value = classpath(getProperty("java.class.path"), null, false, null);

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultNameSpace.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultNameSpace.java?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultNameSpace.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultNameSpace.java [UTF-8] Mon Jun 17 14:08:20 2013
@@ -27,6 +27,7 @@ import org.opengis.util.LocalName;
 import org.opengis.util.ScopedName;
 import org.opengis.util.GenericName;
 import org.opengis.util.InternationalString;
+import org.apache.sis.util.Debug;
 import org.apache.sis.util.Immutable;
 import org.apache.sis.util.collection.WeakValueHashMap;
 import org.apache.sis.internal.util.UnmodifiableArrayList;
@@ -441,6 +442,7 @@ public class DefaultNameSpace implements
      *
      * @return A string representation of this namespace.
      */
+    @Debug
     @Override
     public String toString() {
         return "NameSpace[\"" + name() + "\"]";

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/DualLoggerFactory.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/DualLoggerFactory.java?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/DualLoggerFactory.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/DualLoggerFactory.java [UTF-8] Mon Jun 17 14:08:20 2013
@@ -47,6 +47,14 @@ final class DualLoggerFactory extends Lo
     }
 
     /**
+     * Returns a comma-separated list of the logging frameworks.
+     */
+    @Override
+    public String getName() {
+        return first.getName() + ", " + second.getName();
+    }
+
+    /**
      * Returns the implementation to use for the logger of the specified name,
      * or {@code null} if the logger would delegates to Java logging anyway.
      */

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/LoggerFactory.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/LoggerFactory.java?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/LoggerFactory.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/LoggerFactory.java [UTF-8] Mon Jun 17 14:08:20 2013
@@ -74,6 +74,13 @@ public abstract class LoggerFactory<L> {
     }
 
     /**
+     * Returns the name of the logging framework.
+     *
+     * @return The logging framework name.
+     */
+    public abstract String getName();
+
+    /**
      * Returns the logger of the specified name, or {@code null} if the JDK logging framework
      * should be used.
      *

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/WarningListeners.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/WarningListeners.java?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/WarningListeners.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/WarningListeners.java [UTF-8] Mon Jun 17 14:08:20 2013
@@ -125,6 +125,9 @@ public class WarningListeners<S> impleme
         } else {
             final Logger logger = getLogger();
             record.setLoggerName(logger.getName());
+            if (record instanceof QuietLogRecord) {
+                ((QuietLogRecord) record).clearThrown();
+            }
             logger.log(record);
         }
     }
@@ -133,10 +136,23 @@ public class WarningListeners<S> impleme
      * Reports a warning represented by the given message and exception.
      * At least one of {@code message} and {@code exception} shall be non-null.
      *
+     * {@section Stack trace omission}
+     * If there is no registered listener, then the {@link #warning(LogRecord)} method will send the record to the
+     * {@linkplain #getLogger() logger}, but <em>without</em> the stack trace. This is done that way because stack
+     * traces consume lot of space in the logging files, while being considered implementation details in the context
+     * of {@code WarningListeners} (on the assumption that the logging message provides sufficient information).
+     * If the stack trace is desired, then users can either:
+     * <ul>
+     *   <li>invoke {@code warning(LogRecord)} directly, or</li>
+     *   <li>override {@code warning(LogRecord)} and invoke {@link LogRecord#setThrown(Throwable)} explicitely, or</li>
+     *   <li>register a listener which will log the record itself.</li>
+     * </ul>
+     *
      * @param message    The message to log, or {@code null} if none.
      * @param exception  The exception to log, or {@code null} if none.
      */
     public void warning(String message, final Exception exception) {
+        final LogRecord record;
         final StackTraceElement[] trace;
         if (exception != null) {
             trace = exception.getStackTrace();
@@ -144,11 +160,12 @@ public class WarningListeners<S> impleme
             if (message == null) {
                 message = exception.toString();
             }
+            record = new QuietLogRecord(message, exception);
         } else {
+            ArgumentChecks.ensureNonEmpty("message", message);
             trace = Thread.currentThread().getStackTrace();
+            record = new LogRecord(Level.WARNING, message);
         }
-        ArgumentChecks.ensureNonEmpty("message", message);
-        final LogRecord record = new LogRecord(Level.WARNING, message);
         for (int i=0; i<trace.length; i++) {
             StackTraceElement e = trace[i];
             if (isPublic(e)) {

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java [UTF-8] Mon Jun 17 14:08:20 2013
@@ -135,6 +135,11 @@ public final class Vocabulary extends In
         public static final int Identifier = 42;
 
         /**
+         * Implementation
+         */
+        public static final int Implementation = 52;
+
+        /**
          * Index
          */
         public static final int Index = 44;
@@ -175,6 +180,11 @@ public final class Vocabulary extends In
         public static final int Localization = 19;
 
         /**
+         * Logging
+         */
+        public static final int Logging = 51;
+
+        /**
          * Longitude
          */
         public static final int Longitude = 41;

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties [ISO-8859-1] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties [ISO-8859-1] Mon Jun 17 14:08:20 2013
@@ -30,6 +30,7 @@ Destination        = Destination
 Dimensions         = Dimensions
 Directory          = Directory
 Identifier         = Identifier
+Implementation     = Implementation
 Index              = Index
 JavaExtensions     = Java extensions
 JavaHome           = Java home directory
@@ -39,6 +40,7 @@ Libraries          = Libraries
 LocalConfiguration = Local configuration
 Locale             = Locale
 Localization       = Localization
+Logging            = Logging
 MaximumValue       = Maximum value
 MeanValue          = Mean value
 MinimumValue       = Minimum value

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties [ISO-8859-1] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties [ISO-8859-1] Mon Jun 17 14:08:20 2013
@@ -30,6 +30,7 @@ Destination        = Destination
 Dimensions         = Dimensions
 Directory          = R\u00e9pertoire
 Identifier         = Identifiant
+Implementation     = Impl\u00e9mentation
 Index              = Index
 JavaExtensions     = Extensions du Java
 JavaHome           = R\u00e9pertoire du Java
@@ -39,6 +40,7 @@ Libraries          = Biblioth\u00e8ques
 LocalConfiguration = Configuration locale
 Locale             = Locale
 Localization       = R\u00e9gionalisation
+Logging            = Journalisation
 MaximumValue       = Valeur maximale
 MeanValue          = Valeur moyenne
 MinimumValue       = Valeur minimale

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/XML.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/XML.java?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/XML.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/XML.java [UTF-8] Mon Jun 17 14:08:20 2013
@@ -26,6 +26,7 @@ import javax.xml.bind.Marshaller;
 import javax.xml.bind.Unmarshaller;
 import javax.xml.bind.JAXBException;
 import org.apache.sis.util.Static;
+import org.apache.sis.internal.system.Modules;
 import org.apache.sis.internal.system.SystemListener;
 import org.apache.sis.internal.jaxb.TypeRegistration;
 
@@ -263,7 +264,7 @@ public final class XML extends Static {
      * be created because the {@code JAXBContext} may be different.
      */
     static {
-        SystemListener.add(new SystemListener() {
+        SystemListener.add(new SystemListener(Modules.UTILITIES) {
             @Override protected void classpathChanged() {
                 POOL = null;
             }

Modified: sis/trunk/ide-project/NetBeans/nbproject/project.properties
URL: http://svn.apache.org/viewvc/sis/trunk/ide-project/NetBeans/nbproject/project.properties?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/ide-project/NetBeans/nbproject/project.properties [ISO-8859-1] (original)
+++ sis/trunk/ide-project/NetBeans/nbproject/project.properties [ISO-8859-1] Mon Jun 17 14:08:20 2013
@@ -55,7 +55,7 @@ rome.version         = 0.9
 jdom.version         = 1.0
 jee.version          = 6.0
 osgi.version         = 5.0.0
-netcdf.version       = 4.3.16
+netcdf.version       = 4.3.17
 joda-time.version    = 2.0
 httpclient.version   = 3.1
 slf4j.version        = 1.6.4

Modified: sis/trunk/ide-project/NetBeans/nbproject/project.xml
URL: http://svn.apache.org/viewvc/sis/trunk/ide-project/NetBeans/nbproject/project.xml?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/ide-project/NetBeans/nbproject/project.xml (original)
+++ sis/trunk/ide-project/NetBeans/nbproject/project.xml Mon Jun 17 14:08:20 2013
@@ -46,6 +46,7 @@
             <word>namespaces</word>
             <word>timezone</word>
             <word>Unicode</word>
+            <word>uninstall</word>
             <word>unmarshal</word>
             <word>unmarshaller</word>
             <word>unmarshallers</word>

Modified: sis/trunk/pom.xml
URL: http://svn.apache.org/viewvc/sis/trunk/pom.xml?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/pom.xml (original)
+++ sis/trunk/pom.xml Mon Jun 17 14:08:20 2013
@@ -347,7 +347,7 @@ Apache SIS is a free software, Java lang
       <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-jdk14</artifactId>
-        <version>1.6.4</version> <!-- Must matches the version used by NetCDF. -->
+        <version>1.7.5</version> <!-- Must matches the version used by NetCDF. -->
         <scope>runtime</scope> <!-- Should never be needed at compile time. -->
       </dependency>
     </dependencies>
@@ -374,7 +374,7 @@ Apache SIS is a free software, Java lang
        =================================================================== -->
   <properties>
     <geoapi.version>3.0.0</geoapi.version>
-    <netcdf.version>4.3.16</netcdf.version>
+    <netcdf.version>4.3.17</netcdf.version>
     <findbugs.version>2.5.2</findbugs.version>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <website.encoding>UTF-8</website.encoding>

Modified: sis/trunk/storage/sis-netcdf/pom.xml
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-netcdf/pom.xml?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/storage/sis-netcdf/pom.xml (original)
+++ sis/trunk/storage/sis-netcdf/pom.xml Mon Jun 17 14:08:20 2013
@@ -86,6 +86,24 @@ Bridge between NetCDF Climate and Foreca
 
 
   <!-- ===========================================================
+           Build configuration
+       =========================================================== -->
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <configuration>
+          <instructions>
+            <Bundle-SymbolicName>org.apache.sis.storage.netcdf</Bundle-SymbolicName>
+          </instructions>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+
+  <!-- ===========================================================
            Dependencies
        =========================================================== -->
   <dependencies>

Modified: sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/ChannelDecoder.java
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/ChannelDecoder.java?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/ChannelDecoder.java [UTF-8] (original)
+++ sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/ChannelDecoder.java [UTF-8] Mon Jun 17 14:08:20 2013
@@ -46,6 +46,7 @@ import org.apache.sis.util.resources.Err
 import org.apache.sis.util.resources.Vocabulary;
 import org.apache.sis.util.logging.WarningListeners;
 import org.apache.sis.util.ArraysExt;
+import org.apache.sis.util.Debug;
 import org.apache.sis.measure.Units;
 
 
@@ -736,6 +737,7 @@ nextVar:    for (final VariableInfo vari
      * Returns a string representation to be inserted in {@link org.apache.sis.storage.netcdf.NetcdfStore#toString()}
      * result. This is for debugging purpose only any may change in any future SIS version.
      */
+    @Debug
     @Override
     public String toString() {
         final StringBuilder buffer = new StringBuilder();

Modified: sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/DecoderWrapper.java
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/DecoderWrapper.java?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/DecoderWrapper.java [UTF-8] (original)
+++ sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/DecoderWrapper.java [UTF-8] Mon Jun 17 14:08:20 2013
@@ -32,6 +32,7 @@ import ucar.nc2.units.DateUnit;
 import ucar.nc2.time.Calendar;
 import ucar.nc2.time.CalendarDate;
 import ucar.nc2.time.CalendarDateFormatter;
+import org.apache.sis.util.Debug;
 import org.apache.sis.util.ArraysExt;
 import org.apache.sis.util.logging.WarningListeners;
 import org.apache.sis.internal.netcdf.Decoder;
@@ -335,6 +336,16 @@ public final class DecoderWrapper extend
     }
 
     /**
+     * Invoked by the UCAR library during the reading process for progress information.
+     *
+     * @param message The message to show to the user.
+     * @param progress Count of progress, or -1 if unknown. This is not necessarily a percentage done.
+     */
+    @Override
+    public void setProgress(final String message, final int progress) {
+    }
+
+    /**
      * Invoked by the UCAR NetCDF library when an error occurred.
      *
      * @param message The error message.
@@ -358,6 +369,7 @@ public final class DecoderWrapper extend
      * Returns a string representation to be inserted in {@link org.apache.sis.storage.netcdf.NetcdfStore#toString()}
      * result. This is for debugging purpose only any may change in any future SIS version.
      */
+    @Debug
     @Override
     public String toString() {
         return "UCAR driver: “" + file.getLocation() + '”';

Modified: sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStore.java
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStore.java?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStore.java [UTF-8] (original)
+++ sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStore.java [UTF-8] Mon Jun 17 14:08:20 2013
@@ -18,6 +18,7 @@ package org.apache.sis.storage.netcdf;
 
 import java.io.IOException;
 import org.opengis.metadata.Metadata;
+import org.apache.sis.util.Debug;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.storage.DataStore;
 import org.apache.sis.storage.DataStoreException;
@@ -103,6 +104,7 @@ public class NetcdfStore extends DataSto
      * Returns a string representation of this NetCDF store for debugging purpose.
      * The content of the string returned by this method may change in any future SIS version.
      */
+    @Debug
     @Override
     public String toString() {
         return getClass().getSimpleName() + '[' + decoder + ']';

Modified: sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStoreProvider.java
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStoreProvider.java?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStoreProvider.java [UTF-8] (original)
+++ sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStoreProvider.java [UTF-8] Mon Jun 17 14:08:20 2013
@@ -26,6 +26,8 @@ import org.apache.sis.internal.netcdf.De
 import org.apache.sis.internal.netcdf.impl.ChannelDecoder;
 import org.apache.sis.internal.netcdf.ucar.DecoderWrapper;
 import org.apache.sis.internal.storage.ChannelDataInput;
+import org.apache.sis.internal.system.SystemListener;
+import org.apache.sis.internal.system.Modules;
 import org.apache.sis.storage.DataStore;
 import org.apache.sis.storage.DataStoreProvider;
 import org.apache.sis.storage.StorageConnector;
@@ -79,6 +81,18 @@ public class NetcdfStoreProvider extends
     private static volatile Constructor<? extends Decoder> createFromUCAR;
 
     /**
+     * Clears the cached constructors if the classpath has changed,
+     * because the UCAR library may no longer be on the classpath.
+     */
+    static {
+        SystemListener.add(new SystemListener(Modules.NETCDF) {
+            @Override protected void classpathChanged() {
+                reset();
+            }
+        });
+    }
+
+    /**
      * Creates a new provider.
      */
     public NetcdfStoreProvider() {
@@ -234,37 +248,51 @@ public class NetcdfStoreProvider extends
     }
 
     /**
-     * Get the {@link java.lang.Class} that represent the {@link ucar.nc2.NetcdfFile type}.
-     * We do not synchronize this method since it is not a big deal if {@code Class.forName(…)} is invoked twice.
-     * The {@code Class.forName(…)} method performs itself the required synchronization for returning the same
-     * singleton {@code Class} instance.
+     * Gets the {@link java.lang.Class} that represent the {@link ucar.nc2.NetcdfFile type}.
      */
     private static void ensureInitialized() {
         if (netcdfFileClass == null) {
-            try {
-                netcdfFileClass = Class.forName(UCAR_CLASSNAME);
-            } catch (ClassNotFoundException e) {
-                netcdfFileClass = Void.TYPE;
-                return;
-            }
-            try {
+            synchronized (NetcdfStoreProvider.class) {
                 /*
-                 * UCAR API.
+                 * No double-check because it is not a big deal if the constructors are fetched twice.
+                 * The sychronization is mostly a safety against concurrent execution of 'reset()'.
                  */
-                canOpenFromPath = netcdfFileClass.getMethod("canOpen", String.class);
-                assert canOpenFromPath.getReturnType() == Boolean.TYPE;
-                /*
-                 * SIS Wrapper API.
-                 */
-                final Class<? extends Decoder> wrapper =
-                        Class.forName("org.apache.sis.internal.netcdf.ucar.DecoderWrapper").asSubclass(Decoder.class);
-                final Class<?>[] parameterTypes = new Class<?>[] {WarningListeners.class, netcdfFileClass};
-                createFromUCAR = wrapper.getConstructor(parameterTypes);
-                parameterTypes[1] = String.class;
-                createFromPath = wrapper.getConstructor(parameterTypes);
-            } catch (Exception e) { // (ReflectiveOperationException) on JDK7 branch.
-                throw new AssertionError(e); // Should never happen (shall be verified by the JUnit tests).
+                try {
+                    netcdfFileClass = Class.forName(UCAR_CLASSNAME);
+                } catch (ClassNotFoundException e) {
+                    netcdfFileClass = Void.TYPE;
+                    return;
+                }
+                try {
+                    /*
+                     * UCAR API.
+                     */
+                    canOpenFromPath = netcdfFileClass.getMethod("canOpen", String.class);
+                    assert canOpenFromPath.getReturnType() == Boolean.TYPE;
+                    /*
+                     * SIS Wrapper API.
+                     */
+                    final Class<? extends Decoder> wrapper =
+                            Class.forName("org.apache.sis.internal.netcdf.ucar.DecoderWrapper").asSubclass(Decoder.class);
+                    final Class<?>[] parameterTypes = new Class<?>[] {WarningListeners.class, netcdfFileClass};
+                    createFromUCAR = wrapper.getConstructor(parameterTypes);
+                    parameterTypes[1] = String.class;
+                    createFromPath = wrapper.getConstructor(parameterTypes);
+                } catch (Exception e) { // (ReflectiveOperationException) on JDK7 branch.
+                    throw new AssertionError(e); // Should never happen (shall be verified by the JUnit tests).
+                }
             }
         }
     }
+
+    /**
+     * Invoked when the classpath changed. Clears the cached class and constructors, since we don't know
+     * if the UCAR library is still on the classpath.
+     */
+    static synchronized void reset() {
+        netcdfFileClass = null;
+        canOpenFromPath = null;
+        createFromUCAR  = null;
+        createFromPath  = null;
+    }
 }

Modified: sis/trunk/storage/sis-storage/pom.xml
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-storage/pom.xml?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/storage/sis-storage/pom.xml (original)
+++ sis/trunk/storage/sis-storage/pom.xml Mon Jun 17 14:08:20 2013
@@ -87,4 +87,22 @@ Provides the interfaces and base classes
     </contributor>
   </contributors>
 
+
+  <!-- ===========================================================
+           Build configuration
+       =========================================================== -->
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <configuration>
+          <instructions>
+            <Bundle-SymbolicName>org.apache.sis.storage</Bundle-SymbolicName>
+          </instructions>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
 </project>

Modified: sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/storage/StorageConnector.java
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/storage/StorageConnector.java?rev=1493766&r1=1493765&r2=1493766&view=diff
==============================================================================
--- sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/storage/StorageConnector.java [UTF-8] (original)
+++ sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/storage/StorageConnector.java [UTF-8] Mon Jun 17 14:08:20 2013
@@ -29,6 +29,7 @@ import javax.imageio.ImageIO;
 import javax.imageio.stream.ImageInputStream;
 import java.sql.Connection;
 import javax.sql.DataSource;
+import org.apache.sis.util.Debug;
 import org.apache.sis.util.Classes;
 import org.apache.sis.util.ArraysExt;
 import org.apache.sis.util.ArgumentChecks;
@@ -566,6 +567,7 @@ public class StorageConnector implements
     /**
      * Returns a string representation of this {@code StorageConnector} for debugging purpose.
      */
+    @Debug
     @Override
     public String toString() {
         final StringBuilder buffer = new StringBuilder(40);



Mime
View raw message