|
From: <de...@us...> - 2012-11-13 08:51:15
|
Revision: 7876
http://fudaa.svn.sourceforge.net/fudaa/?rev=7876&view=rev
Author: deniger
Date: 2012-11-13 08:51:04 +0000 (Tue, 13 Nov 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/soft/fudaa-prepro/meshview/src/main/resources/org/fudaa/fudaa/meshviewer/mv_en.fr_txt
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceFileFinder.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostSourcePersist.java
trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
Added Paths:
-----------
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceXstreamConfiguration.java
Modified: trunk/soft/fudaa-prepro/meshview/src/main/resources/org/fudaa/fudaa/meshviewer/mv_en.fr_txt
===================================================================
--- trunk/soft/fudaa-prepro/meshview/src/main/resources/org/fudaa/fudaa/meshviewer/mv_en.fr_txt 2012-11-13 08:50:35 UTC (rev 7875)
+++ trunk/soft/fudaa-prepro/meshview/src/main/resources/org/fudaa/fudaa/meshviewer/mv_en.fr_txt 2012-11-13 08:51:04 UTC (rev 7876)
@@ -1,4 +1,5 @@
G\xE9n\xE9rer le fichier de maillage MAI=Generate the grid file MAI
+Centre de l'\xE9l\xE9ment=Mesh's center
G\xE9n\xE9rer le fichier COX (cote de fond)=Generate the COX file ( bottom elevation)
G\xE9n\xE9rer le fichier INX (conditions initiales)=Generate the INX file ( initial conditions)
G\xE9n\xE9rer le fichier FRX (frottement)=Generate the FRX file (bottom friction)
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceFileFinder.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceFileFinder.java 2012-11-13 08:50:35 UTC (rev 7875)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceFileFinder.java 2012-11-13 08:51:04 UTC (rev 7876)
@@ -1,12 +1,18 @@
package org.fudaa.fudaa.tr.post.persist;
import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.util.Properties;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import org.fudaa.ctulu.CtuluLibFile;
import org.fudaa.fudaa.tr.post.TrPostSource;
/**
* Tentative de simplificattion de {@link TrPostPersistenceManager}
- *
+ *
* @author deniger
*/
public class TrPostPersistenceFileFinder {
@@ -16,14 +22,15 @@
*/
public static String EXTENSION = "." + TrPostFileFilter.DEFAULT_EXTENSION;
/**
- * Point d'entr\xE9e poru charger un projet repertoire. Continet le path du directory. Cela permet de placer ce fichier
- * n'importe ou sur le ddur et de pouvoir charger le projet. Peut etre g\xE9r\xE9 comem un raccourcis.
+ * Point d'entr\xE9e poru charger un projet repertoire. Continet le path du directory. Cela permet de placer ce fichier n'importe ou sur le ddur et de
+ * pouvoir charger le projet. Peut etre g\xE9r\xE9 comem un raccourcis.
*/
public static final String MAIN_SETUP_FILENAME = "setup";// + EXTENSION;
/**
* Fichier qui d\xE9crit tous les contenu layout sauvegard\xE9s Et noms des balises importantes
*/
public final static String MAIN_LAYOUTS_CONFIG_FILENAME = "info_layout";// "InfoLayout" + EXTENSION;
+ public final static String VERSION_FILE = "version.txt";// "InfoLayout" + EXTENSION;
/**
* Fichier qui d\xE9crit int\xE9gralement le contenu d'une scene
*/
@@ -35,7 +42,6 @@
public final static String REP_TEXTES = "TEXTES";
public final static String REP_CHECKSUM = "checksum";
public final static String MAIN_WIDGET_NAMES_FILENAME = "nom_frame";// "FramesNames"+ EXTENSION;
-
private final File projectBaseDir;
/**
@@ -50,6 +56,42 @@
return new File(projectBaseDir, MAIN_SETUP_FILENAME);
}
+ public void saveVersion(String version) {
+ File versionFile = new File(projectBaseDir, VERSION_FILE);
+ versionFile.delete();
+ FileWriter writer = null;
+ try {
+ Properties properties = new Properties();
+ properties.put("version", version);
+ writer = new FileWriter(versionFile);
+ properties.store(writer, "file Version");
+ } catch (Exception ex) {
+ Logger.getLogger(TrPostPersistenceFileFinder.class.getName()).log(Level.INFO, "message");
+ } finally {
+ CtuluLibFile.close(writer);
+ }
+ }
+
+ public String getVersion() {
+ File versionFile = new File(projectBaseDir, VERSION_FILE);
+ String version = null;
+ if (versionFile.exists()) {
+ FileReader reader = null;
+ try {
+ Properties properties = new Properties();
+ reader = new FileReader(versionFile);
+ properties.load(reader);
+ version = properties.getProperty("version");
+ } catch (Exception ex) {
+ Logger.getLogger(TrPostPersistenceFileFinder.class.getName()).log(Level.INFO, "message");
+ } finally {
+ CtuluLibFile.close(reader);
+ }
+ }
+ return version;
+
+ }
+
public File getBaseDir() {
return projectBaseDir;
}
@@ -75,15 +117,14 @@
}
public File getChecksumFileForSetup() {
- return new File(getMainChecksumDir(), TrPostPersistenceFileFinder.MAIN_SETUP_FILENAME.toLowerCase()+".checksum");
+ return new File(getMainChecksumDir(), TrPostPersistenceFileFinder.MAIN_SETUP_FILENAME.toLowerCase() + ".checksum");
}
public File getChecksumFileForVariables() {
- return new File(getMainChecksumDir(), TrPostPersistenceFileFinder.REP_VAR.toLowerCase()+".checksum");
+ return new File(getMainChecksumDir(), TrPostPersistenceFileFinder.REP_VAR.toLowerCase() + ".checksum");
}
-
+
public File getChecksumFileForSources(TrPostSource src) {
- return new File(getMainChecksumDir(), "sources_"+src.getId()+".checksum");
+ return new File(getMainChecksumDir(), "sources_" + src.getId() + ".checksum");
}
-
}
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2012-11-13 08:50:35 UTC (rev 7875)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2012-11-13 08:51:04 UTC (rev 7876)
@@ -56,27 +56,17 @@
import org.fudaa.fudaa.tr.post.TrPostUserSaverContent;
import org.fudaa.fudaa.tr.post.TrPostUserVariableSaver;
import org.fudaa.fudaa.tr.post.actions.TrPostActionFusionCalques;
-import org.fudaa.fudaa.tr.post.data.TrPostDataCreatedStatisticSaver;
import org.netbeans.api.visual.widget.Widget;
-import org.netbeans.modules.visual.anchor.TriangleAnchorShape;
import com.memoire.fu.FuLib;
import com.memoire.fu.FuLog;
import com.thoughtworks.xstream.XStream;
-import com.thoughtworks.xstream.converters.Converter;
-import com.thoughtworks.xstream.converters.MarshallingContext;
-import com.thoughtworks.xstream.converters.UnmarshallingContext;
-import com.thoughtworks.xstream.io.HierarchicalStreamReader;
-import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
-import com.thoughtworks.xstream.io.xml.XmlFriendlyReplacer;
-import com.thoughtworks.xstream.io.xml.XppDriver;
import com.thoughtworks.xstream.persistence.XmlArrayList;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import org.fudaa.ebli.commun.XstreamCustomizer;
-import org.fudaa.fudaa.tr.post.TrPostCourbeTreeModelPersist;
/**
* Manager qui se charge de donner les noms standart des balises, le chooser de fichiers et appel aux bonnes m\xE9thodes pour la persistence des donn\xE9es.
@@ -85,6 +75,7 @@
*/
public class TrPostPersistenceManager {
+ public static final String CURRENT_VERSION = "1.0";
/**
* Le projet a persiter
*/
@@ -154,7 +145,10 @@
}
if (directory != null && directory.exists()) {
- fileChooser.setCurrentDirectory(directory);
+ try {
+ fileChooser.setCurrentDirectory(directory);
+ } catch (Exception e) {
+ }
}
if (fileDefaut.exists()) {
fileChooser.setSelectedFile(fileDefaut);
@@ -317,7 +311,7 @@
// -- ecriture de la classe xstream
ObjectOutputStream out = null;
try {
- out = EbliLib.createObjectOutpuStream(file, getParser());
+ out = EbliLib.createObjectOutpuStream(file, getParser(true));
// -- readme --//
out.writeObject(XmlCommentaire.getCommentaireLayout());
@@ -368,7 +362,7 @@
try {
- in = EbliLib.createObjectInpuStream(file, getParser());
+ in = EbliLib.createObjectInpuStream(file, getParser(isNewVersion));
int nbFichiersToGenrate;
// -- lecture readme --//
@@ -527,7 +521,7 @@
if (!file.exists()) {
file.getParentFile().mkdirs();
}
- out = EbliLib.createObjectOutpuStream(file, getParser());
+ out = EbliLib.createObjectOutpuStream(file, getParser(true));
// -- redame --//
out.writeObject(XmlCommentaire.getCommentaireSources());
@@ -593,7 +587,7 @@
for (int i = 0; i < listeVar.size(); i++) {
final TrPostUserSaverContent var = listeVar.get(i);
final TrPostTimeModelSaver ptd = listePdt.get(i);
- XStream parser = getParser();
+ XStream parser = getParser(true);
parser.omitField(TrPostUserVariableSaver.class, "g__");
String idSource = listeCouplesIdSources.get(i).IdSource;
File xmlFile = getVariableFile(pathVariables, idSource);
@@ -613,7 +607,7 @@
for (int i = 0; i < listeVarSuites.size(); i++) {
final TrPostUserVariableSaver var = listeVarSuites.get(i);
final TrPostTimeModelSaver ptd = listePdtSuites.get(i);
- XStream parser = getParser();
+ XStream parser = getParser(true);
parser.omitField(TrPostTimeModelSaver.class, "fmtPattern__");
out = parser.createObjectOutputStream(new FileWriter(getVariableFile(pathVariables, listeSuiteCalcul.get(i).Id)));
out.writeObject(var);
@@ -645,7 +639,7 @@
// -- outputstream du xstream --//
ObjectInputStream in = null;
try {
- in = EbliLib.createObjectInpuStream(file, getParser());
+ in = EbliLib.createObjectInpuStream(file, getParser(isNewVersion));
// -- recuperation du multiSourceActivator--//
final TrPostMultiSourceActivator2 multiProjectActivator = new TrPostMultiSourceActivator2(mainProject);
@@ -782,7 +776,7 @@
if (fileVariables.canRead()) {
ObjectInputStream in = null;
try {
- in = EbliLib.createObjectInpuStream(fileVariables, getParser());
+ in = EbliLib.createObjectInpuStream(fileVariables, getParser(isNewVersion));
Object var = in.readObject();
if (var instanceof TrPostUserVariableSaver) {
Map<String, double[]> savedValues = new HashMap<String, double[]>();
@@ -852,6 +846,7 @@
boolean res = false;
try {
final HashMap<String, Object> parametres = new HashMap<String, Object>();
+ parametres.put(XstreamCustomizer.PARAMETER_ID, new TrPostPersistenceXstreamConfiguration.CustomXstreamCustomizer(true));
progression("Cr\xE9ation du r\xE9pertoire", 10);
res = false;
@@ -862,7 +857,7 @@
// -- etape 1: creation du repertoire des graphe et calques --//
final File fileVar = projectFileFinder.getVariablesDir();
fileVar.mkdirs();
-
+ projectFileFinder.saveVersion(CURRENT_VERSION);
// -- etape 2 sauvegarde du fichier contenant tous les sources ouverts
progression("Cr\xE9ation du fichier descripteur de sources", 15);
File mainSetupFile = projectFileFinder.getMainSetupFile();
@@ -953,7 +948,7 @@
ObjectOutputStream out = null;
try {
mkdirParent(file);
- out = EbliLib.createObjectOutpuStream(file, getParser());
+ out = EbliLib.createObjectOutpuStream(file, getParser(true));
// --readme --//
out.writeObject(XmlCommentaire.getCommentaireName());
@@ -994,7 +989,7 @@
return Collections.emptyList();
}
try {
- in = EbliLib.createObjectInpuStream(file, getParser());
+ in = EbliLib.createObjectInpuStream(file, getParser(isNewVersion));
// --readme --//
final Object debuTfichier = in.readObject();
if (debuTfichier instanceof XmlCommentaire) {
@@ -1015,6 +1010,7 @@
}
return liste;
}
+ boolean isNewVersion;
/**
* Methode qui charge le projet,l'ensemble des sources et toutes les widgets dans les layouts.
@@ -1043,8 +1039,10 @@
// -- etape 2 sauvegarde du fichier contenant tous les sources ouverts
progression("Chargement du fichier descripteur de sources", 15);
File mainSetupFile = projectFileFinder.getMainSetupFile();
+ isNewVersion = projectFileFinder.getVersion() != null;//pour l'instant qu'une version...
final HashMap<String, Object> parametres = new HashMap<String, Object>();
+ parametres.put(XstreamCustomizer.PARAMETER_ID, new TrPostPersistenceXstreamConfiguration.CustomXstreamCustomizer(isNewVersion));
if (!loadSource(mainSetupFile, parametres)) {
managerError.addMessageError(
"Veuillez corriger les chemins des fichiers r\xE9sultats dans le fichier setup et r\xE9it\xE9rez l'op\xE9ration.");
@@ -1077,7 +1075,6 @@
parametres.put(TrPostReloadParameter.POST_PROJET, mainProject);
parametres.put("errorMsg", managerError.listeMessageError);
parametres.put(TrPostReloadParameter.RECOMPUTE, Boolean.valueOf(recomputeAllData));
- parametres.put(XstreamCustomizer.PARAMETER_ID, new CustomXstreamCustomizer());
// -- etape 5 lecture de la liste des couples nomsfRAME /ID --//
final List<EbliWidgetSerializeXml.CoupleNomId> listeCouplesNoms = loadNomsFrames(projectFileFinder.getMainWidgetDir());
SwingUtilities.invokeLater(new Runnable() {
@@ -1126,72 +1123,13 @@
}
private XStream parser_;
- private XStream getParser() {
+ private XStream getParser(boolean newVersion) {
if (parser_ == null) {
- parser_ = createXmlParser();
+ parser_ = TrPostPersistenceXstreamConfiguration.createXmlParser(newVersion);
}
return parser_;
}
- /**
- * Init le parser avec les alias adequats.
- *
- * @return
- */
- private static XStream createXmlParser() {
- final XmlFriendlyReplacer replacer = new XmlFriendlyReplacer("#", "_");
- // final DomDriver domDriver = new DomDriver("UTF-8", replacer);
- final XppDriver staxDriver = new XppCustomDriver(replacer);
- final XStream xstream = new XStream(staxDriver);
- // -- creation des alias pour que ce soit + parlant dans le xml file --//
- xstream.alias("LAYOUT", EbliSceneSerializeXml.class);
- xstream.alias("FRAME", EbliWidgetSerializeXml.class);
- xstream.alias("GROUPE", EbliWidgetGroupSerializeXml.class);
- xstream.alias("FRAMESNAME", EbliWidgetSerializeXml.CoupleNomId.class);
- xstream.alias("SOURCE", TrPostSourcePersist.class);
- // these field is no more needed:
- xstream.omitField(TrPostSourcePersist.class, "rechargerLesLiens");
- xstream.alias("PROJECTED_SOURCE", TrPostSourceProjectedPersistReplay.class);
- xstream.alias("ONETIME_SOURCE", TrPostSourceOneTimeStepReplayPersist.class);
- xstream.alias("COMPARAISON_SOURCE", TrPostSourceComparaisonPersistReplay.class);
- xstream.alias("SUITECALCUL", TrPostSourcePersistComposite.class);
- xstream.alias("LAYOUTDESCRIPTOR", LayoutDescriptor.class);
- xstream.alias("README", XmlCommentaire.class);
- xstream.alias("TIMEMODEL", TrPostTimeModelSaver.class);
- xstream.alias("USERVAR", TrPostUserVariableSaver.class);
- xstream.omitField(TrPostDataCreatedStatisticSaver.class, "data_");
- xstream.omitField(TriangleAnchorShape.class, "generalPath");
- xstream.registerLocalConverter(TrPostDataCreatedStatisticSaver.class, "data_", new Converter() {
- @Override
- public boolean canConvert(Class type) {
- return true;
- }
-
- @Override
- public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) {
- return null;
- }
-
- @Override
- public void marshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context) {
- }
- });
- xstream.omitField(TrPostCourbeTreeModelPersist.class, "varSupported");
- xstream.omitField(TrPostCourbeTreeModelPersist.class, "objIdx");
- xstream.omitField(TrPostCourbeTreeModelPersist.class, "intepolPt");
- return xstream;
- }
-
- private static class CustomXstreamCustomizer implements XstreamCustomizer {
-
- @Override
- public void configureXstream(XStream xstream) {
- xstream.omitField(TrPostCourbeTreeModelPersist.class, "varSupported");
- xstream.omitField(TrPostCourbeTreeModelPersist.class, "objIdx");
- xstream.omitField(TrPostCourbeTreeModelPersist.class, "intepolPt");
- }
- }
-
private static void buildMapWithDataPath(TrPostPersistenceFileFinder projectFileFinder, final Map parametres,
final String repertoireLayout) {
final File repertoireLayoutFile = projectFileFinder.getPath(repertoireLayout);
@@ -1208,7 +1146,6 @@
parametres.put("pathGraphes", dirGraphes.getAbsolutePath());
parametres.put("pathCalques", dirCalques.getAbsolutePath());
parametres.put("pathTexte", dirText.getAbsolutePath());
-
}
/**
@@ -1234,7 +1171,7 @@
// -- outputstream du xstream --//
ObjectOutputStream out = null;
try {
- out = EbliLib.createObjectOutpuStream(file, createXmlParser());
+ out = EbliLib.createObjectOutpuStream(file, TrPostPersistenceXstreamConfiguration.createXmlParser(true));
// -- g\xE9n\xE9ration du xml pour la scene --//
out.writeObject(new EbliSceneSerializeXml(scene, title, (Dimension) parametres.get("dimensions"), (Point) parametres.get(
@@ -1343,7 +1280,7 @@
// -- inputstream du xstream --//
ObjectInputStream in = null;
try {
- in = EbliLib.createObjectInpuStream(file, getParser());
+ in = EbliLib.createObjectInpuStream(file, getParser(isNewVersion));
// -- r\xE9cup\xE9ration de la scene xml --//
final EbliSceneSerializeXml sceneXml = (EbliSceneSerializeXml) in.readObject();
Added: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceXstreamConfiguration.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceXstreamConfiguration.java (rev 0)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceXstreamConfiguration.java 2012-11-13 08:51:04 UTC (rev 7876)
@@ -0,0 +1,123 @@
+/*
+ GPL 2
+ */
+package org.fudaa.fudaa.tr.post.persist;
+
+import com.thoughtworks.xstream.XStream;
+import com.thoughtworks.xstream.converters.Converter;
+import com.thoughtworks.xstream.converters.MarshallingContext;
+import com.thoughtworks.xstream.converters.UnmarshallingContext;
+import com.thoughtworks.xstream.io.HierarchicalStreamReader;
+import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
+import com.thoughtworks.xstream.io.xml.XmlFriendlyReplacer;
+import com.thoughtworks.xstream.io.xml.XppDriver;
+import org.fudaa.ctulu.xml.BooleanArrayConverter;
+import org.fudaa.ctulu.xml.DoubleArrayConverter;
+import org.fudaa.ctulu.xml.FloatArrayConverter;
+import org.fudaa.ctulu.xml.IntegerArrayConverter;
+import org.fudaa.ctulu.xml.StringArrayConverter;
+import org.fudaa.ebli.commun.XstreamCustomizer;
+import org.fudaa.ebli.converter.TraceToStringConverter;
+import org.fudaa.ebli.courbe.EGCourbeMarqueur;
+import org.fudaa.ebli.courbe.EGCourbePersist;
+import org.fudaa.ebli.courbe.convert.EGAxePersistConverter;
+import org.fudaa.ebli.courbe.convert.EGCourbePersistConverter;
+import org.fudaa.ebli.courbe.convert.EGPersistHelper;
+import org.fudaa.ebli.visuallibrary.persist.EbliSceneSerializeXml;
+import org.fudaa.ebli.visuallibrary.persist.EbliWidgetGroupSerializeXml;
+import org.fudaa.ebli.visuallibrary.persist.EbliWidgetSerializeXml;
+import org.fudaa.fudaa.tr.post.TrPostCourbeTreeModelPersist;
+import org.fudaa.fudaa.tr.post.TrPostSourcePersistComposite;
+import org.fudaa.fudaa.tr.post.TrPostTimeModelSaver;
+import org.fudaa.fudaa.tr.post.TrPostUserVariableSaver;
+import org.fudaa.fudaa.tr.post.data.TrPostDataCreatedStatisticSaver;
+import org.fudaa.fudaa.tr.post.profile.MvProfileTreeModelPersist;
+import org.netbeans.modules.visual.anchor.TriangleAnchorShape;
+
+/**
+ *
+ * @author Frederic Deniger
+ */
+public class TrPostPersistenceXstreamConfiguration {
+
+ protected static class CustomXstreamCustomizer implements XstreamCustomizer {
+
+ boolean newVersion;
+
+ public CustomXstreamCustomizer(boolean newVersion) {
+ this.newVersion = newVersion;
+ }
+
+ @Override
+ public void configureXstream(XStream xstream) {
+ if (newVersion) {
+ configureTraceColors(xstream);
+ }
+ xstream.omitField(TrPostCourbeTreeModelPersist.class, "varSupported");
+ xstream.omitField(TrPostCourbeTreeModelPersist.class, "objIdx");
+ xstream.omitField(TrPostCourbeTreeModelPersist.class, "intepolPt");
+ }
+ }
+
+ private static void configureTraceColors(XStream xstream) {
+ final TraceToStringConverter traceToStringConverter = new TraceToStringConverter();
+ EGPersistHelper.registerDefaultConverters(xstream, traceToStringConverter);
+ new EGAxePersistConverter(traceToStringConverter).initXstream(xstream);
+ xstream.processAnnotations(EGCourbeMarqueur.class);
+ xstream.registerConverter(new DoubleArrayConverter());
+ xstream.registerConverter(new BooleanArrayConverter());
+ xstream.registerConverter(new IntegerArrayConverter());
+ xstream.registerConverter(new FloatArrayConverter());
+ xstream.alias("PostVisuPanelPersistManager", org.fudaa.fudaa.tr.post.TrPostVisuPanelPersistManager.class);
+ xstream.alias("MvProfileTreeModelPersist", MvProfileTreeModelPersist.class);
+ }
+
+ /**
+ * Init le parser avec les alias adequats.
+ *
+ * @return
+ */
+ public static XStream createXmlParser(boolean newVersion) {
+ final XmlFriendlyReplacer replacer = new XmlFriendlyReplacer("#", "_");
+ final XppDriver staxDriver = new XppCustomDriver(replacer);
+ final XStream xstream = new XStream(staxDriver);
+ xstream.alias("LAYOUT", EbliSceneSerializeXml.class);
+ xstream.alias("FRAME", EbliWidgetSerializeXml.class);
+ xstream.alias("GROUPE", EbliWidgetGroupSerializeXml.class);
+ xstream.alias("FRAMESNAME", EbliWidgetSerializeXml.CoupleNomId.class);
+ xstream.alias("SOURCE", TrPostSourcePersist.class);
+ xstream.omitField(TrPostSourcePersist.class, "rechargerLesLiens");
+ xstream.alias("PROJECTED_SOURCE", TrPostSourceProjectedPersistReplay.class);
+ xstream.alias("ONETIME_SOURCE", TrPostSourceOneTimeStepReplayPersist.class);
+ xstream.alias("COMPARAISON_SOURCE", TrPostSourceComparaisonPersistReplay.class);
+ xstream.alias("SUITECALCUL", TrPostSourcePersistComposite.class);
+ xstream.alias("LAYOUTDESCRIPTOR", LayoutDescriptor.class);
+ xstream.alias("README", XmlCommentaire.class);
+ xstream.alias("TIMEMODEL", TrPostTimeModelSaver.class);
+ xstream.alias("USERVAR", TrPostUserVariableSaver.class);
+ xstream.omitField(TrPostDataCreatedStatisticSaver.class, "data_");
+ xstream.omitField(TriangleAnchorShape.class, "generalPath");
+ xstream.registerLocalConverter(TrPostDataCreatedStatisticSaver.class, "data_", new Converter() {
+ @Override
+ public boolean canConvert(Class type) {
+ return true;
+ }
+
+ @Override
+ public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) {
+ return null;
+ }
+
+ @Override
+ public void marshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context) {
+ }
+ });
+ xstream.omitField(TrPostCourbeTreeModelPersist.class, "varSupported");
+ xstream.omitField(TrPostCourbeTreeModelPersist.class, "objIdx");
+ xstream.omitField(TrPostCourbeTreeModelPersist.class, "intepolPt");
+ if (newVersion) {
+ configureTraceColors(xstream);
+ }
+ return xstream;
+ }
+}
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostSourcePersist.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostSourcePersist.java 2012-11-13 08:50:35 UTC (rev 7875)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostSourcePersist.java 2012-11-13 08:51:04 UTC (rev 7876)
@@ -20,7 +20,6 @@
@XStreamAlias("warning")
String warning = "ID unique";
String IdSource;
-// private boolean rechargerLesLiens = false;
String[] pathRelatifSource;
String[] pathSource;
Modified: trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt 2012-11-13 08:50:35 UTC (rev 7875)
+++ trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt 2012-11-13 08:51:04 UTC (rev 7876)
@@ -1241,4 +1241,8 @@
La courbe actuelle va \xEAtre recalcul\xE9e pour les donn\xE9es suivantes\:\n Variable\: {0}\n Nombre d'\xE9l\xE9ments\: {1}=The current curve will be recaculated with the following inputs\:\n Variable\: {0}\n Number of meshes\: {1}
Une nouvelle courbe de cubature va \xEAtre recalcul\xE9e pour les donn\xE9es suivantes\:\n Variable\: {0}\n Nombre d'\xE9l\xE9ments\: {1}.\nLa courbe actuelle ne sera pas \xE9cras\xE9e=A new curve will be recalculated with the following inputs\:\n Variable\: {0}\n Number of meshes\: {1}.\nThe current curve won't be deleted
Il faut s\xE9lectionner au moins 1 \xE9l\xE9ment afin de calculer un volume.\nPour s\xE9lectionner plusieurs \xE9l\xE9ments, maintenir la touche shift=At least one mesh must be selected to calculate the volume.\nTo select several meshes, press the key Shift
-S\xE9lectionner le fichier r\xE9sultat=Select the result file
\ No newline at end of file
+S\xE9lectionner le fichier r\xE9sultat=Select the result file
+Fusionner avec un autre projet POST=Merge with another POST project
+Choisir le pas de temps \xE0 utiliser=Choose the timestep to use
+Les t\xE2ches en cours=Current tasks
+Cacher/Afficher les t\xE2ches=Hide/show tasks
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|