|
From: <bma...@us...> - 2011-06-06 13:08:35
|
Revision: 6270
http://fudaa.svn.sourceforge.net/fudaa/?rev=6270&view=rev
Author: bmarchan
Date: 2011-06-06 13:08:29 +0000 (Mon, 06 Jun 2011)
Log Message:
-----------
Outils externes : Execution avec trace dans fenetre + r?\195?\169cup?\195?\169ration des r?\195?\169sultats dans des calques.
Modified Paths:
--------------
trunk/framework/ctulu-gis/src/main/java/org/fudaa/ctulu/gis/factory/GISExportDataStoreFactory.java
Added Paths:
-----------
trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/ProgressionDetailedInterface.java
Added: trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/ProgressionDetailedInterface.java
===================================================================
--- trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/ProgressionDetailedInterface.java (rev 0)
+++ trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/ProgressionDetailedInterface.java 2011-06-06 13:08:29 UTC (rev 6270)
@@ -0,0 +1,27 @@
+package org.fudaa.ctulu;
+
+/**
+ * une interface pour notifier la progression d'une tache. Doit \xEAtre utilis\xE9e dans
+ * la tache, et appel\xE9e r\xE9guli\xE8rement. La tache peut notifier certains d\xE9tails.
+ *
+ * @author mar...@de...
+ * @version $Id:$
+ */
+public interface ProgressionDetailedInterface extends ProgressionInterface {
+
+ /**
+ * Ajoute un d\xE9tail aux d\xE9tails pr\xE9c\xE9dents. La string peut comporter des retours
+ * chariots pour passer \xE0 la ligne. La methode {@link #reset()} efface les
+ * details.
+ *
+ * @param _s La string.
+ */
+ public void appendDetail(String _s);
+
+ /**
+ * Ajoute un d\xE9tail aux d\xE9tails pr\xE9c\xE9dents, en passant \xE0 la ligne en fin.
+ *
+ * @param _s La string.
+ */
+ public void appendDetailln(String _s);
+}
Property changes on: trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/ProgressionDetailedInterface.java
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Modified: trunk/framework/ctulu-gis/src/main/java/org/fudaa/ctulu/gis/factory/GISExportDataStoreFactory.java
===================================================================
--- trunk/framework/ctulu-gis/src/main/java/org/fudaa/ctulu/gis/factory/GISExportDataStoreFactory.java 2011-06-06 13:07:10 UTC (rev 6269)
+++ trunk/framework/ctulu-gis/src/main/java/org/fudaa/ctulu/gis/factory/GISExportDataStoreFactory.java 2011-06-06 13:08:29 UTC (rev 6270)
@@ -44,27 +44,37 @@
final HashMap fileFilterDataStore = new HashMap();
final FileDataStoreFactorySpi[] stores = new FileDataStoreFactorySpi[] { new ShapefileDataStoreFactory(),
new MIFDataStoreFactory(), new GMLDataStoreFactory() };
+
for (int i = 0; i < stores.length; i++) {
- final FileDataStoreFactorySpi shape = stores[i];
- // pour l'instant: geotools ne support pas l'export pour le gml
- final String[] ex = shape.getFileExtensions();
- if (ex != null) {
- for (int j = ex.length - 1; j >= 0; j--) {
- if (ex[j].startsWith(CtuluLibString.DOT)) {
- ex[j] = ex[j].substring(1);
- }
+ fileFilterDataStore.put(buildFileFilterFor(stores[i]), stores[i]);
+ }
+ return fileFilterDataStore;
+ }
+
+ /**
+ * Construit et retoune le filtre correspondant au DataStore.
+ * @param _store Le data store.
+ * @return
+ */
+ public static BuFileFilter buildFileFilterFor(FileDataStoreFactorySpi _store) {
+ // pour l'instant: geotools ne support pas l'export pour le gml
+ final String[] ex=_store.getFileExtensions();
+ if (ex != null) {
+ for (int j=ex.length - 1; j >= 0; j--) {
+ if (ex[j].startsWith(CtuluLibString.DOT)) {
+ ex[j]=ex[j].substring(1);
}
}
- final String desc = shape.getDescription();
- /*
- * if (shape.getClass().equals(GMLDataStoreFactory.class)) { desc = "GML (*.gml, *.xml)"; }
- */
- final BuFileFilter ft = new BuFileFilter(ex, desc);
- // les extensions sont deja mise par les data store factories
- ft.setExtensionListInDescription(false);
- fileFilterDataStore.put(ft, shape);
}
- return fileFilterDataStore;
+ final String desc=_store.getDescription();
+ System.out.println(_store.getDisplayName());
+ /*
+ * if (shape.getClass().equals(GMLDataStoreFactory.class)) { desc = "GML (*.gml, *.xml)"; }
+ */
+ final BuFileFilter ft=new BuFileFilter(ex, desc);
+ // les extensions sont deja mise par les data store factories
+ ft.setExtensionListInDescription(false);
+ return ft;
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|