You can subscribe to this list here.
| 2003 |
Jan
|
Feb
(89) |
Mar
(219) |
Apr
(82) |
May
(33) |
Jun
(11) |
Jul
(129) |
Aug
(357) |
Sep
(34) |
Oct
(37) |
Nov
(42) |
Dec
(182) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(59) |
Feb
(74) |
Mar
(196) |
Apr
(205) |
May
(109) |
Jun
(268) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <de...@us...> - 2003-05-19 13:54:10
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/reflux
In directory sc8-pr-cvs1:/tmp/cvs-serv3989/test/reflux
Modified Files:
TestCorEleBth.java TestDunes.java TestINP.java
Log Message:
Mis a jour des fichiers de lecture de telemac
Les classes dico sont mises dans un package dediee.
package dico : contient les classes necessaires pour gerer un fichier dico
package h2d: permet de stocker les classes communes reflux/telemac
Index: TestCorEleBth.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/reflux/TestCorEleBth.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TestCorEleBth.java 17 Apr 2003 17:26:23 -0000 1.3
--- TestCorEleBth.java 19 May 2003 13:54:02 -0000 1.4
***************
*** 26,30 ****
import org.fudaa.dodico.reflux.io.CorEleBthWriter;
import org.fudaa.dodico.test.TestIO;
! import org.fudaa.dodico.tr.TrFileReadView;
/**
--- 26,30 ----
import org.fudaa.dodico.reflux.io.CorEleBthWriter;
import org.fudaa.dodico.test.TestIO;
! import org.fudaa.dodico.h2d.H2dFileReadView;
/**
***************
*** 43,47 ****
! public void _interfaceTest(TrFileReadView _t)
{
assertNotNull(_t);
--- 43,47 ----
! public void _interfaceTest(H2dFileReadView _t)
{
assertNotNull(_t);
Index: TestDunes.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/reflux/TestDunes.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** TestDunes.java 17 Apr 2003 17:26:23 -0000 1.4
--- TestDunes.java 19 May 2003 13:54:03 -0000 1.5
***************
*** 24,28 ****
import org.fudaa.dodico.dunes.io.DunesWriter;
import org.fudaa.dodico.test.TestIO;
! import org.fudaa.dodico.tr.TrFileReadView;
import com.memoire.bu.BuTask;
--- 24,28 ----
import org.fudaa.dodico.dunes.io.DunesWriter;
import org.fudaa.dodico.test.TestIO;
! import org.fudaa.dodico.h2d.H2dFileReadView;
import com.memoire.bu.BuTask;
***************
*** 41,45 ****
}
! public synchronized void _interfaceTest(TrFileReadView _t)
{
assertNotNull(_t);
--- 41,45 ----
}
! public synchronized void _interfaceTest(H2dFileReadView _t)
{
assertNotNull(_t);
Index: TestINP.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/reflux/TestINP.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TestINP.java 17 Apr 2003 17:26:23 -0000 1.2
--- TestINP.java 19 May 2003 13:54:03 -0000 1.3
***************
*** 30,35 ****
import org.fudaa.dodico.reflux.io.INPReader;
import org.fudaa.dodico.test.TestIO;
! import org.fudaa.dodico.tr.TrFileReadView;
! import org.fudaa.dodico.tr.TrProjetH2d;
import com.memoire.bu.BuTask;
--- 30,35 ----
import org.fudaa.dodico.reflux.io.INPReader;
import org.fudaa.dodico.test.TestIO;
! import org.fudaa.dodico.h2d.H2dFileReadView;
! import org.fudaa.dodico.h2d.H2dParametres;
import com.memoire.bu.BuTask;
***************
*** 51,55 ****
* @see org.fudaa.dodico.test.TestIO#_interfaceTest(TrFileReadView)
*/
! public void _interfaceTest(TrFileReadView _r)
{
INPInterface t=(INPInterface)_r.getSource();
--- 51,55 ----
* @see org.fudaa.dodico.test.TestIO#_interfaceTest(TrFileReadView)
*/
! public void _interfaceTest(H2dFileReadView _r)
{
INPInterface t=(INPInterface)_r.getSource();
***************
*** 78,89 ****
STrConditionLimite cl=getForIndex(tabCl, 818);
! assertEquals(cl.uCode, TrProjetH2d.CODE_PERMANENT);
assertEquals(cl.u,0,eps_);
cl=getForIndex(tabCl, 1790);
! assertEquals(cl.vCode, TrProjetH2d.CODE_PERMANENT);
assertEquals(cl.v,0,eps_);
assertEquals(cl.normale, 0,eps_);
! assertEquals(cl.hCode, TrProjetH2d.CODE_PERMANENT);
assertEquals(cl.h,13.3,eps_);
--- 78,89 ----
STrConditionLimite cl=getForIndex(tabCl, 818);
! assertEquals(cl.uCode, H2dParametres.CODE_PERMANENT);
assertEquals(cl.u,0,eps_);
cl=getForIndex(tabCl, 1790);
! assertEquals(cl.vCode, H2dParametres.CODE_PERMANENT);
assertEquals(cl.v,0,eps_);
assertEquals(cl.normale, 0,eps_);
! assertEquals(cl.hCode, H2dParametres.CODE_PERMANENT);
assertEquals(cl.h,13.3,eps_);
***************
*** 92,96 ****
cl=getForIndex(tabCl, 0);
! assertEquals(cl.hCode, TrProjetH2d.CODE_PERMANENT);
assertEquals(cl.h,16.325,eps_);
--- 92,96 ----
cl=getForIndex(tabCl, 0);
! assertEquals(cl.hCode, H2dParametres.CODE_PERMANENT);
assertEquals(cl.h,16.325,eps_);
***************
*** 101,105 ****
cl=getForIndex(tabCl, itemp[i]);
assertEquals(LTrTypeBord.SOLIDE,cl.typeBord);
! assertEquals(TrProjetH2d.CODE_PERMANENT,cl.stricklerCode);
assertEquals(1d/3d,cl.strickler ,eps_);
--- 101,105 ----
cl=getForIndex(tabCl, itemp[i]);
assertEquals(LTrTypeBord.SOLIDE,cl.typeBord);
! assertEquals(H2dParametres.CODE_PERMANENT,cl.stricklerCode);
assertEquals(1d/3d,cl.strickler ,eps_);
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/tr In directory sc8-pr-cvs1:/tmp/cvs-serv3989/tr Removed Files: MaillageReader.java TrDicoDataType.java TrDicoEntite.java TrFileFormat.java TrFileReadView.java TrLib.java TrProjetH2d.java TrReaderCharSimpleAbstract.java TrReaderInterface.java TrReaderWriterAbstract.java TrReaderWriterMultiAbstract.java TrReaderWriterSimpleAbstract.java TrWriterCharSimpleAbstract.java TrWriterInterface.java Log Message: Mis a jour des fichiers de lecture de telemac Les classes dico sont mises dans un package dediee. package dico : contient les classes necessaires pour gerer un fichier dico package h2d: permet de stocker les classes communes reflux/telemac --- MaillageReader.java DELETED --- --- TrDicoDataType.java DELETED --- --- TrDicoEntite.java DELETED --- --- TrFileFormat.java DELETED --- --- TrFileReadView.java DELETED --- --- TrLib.java DELETED --- --- TrProjetH2d.java DELETED --- --- TrReaderCharSimpleAbstract.java DELETED --- --- TrReaderInterface.java DELETED --- --- TrReaderWriterAbstract.java DELETED --- --- TrReaderWriterMultiAbstract.java DELETED --- --- TrReaderWriterSimpleAbstract.java DELETED --- --- TrWriterCharSimpleAbstract.java DELETED --- --- TrWriterInterface.java DELETED --- |
|
From: <de...@us...> - 2003-05-19 13:54:05
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test
In directory sc8-pr-cvs1:/tmp/cvs-serv3989/test
Modified Files:
TestIO.java
Log Message:
Mis a jour des fichiers de lecture de telemac
Les classes dico sont mises dans un package dediee.
package dico : contient les classes necessaires pour gerer un fichier dico
package h2d: permet de stocker les classes communes reflux/telemac
Index: TestIO.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/TestIO.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TestIO.java 11 Apr 2003 16:09:22 -0000 1.2
--- TestIO.java 19 May 2003 13:54:02 -0000 1.3
***************
*** 15,20 ****
import junit.framework.TestCase;
! import org.fudaa.dodico.tr.TrFileFormat;
! import org.fudaa.dodico.tr.TrFileReadView;
/**
--- 15,20 ----
import junit.framework.TestCase;
! import org.fudaa.dodico.h2d.H2dFileFormat;
! import org.fudaa.dodico.h2d.H2dFileReadView;
/**
***************
*** 28,35 ****
protected double eps_;
protected File fic_;
! protected TrFileFormat format_;
! protected TrFileReadView readResult_;
! public TestIO(String _fic, TrFileFormat _tr)
{
eps_ = 1E-15;
--- 28,35 ----
protected double eps_;
protected File fic_;
! protected H2dFileFormat format_;
! protected H2dFileReadView readResult_;
! public TestIO(String _fic, H2dFileFormat _tr)
{
eps_ = 1E-15;
***************
*** 41,52 ****
}
! protected final synchronized TrFileReadView lecture(File _f)
{
assertNotNull(_f);
! TrFileReadView r=format_.read(_f, null);
return r;
}
! public abstract void _interfaceTest(TrFileReadView _r);
--- 41,52 ----
}
! protected final synchronized H2dFileReadView lecture(File _f)
{
assertNotNull(_f);
! H2dFileReadView r=format_.read(_f, null);
return r;
}
! public abstract void _interfaceTest(H2dFileReadView _r);
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d
In directory sc8-pr-cvs1:/tmp/cvs-serv3989/h2d
Added Files:
H2dFileFormat.java H2dFileReadView.java H2dLib.java
H2dParametres.java MaillageReader.java
Log Message:
Mis a jour des fichiers de lecture de telemac
Les classes dico sont mises dans un package dediee.
package dico : contient les classes necessaires pour gerer un fichier dico
package h2d: permet de stocker les classes communes reflux/telemac
--- NEW FILE: H2dFileFormat.java ---
/*
* @file TrFileFormat.java
* @creation 12 mars 2003
* @modification $Date: 2003/05/19 13:54:00 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.h2d;
import java.io.File;
import java.io.IOException;
import org.fudaa.dodico.commun.DodicoFileFormat;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.commun.ProgressionInterface;
import org.fudaa.dodico.fichiers.*;
/**
* @author deniger
* @version $Id: H2dFileFormat.java,v 1.1 2003/05/19 13:54:00 deniger Exp $
*/
public abstract class H2dFileFormat extends DodicoFileFormat
{
protected String typeID_;
public H2dFileFormat(int _nb, String _typeID)
{
super(_nb);
typeID_ = _typeID;
}
public abstract FileWriterInterface createWriter();
public abstract FileReaderInterface createReader();
/**
* Methode generale permettant de lire le fichier _f et renvoie une structure
* donnant la synthese (resultat, erreur) de la lecture.
* @param _progress l'etat d'avancement de la lecture.
*/
public final H2dFileReadView read(File _f, ProgressionInterface _progress)
{
FileReaderInterface r = createReader();
IOException[] exs = read(_f, r, _progress);
return new H2dFileReadView(_f, r.getInterface(), this, r.getAnalyzes(), exs);
}
/**
* Permet de le lire le fichier <code>_f</code>.
* @return les exceptions levees lors de la fermeture du flux.
*/
public final IOException[] read(File _f, FileReaderInterface _r, ProgressionInterface _progress)
{
if (getNbFile() == 1)
{
_r.setIn(_f);
_r.setProgressReceiver(_progress);
_r.read();
return _r.close();
}
else
return read(getFile(_f), _r, _progress);
}
public static final IOException[] readFile(File _f, FileReaderInterface _reader, ProgressionInterface _progress)
{
_reader.setIn(_f);
_reader.setProgressReceiver(_progress);
_reader.read();
return _reader.close();
}
public static final IOException[] readFile(File[] _f, FileReaderInterface _reader, ProgressionInterface _progress)
{
_reader.setIn(_f);
_reader.setProgressReceiver(_progress);
_reader.read();
return _reader.close();
}
public final H2dFileReadView read(File[] _f)
{
return read(_f, null);
}
public final IOException[] read(File[] _f, FileReaderInterface _r, ProgressionInterface _progress)
{
int l = _f.length;
if (l != getNbFile())
throw new IllegalArgumentException("Le nombre de fichier donne " + l + DodicoLib.LINE_SEP + "Nb Fichier attendu " + getNbFile());
_r.setIn(_f);
_r.setProgressReceiver(_progress);
_r.read();
return _r.close();
}
public final H2dFileReadView read(File[] _f, ProgressionInterface _progress)
{
FileReaderInterface r = createReader();
IOException[] exs = read(_f, r, _progress);
return new H2dFileReadView(_f, r.getInterface(), this, r.getAnalyzes(), exs);
}
public final H2dFileReadView write(File _f, Object _interface, ProgressionInterface _progress)
{
if (getNbFile() == 1)
{
FileWriterInterface r = createWriter();
r.setOut(_f);
r.setInterface(_interface);
r.setProgressReceiver(_progress);
r.write();
IOException[] exs = r.close();
return new H2dFileReadView(_f, _interface, this, r.getAnalyzes(), exs);
}
else
return write(getFile(_f), _interface, _progress);
}
public final H2dFileReadView write(File[] _f, Object _interface)
{
return write(_f, _interface, null);
}
public final H2dFileReadView write(File[] _f, Object _interface, ProgressionInterface _progress)
{
int l = _f.length;
if (l != getNbFile())
throw new IllegalArgumentException("Le nombre de fichier donne " + l + DodicoLib.LINE_SEP + "Nb Fichier attendu " + getNbFile());
FileWriterInterface r = createWriter();
r.setOut(_f);
r.setProgressReceiver(_progress);
r.setInterface(_interface);
r.write();
IOException[] exs = r.close();
return new H2dFileReadView(_f, _interface, this, r.getAnalyzes(), exs);
}
/**
* @return
*/
public String getTypeID()
{
return typeID_;
}
}
--- NEW FILE: H2dFileReadView.java ---
/*
* @file TrFileReadView.java
* @creation 12 mars 2003
* @modification $Date: 2003/05/19 13:54:00 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.h2d;
import java.io.File;
import java.io.IOException;
import org.fudaa.dodico.commun.DodicoAnalyze;
/**
*
* @author deniger
* @version $Id: H2dFileReadView.java,v 1.1 2003/05/19 13:54:00 deniger Exp $
*/
public class H2dFileReadView
{
private H2dFileFormat format_;
private File[] file_;
private Object source_;
private IOException[] exClose_;
private DodicoAnalyze[] analyzes_;
public H2dFileReadView(File _f,Object _source,H2dFileFormat _form,DodicoAnalyze[] _analyse,IOException[] _closeExs)
{
this(new File[]{_f},_source,_form,_analyse,_closeExs);
}
public H2dFileReadView(File[] _f,Object _source,H2dFileFormat _form,DodicoAnalyze[] _analyse,IOException[] _closeExs)
{
file_=_f;
source_=_source;
format_=_form;
exClose_=_closeExs;
analyzes_=_analyse;
}
public DodicoAnalyze[] getAnalyzes()
{
return analyzes_;
}
/**
* Renvoie la source obtenue par la lecture du fichier.
* @return Object
*/
public Object getSource()
{
return source_;
}
}
--- NEW FILE: H2dLib.java ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: H2dParametres.java ---
/*
* @file TrProjetH2d.java
* @creation 20 mars 2003
* @modification $Date: 2003/05/19 13:54:00 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.h2d;
import java.util.Comparator;
import com.memoire.bu.BuInformationsDocument;
import org.fudaa.dodico.corba.tr.STrProjetH2d;
import org.fudaa.dodico.corba.tr.STrProprieteElementaireTransitoire;
import org.fudaa.dodico.corba.tr.STrProprieteElementaireValeur;
/**
*
* @author deniger
* @version $Id: H2dParametres.java,v 1.1 2003/05/19 13:54:00 deniger Exp $
*/
public abstract class H2dParametres
{
private STrProjetH2d projet_;
public static final String CODE_NON_INITIALISE = "INCONNU";
public static final String CODE_LIBRE = "LIBRE";
public static final String CODE_PERMANENT = "PERMANENT";
public static final String CODE_TRANSITOIRE_BEGIN = "TRANS_";
public static final double NORMALE_NON_INITIALISEE = 400;
//Taille de 16 maxi pour serafin.
public static String PROPRIETE_VISCOSITE = "VISCOSITE";
public static String PROPRIETE_RUGOSITE = "RUGOSITE";
public static String PROPRIETE_ALPHA_LONGUEUR_MELANGE = "LONGUEUR MELANGE";
public static String PROPRIETE_PERTE_CHARGE = "PERTE CHARGE";
public static String FICHIER_PRINCIPAL="FICHIER_PRINCIPAL";
public static String FICHIER_GEOMETRIE="FICHIER_GEOMETRIE";
public static String FICHIER_CL="FICHIER_CL";
public static String FICHIER_CL_LIQUIDE="FICHIER_CL_LIQUIDE";
public static String FICHIER_FOND="FICHIER_FOND";
public H2dParametres()
{
}
public abstract String getTitre();
public abstract BuInformationsDocument getInformationsDocument();
public static boolean isTransitoire(String _code)
{
return _code.startsWith(CODE_TRANSITOIRE_BEGIN);
}
// public void setMaillage(SMaillageIndex _index)
// {
// if (projet_ == null)
// projet_ = new STrProjetH2d();
// projet_.maillage = _index;
// }
/**
* Permet de comparer les STrProprieteElementaireValeur a partir de leur
* index.
*/
public static Comparator getProprieteElementaireValeurIndexComparator()
{
return new proprieteElementaireValeurIndexComparator();
}
/**
* Permet de comparer les STrProprieteElementaireTransitoire a partir de leur
* index.
*/
public static Comparator getProprieteElementaireTransitoireIndexComparator()
{
return new proprieteElementaireTransitoireIndexComparator();
}
static class proprieteElementaireValeurIndexComparator implements Comparator
{
/**
* @see java.util.Comparator#compare(Object, Object)
*/
public int compare(Object o1, Object o2)
{
if( (! (o1 instanceof STrProprieteElementaireValeur)) ||
(! (o2 instanceof STrProprieteElementaireValeur)) )
{
throw new IllegalArgumentException("Arguments non valides");
}
STrProprieteElementaireValeur v1=(STrProprieteElementaireValeur)o1;
STrProprieteElementaireValeur v2=(STrProprieteElementaireValeur)o2;
return v1.indexElement-v2.indexElement;
}
}
static class proprieteElementaireTransitoireIndexComparator implements Comparator
{
/**
* @see java.util.Comparator#compare(Object, Object)
*/
public int compare(Object o1, Object o2)
{
if( (! (o1 instanceof STrProprieteElementaireTransitoire)) ||
(! (o2 instanceof STrProprieteElementaireTransitoire)) )
{
throw new IllegalArgumentException("Arguments non valides");
}
STrProprieteElementaireTransitoire v1=(STrProprieteElementaireTransitoire)o1;
STrProprieteElementaireTransitoire v2=(STrProprieteElementaireTransitoire)o2;
return v1.indexElement-v2.indexElement;
}
}
}
--- NEW FILE: MaillageReader.java ---
(This appears to be a binary file; contents omitted.)
|
|
From: <de...@us...> - 2003-05-19 13:54:03
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fichiers
In directory sc8-pr-cvs1:/tmp/cvs-serv3989/fichiers
Added Files:
FileReaderCharSimpleAbstract.java FileReaderInterface.java
FileReaderWriterAbstract.java
FileReaderWriterMultiAbstract.java
FileReaderWriterSimpleAbstract.java
FileWriterCharSimpleAbstract.java FileWriterInterface.java
Log Message:
Mis a jour des fichiers de lecture de telemac
Les classes dico sont mises dans un package dediee.
package dico : contient les classes necessaires pour gerer un fichier dico
package h2d: permet de stocker les classes communes reflux/telemac
--- NEW FILE: FileReaderCharSimpleAbstract.java ---
/*
* @file TrReaderCharSimple.java
* @creation 21 mars 2003
* @modification $Date: 2003/05/19 13:53:59 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.fichiers;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.fortran.FortranReader;
/**
*
* @author deniger
* @version $Id: FileReaderCharSimpleAbstract.java,v 1.1 2003/05/19 13:53:59 deniger Exp $
*/
public abstract class FileReaderCharSimpleAbstract extends FileReaderWriterSimpleAbstract
implements FileReaderInterface
{
protected FortranReader in_;
public final void setIn(File _f)
{
FileReader r=null;
try
{
r=new FileReader(_f);
}
catch(FileNotFoundException _e)
{
manageException(_e,analyze_);
}
if(r!=null) setIn(r);
}
public final void setIn(File[] _f)
{
setIn(_f[0]);
}
public final void setIn(Reader _r)
{
in_=new FortranReader(_r);
}
public final IOException[] close()
{
IOException e= FortranReader.close(in_);
return (e==null?null:new IOException[] {e});
}
protected void addAnalyzeLigneLue()
{
analyze_.addInfo(DodicoLib.geti18n("Ligne lu")+": "+in_.getLine(),in_,false);
}
}
--- NEW FILE: FileReaderInterface.java ---
/*
* @file TrReaderInterface.java
* @creation 21 mars 2003
* @modification $Date: 2003/05/19 13:53:59 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.fichiers;
import java.io.File;
import java.io.IOException;
import org.fudaa.dodico.commun.DodicoAnalyze;
import org.fudaa.dodico.commun.ProgressionInterface;
import org.fudaa.dodico.h2d.H2dFileFormat;
/**
*
* @author deniger
* @version $Id: FileReaderInterface.java,v 1.1 2003/05/19 13:53:59 deniger Exp $
*/
public interface FileReaderInterface
{
public H2dFileFormat getFileFormat();
public DodicoAnalyze getAnalyze();
public DodicoAnalyze[] getAnalyzes();
public void razAnalyzes();
public ProgressionInterface getProgressReceiver();
public void setProgressReceiver(ProgressionInterface progressReceiver);
public void read();
public void setIn(File[] _f);
public void setIn(File _f);
public Object getInterface();
public IOException[] close();
}
--- NEW FILE: FileReaderWriterAbstract.java ---
/*
* @file TrReaderWriterAbstract.java
* @creation 21 mars 2003
* @modification $Date: 2003/05/19 13:53:59 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.fichiers;
import java.io.FileNotFoundException;
import java.io.IOException;
import org.fudaa.dodico.commun.DodicoAnalyze;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.commun.ProgressionInterface;
import org.fudaa.dodico.fortran.FortranReader;
/**
*
* @author deniger
* @version $Id: FileReaderWriterAbstract.java,v 1.1 2003/05/19 13:53:59 deniger Exp $
*/
public class FileReaderWriterAbstract
{
protected ProgressionInterface progressReceiver_;
/**
* Returns the progressReceiver.
* @return ProgressionInterface
*/
public final ProgressionInterface getProgressReceiver()
{
return progressReceiver_;
} /**
* Sets the progressReceiver.
* @param progressReceiver The progressReceiver to set
*/
public final void setProgressReceiver(ProgressionInterface progressReceiver)
{
progressReceiver_ = progressReceiver;
//if(progressReceiver!=null) afficheAvance_=true;
}
public void manageException(FileNotFoundException _e, DodicoAnalyze.Editor _analyze)
{
_analyze.addTranslateError("Fichier non trouvé");
_analyze.addInfo(_e.getMessage());
if (DodicoLib.DEBUG)
_e.printStackTrace();
}
public void manageException(IOException _e, DodicoAnalyze.Editor _analyze)
{
_analyze.addTranslateError("Erreur d'entrée/sortie");
_analyze.addInfo(_e.getMessage());
if (DodicoLib.DEBUG)
_e.printStackTrace();
}
public void manageException(
NumberFormatException _e,
DodicoAnalyze.Editor _analyze,
FortranReader _l)
{
_analyze.addError("Format du champ incorrect", _l);
_analyze.addInfo(_e.getMessage());
if (DodicoLib.DEBUG)
_e.printStackTrace();
}
public void manageException(
IllegalArgumentException _e,
DodicoAnalyze.Editor _analyze)
{
_analyze.addTranslateError("Erreur interne d'argument");
_analyze.addInfo(_e.getMessage());
if (DodicoLib.DEBUG)
_e.printStackTrace();
}
public void manageException(Exception _e, DodicoAnalyze.Editor _analyze)
{
_analyze.addTranslateError("Erreur d'exécution");
_analyze.addInfo(_e.getMessage());
if (DodicoLib.DEBUG)
_e.printStackTrace();
}
}
--- NEW FILE: FileReaderWriterMultiAbstract.java ---
/*
* @file TrReaderWriterMultiAbstract.java
* @creation 21 mars 2003
* @modification $Date: 2003/05/19 13:53:59 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.fichiers;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import org.fudaa.dodico.commun.DodicoAnalyze;
/**
*
* @author deniger
* @version $Id: FileReaderWriterMultiAbstract.java,v 1.1 2003/05/19 13:53:59 deniger Exp $
*/
public abstract class FileReaderWriterMultiAbstract extends FileReaderWriterAbstract
{
protected DodicoAnalyze.Editor[] analyze_;
int nbFile_;
public FileReaderWriterMultiAbstract(int _nbFile)
{
if (_nbFile < 2)
throw new IllegalArgumentException("minimum 2 fichiers");
nbFile_ = _nbFile;
analyze_=new DodicoAnalyze.Editor[nbFile_];
for(int i=nbFile_-1;i>=0;i--)
{
analyze_[i]=new DodicoAnalyze.Editor();
}
}
public void razAnalyzes()
{
int l = analyze_.length - 1;
for (int i = l; i >= 0; i--)
{
analyze_[i].clear();
}
}
/**
* Renvoie l'analyse de l'operation concernant le premier flux.
*/
public final DodicoAnalyze getAnalyze()
{
return analyze_[0].toAnalyze();
}
public final DodicoAnalyze[] getAnalyzes()
{
return DodicoAnalyze.getAnalyze(analyze_);
}
public boolean analyzeContainsError(int _i)
{
return analyze_[_i].containsErrors();
}
protected final FileReader initFileReader(File _f,int _i)
{
FileReader r=null;
try
{
r=new FileReader(_f);
}
catch(FileNotFoundException _e)
{
manageException(_e, analyze_[_i]);
}
return r;
}
protected final FileWriter initFileWriter(File _f,int _i)
{
FileWriter r=null;
try
{
r=new FileWriter(_f);
}
catch(IOException _e)
{
manageException(_e, analyze_[_i]);
}
return r;
}
}
--- NEW FILE: FileReaderWriterSimpleAbstract.java ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: FileWriterCharSimpleAbstract.java ---
/*
* @file TrWriterCharSimpleAbstract.java
* @creation 21 mars 2003
* @modification $Date: 2003/05/19 13:53:59 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.fichiers;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;
import org.fudaa.dodico.commun.DodicoLib;
/**
*
* @author deniger
* @version $Id: FileWriterCharSimpleAbstract.java,v 1.1 2003/05/19 13:53:59 deniger Exp $
*/
public abstract class FileWriterCharSimpleAbstract extends FileReaderWriterSimpleAbstract implements FileWriterInterface
{
protected String lineSep_;
protected Writer out_;
public FileWriterCharSimpleAbstract()
{
lineSep_ = DodicoLib.LINE_SEP;
}
public void writeln() throws IOException
{
out_.write(lineSep_);
}
public void writeln(StringBuffer _b) throws IOException
{
write(_b.append(lineSep_));
}
public void write(StringBuffer _b) throws IOException
{
out_.write(_b.toString());
_b.setLength(0);
}
public void writeln(String _b) throws IOException
{
write(_b + lineSep_);
}
public void write(String _b) throws IOException
{
out_.write(_b);
}
/**
* Renvoie le separateur de ligne.
* @return separateur de ligne
*/
public final String getLineSeparator()
{
return lineSep_;
}
/**
* Modifie le separateur de ligne.
* @param lineSep The lineSep to set
*/
public final void setLineSeparator(String lineSep)
{
lineSep_ = lineSep;
}
public final void setOut(File _f)
{
FileWriter out = null;
try
{
out = new FileWriter(_f);
}
catch (IOException _e)
{
manageException(_e, analyze_);
}
if (out != null)
setOut(out);
}
public final void setOut(File[] _f)
{
setOut(_f[0]);
}
public final void setOut(Writer _f)
{
out_ = _f;
}
public final IOException[] close()
{
IOException e = DodicoLib.close(out_);
return (e == null ? null : new IOException[] { e });
}
}
--- NEW FILE: FileWriterInterface.java ---
/*
* @file TrWriterInterface.java
* @creation 21 mars 2003
* @modification $Date: 2003/05/19 13:54:00 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.fichiers;
import java.io.File;
import java.io.IOException;
import org.fudaa.dodico.commun.DodicoAnalyze;
import org.fudaa.dodico.commun.ProgressionInterface;
/**
* Une interface de base pour les lecteurs des fichiers reflux-telemacx
* @author deniger
* @version $Id: FileWriterInterface.java,v 1.1 2003/05/19 13:54:00 deniger Exp $
*/
public interface FileWriterInterface
{
public DodicoAnalyze getAnalyze();
public DodicoAnalyze[] getAnalyzes();
public void razAnalyzes();
public ProgressionInterface getProgressReceiver();
public void setProgressReceiver(ProgressionInterface progressReceiver);
public void write();
public void setOut(File[] _f);
public void setOut(File _f);
public void setInterface(Object _interface);
public IOException[] close();
}
|
|
From: <de...@us...> - 2003-05-19 13:46:42
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d In directory sc8-pr-cvs1:/tmp/cvs-serv889/h2d Log Message: Directory /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d added to the repository |
|
From: <de...@us...> - 2003-05-19 13:34:09
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dico In directory sc8-pr-cvs1:/tmp/cvs-serv22954/dico Log Message: Directory /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dico added to the repository |
|
From: <jm_...@us...> - 2003-05-17 21:30:22
|
Update of /cvsroot/fudaa//fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor
In directory sc8-pr-cvs1:/tmp/cvs-serv2203/hydraulique1d/editor
Modified Files:
Hydraulique1dParametresTemporelsEditor.java
Log Message:
correction bug saisie nulle et changement de noyau de calcul
Index: Hydraulique1dParametresTemporelsEditor.java
===================================================================
RCS file: /cvsroot/fudaa//fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dParametresTemporelsEditor.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Hydraulique1dParametresTemporelsEditor.java 18 Mar 2003 17:50:25 -0000 1.3
--- Hydraulique1dParametresTemporelsEditor.java 17 May 2003 21:30:20 -0000 1.4
***************
*** 188,196 ****
--- 188,203 ----
rbNbPasTps_.setSelected(false);
tfTpsMax_.setEnabled(true);
+ if (tfNbPasTps_.getValue() == null) {
+ tfNbPasTps_.setValue(new Integer(10));
+ }
tfNbPasTps_.setEnabled(false);
+
}
else if ("NB_PAS_TEMPS".equals(cmd)) {
rbNbPasTps_.setSelected(true);
rbTpsMax_.setSelected(false);
+ if (tfTpsMax_.getValue() == null) {
+ tfTpsMax_.setValue(new Double(10));
+ }
tfTpsMax_.setEnabled(false);
tfNbPasTps_.setEnabled(true);
***************
*** 198,202 ****
else if ("PAS_TPS_VARIABLE".equals(cmd)) {
if (cbPasTpsVariable_.isSelected()) tfNbCourant_.setEnabled(true);
! else tfNbCourant_.setEnabled(false);
}
}
--- 205,214 ----
else if ("PAS_TPS_VARIABLE".equals(cmd)) {
if (cbPasTpsVariable_.isSelected()) tfNbCourant_.setEnabled(true);
! else {
! if (tfNbCourant_.getValue() == null) {
! tfNbCourant_.setValue(new Double(0.9));
! }
! tfNbCourant_.setEnabled(false);
! }
}
}
***************
*** 205,250 ****
boolean changed=false;
! double tInit=((Double)tfTpsInitial_.getValue()).doubleValue();
! if( tInit!=param_.tempsInitial() ) {
! param_.tempsInitial(tInit);
! changed=true;
! }
! double pasTps=((Double)tfPasTps_.getValue()).doubleValue();
! if( pasTps!=param_.pasTemps() ) {
! param_.pasTemps(pasTps);
! changed=true;
! }
! double tpsMax=((Double)tfTpsMax_.getValue()).doubleValue();
! if( tpsMax!=param_.tempsFinal() ) {
! param_.tempsFinal(tpsMax);
! changed=true;
! }
! int nbPas=((Integer)tfNbPasTps_.getValue()).intValue();
! if( nbPas!=param_.nbPasTemps() ) {
! param_.nbPasTemps(nbPas);
! changed=true;
! }
! double nbCourant=((Double)tfNbCourant_.getValue()).doubleValue();
! if( nbCourant!=param_.nbCourant() ) {
! param_.nbCourant(nbCourant);
! changed=true;
! }
! boolean pasTpsVar = cbPasTpsVariable_.isSelected();
! if ( pasTpsVar!=param_.pasTempsVariable() ) {
! param_.pasTempsVariable(pasTpsVar);
! changed=true;
! }
! LCritereArret critereArret;
! if (rbTpsMax_.isSelected()) critereArret = LCritereArret.TEMPS_MAX;
! else critereArret = LCritereArret.NB_PAS_TEMPS;
! if ( critereArret.value()!=param_.critereArret().value() ) {
! param_.critereArret(critereArret);
! changed=true;
}
return changed;
--- 217,269 ----
boolean changed=false;
! try {
! double tInit=((Double)tfTpsInitial_.getValue()).doubleValue();
! if( tInit!=param_.tempsInitial() ) {
! param_.tempsInitial(tInit);
! changed=true;
! }
! double pasTps=((Double)tfPasTps_.getValue()).doubleValue();
! if( pasTps!=param_.pasTemps() ) {
! param_.pasTemps(pasTps);
! changed=true;
! }
! double tpsMax=((Double)tfTpsMax_.getValue()).doubleValue();
! if( tpsMax!=param_.tempsFinal() ) {
! param_.tempsFinal(tpsMax);
! changed=true;
! }
! int nbPas=((Integer)tfNbPasTps_.getValue()).intValue();
! if( nbPas!=param_.nbPasTemps() ) {
! param_.nbPasTemps(nbPas);
! changed=true;
! }
! double nbCourant=((Double)tfNbCourant_.getValue()).doubleValue();
! if( nbCourant!=param_.nbCourant() ) {
! param_.nbCourant(nbCourant);
! changed=true;
! }
! boolean pasTpsVar = cbPasTpsVariable_.isSelected();
! if ( pasTpsVar!=param_.pasTempsVariable() ) {
! param_.pasTempsVariable(pasTpsVar);
! changed=true;
! }
! LCritereArret critereArret;
! if (rbTpsMax_.isSelected()) critereArret = LCritereArret.TEMPS_MAX;
! else critereArret = LCritereArret.NB_PAS_TEMPS;
! if ( critereArret.value()!=param_.critereArret().value() ) {
! param_.critereArret(critereArret);
! changed=true;
! }
! }
! catch(NullPointerException ex) {
! System.out.println("Valeur non initialisée");
! ex.printStackTrace();
! changed=false;
}
return changed;
|
|
From: <jm_...@us...> - 2003-05-17 21:28:32
|
Update of /cvsroot/fudaa//fudaa_devel/dodico/src/org/fudaa/dodico/mascaret
In directory sc8-pr-cvs1:/tmp/cvs-serv1427/mascaret
Modified Files:
CConversionHydraulique1d.java DCalculMascaret.java
Log Message:
Correction bugs
Index: CConversionHydraulique1d.java
===================================================================
RCS file: /cvsroot/fudaa//fudaa_devel/dodico/src/org/fudaa/dodico/mascaret/CConversionHydraulique1d.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** CConversionHydraulique1d.java 18 Mar 2003 13:01:27 -0000 1.2
--- CConversionHydraulique1d.java 17 May 2003 21:28:29 -0000 1.3
***************
*** 326,329 ****
--- 326,330 ----
private final static SParametresMaillage getMaillageMas(IMaillage maillage, IReseau ireseau) {
+ System.out.println("getMaillageMas(...)");
IDefinitionSectionsParSeries def;
SParametresMaillageClavier maillClavMas = new SParametresMaillageClavier();
***************
*** 363,367 ****
double xDeb = def.unitaires()[i].zone().abscisseDebut();
IBief bief = def.unitaires()[i].zone().biefRattache();
! IProfil profDebutPlage = bief.profils()[bief.getIndiceProfilAbscisse(xDeb)];
//def.unitaires()[i].zone().biefRattache().getIndiceProfilAbscisse(xDeb)
maillClavMas.num1erProfPlage[i]=ireseau.getNumeroApparitionProfil(profDebutPlage);
--- 364,368 ----
double xDeb = def.unitaires()[i].zone().abscisseDebut();
IBief bief = def.unitaires()[i].zone().biefRattache();
! IProfil profDebutPlage = bief.profils()[Math.abs(bief.getIndiceProfilAbscisse(xDeb))];
//def.unitaires()[i].zone().biefRattache().getIndiceProfilAbscisse(xDeb)
maillClavMas.num1erProfPlage[i]=ireseau.getNumeroApparitionProfil(profDebutPlage);
***************
*** 369,373 ****
double xFin = def.unitaires()[i].zone().abscisseFin();
bief = def.unitaires()[i].zone().biefRattache();
! IProfil profFinPlage = bief.profils()[bief.getIndiceProfilAbscisse(xFin)];
maillClavMas.numDerProfPlage[i]=ireseau.getNumeroApparitionProfil(profFinPlage);
//maillClavMas.numDerProfPlage[i]=def.unitaires()[i].zone().biefRattache().getIndiceProfilAbscisse(xFin);
--- 370,374 ----
double xFin = def.unitaires()[i].zone().abscisseFin();
bief = def.unitaires()[i].zone().biefRattache();
! IProfil profFinPlage = bief.profils()[Math.abs(bief.getIndiceProfilAbscisse(xFin))];
maillClavMas.numDerProfPlage[i]=ireseau.getNumeroApparitionProfil(profFinPlage);
//maillClavMas.numDerProfPlage[i]=def.unitaires()[i].zone().biefRattache().getIndiceProfilAbscisse(xFin);
Index: DCalculMascaret.java
===================================================================
RCS file: /cvsroot/fudaa//fudaa_devel/dodico/src/org/fudaa/dodico/mascaret/DCalculMascaret.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DCalculMascaret.java 18 Mar 2003 13:01:27 -0000 1.2
--- DCalculMascaret.java 17 May 2003 21:28:29 -0000 1.3
***************
*** 137,140 ****
--- 137,141 ----
String os=System.getProperty("os.name");
+ System.out.println("os="+os);
String drive;
String path=cheminServeur();
***************
*** 155,159 ****
if (ficEcran.exists())ficEcran.delete();
File ficDamocles=null;
! if (os.startsWith("Windows") ) ficDamocles=new File(path+"listing.damoc");
else ficDamocles=new File(path+nomEtude+".listing");
if (ficDamocles.exists())ficDamocles.delete();
--- 156,160 ----
if (ficEcran.exists())ficEcran.delete();
File ficDamocles=null;
! if (os.startsWith("Windows") || os.startsWith("Linux")) ficDamocles=new File(path+"listing.damoc");
else ficDamocles=new File(path+nomEtude+".listing");
if (ficDamocles.exists())ficDamocles.delete();
|
|
From: <jm_...@us...> - 2003-05-17 21:28:32
|
Update of /cvsroot/fudaa//fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d
In directory sc8-pr-cvs1:/tmp/cvs-serv1427/hydraulique1d
Modified Files:
DBief.java
Log Message:
Correction bugs
Index: DBief.java
===================================================================
RCS file: /cvsroot/fudaa//fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/DBief.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DBief.java 18 Mar 2003 12:50:54 -0000 1.2
--- DBief.java 17 May 2003 21:28:29 -0000 1.3
***************
*** 146,150 ****
CDodico.findUsine().fireObjetModifie(toString(), tie(), "profils"); */
}
!
public void profils(IProfil[] s,boolean _trie)
{
--- 146,150 ----
CDodico.findUsine().fireObjetModifie(toString(), tie(), "profils"); */
}
!
public void profils(IProfil[] s,boolean _trie)
{
***************
*** 325,329 ****
// profils(profils);
//trie non obligatoire
! //L'abscisse de cahque profil peut etre modifie sans que le bief soit
// informe
profils(profils,false);
--- 325,329 ----
// profils(profils);
//trie non obligatoire
! //L'abscisse de cahque profil peut etre modifie sans que le bief soit
// informe
profils(profils,false);
***************
*** 675,680 ****
if( CGlobal.egale(profils_[i].abscisse(), abscisseProfil) )
return i;
}
! return -1;
}
--- 675,685 ----
if( CGlobal.egale(profils_[i].abscisse(), abscisseProfil) )
return i;
+ else {
+ if (profils_[i].abscisse() > abscisseProfil) {
+ return -i;
+ }
+ }
}
! return Integer.MIN_VALUE;
}
|
|
From: <jm_...@us...> - 2003-05-17 21:26:23
|
Update of /cvsroot/fudaa//fudaa_devel/ctulu/src/com/memoire/yapod
In directory sc8-pr-cvs1:/tmp/cvs-serv521
Modified Files:
YapodXmlDeserializer.java
Log Message:
Improve for JVM 1.4.1
Index: YapodXmlDeserializer.java
===================================================================
RCS file: /cvsroot/fudaa//fudaa_devel/ctulu/src/com/memoire/yapod/YapodXmlDeserializer.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** YapodXmlDeserializer.java 29 Jan 2003 11:24:20 -0000 1.1
--- YapodXmlDeserializer.java 17 May 2003 21:26:20 -0000 1.2
***************
*** 1,721 ****
! /**
! * @modification $Date$
! * @statut unstable
! * @file YapodXmlDeserializer.java
! * @version 0.17
! * @author Guillaume Desnoix
! * @email gui...@de...
! * @license GNU General Public License 2 (GPL2)
! */
!
[...1416 lines suppressed...]
! InputStream is=new FileInputStream(f);
! // InputStream xxx=System.in;
! in.open(is);
! Object o1=in.read();
! Object o2=in.read();
! Object o3=in.read();
! in.close();
!
! YapodSerializer out=new YapodXmlSerializer();
! OutputStream os=new FileOutputStream(f+".2");
! // OutputStream xxx=System.out;
! out.open(os);
! out.write(o1);
! out.write(o2);
! out.write(o3);
! out.close();
! }
! catch(Exception ex) { ex.printStackTrace(); }
! }
! }
|
|
From: <de...@us...> - 2003-04-17 17:45:40
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/tr In directory sc8-pr-cvs1:/tmp/cvs-serv10317 Modified Files: TrWriterInterface.java Log Message: Maj commentaire et essai Index: TrWriterInterface.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/tr/TrWriterInterface.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TrWriterInterface.java 1 Apr 2003 13:47:16 -0000 1.1 --- TrWriterInterface.java 17 Apr 2003 17:45:34 -0000 1.2 *************** *** 16,19 **** --- 16,20 ---- /** + * Une interface de base pour les lecteurs des fichiers reflux-telemacx * @author deniger * @version $Id$ |
|
From: <de...@us...> - 2003-04-17 17:26:59
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/reflux
In directory sc8-pr-cvs1:/tmp/cvs-serv1427/org/fudaa/dodico/test/reflux
Modified Files:
TestCorEleBth.java TestDunes.java TestINP.java
Log Message:
Mise a jour diverses
Index: TestCorEleBth.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/reflux/TestCorEleBth.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TestCorEleBth.java 1 Apr 2003 13:52:08 -0000 1.2
--- TestCorEleBth.java 17 Apr 2003 17:26:23 -0000 1.3
***************
*** 13,17 ****
import java.io.FileWriter;
import java.io.IOException;
- import java.io.Reader;
import java.util.HashMap;
--- 13,16 ----
***************
*** 47,51 ****
{
assertNotNull(_t);
! assertNull(_t.getAnalyzes());
assertTrue(_t.getSource() instanceof CorEleBthInterface);
CorEleBthInterface t=(CorEleBthInterface)_t.getSource();
--- 46,52 ----
{
assertNotNull(_t);
! assertTrue(_t.getAnalyzes()[0].isEmpty());
! assertTrue(_t.getAnalyzes()[1].isEmpty());
! assertTrue(_t.getAnalyzes()[2].isEmpty());
assertTrue(_t.getSource() instanceof CorEleBthInterface);
CorEleBthInterface t=(CorEleBthInterface)_t.getSource();
Index: TestDunes.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/reflux/TestDunes.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TestDunes.java 1 Apr 2003 13:52:08 -0000 1.3
--- TestDunes.java 17 Apr 2003 17:26:23 -0000 1.4
***************
*** 44,48 ****
{
assertNotNull(_t);
! assertNull(_t.getAnalyzes());
assertTrue(_t.getSource() instanceof DunesInterface);
DunesInterface t=(DunesInterface)_t.getSource();
--- 44,48 ----
{
assertNotNull(_t);
! assertTrue(_t.getAnalyzes()[0].isEmpty());
assertTrue(_t.getSource() instanceof DunesInterface);
DunesInterface t=(DunesInterface)_t.getSource();
Index: TestINP.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/reflux/TestINP.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TestINP.java 1 Apr 2003 13:52:08 -0000 1.1
--- TestINP.java 17 Apr 2003 17:26:23 -0000 1.2
***************
*** 10,19 ****
import java.io.File;
- import java.io.FileReader;
import java.io.IOException;
import java.util.HashMap;
- import junit.framework.Assert;
-
import org.fudaa.dodico.commun.DodicoAnalyze;
import org.fudaa.dodico.commun.DodicoLib;
--- 10,16 ----
***************
*** 29,34 ****
import org.fudaa.dodico.corba.tr.STrProprieteElementaire;
import org.fudaa.dodico.corba.tr.STrProprieteElementaireValeur;
- import org.fudaa.dodico.dunes.io.DunesInterface;
- import org.fudaa.dodico.dunes.io.DunesReader;
import org.fudaa.dodico.reflux.io.INPFileFormat;
import org.fudaa.dodico.reflux.io.INPInterface;
--- 26,29 ----
***************
*** 104,111 ****
for(int i=itemp.length-1;i>0;i--)
{
! cl=getForIndex(tabCl, 1430);
! assertEquals(cl.typeBord, LTrTypeBord.SOLIDE);
! assertEquals(cl.frottement ,3 ,eps_);
! assertEquals(cl.frottementCode ,TrProjetH2d.CODE_PERMANENT);
}
--- 99,107 ----
for(int i=itemp.length-1;i>0;i--)
{
! cl=getForIndex(tabCl, itemp[i]);
! assertEquals(LTrTypeBord.SOLIDE,cl.typeBord);
! assertEquals(TrProjetH2d.CODE_PERMANENT,cl.stricklerCode);
! assertEquals(1d/3d,cl.strickler ,eps_);
!
}
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io
In directory sc8-pr-cvs1:/tmp/cvs-serv1427/org/fudaa/dodico/reflux/io
Modified Files:
CorEleBthReader.java CorEleBthWriter.java INPAdapter.java
INPReader.java
Log Message:
Mise a jour diverses
Index: CorEleBthReader.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/CorEleBthReader.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** CorEleBthReader.java 1 Apr 2003 12:55:12 -0000 1.2
--- CorEleBthReader.java 17 Apr 2003 17:26:18 -0000 1.3
***************
*** 11,20 ****
import java.io.EOFException;
import java.io.File;
- import java.io.FileNotFoundException;
- import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;
- import org.fudaa.dodico.commun.DodicoAnalyze;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.corba.geometrie.LTypeElement;
--- 11,17 ----
***************
*** 135,139 ****
if(corIn_==null)
{
! _initAnalyze(0).addError("Le flux contenant les coordonnées est nul",-1,true);
}
try
--- 132,136 ----
if(corIn_==null)
{
! analyze_[0].addError("Le flux contenant les coordonnées est nul",-1,true);
}
try
***************
*** 143,147 ****
catch(IOException _e)
{
! _initAnalyze(0).addError("Erreur d'entrée/sortie");
analyze_[0].addInfo(_e.getMessage());
if(DodicoLib.DEBUG) _e.printStackTrace();
--- 140,144 ----
catch(IOException _e)
{
! analyze_[0].addError("Erreur d'entrée/sortie");
analyze_[0].addInfo(_e.getMessage());
if(DodicoLib.DEBUG) _e.printStackTrace();
***************
*** 163,167 ****
catch(IOException _e)
{
! _initAnalyze(1).addError("Erreur d'entrée/sortie");
analyze_[1].addInfo(_e.getMessage());
if(DodicoLib.DEBUG) _e.printStackTrace();
--- 160,164 ----
catch(IOException _e)
{
! analyze_[1].addError("Erreur d'entrée/sortie");
analyze_[1].addInfo(_e.getMessage());
if(DodicoLib.DEBUG) _e.printStackTrace();
***************
*** 179,184 ****
if (bthIn_ == null)
{
! DodicoAnalyze analyse = _initAnalyze(2);
! analyse.addWarning(
"Les données concernant la bathymétrie sont introuvables",
-1,
--- 176,180 ----
if (bthIn_ == null)
{
! analyze_[2].addWarning(
"Les données concernant la bathymétrie sont introuvables",
-1,
***************
*** 196,200 ****
catch(IOException _e)
{
! _initAnalyze(0).addError("Erreur d'entrée/sortie");
analyze_[0].addInfo(_e.getMessage());
if(DodicoLib.DEBUG) _e.printStackTrace();
--- 192,196 ----
catch(IOException _e)
{
! analyze_[0].addError("Erreur d'entrée/sortie");
analyze_[0].addInfo(_e.getMessage());
if(DodicoLib.DEBUG) _e.printStackTrace();
***************
*** 245,249 ****
if ((nbMaxPts != 3) && (nbMaxPts != 6))
{
! _initAnalyze(1).addError(
"Seuls les éléments T3 ou T6 sont acceptés",
eleIn_,
--- 241,245 ----
if ((nbMaxPts != 3) && (nbMaxPts != 6))
{
! analyze_[1].addError(
"Seuls les éléments T3 ou T6 sont acceptés",
eleIn_,
***************
*** 290,295 ****
if (eleIn_.intField(0) != (i + 1))
{
! _initAnalyze(1).addError("L'indice est invalide", eleIn_, true);
! _initAnalyze(1).addInfo(
DodicoLib.geti18n("Indice attendu") + ": " + (i + 1),
eleIn_);
--- 286,291 ----
if (eleIn_.intField(0) != (i + 1))
{
! analyze_[1].addError("L'indice est invalide", eleIn_, true);
! analyze_[1].addInfo(
DodicoLib.geti18n("Indice attendu") + ": " + (i + 1),
eleIn_);
***************
*** 299,303 ****
if (eleIn_.getNumberOfFields() < 5)
{
! _initAnalyze(1).addError(
"Une ligne doit posséder au moins 5 champs",
eleIn_,
--- 295,299 ----
if (eleIn_.getNumberOfFields() < 5)
{
! analyze_[1].addError(
"Une ligne doit posséder au moins 5 champs",
eleIn_,
***************
*** 313,317 ****
if ((indexPt > indexMax) || (indexPt < 0))
{
! _initAnalyze(1).addError(
DodicoLib.geti18n("L'indice")
+ " "
--- 309,313 ----
if ((indexPt > indexMax) || (indexPt < 0))
{
! analyze_[1].addError(
DodicoLib.geti18n("L'indice")
+ " "
***************
*** 319,323 ****
+ DodicoLib.geti18n("n'est pas valide"),
eleIn_);
! _initAnalyze(1).addInfo(
DodicoLib.geti18n("L'indice doit etre compris dans")
+ " [0,"
--- 315,319 ----
+ DodicoLib.geti18n("n'est pas valide"),
eleIn_);
! analyze_[1].addInfo(
DodicoLib.geti18n("L'indice doit etre compris dans")
+ " [0,"
***************
*** 350,354 ****
catch (NumberFormatException fe)
{
! manageException(fe, _initAnalyze(1), eleIn_);
return null;
}
--- 346,350 ----
catch (NumberFormatException fe)
{
! manageException(fe, analyze_[1], eleIn_);
return null;
}
***************
*** 356,360 ****
if (ele[ele.length - 1] == null)
{
! _initAnalyze(1).addError(
"Des éléments ne sont pas définis",
eleIn_,
--- 352,356 ----
if (ele[ele.length - 1] == null)
{
! analyze_[1].addError(
"Des éléments ne sont pas définis",
eleIn_,
***************
*** 431,435 ****
if (num != i + 1)
{
! _initAnalyze(0).addError(
DodicoLib.geti18n("Le numéro du noeuds")
+ " "
--- 427,431 ----
if (num != i + 1)
{
! analyze_[0].addError(
DodicoLib.geti18n("Le numéro du noeuds")
+ " "
***************
*** 465,469 ****
catch (NumberFormatException fe)
{
! manageException(fe, _initAnalyze(0), corIn_);
return null;
}
--- 461,465 ----
catch (NumberFormatException fe)
{
! manageException(fe, analyze_[0], corIn_);
return null;
}
***************
*** 536,540 ****
catch (NumberFormatException fe)
{
! manageException(fe, _initAnalyze(2), bthIn_);
return;
}
--- 532,536 ----
catch (NumberFormatException fe)
{
! manageException(fe, analyze_[2], bthIn_);
return;
}
***************
*** 543,547 ****
{
//Ajout d'un avertissement.
! _initAnalyze(2).addWarning(
index
+ " "
--- 539,543 ----
{
//Ajout d'un avertissement.
! analyze_[2].addWarning(
index
+ " "
***************
*** 561,568 ****
* @see org.fudaa.dodico.tr.ReaderWriterInterface#getFormat()
*/
! public TrFileFormat getFormat()
{
! return format_;
}
public IOException[] close()
--- 557,571 ----
* @see org.fudaa.dodico.tr.ReaderWriterInterface#getFormat()
*/
! public TrFileFormat getFileFormat()
{
! return getCorEleBthFileFormat();
}
+
+ public CorEleBthFileFormat getCorEleBthFileFormat()
+ {
+ return format_;
+ }
+
+
public IOException[] close()
Index: CorEleBthWriter.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/CorEleBthWriter.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** CorEleBthWriter.java 1 Apr 2003 12:55:12 -0000 1.2
--- CorEleBthWriter.java 17 Apr 2003 17:26:18 -0000 1.3
***************
*** 106,110 ****
if (source_ == null)
{
! _initAnalyze(0).addError("L'objet source est nul.", -1, true);
return;
}
--- 106,110 ----
if (source_ == null)
{
! analyze_[0].addError("L'objet source est nul.", -1, true);
return;
}
***************
*** 117,121 ****
if (nbDigits > kw_.getDoubleColumLength())
{
! _initAnalyze(0).addError(
"Le nombre de points est trop important.",
-1,
--- 117,121 ----
if (nbDigits > kw_.getDoubleColumLength())
{
! analyze_[0].addError(
"Le nombre de points est trop important.",
-1,
***************
*** 135,139 ****
catch(IOException _io)
{
! manageException(_io, _initAnalyze(0));
return;
}
--- 135,139 ----
catch(IOException _io)
{
! manageException(_io, analyze_[0]);
return;
}
***************
*** 147,151 ****
catch(IOException _io)
{
! manageException(_io, _initAnalyze(0));
return;
}
--- 147,151 ----
catch(IOException _io)
{
! manageException(_io, analyze_[0]);
return;
}
***************
*** 158,162 ****
catch(IOException _io)
{
! manageException(_io, _initAnalyze(0));
return;
}
--- 158,162 ----
catch(IOException _io)
{
! manageException(_io, analyze_[0]);
return;
}
***************
*** 174,178 ****
if (corOut_ == null)
{
! _initAnalyze(0).addError(
"Le flux pour les coordonnées est nul.",
-1,
--- 174,178 ----
if (corOut_ == null)
{
! analyze_[0].addError(
"Le flux pour les coordonnées est nul.",
-1,
***************
*** 236,240 ****
if (eleOut_ == null)
{
! _initAnalyze(1).addError("Le flux pour les éléments est nul.", -1, true);
return;
}
--- 236,240 ----
if (eleOut_ == null)
{
! analyze_[1].addError("Le flux pour les éléments est nul.", -1, true);
return;
}
***************
*** 307,311 ****
if (bthOut_ == null)
{
! _initAnalyze(2).addError(
"Le flux pour la bathymétrie est nul.",
-1,
--- 307,311 ----
if (bthOut_ == null)
{
! analyze_[2].addError(
"Le flux pour la bathymétrie est nul.",
-1,
Index: INPAdapter.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/INPAdapter.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** INPAdapter.java 1 Apr 2003 12:56:30 -0000 1.1
--- INPAdapter.java 17 Apr 2003 17:26:18 -0000 1.2
***************
*** 10,14 ****
import org.fudaa.dodico.corba.tr.STrProjetH2d;
- import org.fudaa.dodico.tr.TrProjetH2d;
/**
--- 10,13 ----
***************
*** 26,29 ****
--- 25,30 ----
private boolean isRadiationsLecturePasDeTemps_;
private STrProjetH2d p_;
+ private int nbPNTransitoires_;
+ private int nbCLTransitoires_;
public INPAdapter(STrProjetH2d _p)
***************
*** 32,35 ****
--- 33,49 ----
}
+ public void setNbPNTransitoires(int _i)
+ {
+ if(_i>0)
+ nbPNTransitoires_=_i;
+ }
+
+ public void setNbCLTransitoires(int _i)
+ {
+ if(_i>0)
+ nbCLTransitoires_=_i;
+ }
+
+
/**
* @see org.fudaa.dodico.reflux.io.INPInterface#getProjet()
***************
*** 140,143 ****
--- 154,173 ----
{
this.isVentLecturePasDeTemps_ = _b;
+ }
+
+ /**
+ * @return
+ */
+ public int getNbCLTransitoires()
+ {
+ return nbCLTransitoires_;
+ }
+
+ /**
+ * @return
+ */
+ public int getNbPNTransitoires()
+ {
+ return nbPNTransitoires_;
}
Index: INPReader.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/INPReader.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** INPReader.java 1 Apr 2003 12:56:30 -0000 1.1
--- INPReader.java 17 Apr 2003 17:26:18 -0000 1.2
***************
*** 31,34 ****
--- 31,35 ----
import org.fudaa.dodico.corba.tr.STrProprieteElementaireTransitoire;
import org.fudaa.dodico.corba.tr.STrProprieteElementaireValeur;
+ import org.fudaa.dodico.tr.TrFileFormat;
import org.fudaa.dodico.tr.TrProjetH2d;
import org.fudaa.dodico.tr.TrReaderCharSimpleAbstract;
***************
*** 71,75 ****
if (in_ == null)
{
! _initAnalyze().addTranslateError("Flux d'entrée null");
return;
}
--- 72,76 ----
if (in_ == null)
{
! analyze_.addTranslateError("Flux d'entrée null");
return;
}
***************
*** 117,121 ****
if (l == null)
{
! _initAnalyze().addError("Fichier invalide", in_, true);
return;
}
--- 118,122 ----
if (l == null)
{
! analyze_.addError("Fichier invalide", in_, true);
return;
}
***************
*** 159,163 ****
if (index >= temp)
{
! _initAnalyze().addError(
"Des commandes d'impression sont en doublons",
in_,
--- 160,164 ----
if (index >= temp)
{
! analyze_.addError(
"Des commandes d'impression sont en doublons",
in_,
***************
*** 182,186 ****
if (!l.startsWith(bloc2))
{
! _initAnalyze().addError("Bloc de données non trouvé", in_, true);
addAnalyzeLigneLue();
return;
--- 183,187 ----
if (!l.startsWith(bloc2))
{
! analyze_.addError("Bloc de données non trouvé", in_, true);
addAnalyzeLigneLue();
return;
***************
*** 197,201 ****
if (typeProjet == null)
{
! _initAnalyze().addError("Type de projet inconnu", in_, true);
addAnalyzeLigneLue();
return;
--- 198,202 ----
if (typeProjet == null)
{
! analyze_.addError("Type de projet inconnu", in_, true);
addAnalyzeLigneLue();
return;
***************
*** 215,219 ****
if (!sTemp1.equals(kw_.getCOOR()))
{
! _initAnalyze().addError(
"Le bloc des coordonnées est introuvable",
in_,
--- 216,220 ----
if (!sTemp1.equals(kw_.getCOOR()))
{
! analyze_.addError(
"Le bloc des coordonnées est introuvable",
in_,
***************
*** 227,231 ****
if (!sTemp1.equals(sTemp))
{
! _initAnalyze().addWarning(
"Le type de projet du bloc des coordonnées est différent de celui annoncé par le bloc DATA",
in_,
--- 228,232 ----
if (!sTemp1.equals(sTemp))
{
! analyze_.addWarning(
"Le type de projet du bloc des coordonnées est différent de celui annoncé par le bloc DATA",
in_,
***************
*** 235,239 ****
if (temp != 3)
{
! _initAnalyze().addError(
"Le nombre de coordonnées doit être égal à 3",
in_,
--- 236,240 ----
if (temp != 3)
{
! analyze_.addError(
"Le nombre de coordonnées doit être égal à 3",
in_,
***************
*** 246,250 ****
if (temp <= 0)
{
! _initAnalyze().addError(
"Le nombre de points est négatif ou nul",
in_,
--- 247,251 ----
if (temp <= 0)
{
! analyze_.addError(
"Le nombre de points est négatif ou nul",
in_,
***************
*** 292,296 ****
if (!sTemp.equals(kw_.getDLPN()))
{
! _initAnalyze().addError(
"Le bloc degrés de de liberté n'a pas été trouvé",
in_,
--- 293,297 ----
if (!sTemp.equals(kw_.getDLPN()))
{
! analyze_.addError(
"Le bloc degrés de de liberté n'a pas été trouvé",
in_,
***************
*** 345,349 ****
if (!sTemp.startsWith(kw_.getCOND()))
{
! _initAnalyze().addError("Le bloc COND n'a pas été trouvé", in_, true);
addAnalyzeLigneLue();
return;
--- 346,350 ----
if (!sTemp.startsWith(kw_.getCOND()))
{
! analyze_.addError("Le bloc COND n'a pas été trouvé", in_, true);
addAnalyzeLigneLue();
return;
***************
*** 351,356 ****
//Cet index indique quelle courbe transitoire utiliser
! //si -1 il faut utiliser la courbe 1,-2 la courbe 2
! int courbreTranstoireIndex = 0;
//les codes definissant une condition libre,permanent ou transitoire
--- 352,356 ----
//Cet index indique quelle courbe transitoire utiliser
! int courbeTransitoireCLIndex = 0;
//les codes definissant une condition libre,permanent ou transitoire
***************
*** 376,380 ****
//Format <code_u> <code_v> <code_h>
temp = in_.intField(0);
! int uCode = 0;
if (temp == clLibre)
{
--- 376,380 ----
//Format <code_u> <code_v> <code_h>
temp = in_.intField(0);
! String uCode = TrProjetH2d.CODE_NON_INITIALISE;
if (temp == clLibre)
{
***************
*** 387,396 ****
else if (temp == clTransitoire)
{
! uCode = -1;
}
else
{
! _initAnalyze().addError(
! "Le code pour la vitesse un est inconnu",
in_,
true);
--- 387,396 ----
else if (temp == clTransitoire)
{
! uCode = TrProjetH2d.CODE_TRANSITOIRE_BEGIN;
}
else
{
! analyze_.addError(
! "Le code pour la vitesse Un est inconnu",
in_,
true);
***************
*** 399,403 ****
}
temp = in_.intField(1);
! int vCode = 0;
if (temp == clLibre)
{
--- 399,403 ----
}
temp = in_.intField(1);
! String vCode = TrProjetH2d.CODE_NON_INITIALISE;
if (temp == clLibre)
{
***************
*** 410,418 ****
else if (temp == clTransitoire)
{
! vCode = -1;
}
else
{
! _initAnalyze().addError(
"Le code pour la vitesse ut est inconnu",
in_,
--- 410,418 ----
else if (temp == clTransitoire)
{
! vCode = TrProjetH2d.CODE_TRANSITOIRE_BEGIN;
}
else
{
! analyze_.addError(
"Le code pour la vitesse ut est inconnu",
in_,
***************
*** 422,426 ****
}
temp = in_.intField(2);
! int hCode = 0;
if (temp == clLibre)
{
--- 422,426 ----
}
temp = in_.intField(2);
! String hCode = TrProjetH2d.CODE_NON_INITIALISE;
if (temp == clLibre)
{
***************
*** 433,441 ****
else if (temp == clTransitoire)
{
! hCode = -1;
}
else
{
! _initAnalyze().addError(
"Le code pour la hauteur est inconnu",
in_,
--- 433,441 ----
else if (temp == clTransitoire)
{
! hCode = TrProjetH2d.CODE_TRANSITOIRE_BEGIN;
}
else
{
! analyze_.addError(
"Le code pour la hauteur est inconnu",
in_,
***************
*** 511,515 ****
&& (old.hCode != TrProjetH2d.CODE_LIBRE)))
{
! _initAnalyze().addWarning(
DodicoLib.geti18n("Le point")
+ (temp1 + 1)
--- 511,515 ----
&& (old.hCode != TrProjetH2d.CODE_LIBRE)))
{
! analyze_.addWarning(
DodicoLib.geti18n("Le point")
+ (temp1 + 1)
***************
*** 541,555 ****
//cas transitoire
//Pour chaque point transitoire on decremente le compteur.
! if (uCode < 0)
{
! old.uCode = --courbreTranstoireIndex;
}
! if (vCode < 0)
{
! old.vCode = --courbreTranstoireIndex;
}
! if (hCode < 0)
{
! old.hCode = --courbreTranstoireIndex;
}
}
--- 541,555 ----
//cas transitoire
//Pour chaque point transitoire on decremente le compteur.
! if (TrProjetH2d.isTransitoire(uCode))
{
! old.uCode = TrProjetH2d.CODE_TRANSITOIRE_BEGIN+"CL"+courbeTransitoireCLIndex++;
}
! if (TrProjetH2d.isTransitoire(vCode))
{
! old.vCode = TrProjetH2d.CODE_TRANSITOIRE_BEGIN+"CL"+courbeTransitoireCLIndex++;
}
! if (TrProjetH2d.isTransitoire(hCode))
{
! old.hCode = TrProjetH2d.CODE_TRANSITOIRE_BEGIN+"CL"+courbeTransitoireCLIndex++;
}
}
***************
*** 572,576 ****
if (temp != 2)
{
! _initAnalyze().addError(
"Bloc PRND :Seuls 2 propriétés seront autorisées : normales et débit linéïque",
in_,
--- 572,576 ----
if (temp != 2)
{
! analyze_.addError(
"Bloc PRND :Seuls 2 propriétés seront autorisées : normales et débit linéïque",
in_,
***************
*** 587,591 ****
//Ce chiffre indique le nombre de courbe que doit contenir
//finalement le fichier clv.
! final int clvTotal = courbreTranstoireIndex;
if (afficheAvance)
--- 587,592 ----
//Ce chiffre indique le nombre de courbe que doit contenir
//finalement le fichier clv.
! projet_.setNbCLTransitoires(courbeTransitoireCLIndex);
! int courbeTransitoirePnIndex=0;
if (afficheAvance)
***************
*** 626,630 ****
if (tr == null)
{
! _initAnalyze().addWarning(
DodicoLib.geti18n("La normale n'est pas définie pour le point")
+ ": "
--- 627,631 ----
if (tr == null)
{
! analyze_.addWarning(
DodicoLib.geti18n("La normale n'est pas définie pour le point")
+ ": "
***************
*** 648,656 ****
else if (index == clTransitoire)
{
! tr.qCode = --courbreTranstoireIndex;
}
else
{
! _initAnalyze().addWarning("Code inconnu", in_, true);
analyze_.addInfo(
DodicoLib.geti18n("Code") + ": " + index,
--- 649,657 ----
else if (index == clTransitoire)
{
! tr.qCode = TrProjetH2d.CODE_TRANSITOIRE_BEGIN+"PN"+courbeTransitoirePnIndex++;
}
else
{
! analyze_.addWarning("Code inconnu", in_, true);
analyze_.addInfo(
DodicoLib.geti18n("Code") + ": " + index,
***************
*** 691,695 ****
if (tr == null)
{
! _initAnalyze().addWarning(
"La valeur de la normale ne sera pas prise en compte",
in_,
--- 692,696 ----
if (tr == null)
{
! analyze_.addWarning(
"La valeur de la normale ne sera pas prise en compte",
in_,
***************
*** 705,709 ****
else
{
! _initAnalyze().addWarning(
"La valeur de la normale ne sera pas prise en compte",
in_,
--- 706,710 ----
else
{
! analyze_.addWarning(
"La valeur de la normale ne sera pas prise en compte",
in_,
***************
*** 723,727 ****
if (tr == null)
{
! _initAnalyze().addWarning(
"La valeur du débit linéïque ne sera pas prise en compte",
in_,
--- 724,728 ----
if (tr == null)
{
! analyze_.addWarning(
"La valeur du débit linéïque ne sera pas prise en compte",
in_,
***************
*** 729,735 ****
addAnalyzeLigneLue();
}
! else if (tr.qCode < 0)
{
! _initAnalyze().addWarning(
"Le débit est de type transitoire. La valeur ne sera pas prise en compte",
in_,
--- 730,736 ----
addAnalyzeLigneLue();
}
! else if (TrProjetH2d.isTransitoire(tr.qCode))
{
! analyze_.addWarning(
"Le débit est de type transitoire. La valeur ne sera pas prise en compte",
in_,
***************
*** 739,743 ****
else if (tr.qCode == TrProjetH2d.CODE_LIBRE)
{
! _initAnalyze().addWarning(
"Le débit est de type libre. La valeur ne sera pas prise en compte",
in_,
--- 740,744 ----
else if (tr.qCode == TrProjetH2d.CODE_LIBRE)
{
! analyze_.addWarning(
"Le débit est de type libre. La valeur ne sera pas prise en compte",
in_,
***************
*** 766,770 ****
if (!kw_.getELEM().equals(in_.stringField(0)))
{
! _initAnalyze().addError("Le bloc ELEM n'a pas été trouvé", in_, true);
addAnalyzeLigneLue();
return;
--- 767,771 ----
if (!kw_.getELEM().equals(in_.stringField(0)))
{
! analyze_.addError("Le bloc ELEM n'a pas été trouvé", in_, true);
addAnalyzeLigneLue();
return;
***************
*** 777,781 ****
if (temp2 != kw_.getELEMTailleFond())
{
! _initAnalyze().addError(
"Seuls les éléments T6 sont autorisés",
in_,
--- 778,782 ----
if (temp2 != kw_.getELEMTailleFond())
{
! analyze_.addError(
"Seuls les éléments T6 sont autorisés",
in_,
***************
*** 824,828 ****
if (elemBordCommence)
{
! _initAnalyze().addError(
"Des éléments T6 se trouvent après des éléments T3",
in_,
--- 825,829 ----
if (elemBordCommence)
{
! analyze_.addError(
"Des éléments T6 se trouvent après des éléments T3",
in_,
***************
*** 873,877 ****
if (!sTemp.startsWith(kw_.getTPEL()))
{
! _initAnalyze().addError("Le bloc TPEL est introuvable", in_, true);
addAnalyzeLigneLue();
return;
--- 874,878 ----
if (!sTemp.startsWith(kw_.getTPEL()))
{
! analyze_.addError("Le bloc TPEL est introuvable", in_, true);
addAnalyzeLigneLue();
return;
***************
*** 907,911 ****
if (nbElemBord == 0)
{
! _initAnalyze().addError(
"Erreur de lecture des éléments. Bords non trouvés",
in_,
--- 908,912 ----
if (nbElemBord == 0)
{
! analyze_.addError(
"Erreur de lecture des éléments. Bords non trouvés",
in_,
***************
*** 965,969 ****
else
{
! _initAnalyze().addError(
"Code de type d'éléments inconnus",
in_,
--- 966,970 ----
else
{
! analyze_.addError(
"Code de type d'éléments inconnus",
in_,
***************
*** 988,992 ****
if (st == null)
{
! _initAnalyze().addError(
DodicoLib.geti18n(
"La normale n'a pas été definie pour le point")
--- 989,993 ----
if (st == null)
{
! analyze_.addError(
DodicoLib.geti18n(
"La normale n'a pas été definie pour le point")
***************
*** 1023,1027 ****
if (!kw_.getPREL().equals(in_.stringField(0)))
{
! _initAnalyze().addError("Le bloc PREL est introuvable", in_, true);
addAnalyzeLigneLue();
return;
--- 1024,1028 ----
if (!kw_.getPREL().equals(in_.stringField(0)))
{
! analyze_.addError("Le bloc PREL est introuvable", in_, true);
addAnalyzeLigneLue();
return;
***************
*** 1127,1131 ****
else
{
! _initAnalyze().addWarning(
DodicoLib.geti18n("L'élément")
+ " "
--- 1128,1132 ----
else
{
! analyze_.addWarning(
DodicoLib.geti18n("L'élément")
+ " "
***************
*** 1193,1201 ****
int indexElement;
int code = codes[0];
double valeur = 0;
if (code == clPermanent)
{
valeur = Double.parseDouble(in_.readLine().trim());
! code = TrProjetH2d.CODE_PERMANENT;
}
else
--- 1194,1203 ----
int indexElement;
int code = codes[0];
+ String codeFinal=TrProjetH2d.CODE_NON_INITIALISE;
double valeur = 0;
if (code == clPermanent)
{
valeur = Double.parseDouble(in_.readLine().trim());
! codeFinal = TrProjetH2d.CODE_PERMANENT;
}
else
***************
*** 1203,1211 ****
if (code == clTransitoire)
{
! code = --courbreTranstoireIndex;
}
else
{
! code = TrProjetH2d.CODE_LIBRE;
}
in_.readLine();
--- 1205,1213 ----
if (code == clTransitoire)
{
! codeFinal=TrProjetH2d.CODE_TRANSITOIRE_BEGIN+"PN"+courbeTransitoirePnIndex++;
}
else
{
! codeFinal = TrProjetH2d.CODE_LIBRE;
}
in_.readLine();
***************
*** 1231,1241 ****
{
//OK affectation
! str.frottement = valeur;
! str.frottementCode = code;
}
else
{
//erreur dans le fichier
! _initAnalyze().addError(
DodicoLib.geti18n("Le point")
+ " "
--- 1233,1243 ----
{
//OK affectation
! str.strickler = valeur==0?0:1D/valeur;
! str.stricklerCode = codeFinal;
}
else
{
//erreur dans le fichier
! analyze_.addError(
DodicoLib.geti18n("Le point")
+ " "
***************
*** 1250,1254 ****
{
//Ce n'est pas un point frontiere et pourtant
! _initAnalyze().addError(
"Seule la rugosité est spécifié alors que ce n'est pas un point de bord",
in_,
--- 1252,1256 ----
{
//Ce n'est pas un point frontiere et pourtant
! analyze_.addError(
"Seule la rugosité est spécifié alors que ce n'est pas un point de bord",
in_,
***************
*** 1259,1263 ****
else
{
! _initAnalyze().addError(
"Des propriétés ne sont pas renseignées",
in_,
--- 1261,1265 ----
else
{
! analyze_.addError(
"Des propriétés ne sont pas renseignées",
in_,
***************
*** 1274,1278 ****
if (indexEnCours != temp)
{
! _initAnalyze().addWarning(
"Le nombre de code pour les propriétés elementaires est incorrect",
in_,
--- 1276,1280 ----
if (indexEnCours != temp)
{
! analyze_.addWarning(
"Le nombre de code pour les propriétés elementaires est incorrect",
in_,
***************
*** 1312,1317 ****
else if (code == clTransitoire)
{
! courbreTranstoireIndex =
! tge.ajouteTransitoire(elems, courbreTranstoireIndex, temp2);
}
}
--- 1314,1319 ----
else if (code == clTransitoire)
{
! courbeTransitoirePnIndex =
! tge.ajouteTransitoire(elems, courbeTransitoirePnIndex, temp2);
}
}
***************
*** 1340,1344 ****
if (s.normale > 361)
{
! _initAnalyze().addError(
DodicoLib.geti18n(
"La normale n'a pas été initialisé pour le point")
--- 1342,1346 ----
if (s.normale > 361)
{
! analyze_.addError(
DodicoLib.geti18n(
"La normale n'a pas été initialisé pour le point")
***************
*** 1354,1357 ****
--- 1356,1360 ----
}
}
+ projet_.setNbPNTransitoires(courbeTransitoirePnIndex);
h2d.conditionsLimites = new STrConditionLimite[indexEnCours];
System.arraycopy(clF, 0, h2d.conditionsLimites, 0, indexEnCours);
***************
*** 1439,1443 ****
if (sTemp.startsWith(sTemp1))
{
! _initAnalyze().addWarning("Le bloc TRANS est ignoré", in_);
sTemp = in_.readLine().trim();
}
--- 1442,1446 ----
if (sTemp.startsWith(sTemp1))
{
! analyze_.addWarning("Le bloc TRANS est ignoré", in_);
sTemp = in_.readLine().trim();
}
***************
*** 1455,1459 ****
if (!sTemp.equals(refluxProjetNom))
{
! _initAnalyze().addError("Un seul type de problème supporté");
return;
}
--- 1458,1462 ----
if (!sTemp.equals(refluxProjetNom))
{
! analyze_.addError("Un seul type de problème supporté");
return;
}
***************
*** 1496,1500 ****
else
{
! _initAnalyze().addError("Schéma non supporté", in_, true);
addAnalyzeLigneLue();
}
--- 1499,1503 ----
else
{
! analyze_.addError("Schéma non supporté", in_, true);
addAnalyzeLigneLue();
}
***************
*** 1507,1511 ****
if (meth == null)
{
! _initAnalyze().addError(
"Méthode de résolution non supportée",
in_,
--- 1510,1514 ----
if (meth == null)
{
! analyze_.addError(
"Méthode de résolution non supportée",
in_,
***************
*** 1525,1529 ****
if (!sTemp.startsWith(kw_.getFLUTCoefficientContribution()))
{
! _initAnalyze().addError(
"Le bloc est invalide. Le bloc des coefficients est attendu",
in_,
--- 1528,1532 ----
if (!sTemp.startsWith(kw_.getFLUTCoefficientContribution()))
{
! analyze_.addError(
"Le bloc est invalide. Le bloc des coefficients est attendu",
in_,
***************
*** 1574,1583 ****
catch (NumberFormatException _e)
{
! manageException(_e, _initAnalyze(), in_);
return;
}
catch (IOException _e)
{
! manageException(_e, _initAnalyze());
return;
}
--- 1577,1586 ----
catch (NumberFormatException _e)
{
! manageException(_e, analyze_, in_);
return;
}
catch (IOException _e)
{
! manageException(_e, analyze_);
return;
}
***************
*** 1729,1733 ****
new STrProprieteElementaireTransitoire();
tr.indexElement = _i;
! tr.indexCode = r;
fixe.add(tr);
}
--- 1732,1736 ----
new STrProprieteElementaireTransitoire();
tr.indexElement = _i;
! tr.indexCode = TrProjetH2d.CODE_TRANSITOIRE_BEGIN+"PN"+r;
fixe.add(tr);
}
***************
*** 1763,1766 ****
--- 1766,1782 ----
System.out.println((int) 2.9);
+ }
+
+ /**
+ * @return
+ */
+ public INPFileFormat getINPFileFormat()
+ {
+ return format_;
+ }
+
+ public TrFileFormat getFileFormat()
+ {
+ return getINPFileFormat();
}
|
|
From: <de...@us...> - 2003-04-17 17:26:53
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun
In directory sc8-pr-cvs1:/tmp/cvs-serv1427/org/fudaa/dodico/commun
Modified Files:
DodicoAnalyze.java DodicoLib.java
Log Message:
Mise a jour diverses
Index: DodicoAnalyze.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun/DodicoAnalyze.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DodicoAnalyze.java 11 Apr 2003 16:08:52 -0000 1.2
--- DodicoAnalyze.java 17 Apr 2003 17:26:16 -0000 1.3
***************
*** 11,15 ****
import java.util.ArrayList;
import java.util.Collection;
- import java.util.Iterator;
import org.fudaa.dodico.fortran.FortranReader;
--- 11,14 ----
***************
*** 25,36 ****
public class DodicoAnalyze
{
! private ArrayList warnings_;
! private ArrayList errors_;
! private ArrayList infos_;
!
! public DodicoAnalyze()
{
!
}
--- 24,52 ----
public class DodicoAnalyze
{
+ private DodicoAnalyze.Field[] errors_;
+ private DodicoAnalyze.Field[] warns_;
+ private DodicoAnalyze.Field[] infos_;
! public DodicoAnalyze(DodicoAnalyze.Editor _io)
{
! if (_io != null)
! {
! errors_ = _io.getErrors();
! warns_ = _io.getWarnings();
! infos_ = _io.getInfos();
! }
! }
!
! public static DodicoAnalyze[] getAnalyze(DodicoAnalyze.Editor[] _io)
! {
!
! if(_io==null) return null;
! int nb=_io.length;
! DodicoAnalyze[] r=new DodicoAnalyze[nb];
! for(int i=nb-1;i>=0;i--)
! {
! r[i]=_io[i].toAnalyze();
! }
! return r;
}
***************
*** 45,81 ****
}
- public void merge(DodicoAnalyze _a)
- {
- if ((_a == null) || _a.isEmpty())
- return;
- warnings_ = merge(warnings_, _a.warnings_);
- infos_ = merge(infos_, _a.infos_);
- errors_ = merge(errors_, _a.errors_);
-
- }
-
- private ArrayList merge(ArrayList _target, ArrayList _s)
- {
- if ((_s == null) || (_s.isEmpty()))
- return _target;
- if (_target == null)
- return new ArrayList(_s);
- else
- {
- _target.addAll(_s);
- return _target;
- }
- }
-
- public void clear()
- {
- if (warnings_ != null)
- warnings_.clear();
- if (errors_ != null)
- errors_.clear();
- if (infos_ != null)
- infos_.clear();
- }
-
public String getResume()
{
--- 61,64 ----
***************
*** 89,93 ****
if (t != null)
s += DodicoLib.LINE_SEP + t;
! t = getResume("Avertissements", warnings_, _prefix);
if (t != null)
s += DodicoLib.LINE_SEP + t;
--- 72,76 ----
if (t != null)
s += DodicoLib.LINE_SEP + t;
! t = getResume("Avertissements", warns_, _prefix);
if (t != null)
s += DodicoLib.LINE_SEP + t;
***************
*** 98,123 ****
}
- private String getResume(String _titre, ArrayList _l, String _prefix)
- {
- if ((_l == null) || (_l.size() <= 0))
- {
-
- return null;
- }
- StringBuffer r = new StringBuffer(200);
- r.append(_prefix);
- r.append(_titre);
- String lineSep = DodicoLib.LINE_SEP;
- Field element;
- for (Iterator iter = _l.iterator(); iter.hasNext();)
- {
- r.append(lineSep);
- element = (Field) iter.next();
- r.append(_prefix);
- r.append("Ligne " + element.getOffset() + ": " + element.getMessage());
- }
- return r.toString();
- }
-
/**
* Returns the erreurs.
--- 81,84 ----
***************
*** 126,130 ****
public DodicoAnalyze.Field[] getErrors()
{
! return getFieldArray(errors_);
}
--- 87,91 ----
public DodicoAnalyze.Field[] getErrors()
{
! return errors_;
}
***************
*** 135,139 ****
public DodicoAnalyze.Field[] getWarnings()
{
! return getFieldArray(warnings_);
}
--- 96,100 ----
public DodicoAnalyze.Field[] getWarnings()
{
! return warns_;
}
***************
*** 144,389 ****
public DodicoAnalyze.Field[] getInfos()
{
! return getFieldArray(infos_);
}
- /**
- * Test pour savoir si l'analyse s'est passee sans erreur.
- * @return true si le tableau d'erreur est non null.
- */
public boolean containsErrors()
{
! return errors_ == null ? false : true;
}
! public boolean containsInfos()
{
! return infos_ == null ? false : true;
}
! public boolean containsWarnings()
{
! return warnings_ == null ? false : true;
}
public boolean isEmpty()
{
! return ((warnings_ == null) && (infos_ == null) && (errors_ == null))
! ? true
! : false;
}
! /**
! * Renvoie dans un tableau le contenu de la liste <code>_list</code> (qui ne
! * contient que des Field).
! * @return null si la liste est null ou de taille nulle.
! *
! */
! private static DodicoAnalyze.Field[] getFieldArray(Collection _list)
{
! if ((_list == null) || (_list.size() == 0))
return null;
! int l = _list.size();
! DodicoAnalyze.Field[] r = new DodicoAnalyze.Field[l];
! _list.toArray(r);
! return r;
! }
- /**
- * Ajoute une erreur traduite (offset=-1).
- */
- public void addTranslateError(String _message)
- {
- addError(_message, -1, true);
}
! public void addError(String _message)
{
- addError(_message, -1, false);
- }
! public void addError(String _message, FortranReader _in)
! {
! addError(_message, _in.getLineNumber(), false);
! }
! public void addError(String _message, FortranReader _in, boolean _t)
! {
! addError(_message, _in.getLineNumber(), _t);
! }
! public void addError(String _message, int _offset)
! {
! addError(_message, _offset, false);
! }
! public synchronized void addError(
! String _message,
! int _offset,
! boolean _translate)
! {
! if (errors_ == null)
! errors_ = new ArrayList();
! if (_message == null)
{
! addField(errors_, "Erreur inconnue", _offset, true);
! return;
}
- addField(errors_, _message, _offset, _translate);
- }
! public void addWarning(String _message, FortranReader _in)
! {
! addWarning(_message, _in.getLineNumber(), false);
! }
! public void addWarning(String _message, FortranReader _in, boolean _t)
! {
! addWarning(_message, _in.getLineNumber(), _t);
! }
! public void addWarning(String _message, int _offset)
! {
! addWarning(_message, _offset, false);
! }
! public synchronized void addWarning(
! String _message,
! int _offset,
! boolean _translate)
! {
! if (warnings_ == null)
! warnings_ = new ArrayList();
! if (_message == null)
{
! addField(warnings_, "Avertissement inconnu", _offset, true);
! return;
}
- addField(warnings_, _message, _offset, _translate);
- }
! public void addInfo(String _message, FortranReader _in)
! {
! addInfo(_message, _in.getLineNumber(), false);
! }
! public void addInfo(String _message, FortranReader _in, boolean _t)
! {
! addInfo(_message, _in.getLineNumber(), _t);
! }
! public void addInfo(String _message)
! {
! addInfo(_message, -1, false);
! }
! public void addInfo(String _message, int _offset)
! {
! addInfo(_message, _offset, false);
! }
! public synchronized void addInfo(
! String _message,
! int _offset,
! boolean _translate)
! {
! if (infos_ == null)
! infos_ = new ArrayList();
! if (_message == null)
{
! addField(infos_, "Information inconnue", _offset, true);
! return;
}
- addField(infos_, _message, _offset, _translate);
- }
! /**
! * Appelle la methode complete avec _offset=-1 et sans tranduction du
! * message.
! * @see #getField(String, int, boolean)
! */
! public static DodicoAnalyze.Field createField(String _message)
! {
! return createField(_message, -1);
! }
! /**
! * Appelle la methode complete sans tranduction du message.
! * @see #getField(String, int, boolean)
! */
! public static DodicoAnalyze.Field createField(String _message, int _offset)
! {
! return createField(_message, _offset, false);
! }
! /**
! * Cree (si <code>_message</code> non null) un champ contenant les infos
! * passes en parametres.
! * @param _message le message
! * @param _offset la ligne (ou le byte) concerne
! * @param _translate si true le message est traduit.
! */
! public static DodicoAnalyze.Field createField(
! String _message,
! int _offset,
! boolean _translate)
! {
! if (_message == null)
! return null;
! return new DodicoAnalyze.Field(
! _translate ? DodicoLib.geti18n(_message) : _message,
! _offset);
! }
! /**
! * Ajoute l'info sans traduction.
! * @see #addField(Collection, String, FortranReader)
! */
! public static void addField(
! Collection _warns,
! String _message,
! FortranReader _in)
! {
! addField(_warns, _message, _in, false);
! }
! /**
! * Ajoute l'info sans traduction.
! * @see #addField(Collection, String, int)
! */
! public static void addField(Collection _warns, String _message, int _offset)
! {
! addField(_warns, _message, _offset, false);
! }
! /**
! * Ajoute le message <code>_message</code> traduit a la collection
! * <code>_warns</code>.Le numero de ligne sera determine a partir de
! * la methode <code>_in.getLineNumber()</code>.
! * @see #addField(Collection, String, int, boolean)
! */
! public static void addField(
! Collection _warns,
! String _message,
! FortranReader _in,
! boolean _translate)
! {
! addField(_warns, _message, _in.getLineNumber(), _translate);
! }
! /**
! * Ajoute le message <code>_message</code> NON traduit a la collection
! * <code>_warns</code>.Le numero de ligne sera determine a partir de
! * la methode <code>_in.getLineNumber()</code>.
! */
! private static void addField(
! Collection _warns,
! String _message,
! int _offset,
! boolean _translate)
! {
! _warns.add(DodicoAnalyze.createField(_message, _offset, _translate));
! }
public static class Field
{
--- 105,443 ----
public DodicoAnalyze.Field[] getInfos()
{
! return infos_;
}
public boolean containsErrors()
{
! return ((errors_ != null) && (errors_.length > 0)) ? true : false;
}
! public boolean containsWarnings()
{
! return ((warns_ != null) && (warns_.length > 0)) ? true : false;
}
! public boolean containsInfos()
{
! return ((infos_ != null) && (infos_.length > 0)) ? true : false;
}
public boolean isEmpty()
{
! return (!containsErrors()) && (!containsWarnings()) && (!containsInfos());
}
! protected static String getResume(String _titre, DodicoAnalyze.Field[] _ls, String _prefix)
{
! if ((_ls == null) || (_ls.length <= 0))
! {
return null;
! }
! StringBuffer r = new StringBuffer(200);
! r.append(_prefix);
! r.append(_titre);
! String lineSep = DodicoLib.LINE_SEP;
! Field element;
! int nb = _ls.length;
! for (int i = 0; i < nb; i++)
! {
! r.append(lineSep);
! element = _ls[i];
! r.append(_prefix);
! r.append("Ligne " + element.getOffset() + ": " + element.getMessage());
! }
! return r.toString();
}
! public static class Editor
{
! private ArrayList warnings_;
! private ArrayList errors_;
! private ArrayList infos_;
! public Editor()
! {
! }
! public void merge(DodicoAnalyze.Editor _a)
{
! if ((_a == null) || _a.isEmpty())
! return;
! warnings_ = merge(warnings_, _a.warnings_);
! infos_ = merge(infos_, _a.infos_);
! errors_ = merge(errors_, _a.errors_);
!
}
! private ArrayList merge(ArrayList _target, ArrayList _s)
! {
! if ((_s == null) || (_s.isEmpty()))
! return _target;
! if (_target == null)
! return new ArrayList(_s);
! else
! {
! _target.addAll(_s);
! return _target;
! }
! }
! public void clear()
! {
! if (warnings_ != null)
! warnings_.clear();
! if (errors_ != null)
! errors_.clear();
! if (infos_ != null)
! infos_.clear();
! }
! /**
! * Returns the erreurs.
! * @return Field[]
! */
! public DodicoAnalyze.Field[] getErrors()
! {
! return getFieldArray(errors_);
! }
! /**
! * Returns the warns.
! * @return Field[]
! */
! public DodicoAnalyze.Field[] getWarnings()
{
! return getFieldArray(warnings_);
}
! /**
! * Returns the warns.
! * @return Field[]
! */
! public DodicoAnalyze.Field[] getInfos()
! {
! return getFieldArray(infos_);
! }
! /**
! * Test pour savoir si l'analyse s'est passee sans erreur.
! * @return true si le tableau d'erreur est non null.
! */
! public boolean containsErrors()
! {
! return errors_ == null ? false : true;
! }
! public boolean containsInfos()
! {
! return infos_ == null ? false : true;
! }
! public boolean containsWarnings()
! {
! return warnings_ == null ? false : true;
! }
! public boolean isEmpty()
{
! return ((warnings_ == null) && (infos_ == null) && (errors_ == null)) ? true : false;
! }
!
! public DodicoAnalyze toAnalyze()
! {
! return (isEmpty())?null:new DodicoAnalyze(this);
}
! /**
! * Renvoie dans un tableau le contenu de la liste <code>_list</code> (qui ne
! * contient que des Field).
! * @return null si la liste est null ou de taille nulle.
! *
! */
! private static DodicoAnalyze.Field[] getFieldArray(Collection _list)
! {
! if ((_list == null) || (_list.size() == 0))
! return null;
! int l = _list.size();
! DodicoAnalyze.Field[] r = new DodicoAnalyze.Field[l];
! _list.toArray(r);
! return r;
! }
! /**
! * Ajoute une erreur traduite (offset=-1).
! */
! public void addTranslateError(String _message)
! {
! addError(_message, -1, true);
! }
! public void addError(String _message)
! {
! addError(_message, -1, false);
! }
! public void addError(String _message, FortranReader _in)
! {
! addError(_message, _in.getLineNumber(), false);
! }
! public void addError(String _message, FortranReader _in, boolean _t)
! {
! addError(_message, _in.getLineNumber(), _t);
! }
! public void addError(String _message, int _offset)
! {
! addError(_message, _offset, false);
! }
! public synchronized void addError(String _message, int _offset, boolean _translate)
! {
! if (errors_ == null)
! errors_ = new ArrayList();
! if (_message == null)
! {
! addField(errors_, "Erreur inconnue", _offset, true);
! return;
! }
! addField(errors_, _message, _offset, _translate);
! }
! public void addWarning(String _message, FortranReader _in)
! {
! addWarning(_message, _in.getLineNumber(), false);
! }
!
! public void addWarning(String _message, FortranReader _in, boolean _t)
! {
! addWarning(_message, _in.getLineNumber(), _t);
! }
!
! public void addWarning(String _message, int _offset)
! {
! addWarning(_message, _offset, false);
! }
!
! public synchronized void addWarning(String _message, int _offset, boolean _translate)
! {
! if (warnings_ == null)
! warnings_ = new ArrayList();
! if (_message == null)
! {
! addField(warnings_, "Avertissement inconnu", _offset, true);
! return;
! }
! addField(warnings_, _message, _offset, _translate);
! }
!
! public void addInfo(String _message, FortranReader _in)
! {
! addInfo(_message, _in.getLineNumber(), false);
! }
!
! public void addInfo(String _message, FortranReader _in, boolean _t)
! {
! addInfo(_message, _in.getLineNumber(), _t);
! }
!
! public void addInfo(String _message)
! {
! addInfo(_message, -1, false);
! }
!
! public void addInfo(String _message, int _offset)
! {
! addInfo(_message, _offset, false);
! }
!
! public synchronized void addInfo(String _message, int _offset, boolean _translate)
! {
! if (infos_ == null)
! infos_ = new ArrayList();
! if (_message == null)
! {
! addField(infos_, "Information inconnue", _offset, true);
! return;
! }
! addField(infos_, _message, _offset, _translate);
! }
!
! /**
! * Appelle la methode complete avec _offset=-1 et sans tranduction du
! * message.
! * @see #getField(String, int, boolean)
! */
! public static DodicoAnalyze.Field createField(String _message)
! {
! return createField(_message, -1);
! }
!
! /**
! * Appelle la methode complete sans tranduction du message.
! * @see #getField(String, int, boolean)
! */
! public static DodicoAnalyze.Field createField(String _message, int _offset)
! {
! return createField(_message, _offset, false);
! }
!
! /**
! * Cree (si <code>_message</code> non null) un champ contenant les infos
! * passes en parametres.
! * @param _message le message
! * @param _offset la ligne (ou le byte) concerne
! * @param _translate si true le message est traduit.
! */
! public static DodicoAnalyze.Field createField(String _message, int _offset, boolean _translate)
! {
! if (_message == null)
! return null;
! return new DodicoAnalyze.Field(_translate ? DodicoLib.geti18n(_message) : _message, _offset);
!
! }
+ /**
+ * Ajoute l'info sans traduction.
+ * @see #addField(Collection, String, FortranReader)
+ */
+ public static void addField(Collection _warns, String _message, FortranReader _in)
+ {
+ addField(_warns, _message, _in, false);
+ }
+
+ /**
+ * Ajoute l'info sans traduction.
+ * @see #addField(Collection, String, int)
+ */
+ public static void addField(Collection _warns, String _message, int _offset)
+ {
+ addField(_warns, _message, _offset, false);
+ }
+
+ /**
+ * Ajoute le message <code>_message</code> traduit a la collection
+ * <code>_warns</code>.Le numero de ligne sera determine a partir de
+ * la methode <code>_in.getLineNumber()</code>.
+ * @see #addField(Collection, String, int, boolean)
+ */
+ public static void addField(Collection _warns, String _message, FortranReader _in, boolean _translate)
+ {
+ addField(_warns, _message, _in.getLineNumber(), _translate);
+ }
+
+ /**
+ * Ajoute le message <code>_message</code> NON traduit a la collection
+ * <code>_warns</code>.Le numero de ligne sera determine a partir de
+ * la methode <code>_in.getLineNumber()</code>.
+ */
+ private static void addField(Collection _warns, String _message, int _offset, boolean _translate)
+ {
+ _warns.add(DodicoAnalyze.Editor.createField(_message, _offset, _translate));
+ }
+ }
public static class Field
{
Index: DodicoLib.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun/DodicoLib.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** DodicoLib.java 11 Apr 2003 16:08:53 -0000 1.6
--- DodicoLib.java 17 Apr 2003 17:26:16 -0000 1.7
***************
*** 9,12 ****
--- 9,13 ----
package org.fudaa.dodico.commun;
+ import java.io.File;
import java.io.IOException;
import java.io.InputStream;
***************
*** 30,38 ****
public class DodicoLib
{
! public final static boolean DEBUG =
! "true".equals(System.getProperty("DEBUG").toLowerCase()) ;
public final static String LOCAL_LANGUAGE = Locale.getDefault().getLanguage();
! public final static boolean FRENCH_LANGUAGE =
! ("fr".equals(LOCAL_LANGUAGE)) ? true : false;
/** */
--- 31,37 ----
public class DodicoLib
{
! public final static boolean DEBUG = "true".equals(System.getProperty("DEBUG"));
public final static String LOCAL_LANGUAGE = Locale.getDefault().getLanguage();
! public final static boolean FRENCH_LANGUAGE = ("fr".equals(LOCAL_LANGUAGE)) ? true : false;
/** */
***************
*** 192,197 ****
}
if (r.length() != _taille)
! System.out.println(
! "erreur de taille " + r.length() + " au lieu de " + _taille);
return r.toString();
}
--- 191,195 ----
}
if (r.length() != _taille)
! System.out.println("erreur de taille " + r.length() + " au lieu de " + _taille);
return r.toString();
}
***************
*** 235,241 ****
else
{
! r.put(
! champ.substring(0, index),
! champ.substring(index + 1, champ.length()));
}
}
--- 233,237 ----
else
{
! r.put(champ.substring(0, index), champ.substring(index + 1, champ.length()));
}
}
***************
*** 453,459 ****
public static double getAngle(double _angleInit)
{
! return ((_angleInit > 360) || (_angleInit < -360))
! ? _angleInit % 360
! : _angleInit;
}
--- 449,453 ----
public static double getAngle(double _angleInit)
{
! return ((_angleInit > 360) || (_angleInit < -360)) ? _angleInit % 360 : _angleInit;
}
***************
*** 463,467 ****
public static int findObject(Object[] _array, Object _objectToFound)
{
! if((_array==null) || (_objectToFound==null) ) return -1;
int l = _array.length - 1;
for (int i = l; i >= 0; i--)
--- 457,462 ----
public static int findObject(Object[] _array, Object _objectToFound)
{
! if ((_array == null) || (_objectToFound == null))
! return -1;
int l = _array.length - 1;
for (int i = l; i >= 0; i--)
***************
*** 473,477 ****
}
-
/**
* Renvoie true si la langage utilise est le francais.
--- 468,471 ----
***************
*** 482,486 ****
}
-
/**
* Permet de decouper une chaine grace a un separateur. Par exemple,
--- 476,479 ----
***************
*** 492,498 ****
public static String[] parseString(String _s, String _sepChar)
{
! if((_s==null) || (_sepChar==null) ) return null;
StringTokenizer tk = new StringTokenizer(_s, _sepChar);
! ArrayList l=new ArrayList();
String temp;
while (tk.hasMoreTokens())
--- 485,492 ----
public static String[] parseString(String _s, String _sepChar)
{
! if ((_s == null) || (_sepChar == null))
! return null;
StringTokenizer tk = new StringTokenizer(_s, _sepChar);
! ArrayList l = new ArrayList();
String temp;
while (tk.hasMoreTokens())
***************
*** 502,510 ****
return enTableau(l);
}
!
public static void main(String[] args)
{
- printObject(parseString("dddd", ";"),true);
}
--- 496,550 ----
return enTableau(l);
}
!
! /**
! * Renvoie le chemin canonique du fichier _f. Si une exception est levee
! * renvoie le chemin absolu.
! * @return une valeur non nulle
! * @see java.io.File#getCanonicalFile();
! * @see java.io.File#getAbsoluteFile();
! */
! public static String getConanicalPath(File _f)
! {
! String path = null;
! try
! {
! path = _f.getCanonicalPath();
! }
! catch (IOException e)
! {
! e.printStackTrace();
! path = _f.getAbsolutePath();
! }
! return path;
! }
!
! public static File getConanicalPathFile(File _f)
! {
! File path = null;
! try
! {
! path = _f.getCanonicalFile();
! }
! catch (IOException e)
! {
! e.printStackTrace();
! path = _f.getAbsoluteFile();
! }
! return path;
! }
!
! public static File getAbsolutePath(String _baseDir, String _path)
! {
! File f = new File(_path);
! if (f.isAbsolute())
! return f;
! else
! return new File(_baseDir, _path);
! }
!
public static void main(String[] args)
{
+ System.out.println(getAbsolutePath("/gg/", "C:\\f.f"));
}
|
|
From: <de...@us...> - 2003-04-17 17:26:52
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fortran
In directory sc8-pr-cvs1:/tmp/cvs-serv1427/org/fudaa/dodico/fortran
Modified Files:
FortranReader.java
Log Message:
Mise a jour diverses
Index: FortranReader.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fortran/FortranReader.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** FortranReader.java 1 Apr 2003 09:44:37 -0000 1.5
--- FortranReader.java 17 Apr 2003 17:26:17 -0000 1.6
***************
*** 292,299 ****
{
fields = new String[] { line };
}
- return;
}
-
int i;
--- 292,298 ----
{
fields = new String[] { line };
+ return;
}
}
int i;
|
|
From: <de...@us...> - 2003-04-17 17:26:51
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io
In directory sc8-pr-cvs1:/tmp/cvs-serv1427/org/fudaa/dodico/dunes/io
Modified Files:
DunesReader.java DunesWriter.java
Log Message:
Mise a jour diverses
Index: DunesReader.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io/DunesReader.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DunesReader.java 1 Apr 2003 09:28:11 -0000 1.2
--- DunesReader.java 17 Apr 2003 17:26:17 -0000 1.3
***************
*** 11,20 ****
import java.io.EOFException;
import java.io.IOException;
- import java.io.Reader;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.corba.geometrie.SMaillageIndex;
import org.fudaa.dodico.corba.geometrie.SPoint;
! import org.fudaa.dodico.fortran.FortranReader;
import org.fudaa.dodico.tr.TrLib;
import org.fudaa.dodico.tr.TrReaderCharSimpleAbstract;
--- 11,19 ----
import java.io.EOFException;
import java.io.IOException;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.corba.geometrie.SMaillageIndex;
import org.fudaa.dodico.corba.geometrie.SPoint;
! import org.fudaa.dodico.tr.TrFileFormat;
import org.fudaa.dodico.tr.TrLib;
import org.fudaa.dodico.tr.TrReaderCharSimpleAbstract;
***************
*** 30,34 ****
DunesAdapter source_;
! DunesKeyWord format_;
/**
--- 29,34 ----
DunesAdapter source_;
! DunesKeyWord kw_;
! DunesFileFormat fileFormat_;
/**
***************
*** 42,49 ****
public DunesReader(DunesFileFormat _f)
{
! if (_f == null)
! format_ = DunesFileFormat.getInstance().getKeyWords();
! else
! format_ = _f.getKeyWords();
}
--- 42,48 ----
public DunesReader(DunesFileFormat _f)
{
! fileFormat_ = (_f == null) ? DunesFileFormat.getInstance() : _f;
! kw_ = fileFormat_.getKeyWords();
!
}
***************
*** 63,76 ****
//Lecture de l'identifiant NOEUD
in_.readFields();
! if ((in_.getNumberOfFields() != 1)
! && (!format_.getNoeudCode().equals(in_.stringField(0))))
{
! _initAnalyze().addError(
! DodicoLib.geti18n("L'identifiant")
! + " "
! + format_.getNoeudCode()
! + " "
! + DodicoLib.geti18n("est attendu"),
! in_);
return;
}
--- 62,68 ----
//Lecture de l'identifiant NOEUD
in_.readFields();
! if ((in_.getNumberOfFields() != 1) && (!kw_.getNoeudCode().equals(in_.stringField(0))))
{
! analyze_.addError(DodicoLib.geti18n("L'identifiant") + " " + kw_.getNoeudCode() + " " + DodicoLib.geti18n("est attendu"), in_);
return;
}
***************
*** 87,91 ****
if (in_.getNumberOfFields() != 2)
{
! _initAnalyze().addError("Nombre de noeuds non trouve", in_, true);
return;
}
--- 79,83 ----
if (in_.getNumberOfFields() != 2)
{
! analyze_.addError("Nombre de noeuds non trouve", in_, true);
return;
}
***************
*** 97,101 ****
//Si adaptatif, on initialise le tableau stockant les valeurs.
double[] adaptatifs = null;
! if (typeMaillage == format_.getAdaptatifCode())
{
adaptatifs = new double[nbNoeuds];
--- 89,93 ----
//Si adaptatif, on initialise le tableau stockant les valeurs.
double[] adaptatifs = null;
! if (typeMaillage == kw_.getAdaptatifCode())
{
adaptatifs = new double[nbNoeuds];
***************
*** 122,135 ****
{
! _initAnalyze().addInfo(
! DodicoLib.geti18n("Format attendu") + ": NUM_POINT X Y Z",
! in_);
! _initAnalyze().addError(
! DodicoLib.geti18n("Définition du noeud")
! + " "
! + (i + 1)
! + " "
! + DodicoLib.geti18n("non valide"),
! in_);
return;
}
--- 114,119 ----
{
! analyze_.addInfo(DodicoLib.geti18n("Format attendu") + ": NUM_POINT X Y Z", in_);
! analyze_.addError(DodicoLib.geti18n("Définition du noeud") + " " + (i + 1) + " " + DodicoLib.geti18n("non valide"), in_);
return;
}
***************
*** 137,144 ****
if (temp != (i + 1))
{
! _initAnalyze().addInfo(
! "Le numero du point ne correspond pas au numéro réel",
! in_,
! true);
}
points[i] = new SPoint();
--- 121,125 ----
if (temp != (i + 1))
{
! analyze_.addInfo("Le numero du point ne correspond pas au numéro réel", in_, true);
}
points[i] = new SPoint();
***************
*** 152,159 ****
{
! _initAnalyze().addWarning(
! "la ligne du coefficient adaptatif ne doit contenir qu'un champ",
! in_,
! true);
}
adaptatifs[i] = in_.doubleField(0);
--- 133,137 ----
{
! analyze_.addWarning("la ligne du coefficient adaptatif ne doit contenir qu'un champ", in_, true);
}
adaptatifs[i] = in_.doubleField(0);
***************
*** 171,184 ****
//Lecture du mot cle ELEMENT
in_.readFields();
! if ((in_.getNumberOfFields() != 1)
! && (!format_.getElementCode().equals(in_.stringField(0))))
{
! _initAnalyze().addError(
! DodicoLib.geti18n("L'identifiant")
! + " "
! + format_.getElementCode()
! + " "
! + DodicoLib.geti18n("est attendu"),
! in_);
return;
}
--- 149,155 ----
//Lecture du mot cle ELEMENT
in_.readFields();
! if ((in_.getNumberOfFields() != 1) && (!kw_.getElementCode().equals(in_.stringField(0))))
{
! analyze_.addError(DodicoLib.geti18n("L'identifiant") + " " + kw_.getElementCode() + " " + DodicoLib.geti18n("est attendu"), in_);
return;
}
***************
*** 189,196 ****
if (in_.getNumberOfFields() != 1)
{
! _initAnalyze().addError(
! "Cette ligne ne doit contenir que le nombre d'elements",
! in_,
! true);
return;
}
--- 160,164 ----
if (in_.getNumberOfFields() != 1)
{
! analyze_.addError("Cette ligne ne doit contenir que le nombre d'elements", in_, true);
return;
}
***************
*** 208,222 ****
if (in_.getNumberOfFields() < 2)
{
! _initAnalyze().addInfo(
! DodicoLib.geti18n("Format attendu")
! + "NUM_ELEMENT NB_POINT P[1] ...P[NB_POINT]",
! in_);
! _initAnalyze().addError(
! DodicoLib.geti18n("Définition de l'element")
! + " "
! + (i + 1)
! + " "
! + DodicoLib.geti18n("non valide"),
! in_);
return;
}
--- 176,181 ----
if (in_.getNumberOfFields() < 2)
{
! analyze_.addInfo(DodicoLib.geti18n("Format attendu") + "NUM_ELEMENT NB_POINT P[1] ...P[NB_POINT]", in_);
! analyze_.addError(DodicoLib.geti18n("Définition de l'element") + " " + (i + 1) + " " + DodicoLib.geti18n("non valide"), in_);
return;
}
***************
*** 225,259 ****
if (temp != (i + 1))
{
! _initAnalyze().addInfo(
! "Le numero de l'element ne correspond pas au numéro réel",
! in_,
! true);
}
temp = in_.intField(1);
if (temp <= 0)
{
! _initAnalyze().addError(
! DodicoLib.geti18n(
! "Nombre de points négatifs ou nul pour l'élément")
! + " "
! + (i + 1),
! in_);
return;
}
if (in_.getNumberOfFields() != (temp + 2))
{
! _initAnalyze().addInfo(
! DodicoLib.geti18n("Nombre indiqué")
! + ": "
! + temp
! + "."
! + DodicoLib.geti18n("Nombre lu")
! + ": "
! + (in_.getNumberOfFields() - 2),
in_);
! _initAnalyze().addError(
! "Le nombre d'éléments ne correspond pas",
! in_,
! true);
return;
}
--- 184,201 ----
if (temp != (i + 1))
{
! analyze_.addInfo("Le numero de l'element ne correspond pas au numéro réel", in_, true);
}
temp = in_.intField(1);
if (temp <= 0)
{
! analyze_.addError(DodicoLib.geti18n("Nombre de points négatifs ou nul pour l'élément") + " " + (i + 1), in_);
return;
}
if (in_.getNumberOfFields() != (temp + 2))
{
! analyze_.addInfo(
! DodicoLib.geti18n("Nombre indiqué") + ": " + temp + "." + DodicoLib.geti18n("Nombre lu") + ": " + (in_.getNumberOfFields() - 2),
in_);
! analyze_.addError("Le nombre d'éléments ne correspond pas", in_, true);
return;
}
***************
*** 279,291 ****
{
if (in_.getLine().trim() != "")
! _initAnalyze().addWarning(
! "Cette ligne et les suivantes sont ignorées",
! in_);
}
in_.readFields();
if (in_.getLine().trim() != "")
! _initAnalyze().addWarning(
! "Cette ligne et les suivantes sont ignorées",
! in_);
}
--- 221,229 ----
{
if (in_.getLine().trim() != "")
! analyze_.addWarning("Cette ligne et les suivantes sont ignorées", in_);
}
in_.readFields();
if (in_.getLine().trim() != "")
! analyze_.addWarning("Cette ligne et les suivantes sont ignorées", in_);
}
***************
*** 297,305 ****
catch (NumberFormatException fe)
{
! manageException(fe, _initAnalyze(), in_);
}
catch (IOException _e)
{
! manageException(_e, _initAnalyze());
}
}
--- 235,243 ----
catch (NumberFormatException fe)
{
! manageException(fe, analyze_, in_);
}
catch (IOException _e)
{
! manageException(_e, analyze_);
}
}
***************
*** 312,315 ****
--- 250,266 ----
return getDunesInterface();
}
+
+ /**
+ * @return
+ */
+ public TrFileFormat getFileFormat()
+ {
+ return getDunesFileFormat();
+ }
+
+ public DunesFileFormat getDunesFileFormat()
+ {
+ return fileFormat_;
+ }
}
Index: DunesWriter.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io/DunesWriter.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DunesWriter.java 1 Apr 2003 09:28:09 -0000 1.2
--- DunesWriter.java 17 Apr 2003 17:26:17 -0000 1.3
***************
*** 10,16 ****
import java.io.IOException;
- import java.io.Writer;
- import org.fudaa.dodico.commun.DodicoAnalyze;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.corba.geometrie.SMaillageIndex;
--- 10,14 ----
***************
*** 64,73 ****
if (dunes_ == null)
{
! _initAnalyze().addError("La structure à écrire est nulle !", -1, true);
return;
}
if (out_ == null)
{
! _initAnalyze().addError("Le flux de sortie est nul !", -1, true);
return;
}
--- 62,71 ----
if (dunes_ == null)
{
! analyze_.addError("La structure à écrire est nulle !", -1, true);
return;
}
if (out_ == null)
{
! analyze_.addError("Le flux de sortie est nul !", -1, true);
return;
}
***************
*** 75,79 ****
if (maillage == null)
{
! _initAnalyze().addError("Le maillage est nul !", -1, true);
return;
}
--- 73,77 ----
if (maillage == null)
{
! analyze_.addError("Le maillage est nul !", -1, true);
return;
}
***************
*** 81,85 ****
if (pts == null)
{
! _initAnalyze().addError(
"Le maillage ne contient pas de points !",
-1,
--- 79,83 ----
if (pts == null)
{
! analyze_.addError(
"Le maillage ne contient pas de points !",
-1,
***************
*** 90,94 ****
if (nPts == 0)
{
! _initAnalyze().addError(
"Le maillage ne contient pas de points !",
-1,
--- 88,92 ----
if (nPts == 0)
{
! analyze_.addError(
"Le maillage ne contient pas de points !",
-1,
***************
*** 99,103 ****
if (elems == null)
{
! _initAnalyze().addError(
"Le maillage ne contient pas d'éléments !",
-1,
--- 97,101 ----
if (elems == null)
{
! analyze_.addError(
"Le maillage ne contient pas d'éléments !",
-1,
***************
*** 108,112 ****
if (nElems == 0)
{
! _initAnalyze().addError(
"Le maillage ne contient pas d'éléments !",
-1,
--- 106,110 ----
if (nElems == 0)
{
! analyze_.addError(
"Le maillage ne contient pas d'éléments !",
-1,
***************
*** 206,210 ****
b.append(ppel[j] + 1);
}
! writelnTo(out_, b);
//mis a jour de l'etat d'avancement au cas ou.
if (afficheAvance)
--- 204,208 ----
b.append(ppel[j] + 1);
}
! writeln(b);
//mis a jour de l'etat d'avancement au cas ou.
if (afficheAvance)
***************
*** 223,227 ****
catch (IOException _ex)
{
! manageException(_ex, _initAnalyze());
}
return;
--- 221,225 ----
catch (IOException _ex)
{
! manageException(_ex, analyze_);
}
return;
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/tr
In directory sc8-pr-cvs1:/tmp/cvs-serv1427/org/fudaa/dodico/tr
Modified Files:
TrFileFormat.java TrFileReadView.java TrLib.java
TrProjetH2d.java TrReaderCharSimpleAbstract.java
TrReaderInterface.java TrReaderWriterAbstract.java
TrReaderWriterMultiAbstract.java
TrReaderWriterSimpleAbstract.java
TrWriterCharSimpleAbstract.java
Added Files:
TrDicoDataType.java TrDicoEntite.java
Log Message:
Mise a jour diverses
--- NEW FILE: TrDicoDataType.java ---
/*
* @file TelemacDicoDataType.java
* @creation 7 avr. 2003
* @modification $Date: 2003/04/17 17:26:25 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.tr;
import javax.swing.JComponent;
import org.fudaa.dodico.commun.DodicoLib;
/**
* @author deniger
* @version $Id: TrDicoDataType.java,v 1.1 2003/04/17 17:26:25 deniger Exp $
*/
public abstract class TrDicoDataType
{
/**
*
*/
public TrDicoDataType()
{
super();
}
public JComponent getComponent()
{
return null;
}
public abstract boolean isValide(String _data);
public static class Binaire extends TrDicoDataType
{
private static String[] falseValues_= new String[] { "0", "non", "faux", "no", "false" };
private static String[] trueValues_ = new String[] { "1", "oui", "vrai", "yes", "true" };
public Binaire()
{
}
/**
* @see org.fudaa.dodico.telemac.dico.TelemacDicoDataType#isValide(java.lang.String)
*/
public boolean isValide(String _data)
{
if (_data == null)
return false;
String t = _data.toLowerCase();
return ((DodicoLib.findObject(trueValues_, t) >= 0) || (DodicoLib.findObject(falseValues_, t) >= 0)) ? true : false;
}
public String toString()
{
return getClass().getName();
}
}
public static class Chaine extends ChoixType
{
private boolean isFic_;
/**
* @return
*/
public boolean isFic()
{
return isFic_;
}
/**
* @param b
*/
public void setFic(boolean b)
{
isFic_ = b;
}
public String toString()
{
return getClass().getName();
}
/**
* @see org.fudaa.dodico.telemac.dico.TelemacDicoDataType#isValide(java.lang.String)
*/
public boolean isValide(String _data)
{
if(_data.length()==0) return true;
if (isChoiceEnable())
return _isValide(_data);
return true;
}
}
private abstract static class ChoixType extends TrDicoDataType
{
protected String[] choiceKeys_;
protected String[] choiceValues_;
public boolean isChoiceEnable()
{
return choiceValues_ != null;
}
public void cancelChoice()
{
choiceValues_ = null;
choiceKeys_ = null;
}
public String getKey(String _value)
{
if (!isChoiceEnable())
return null;
int l = choiceValues_.length;
int tempi;
tempi = DodicoLib.findObject(choiceValues_, _value);
if (tempi >= 0)
{
if (choiceKeys_ == null)
return choiceValues_[tempi];
return choiceKeys_[tempi];
}
if (choiceKeys_ != null)
{
tempi = DodicoLib.findObject(choiceKeys_, _value);
if (tempi >= 0)
return choiceKeys_[tempi];
}
return null;
}
protected boolean _isValide(String _data)
{
return (getKey(_data) == null) ? false : true;
}
public void setChoice(String[] _keys, String[] _values)
{
if (_values == null)
throw new IllegalArgumentException("valeurs nulles");
choiceKeys_ = _keys;
choiceValues_ = _values;
if ((choiceKeys_ != null) && (choiceKeys_.length != choiceValues_.length))
throw new IllegalArgumentException("Les tableaux n'ont pas la meme taille");
}
}
public static class Entier extends ChoixType
{
private boolean controle_;
private boolean minOnly_;
private int max_;
private int min_;
public void cancelControle()
{
controle_ = false;
}
public boolean isControle()
{
return controle_;
}
public boolean isControleMinOnly()
{
return minOnly_;
}
public String toString()
{
return getClass().getName();
}
public boolean isValide(String _data)
{
if (isChoiceEnable())
return _isValide(_data);
int t;
try
{
t = Integer.parseInt(_data);
}
catch (NumberFormatException e)
{
return false;
}
if (controle_)
{
if ((minOnly_) && (t < min_))
return false;
else if ((t < min_) || (t > max_))
return false;
}
return true;
}
public void setControle(int _min, int _max)
{
if (_max > _min)
{
min_ = _min;
max_ = _max;
}
else
{
min_ = _max;
max_ = _min;
}
controle_ = true;
}
public void setControle(int _min)
{
min_ = _min;
max_ = Integer.MAX_VALUE;
controle_ = true;
minOnly_ = true;
}
public int getControleMaxValue()
{
return max_;
}
public int getControleMinValue()
{
return min_;
}
}
public static class Reel extends TrDicoDataType
{
private boolean controle_;
private double max_;
private double min_;
private boolean minOnly_;
public void cancelControle()
{
controle_ = false;
}
public String toString()
{
return getClass().getName();
}
/**
* @see org.fudaa.dodico.telemac.dico.TelemacDicoDataType#isValide(java.lang.String)
*/
public boolean isValide(String _data)
{
double t = 0D;
try
{
t = Double.parseDouble(_data);
}
catch (NumberFormatException e)
{
return false;
}
if (controle_)
{
if ((minOnly_) && (t < min_))
return false;
else if ((t < min_) || (t > max_))
return false;
}
return true;
}
public boolean isControleMinOnly()
{
return minOnly_;
}
public boolean isControle()
{
return controle_;
}
public void setControle(double _min)
{
min_ = _min;
max_ = Double.MAX_VALUE;
controle_ = true;
minOnly_ = true;
}
public void setControle(double _min, double _max)
{
if (_max > _min)
{
min_ = _min;
max_ = _max;
}
else
{
min_ = _max;
max_ = _min;
}
controle_ = true;
minOnly_ = false;
}
public double getControleMaxValue()
{
return max_;
}
public double getControleMinValue()
{
return min_;
}
}
}
--- NEW FILE: TrDicoEntite.java ---
/*
* @file TelemacDicoEntite.java
* @creation 7 avr. 2003
* @modification $Date: 2003/04/17 17:26:25 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.tr;
import java.util.ArrayList;
import java.util.StringTokenizer;
import org.fudaa.dodico.commun.DodicoLib;
/**
* Decrit une entree du fichier dico. Certaines donnees (nom, valeur par defaut et l'aide)
* sont donnees dans plusieurs langues. Pour l'instant le francais (indice 0) et l'anglais
* (indice 1) sont supportes.
* @author deniger
* @version $Id: TrDicoEntite.java,v 1.1 2003/04/17 17:26:25 deniger Exp $
*/
public abstract class TrDicoEntite
{
protected TrDicoDataType type_;
private String nom_;
private String aide_;
private String defautValue_;
private int index_;
private int niveau_;
private String rubrique_;
/**
* @param _t le type des donnees
*/
public TrDicoEntite(TrDicoDataType _t)
{
if (_t == null)
throw new IllegalArgumentException("Le type doit etre non null");
type_ = _t;
}
/**
* @return l'aide dans le langue utilisee sur cette machine.
*/
public String getAide()
{
return aide_;
}
/**
* @return la valeur par defaut correspondant au caracteristique locale de cette machine.
*/
public String getDefautValue()
{
return defautValue_;
}
/**
* @return le nom dans le langue utilisee.
*/
public String getNom()
{
return nom_;
}
/**
* @return le type des donnees.
*/
public TrDicoDataType getType()
{
return type_;
}
/**
* @param string l'aide dans les differentes langues.
*/
public void setAide(String string)
{
aide_ = string;
}
/**
* @param string
*/
public void setDefautValue(String _string)
{
defautValue_ = _string;
}
/**
* @param string
*/
public void setNom(String _string)
{
nom_ = _string;
}
/**
* @param type
*/
public void setType(TrDicoDataType type)
{
type_ = type;
}
public abstract boolean isValide(String _data);
/**
* Une entree ne comportant qu'une seule donnee.
*/
public static class Simple extends TrDicoEntite
{
/**
* @param _t le type des donnees
*/
public Simple(TrDicoDataType _t)
{
super(_t);
}
public String toString()
{
return getClass().getName();
}
/**
* @see org.fudaa.dodico.telemac.dico.TelemacDicoDataType#isValide(java.lang.String)
*/
public boolean isValide(String _data)
{
return type_.isValide(_data);
}
}
/**
* Une entree pouvant contenir plusieurs donnee separees par une virgule.
*/
public static class Vecteur extends TrDicoEntite
{
protected String sepChar_ = ",";
/**
* @param _t le type des donnees
*/
public Vecteur(TrDicoDataType _t, String _sepChar)
{
super(_t);
sepChar_ = _sepChar;
}
public String toString()
{
return getClass().getName()+" sep="+sepChar_;
}
public String[] getChamps(String _data)
{
StringTokenizer tk = new StringTokenizer(_data, sepChar_);
ArrayList l = new ArrayList(20);
String temp;
if(tk.countTokens()==0)
{
if (!(type_.isValide("")))
{
return null;
}
else
{
return new String[]{""};
}
}
while (tk.hasMoreTokens())
{
temp = tk.nextToken().trim();
if (!(type_.isValide(temp)))
{
return null;
}
else
{
l.add(temp);
}
}
return DodicoLib.enTableau(l);
}
/**
* @see org.fudaa.dodico.telemac.dico.TelemacDicoDataType#isValide(java.lang.String)
*/
public boolean isValide(String _data)
{
return (getChamps(_data) == null) ? false : true;
}
/**
* @return
*/
public String getSepChar()
{
return sepChar_;
}
}
/**
* une entree possedant un nombre de donnees fixe. Le tableau peut etre traite de
* facon dynamique : si trop de donnees sont presentes, elles seront tronquees pour
* correspondre a la taille du tableau.
*/
public static class Tableau extends Vecteur
{
private int taille_;
private boolean dynamique_;
public Tableau(TrDicoDataType _t)
{
super(_t, ";");
}
public String toString()
{
return getClass().getName()+" [" + taille_ + "]";
}
/**
* @see org.fudaa.dodico.telemac.dico.TelemacDicoDataType#isValide(java.lang.String)
*/
public boolean isValide(String _data)
{
String[] champs = getChamps(_data);
if (champs == null)
return false;
int nb = champs.length;
if (nb != taille_)
{
if ((dynamique_) && (nb > taille_))
return true;
}
return true;
}
/**
* @return la taille du tableau.
*/
public int getTaille()
{
return taille_;
}
/**
* @param i la nouvelle taille du tableau.
*/
public void setTaille(int i)
{
taille_ = i;
}
/**
* @return true si les tableaux sont geres dynamiquement/
*/
public boolean isDynamique()
{
return dynamique_;
}
/**
* @param b la nouvelle valeur du caractere dynamique.
*/
public void setDynamique(boolean b)
{
dynamique_ = b;
}
}
/**
* @return
*/
public int getIndex()
{
return index_;
}
/**
* @param i
*/
public void setIndex(int i)
{
index_ = i;
}
/**
* @return
*/
public void setRubrique(String _s)
{
rubrique_=_s;
}
public String getRubrique()
{
return rubrique_;
}
public String getString()
{
return getNom();
}
/**
* @return
*/
public int getNiveau()
{
return niveau_;
}
/**
* @param i
*/
public void setNiveau(int i)
{
niveau_ = i;
}
}
Index: TrFileFormat.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/tr/TrFileFormat.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TrFileFormat.java 11 Apr 2003 16:09:22 -0000 1.3
--- TrFileFormat.java 17 Apr 2003 17:26:25 -0000 1.4
***************
*** 27,50 ****
}
- // public boolean containsMaillage()
- // {
- // return false;
- // }
- //
- // public boolean containsProprietesNodales()
- // {
- // return false;
- // }
- //
- // public boolean containsConditionsLimites()
- // {
- // return false;
- // }
- //
- // public boolean containsSolutionsInitiales()
- // {
- // return false;
- // }
-
public abstract TrWriterInterface createWriter();
--- 27,30 ----
***************
*** 53,73 ****
public final TrFileReadView read(File _f, ProgressionInterface _progress)
{
if (getNbFile() == 1)
{
! TrReaderInterface r = createReader();
! r.setIn(_f);
! r.setProgressReceiver(_progress);
! r.read();
! IOException[] exs = r.close();
! return new TrFileReadView(
! _f,
! r.getInterface(),
! this,
! r.getAnalyzes(),
! exs);
!
}
else
! return read(getFile(_f), _progress);
}
--- 33,68 ----
public final TrFileReadView read(File _f, ProgressionInterface _progress)
{
+ TrReaderInterface r = createReader();
+ IOException[] exs = read(_f, r, _progress);
+ return new TrFileReadView(_f, r.getInterface(), this, r.getAnalyzes(), exs);
+ }
+
+ public final IOException[] read(File _f, TrReaderInterface _r, ProgressionInterface _progress)
+ {
if (getNbFile() == 1)
{
! _r.setIn(_f);
! _r.setProgressReceiver(_progress);
! _r.read();
! return _r.close();
}
else
! return read(getFile(_f), _r, _progress);
! }
!
! public static final IOException[] readFile(File _f, TrReaderInterface _reader, ProgressionInterface _progress)
! {
! _reader.setIn(_f);
! _reader.setProgressReceiver(_progress);
! _reader.read();
! return _reader.close();
! }
!
! public static final IOException[] readFile(File[] _f, TrReaderInterface _reader, ProgressionInterface _progress)
! {
! _reader.setIn(_f);
! _reader.setProgressReceiver(_progress);
! _reader.read();
! return _reader.close();
}
***************
*** 77,102 ****
}
! public final TrFileReadView read(File[] _f, ProgressionInterface _progress)
{
int l = _f.length;
if (l != getNbFile())
! throw new IllegalArgumentException(
! "Le nombre de fichier donne "
! + l
! + DodicoLib.LINE_SEP
! + "Nb Fichier attendu "
! + getNbFile());
TrReaderInterface r = createReader();
! r.setIn(_f);
! r.setProgressReceiver(_progress);
! r.read();
! IOException[] exs = r.close();
return new TrFileReadView(_f, r.getInterface(), this, r.getAnalyzes(), exs);
}
! public final TrFileReadView write(
! File _f,
! Object _interface,
! ProgressionInterface _progress)
{
if (getNbFile() == 1)
--- 72,95 ----
}
! public final IOException[] read(File[] _f, TrReaderInterface _r, ProgressionInterface _progress)
{
int l = _f.length;
if (l != getNbFile())
! throw new IllegalArgumentException("Le nombre de fichier donne " + l + DodicoLib.LINE_SEP + "Nb Fichier attendu " + getNbFile());
! _r.setIn(_f);
! _r.setProgressReceiver(_progress);
! _r.read();
! return _r.close();
!
! }
!
! public final TrFileReadView read(File[] _f, ProgressionInterface _progress)
! {
TrReaderInterface r = createReader();
! IOException[] exs = read(_f, r, _progress);
return new TrFileReadView(_f, r.getInterface(), this, r.getAnalyzes(), exs);
}
! public final TrFileReadView write(File _f, Object _interface, ProgressionInterface _progress)
{
if (getNbFile() == 1)
***************
*** 119,135 ****
}
! public final TrFileReadView write(
! File[] _f,
! Object _interface,
! ProgressionInterface _progress)
{
int l = _f.length;
if (l != getNbFile())
! throw new IllegalArgumentException(
! "Le nombre de fichier donne "
! + l
! + DodicoLib.LINE_SEP
! + "Nb Fichier attendu "
! + getNbFile());
TrWriterInterface r = createWriter();
r.setOut(_f);
--- 112,120 ----
}
! public final TrFileReadView write(File[] _f, Object _interface, ProgressionInterface _progress)
{
int l = _f.length;
if (l != getNbFile())
! throw new IllegalArgumentException("Le nombre de fichier donne " + l + DodicoLib.LINE_SEP + "Nb Fichier attendu " + getNbFile());
TrWriterInterface r = createWriter();
r.setOut(_f);
Index: TrFileReadView.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/tr/TrFileReadView.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TrFileReadView.java 1 Apr 2003 13:47:16 -0000 1.2
--- TrFileReadView.java 17 Apr 2003 17:26:25 -0000 1.3
***************
*** 25,29 ****
private Object source_;
private IOException[] exClose_;
! private TrFileReadView.Analyze[] analyzes_;
--- 25,29 ----
private Object source_;
private IOException[] exClose_;
! private DodicoAnalyze[] analyzes_;
***************
*** 39,59 ****
format_=_form;
exClose_=_closeExs;
! setAnalyze(_analyse);
}
- private void setAnalyze(DodicoAnalyze[] _analyzes)
- {
- if(_analyzes!=null)
- {
- int l=_analyzes.length;
- analyzes_=new TrFileReadView.Analyze[l];
- for (int i = l-1; i >= 0; i--)
- {
- analyzes_[i]=new TrFileReadView.Analyze(_analyzes[i]);
- }
- }
- }
! public TrFileReadView.Analyze[] getAnalyzes()
{
return analyzes_;
--- 39,47 ----
format_=_form;
exClose_=_closeExs;
! analyzes_=_analyse;
}
! public DodicoAnalyze[] getAnalyzes()
{
return analyzes_;
***************
*** 61,65 ****
/**
! * Returns the source.
* @return Object
*/
--- 49,53 ----
/**
! * Renvoie la source obtenue par la lecture du fichier.
* @return Object
*/
***************
*** 69,88 ****
}
- static public class Analyze
- {
- private DodicoAnalyze.Field[] errors_;
- private DodicoAnalyze.Field[] warns_;
- private DodicoAnalyze.Field[] infos_;
-
- public Analyze(DodicoAnalyze _io)
- {
- if(_io!=null)
- {
- errors_=_io.getErrors();
- warns_=_io.getWarnings();
- infos_=_io.getInfos();
- }
- }
- }
}
--- 57,60 ----
Index: TrLib.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/tr/TrLib.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TrLib.java 1 Apr 2003 13:47:16 -0000 1.2
--- TrLib.java 17 Apr 2003 17:26:25 -0000 1.3
***************
*** 9,14 ****
package org.fudaa.dodico.tr;
! import java.io.IOException;
! import java.io.Writer;
--- 9,15 ----
package org.fudaa.dodico.tr;
! import org.fudaa.dodico.corba.geometrie.SMaillageIndex;
! import org.fudaa.dodico.corba.geometrie.SPoint;
!
***************
*** 45,50 ****
}
!
!
--- 46,60 ----
}
! public static boolean setBathymetrie(SMaillageIndex _m,double[] _fondValues)
! {
! SPoint[] pts=_m.points;
! int nbPoints=pts.length;
! if(nbPoints!=_fondValues.length) return false;
! for(int i=nbPoints-1;i>=0;i--)
! {
! pts[i].z=_fondValues[i];
! }
! return true;
! }
Index: TrProjetH2d.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/tr/TrProjetH2d.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TrProjetH2d.java 1 Apr 2003 13:47:16 -0000 1.1
--- TrProjetH2d.java 17 Apr 2003 17:26:26 -0000 1.2
***************
*** 25,31 ****
private STrProjetH2d projet_;
! public static final int CODE_NON_INITIALISE = 0;
! public static final int CODE_LIBRE = 1;
! public static final int CODE_PERMANENT = 2;
public static final double NORMALE_NON_INITIALISEE = 400;
--- 25,32 ----
private STrProjetH2d projet_;
! public static final String CODE_NON_INITIALISE = "INCONNU";
! public static final String CODE_LIBRE = "LIBRE";
! public static final String CODE_PERMANENT = "PERMANENT";
! public static final String CODE_TRANSITOIRE_BEGIN = "TRANS_";
public static final double NORMALE_NON_INITIALISEE = 400;
***************
*** 35,49 ****
public static String PROPRIETE_ALPHA_LONGUEUR_MELANGE = "LONGUEUR MELANGE";
public static String PROPRIETE_PERTE_CHARGE = "PERTE CHARGE";
public TrProjetH2d()
{
}
!
! public void setMaillage(SMaillageIndex _index)
{
! if (projet_ == null)
! projet_ = new STrProjetH2d();
! projet_.maillage = _index;
}
/**
--- 36,62 ----
public static String PROPRIETE_ALPHA_LONGUEUR_MELANGE = "LONGUEUR MELANGE";
public static String PROPRIETE_PERTE_CHARGE = "PERTE CHARGE";
+
+ public static String FICHIER_PRINCIPAL="FICHIER_PRINCIPAL";
+ public static String FICHIER_GEOMETRIE="FICHIER_GEOMETRIE";
+ public static String FICHIER_CL="FICHIER_CL";
+ public static String FICHIER_CL_LIQUIDE="FICHIER_CL_LIQUIDE";
+ public static String FICHIER_FOND="FICHIER_FOND";
public TrProjetH2d()
{
}
!
! public static boolean isTransitoire(String _code)
{
! return _code.startsWith(CODE_TRANSITOIRE_BEGIN);
}
+
+
+ // public void setMaillage(SMaillageIndex _index)
+ // {
+ // if (projet_ == null)
+ // projet_ = new STrProjetH2d();
+ // projet_.maillage = _index;
+ // }
/**
Index: TrReaderCharSimpleAbstract.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/tr/TrReaderCharSimpleAbstract.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TrReaderCharSimpleAbstract.java 1 Apr 2003 13:47:16 -0000 1.1
--- TrReaderCharSimpleAbstract.java 17 Apr 2003 17:26:26 -0000 1.2
***************
*** 38,42 ****
catch(FileNotFoundException _e)
{
! manageException(_e,_initAnalyze());
}
if(r!=null) setIn(r);
--- 38,42 ----
catch(FileNotFoundException _e)
{
! manageException(_e,analyze_);
}
if(r!=null) setIn(r);
Index: TrReaderInterface.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/tr/TrReaderInterface.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TrReaderInterface.java 1 Apr 2003 13:47:16 -0000 1.1
--- TrReaderInterface.java 17 Apr 2003 17:26:26 -0000 1.2
***************
*** 22,26 ****
public interface TrReaderInterface
{
!
public DodicoAnalyze getAnalyze();
public DodicoAnalyze[] getAnalyzes();
--- 22,26 ----
public interface TrReaderInterface
{
! public TrFileFormat getFileFormat();
public DodicoAnalyze getAnalyze();
public DodicoAnalyze[] getAnalyzes();
Index: TrReaderWriterAbstract.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/tr/TrReaderWriterAbstract.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TrReaderWriterAbstract.java 11 Apr 2003 16:09:23 -0000 1.3
--- TrReaderWriterAbstract.java 17 Apr 2003 17:26:26 -0000 1.4
***************
*** 43,47 ****
}
! public void manageException(FileNotFoundException _e, DodicoAnalyze _analyze)
{
_analyze.addTranslateError("Fichier non trouvé");
--- 43,47 ----
}
! public void manageException(FileNotFoundException _e, DodicoAnalyze.Editor _analyze)
{
_analyze.addTranslateError("Fichier non trouvé");
***************
*** 51,55 ****
}
! public void manageException(IOException _e, DodicoAnalyze _analyze)
{
_analyze.addTranslateError("Erreur d'entrée/sortie");
--- 51,55 ----
}
! public void manageException(IOException _e, DodicoAnalyze.Editor _analyze)
{
_analyze.addTranslateError("Erreur d'entrée/sortie");
***************
*** 61,65 ****
public void manageException(
NumberFormatException _e,
! DodicoAnalyze _analyze,
FortranReader _l)
{
--- 61,65 ----
public void manageException(
NumberFormatException _e,
! DodicoAnalyze.Editor _analyze,
FortranReader _l)
{
***************
*** 71,75 ****
public void manageException(
IllegalArgumentException _e,
! DodicoAnalyze _analyze)
{
_analyze.addTranslateError("Erreur interne d'argument");
--- 71,75 ----
public void manageException(
IllegalArgumentException _e,
! DodicoAnalyze.Editor _analyze)
{
_analyze.addTranslateError("Erreur interne d'argument");
***************
*** 79,83 ****
}
! public void manageException(Exception _e, DodicoAnalyze _analyze)
{
_analyze.addTranslateError("Erreur d'exécution");
--- 79,83 ----
}
! public void manageException(Exception _e, DodicoAnalyze.Editor _analyze)
{
_analyze.addTranslateError("Erreur d'exécution");
Index: TrReaderWriterMultiAbstract.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/tr/TrReaderWriterMultiAbstract.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TrReaderWriterMultiAbstract.java 1 Apr 2003 13:47:16 -0000 1.1
--- TrReaderWriterMultiAbstract.java 17 Apr 2003 17:26:26 -0000 1.2
***************
*** 24,28 ****
public abstract class TrReaderWriterMultiAbstract extends TrReaderWriterAbstract
{
! protected DodicoAnalyze[] analyze_;
int nbFile_;
--- 24,28 ----
public abstract class TrReaderWriterMultiAbstract extends TrReaderWriterAbstract
{
! protected DodicoAnalyze.Editor[] analyze_;
int nbFile_;
***************
*** 32,50 ****
throw new IllegalArgumentException("minimum 2 fichiers");
nbFile_ = _nbFile;
! }
!
! protected DodicoAnalyze _initAnalyze(int _i)
! {
! if (analyze_ == null)
! analyze_ = new DodicoAnalyze[nbFile_];
! if (analyze_[_i] == null)
! analyze_[_i] = new DodicoAnalyze();
! return analyze_[_i];
}
public void razAnalyzes()
{
- if (analyze_ == null)
- return;
int l = analyze_.length - 1;
for (int i = l; i >= 0; i--)
--- 32,44 ----
throw new IllegalArgumentException("minimum 2 fichiers");
nbFile_ = _nbFile;
! analyze_=new DodicoAnalyze.Editor[nbFile_];
! for(int i=nbFile_-1;i>=0;i--)
! {
! analyze_[i]=new DodicoAnalyze.Editor();
! }
}
public void razAnalyzes()
{
int l = analyze_.length - 1;
for (int i = l; i >= 0; i--)
***************
*** 59,81 ****
public final DodicoAnalyze getAnalyze()
{
! if (analyze_ == null)
! return null;
! return analyze_[0];
}
public final DodicoAnalyze[] getAnalyzes()
{
! return analyze_;
}
public boolean analyzeContainsError(int _i)
{
! if ((analyze_ != null)
! && (analyze_[_i] != null)
! && (analyze_[_i].containsErrors()))
! {
! return true;
! }
! return false;
}
--- 53,67 ----
public final DodicoAnalyze getAnalyze()
{
! return analyze_[0].toAnalyze();
}
public final DodicoAnalyze[] getAnalyzes()
{
! return DodicoAnalyze.getAnalyze(analyze_);
}
public boolean analyzeContainsError(int _i)
{
! return analyze_[_i].containsErrors();
}
***************
*** 91,95 ****
catch(FileNotFoundException _e)
{
! manageException(_e, _initAnalyze(_i));
}
return r;
--- 77,81 ----
catch(FileNotFoundException _e)
{
! manageException(_e, analyze_[_i]);
}
return r;
***************
*** 105,109 ****
catch(IOException _e)
{
! manageException(_e, _initAnalyze(_i));
}
return r;
--- 91,95 ----
catch(IOException _e)
{
! manageException(_e, analyze_[_i]);
}
return r;
Index: TrReaderWriterSimpleAbstract.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/tr/TrReaderWriterSimpleAbstract.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TrReaderWriterSimpleAbstract.java 11 Apr 2003 16:09:23 -0000 1.2
--- TrReaderWriterSimpleAbstract.java 17 Apr 2003 17:26:26 -0000 1.3
***************
*** 20,35 ****
{
! protected DodicoAnalyze analyze_;
!
! protected DodicoAnalyze _initAnalyze()
{
! if (analyze_ == null)
! analyze_ = new DodicoAnalyze();
! return analyze_;
}
public void razAnalyzes()
{
- if (analyze_ != null)
analyze_.clear();
}
--- 20,33 ----
{
! protected DodicoAnalyze.Editor analyze_;
!
! public TrReaderWriterSimpleAbstract()
{
! analyze_=new DodicoAnalyze.Editor();
}
+
public void razAnalyzes()
{
analyze_.clear();
}
***************
*** 40,55 ****
public final DodicoAnalyze getAnalyze()
{
! return analyze_;
}
public final DodicoAnalyze[] getAnalyzes()
{
! return analyze_ == null ? null : new DodicoAnalyze[] { analyze_ };
}
public boolean analyzeContainsError()
{
- if (analyze_ == null)
- return false;
return analyze_.containsErrors();
}
--- 38,51 ----
public final DodicoAnalyze getAnalyze()
{
! return analyze_.toAnalyze();
}
public final DodicoAnalyze[] getAnalyzes()
{
! return new DodicoAnalyze[] { getAnalyze() };
}
public boolean analyzeContainsError()
{
return analyze_.containsErrors();
}
Index: TrWriterCharSimpleAbstract.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/tr/TrWriterCharSimpleAbstract.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TrWriterCharSimpleAbstract.java 11 Apr 2003 16:09:24 -0000 1.2
--- TrWriterCharSimpleAbstract.java 17 Apr 2003 17:26:26 -0000 1.3
***************
*** 21,27 ****
* @version $Id$
*/
! public abstract class TrWriterCharSimpleAbstract
! extends TrReaderWriterSimpleAbstract
! implements TrWriterInterface
{
--- 21,25 ----
* @version $Id$
*/
! public abstract class TrWriterCharSimpleAbstract extends TrReaderWriterSimpleAbstract implements TrWriterInterface
{
***************
*** 34,40 ****
}
! public void writelnTo(Writer _out, StringBuffer _b) throws IOException
{
! DodicoLib.writeTo(_out, _b.append(lineSep_));
}
--- 32,43 ----
}
! public void writeln(StringBuffer _b) throws IOException
{
! write(_b.append(lineSep_));
! }
!
! public void write(StringBuffer _b) throws IOException
! {
! DodicoLib.writeTo(out_, _b);
}
***************
*** 59,73 ****
public final void setOut(File _f)
{
! FileWriter out=null;
try
{
! out=new FileWriter(_f);
}
! catch(IOException _e)
{
! manageException(_e, _initAnalyze());
}
! if(out!=null) setOut(out);
!
}
--- 62,77 ----
public final void setOut(File _f)
{
! FileWriter out = null;
try
{
! out = new FileWriter(_f);
}
! catch (IOException _e)
{
! manageException(_e, analyze_);
}
! if (out != null)
! setOut(out);
!
}
***************
*** 81,91 ****
out_ = _f;
}
!
public final IOException[] close()
{
! IOException e= DodicoLib.close(out_);
! return (e==null?null:new IOException[] {e});
}
-
}
--- 85,94 ----
out_ = _f;
}
!
public final IOException[] close()
{
! IOException e = DodicoLib.close(out_);
! return (e == null ? null : new IOException[] { e });
}
}
|
|
From: <de...@us...> - 2003-04-17 17:26:29
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/telemac
In directory sc8-pr-cvs1:/tmp/cvs-serv1427/org/fudaa/dodico/test/telemac
Modified Files:
TestCL.java TestSerafin.java
Added Files:
TestLiquide.java liquide.liq
Log Message:
Mise a jour diverses
--- NEW FILE: TestLiquide.java ---
/*
* @file TestLiquide.java
* @creation 15 avr. 2003
* @modification $Date: 2003/04/17 17:26:24 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.test.telemac;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.corba.tr.LTrVariable;
import org.fudaa.dodico.corba.tr.STrEvolutionFrontiereLiquide;
import org.fudaa.dodico.telemac.io.TelemacLiquideFileFormat;
import org.fudaa.dodico.telemac.io.TelemacLiquideInterface;
import org.fudaa.dodico.telemac.io.TelemacLiquideReader;
import org.fudaa.dodico.test.TestIO;
import org.fudaa.dodico.tr.TrFileReadView;
/**
* @author deniger
* @version $Id: TestLiquide.java,v 1.1 2003/04/17 17:26:24 deniger Exp $
*/
public class TestLiquide extends TestIO
{
public TestLiquide()
{
super("liquide.liq", TelemacLiquideFileFormat.getInstance());
}
/**
* @see org.fudaa.dodico.test.TestIO#_interfaceTest(org.fudaa.dodico.tr.TrFileReadView)
*/
public void _interfaceTest(TrFileReadView _r)
{
TelemacLiquideInterface inter = (TelemacLiquideInterface) _r.getSource();
assertNotNull(inter);
assertEquals(2, inter.getNbEvolutionsFrontiereLiquide());
STrEvolutionFrontiereLiquide[] fs = inter.getEvolutionsFrontieresLiquides();
STrEvolutionFrontiereLiquide fsi = fs[0];
assertEquals(2, fsi.frontiereIndex);
assertEquals("m3/s", fsi.unite);
assertEquals(LTrVariable.DEBIT, fsi.variable);
assertEquals(5, fsi.t.length);
assertEquals(0, fsi.t[0], eps_);
assertEquals(1800, fsi.t[1], eps_);
assertEquals(50000, fsi.t[2], eps_);
assertEquals(50002, fsi.t[3], eps_);
assertEquals(50003, fsi.t[4], eps_);
assertEquals(5, fsi.valeurs.length);
assertEquals(0, fsi.valeurs[0], eps_);
assertEquals(500, fsi.valeurs[1], eps_);
assertEquals(501, fsi.valeurs[2], eps_);
assertEquals(503, fsi.valeurs[4], eps_);
fsi = fs[1];
assertEquals(1, fsi.frontiereIndex);
assertEquals("m", fsi.unite);
assertEquals(LTrVariable.COTE_EAU, fsi.variable);
assertEquals(5, fsi.t.length);
assertEquals(0, fsi.t[0], eps_);
assertEquals(1800, fsi.t[1], eps_);
assertEquals(50000, fsi.t[2], eps_);
assertEquals(5, fsi.valeurs.length);
assertEquals(263, fsi.valeurs[0], eps_);
assertEquals(264, fsi.valeurs[1], eps_);
assertEquals(265, fsi.valeurs[2], eps_);
assertEquals(263, fsi.valeurs[4], eps_);
}
public static void main(String[] args)
{
HashMap arg = DodicoLib.parseArgs(args);
String fileName = (String) arg.get("-f");
if (fileName == null)
fileName = (String) arg.get("-file");
if (fileName == null)
{
System.err.println("Usage: -file=monFichier.mail");
return;
}
File f = new File(fileName);
if (!f.exists())
{
System.err.println("Fichier inexistant " + f.getAbsolutePath());
return;
}
TelemacLiquideReader r = new TelemacLiquideReader();
r.setIn(f);
r.read();
IOException[] e = r.close();
if (e != null)
System.err.println("impossible de fermer le flux");
if (r.getAnalyze() != null)
{
r.getAnalyze().printResume();
}
STrEvolutionFrontiereLiquide[] fs = r.getTelemacLiquideInterface().getEvolutionsFrontieresLiquides();
if (fs == null)
return;
for (int i = 0; i < fs.length; i++)
{
DodicoLib.printFields(fs[i], true);
}
}
}
--- NEW FILE: liquide.liq ---
(This appears to be a binary file; contents omitted.)
Index: TestCL.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/telemac/TestCL.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TestCL.java 1 Apr 2003 13:52:07 -0000 1.2
--- TestCL.java 17 Apr 2003 17:26:23 -0000 1.3
***************
*** 21,25 ****
import org.fudaa.dodico.telemac.io.TelemacCLFileFormat;
import org.fudaa.dodico.telemac.io.TelemacCLInterface;
- import org.fudaa.dodico.telemac.io.TelemacCLLine;
import org.fudaa.dodico.telemac.io.TelemacCLReader;
import org.fudaa.dodico.telemac.io.TelemacCLWriter;
--- 21,24 ----
***************
*** 204,208 ****
assertEquals(cls.v, 300 + i, eps_);
}
! assertEquals(cls.frottement, 400 + i, eps_);
assertEquals(cls.traceur, 500 + i, eps_);
assertEquals(cls.tCoeffa, 600 + i, eps_);
--- 203,207 ----
assertEquals(cls.v, 300 + i, eps_);
}
! assertEquals(cls.strickler, 400 + i, eps_);
assertEquals(cls.traceur, 500 + i, eps_);
assertEquals(cls.tCoeffa, 600 + i, eps_);
Index: TestSerafin.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/telemac/TestSerafin.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TestSerafin.java 1 Apr 2003 13:52:07 -0000 1.5
--- TestSerafin.java 17 Apr 2003 17:26:24 -0000 1.6
***************
*** 10,23 ****
import java.io.File;
import java.io.FileInputStream;
- import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
- import java.io.OutputStream;
- import java.net.URL;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.corba.geometrie.LTypeElement;
import org.fudaa.dodico.corba.geometrie.SMaillageIndex;
- import org.fudaa.dodico.fortran.NativeBinaryInputStream;
import org.fudaa.dodico.mnt.MNTSemis;
import org.fudaa.dodico.mnt.MNTZone;
--- 10,19 ----
***************
*** 26,30 ****
import org.fudaa.dodico.telemac.io.SerafinMNTAdapter;
import org.fudaa.dodico.telemac.io.SerafinReader;
- import org.fudaa.dodico.telemac.io.SerafinWriter;
import org.fudaa.dodico.test.TestIO;
import org.fudaa.dodico.tr.TrFileReadView;
--- 22,25 ----
|
|
From: <de...@us...> - 2003-04-17 17:26:23
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/telemac
In directory sc8-pr-cvs1:/tmp/cvs-serv1427/org/fudaa/dodico/telemac
Added Files:
TelemacCasProcess.java TelemacDicoManager.java
TelemacProjet.java
Log Message:
Mise a jour diverses
--- NEW FILE: TelemacCasProcess.java ---
/*
* @file TelemacCasProcess.java
* @creation 16 avr. 2003
* @modification $Date: 2003/04/17 17:26:19 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.telemac;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.commun.ProgressionInterface;
import org.fudaa.dodico.telemac.io.TelemacCasFileFormat;
import org.fudaa.dodico.tr.TrFileFormat;
import org.fudaa.dodico.tr.TrReaderInterface;
/**
* @author deniger
* @version $Id: TelemacCasProcess.java,v 1.1 2003/04/17 17:26:19 deniger Exp $
*/
public class TelemacCasProcess
{
ProgressionInterface progress_;
boolean error_;
public TelemacCasProcess()
{
}
public TelemacProjet createProjet(File _f, TelemacCasFileFormat ft_)
{
TelemacProjet r = new TelemacProjet();
r.setCas(ft_, _f, this);
if (error_)
return null;
r.loadAll(this);
return r;
}
// protected TelemacCasInterface readCas(TelemacCasFileFormat _ft, File _f, TelemacProjet.FileLoadState _fd)
// {
// TelemacCasReader r = (TelemacCasReader) _ft.createReader();
// IOException[] e = _ft.read(_f, r, progress_);
// manageException(e, r, _f);
// _fd.setAnalyze(r.getAnalyze());
// _fd.setFormat(_ft);
// _fd.setTimeLoaded(System.currentTimeMillis());
// _fd.setAbsolutePath(DodicoLib.getConanicalPath(_f));
// return r.getTelemacCasInterface();
// }
public void error(String _s)
{
error_ = true;
System.out.println(_s);
}
public void maj(TelemacProjet.TrSpecialEntiteFile _e)
{
TelemacProjet.FileLoadState l=_e.getLoadState();
if(l.containsErrors())
{
l.getAnalyze().printResume();
}
}
protected Object read(String _baseDir, String _file, TrFileFormat _fileFormat, TelemacProjet.FileLoadState _f)
{
File f = DodicoLib.getAbsolutePath(_baseDir, _file);
return read(f, _fileFormat, _f);
}
protected Object read(File _file, TrFileFormat _fileFormat, TelemacProjet.FileLoadState _fileDesc)
{
TrReaderInterface reader = _fileFormat.createReader();
IOException[] e = _fileFormat.read(_file, reader, progress_);
manageException(e, reader, _file);
updateFileDescription(reader, _file, _fileDesc);
return reader.getInterface();
}
protected void manageException(IOException[] e, TrReaderInterface _i, File _f)
{
if (e != null)
{
System.out.println("impossible de fermer " + _f);
e[0].printStackTrace();
}
}
protected static TelemacProjet.FileLoadState createFor(TrReaderInterface _reader, File _f)
{
TelemacProjet.FileLoadState r = new TelemacProjet.FileLoadState();
updateFileDescription(_reader, _f, r);
return r;
}
protected static void updateFileDescription(TrReaderInterface _reader, File _f, TelemacProjet.FileLoadState _r)
{
_r.setAnalyze(_reader.getAnalyze());
_r.setFormat(_reader.getFileFormat());
_r.setAbsolutePath(DodicoLib.getConanicalPath(_f));
_r.setTimeLoaded(System.currentTimeMillis());
}
public static void main(String[] args)
{
HashMap arg = DodicoLib.parseArgs(args);
String fileName = (String) arg.get("-file");
File f = new File(fileName);
TelemacCasProcess p = new TelemacCasProcess();
p.createProjet(f, TelemacCasFileFormat.getInstance());
}
}
--- NEW FILE: TelemacDicoManager.java ---
/*
* @file TelemacDicoManager.java
* @creation 14 avr. 2003
* @modification $Date: 2003/04/17 17:26:20 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.telemac;
import org.fudaa.dodico.telemac.dico.TelemacDicoInterface;
import org.fudaa.dodico.telemac.dico.TelemacDicov5p2;
/**
* @author deniger
* @version $Id: TelemacDicoManager.java,v 1.1 2003/04/17 17:26:20 deniger Exp $
*/
public class TelemacDicoManager
{
protected TelemacDicoInterface[] defautDicos_;
private final static TelemacDicoManager INSTANCE=new TelemacDicoManager();
public final static TelemacDicoManager getINSTANCE()
{
return INSTANCE;
}
protected TelemacDicoManager()
{
defautDicos_=new TelemacDicoInterface[1];
defautDicos_[0]=new TelemacDicov5p2();
}
public final TelemacDicoInterface getDefaut()
{
return defautDicos_[0];
}
}
--- NEW FILE: TelemacProjet.java ---
/*
* @file TelemacProjet.java
* @creation 16 avr. 2003
* @modification $Date: 2003/04/17 17:26:20 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.telemac;
import java.io.File;
import java.util.Hashtable;
import org.fudaa.dodico.commun.DodicoAnalyze;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.corba.tr.LTrCodeCalcul;
import org.fudaa.dodico.corba.tr.STrProjetH2d;
import org.fudaa.dodico.telemac.io.SerafinFileFormat;
import org.fudaa.dodico.telemac.io.SerafinInterface;
import org.fudaa.dodico.telemac.io.TelemacCLInterface;
import org.fudaa.dodico.telemac.io.TelemacCasFileFormat;
import org.fudaa.dodico.telemac.io.TelemacCasInterface;
import org.fudaa.dodico.telemac.io.TelemacLiquideInterface;
import org.fudaa.dodico.tr.TrDicoEntite;
import org.fudaa.dodico.tr.TrFileFormat;
import org.fudaa.dodico.tr.TrLib;
import org.fudaa.dodico.tr.TrProjetH2d;
/**
* @author deniger
* @version $Id: TelemacProjet.java,v 1.1 2003/04/17 17:26:20 deniger Exp $
*/
public class TelemacProjet extends TrProjetH2d
{
STrProjetH2d projet_;
private String dirBase_;
private TelemacCasFileFormat ft_;
/**
* Entites-valeurs de ce projet.
*/
private Hashtable keys_;
/**
* contient l'id et la description des fichies speciaux de ce projet
*/
private Hashtable idSpecialEntiteFiles_;
public TelemacProjet()
{
}
private void initProjet(TelemacCasFileFormat _ft)
{
projet_ = new STrProjetH2d();
projet_.codeCalcul = LTrCodeCalcul.TELEMAC;
projet_.version = _ft.getVersion();
ft_ = _ft;
idSpecialEntiteFiles_ = new Hashtable(ft_.getNbSpecialFiles());
}
protected void addSpecialEntiteFiles(String _ID,TrSpecialEntiteFile _ent)
{
if(idSpecialEntiteFiles_.containsKey(_ID))
{
System.err.println("ce fichier special est deja ajoute");
}
idSpecialEntiteFiles_.put(_ID, _ent);
}
public void setCas(TelemacCasFileFormat _ft, File _fichierCas, TelemacCasProcess _p)
{
initProjet(_ft);
dirBase_ = DodicoLib.getConanicalPath(_fichierCas.getParentFile());
System.out.println(dirBase_);
TrDicoEntite fichierPrincEntite=ft_.getSpecialFiles(FICHIER_PRINCIPAL);
if ( fichierPrincEntite== null)
{
_p.error("La definition du fichier principal n'a pas été trouvée");
return;
}
TrSpecialEntiteFile specialEntite = new TrSpecialEntiteFile(fichierPrincEntite,_fichierCas.getName());
FileLoadState fd=new FileLoadState();
TelemacCasInterface inter = (TelemacCasInterface) _p.read(_fichierCas, _ft, fd);
if((fd.containsErrors()) )
{
_p.error("Le fichier cas est invalide");
}
else
{
specialEntite.setLoadState(fd);
addSpecialEntiteFiles(FICHIER_PRINCIPAL, specialEntite);
keys_ = inter.getInputs();
keys_.remove(fichierPrincEntite);
//Les entites representant des fichiers present dans le fichier cas
TrDicoEntite[] entFichiers = ft_.getDico().getFichierEntitesFor(keys_);
int n = entFichiers.length - 1;
TrDicoEntite e;
for (int i = n; i >= 0; i--)
{
e = entFichiers[i];
//si fichier special
if (ft_.isSpecialFiles(e))
{
String s = ft_.getSpecialFilesID(e);
//si ce n'est pas le principal, on l'ajoute
if (!s.equals(FICHIER_PRINCIPAL))
{
addSpecialEntiteFiles(s, new TrSpecialEntiteFile(e,(String)keys_.get(e)));
}
}
}
}
}
public boolean loadAll(TelemacCasProcess _p)
{
return loadGeometrie(_p) && loadConditionsLimite(_p) && loadConditionsLimiteLiquide(_p);
}
protected TrSpecialEntiteFile getSpecialFileEntite(String _ID)
{
return (TrSpecialEntiteFile) idSpecialEntiteFiles_.get(_ID);
}
protected String getEntiteValue(TrDicoEntite _e)
{
return (String) keys_.get(_e);
}
public boolean loadGeometrie(TelemacCasProcess _p)
{
SerafinFileFormat serafinft = ft_.getDefaultSerafinFormat();
SerafinInterface sInter = (SerafinInterface) read(_p, FICHIER_GEOMETRIE, serafinft, true);
if(sInter==null) return false;
String fond = ft_.getDefaultSerafinFormat().getVariableFond();
int numVariable = DodicoLib.findObject(sInter.getVariables(), fond);
if (numVariable < 0)
{
//pour l'instant
_p.error("bathymétrie non trouvée variable FOND ou es-tu ?");
return false;
}
int nbPasTemps = sInter.getNbPasDeTemps();
if (nbPasTemps > 1)
{
System.out.println("la variable à t=0 sera prise");
}
double[] fondValues = sInter.getDonnees(0, numVariable);
projet_.maillage = sInter.getMaillage();
return TrLib.setBathymetrie(projet_.maillage, fondValues);
}
public boolean loadConditionsLimite(TelemacCasProcess _p)
{
TelemacCLInterface inter = (TelemacCLInterface) read(_p, FICHIER_CL, ft_.getDefaultTelemacCLFormat(), true);
if (inter == null)
return false;
projet_.conditionsLimites = inter.getLines();
return true;
}
public boolean loadConditionsLimiteLiquide(TelemacCasProcess _p)
{
TelemacLiquideInterface inter = (TelemacLiquideInterface) read(_p, FICHIER_CL_LIQUIDE, ft_.getDefaultTelemacLiquideFormat(), false);
if (inter == null)
return false;
projet_.evolutionFrontieresLiquides = inter.getEvolutionsFrontieresLiquides();
return true;
}
public boolean loadFond(TelemacCasProcess _p)
{
_p.error("non supporté pour l'instant");
return false;
}
private Object read(TelemacCasProcess _p, String _specialFileID, TrFileFormat _fileFormat, boolean _isVideError)
{
TrDicoEntite ent = ft_.getSpecialFiles(_specialFileID);
if (ent == null)
{
if (_isVideError)
{
_p.error("ce n'est pas une entree valide du fichier dico !");
}
return null;
}
TrSpecialEntiteFile specialFileEntite = getSpecialFileEntite(_specialFileID);
if (specialFileEntite== null)
{
if (_isVideError)
{
_p.error(ent.getNom() + " non spécifié !");
}
return null;
}
String value = getEntiteValue(ent);
//ne devrait jamais arriver
if (value == null)
{
if (_isVideError)
{
_p.error(ent.getNom() + " spécifié mais vide !!!");
}
return null;
}
FileLoadState fileLoad=new FileLoadState();
Object r = _p.read(dirBase_, value, _fileFormat, fileLoad);
specialFileEntite.setLoadState(fileLoad);
if (fileLoad.containsErrors())
{
_p.error(ent.getNom() + " fichier invalide");
_p.maj(specialFileEntite);
return null;
}
return r;
}
public static class TrSpecialEntiteFile
{
private TrDicoEntite entite_;
private String entiteValue_;
private FileLoadState loadState_;
public TrSpecialEntiteFile(TrDicoEntite _entite, String _entiteValue)
{
entite_ = _entite;
entiteValue_ = _entiteValue;
}
public void setLoadState(FileLoadState _fls)
{
loadState_ = _fls;
}
public FileLoadState getLoadState()
{
return loadState_;
}
}
public static class FileLoadState
{
private DodicoAnalyze analyze_;
private long timeLoaded_;
private TrFileFormat format_;
private String absolutePath_;
/**
* @return
*/
public DodicoAnalyze getAnalyze()
{
return analyze_;
}
public boolean containsErrors()
{
return (analyze_!=null) && (analyze_.containsErrors());
}
/**
* @return
*/
public TrFileFormat getFormat()
{
return format_;
}
/**
* @return
*/
public long getTimeLoaded()
{
return timeLoaded_;
}
/**
* @param _analyze
*/
public void setAnalyze(DodicoAnalyze _analyze)
{
analyze_ = _analyze;
}
/**
* @param _format
*/
public void setFormat(TrFileFormat _format)
{
format_ = _format;
}
/**
* @param _l
*/
public void setTimeLoaded(long _l)
{
timeLoaded_ = _l;
}
/**
* @return
*/
public String getAbsolutePath()
{
return absolutePath_;
}
/**
* @param _string
*/
public void setAbsolutePath(String _string)
{
absolutePath_ = _string;
}
}
/**
* @return
*/
public String getDirBase()
{
return dirBase_;
}
/**
* @param _string
*/
public void setDirBase(String _string)
{
dirBase_ = _string;
}
}
|
|
From: <de...@us...> - 2003-04-17 17:11:13
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/idl/code
In directory sc8-pr-cvs1:/tmp/cvs-serv25021
Modified Files:
tr.idl
Log Message:
Maj
Index: tr.idl
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/idl/code/tr.idl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** tr.idl 1 Apr 2003 08:22:39 -0000 1.1
--- tr.idl 17 Apr 2003 17:11:07 -0000 1.2
***************
*** 20,26 ****
* n'utilise que des interfaces ( couteuses en memoire).
* Convention pour les codes ( champs code ou terminant par Code).
! * code 0 : non initialise
! * code 1 : libre
! * code 2 : imposée
* negatif : transitoire. Pour reflux,indique le numero de la courbe correspondante.
*
--- 20,27 ----
* n'utilise que des interfaces ( couteuses en memoire).
* Convention pour les codes ( champs code ou terminant par Code).
! * code non specifie INCONNU
! * code libre LIBRE
! * code permanent PERMANENT
! * code transitoire TRANS_"NOMDELACOURBE"
* negatif : transitoire. Pour reflux,indique le numero de la courbe correspondante.
*
***************
*** 70,73 ****
--- 71,83 ----
};
+ enum LTrVariable
+ {
+ DEBIT,
+ COTE_EAU,
+ VITESSE_U,
+ VITESSE_V,
+ TRACEUR
+ };
+
***************
*** 81,100 ****
{
LTrTypeBord typeBord;
! entier uCode;
reel u;
! entier vCode;
reel v;
! entier hCode;
reel h;
//Traceur (telemac)
! entier traceurCode;
reel traceur;
//Relfux : un frottement peut etre libre,permanent ou transitoire.
! entier frottementCode;
! reel frottement;
reel tCoeffa;
reel tCoeffb;
//debit lineique
! entier qCode;
reel q;
//la normale
--- 91,110 ----
{
LTrTypeBord typeBord;
! chaine uCode;
reel u;
! chaine vCode;
reel v;
! chaine hCode;
reel h;
//Traceur (telemac)
! chaine traceurCode;
reel traceur;
//Relfux : un frottement peut etre libre,permanent ou transitoire.
! chaine stricklerCode;
! reel strickler;
reel tCoeffa;
reel tCoeffb;
//debit lineique
! chaine qCode;
reel q;
//la normale
***************
*** 152,158 ****
{
entier indexElement;
! //Ce chiffre sera negatif et respecte la specification generale ( cf commentaire
//du module)
! entier indexCode;
};
typedef sequence<STrProprieteElementaireTransitoire> VSTrProprieteElementaireTransitoire;
--- 162,168 ----
{
entier indexElement;
! //respecte la specification generale ( cf commentaire
//du module)
! chaine indexCode;
};
typedef sequence<STrProprieteElementaireTransitoire> VSTrProprieteElementaireTransitoire;
***************
*** 181,189 ****
{
chaine nom;
! vreel x;
! vreel y;
};
typedef sequence<STrEvolution> VSTrEvolution;
struct STrGroupeTemps
--- 191,209 ----
{
chaine nom;
! vreel t;
! vreel valeurs;
};
typedef sequence<STrEvolution> VSTrEvolution;
+ struct STrEvolutionFrontiereLiquide
+ {
+ LTrVariable variable;
+ entier frontiereIndex;
+ chaine unite;
+ vreel t;
+ vreel valeurs;
+ };
+ typedef sequence<STrEvolutionFrontiereLiquide> VSTrEvolutionFrontiereLiquide;
+
struct STrGroupeTemps
***************
*** 222,228 ****
//les conditions limites.
VSTrConditionLimite conditionsLimites;
//La condition limite par defaut. Elle ne devrait pas etre
! //transitoire avoir ...
! STrConditionLimite conditionLimiteParDefaut;
//Si true, les normales ont ete definies.
booleen normalesDefinies;
--- 242,253 ----
//les conditions limites.
VSTrConditionLimite conditionsLimites;
+
+ //telemac permet de definir une evolution transitoire pour les frontieres liquides.
+ VSTrEvolutionFrontiereLiquide evolutionFrontieresLiquides;
+
//La condition limite par defaut. Elle ne devrait pas etre
! //transitoire a voir ...
!
!
//Si true, les normales ont ete definies.
booleen normalesDefinies;
***************
*** 230,234 ****
//les proprietes par elements (reflux uniquement).
//3 proprietes seront specifiques reflux
! //RUGOSITE
//VISCOSITE
//PERTE_CHARGE
--- 255,259 ----
//les proprietes par elements (reflux uniquement).
//3 proprietes seront specifiques reflux
! //RUGOSITE 1/strickler
//VISCOSITE
//PERTE_CHARGE
|
|
From: <de...@us...> - 2003-04-11 16:35:44
|
Update of /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/graphe In directory sc8-pr-cvs1:/tmp/cvs-serv32220/org/fudaa/ebli/graphe Modified Files: BGraphe.java Log Message: MAj Index: BGraphe.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/graphe/BGraphe.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BGraphe.java 18 Mar 2003 16:17:40 -0000 1.2 --- BGraphe.java 11 Apr 2003 16:35:39 -0000 1.3 *************** *** 10,25 **** package org.fudaa.ebli.graphe; ! import com.memoire.bu.*; import org.fudaa.ebli.impression.EbliPrinter; ! import java.awt.*; ! import java.awt.geom.Rectangle2D; ! import java.awt.event.*; ! import java.awt.print.*; ! import java.io.*; ! import java.text.*; ! import java.util.Vector; ! import javax.swing.*; /** --- 10,41 ---- package org.fudaa.ebli.graphe; ! import java.awt.Color; ! import java.awt.Dimension; ! import java.awt.Font; ! import java.awt.Graphics; ! import java.awt.Graphics2D; ! import java.awt.Image; ! import java.awt.PrintJob; ! import java.awt.Rectangle; ! import java.awt.Shape; ! import java.awt.Toolkit; ! import java.awt.event.ComponentEvent; ! import java.awt.event.ComponentListener; ! import java.awt.print.PageFormat; ! import java.awt.print.Printable; ! import java.io.IOException; ! import java.io.InputStream; ! import java.text.NumberFormat; ! import java.util.Vector; ! ! import javax.swing.JComponent; ! import javax.swing.JFrame; import org.fudaa.ebli.impression.EbliPrinter; ! import com.memoire.bu.BuInformationsDocument; ! import com.memoire.bu.BuInformationsSoftware; ! import com.memoire.bu.BuPrinter; ! import com.memoire.bu.BuResource; /** |
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io
In directory sc8-pr-cvs1:/tmp/cvs-serv18427/telemac/io
Modified Files:
SerafinExtract.java SerafinReader.java SerafinWriter.java
TelemacCLReader.java
Log Message:
Maj des imports
Index: SerafinExtract.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/SerafinExtract.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SerafinExtract.java 1 Apr 2003 13:45:44 -0000 1.1
--- SerafinExtract.java 11 Apr 2003 16:09:19 -0000 1.2
***************
*** 10,17 ****
import org.fudaa.dodico.commun.DodicoLib;
- import org.fudaa.dodico.corba.tr.STrConditionLimite;
import org.fudaa.dodico.corba.tr.STrProprieteNodale;
import org.fudaa.dodico.corba.tr.STrProprieteNodaleValeur;
- import org.fudaa.dodico.tr.TrProjetH2d;
/**
--- 10,15 ----
Index: SerafinReader.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/SerafinReader.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SerafinReader.java 1 Apr 2003 13:45:44 -0000 1.2
--- SerafinReader.java 11 Apr 2003 16:09:20 -0000 1.3
***************
*** 252,256 ****
inter_.setIparam(iparam);
//Idate
! if (format_.isIdateDefini(iparam))
{
in.readRecord();
--- 252,256 ----
inter_.setIparam(iparam);
//Idate
! if (SerafinKeyWord.isIdateDefini(iparam))
{
in.readRecord();
***************
*** 362,366 ****
* (sauf le premier car deja lus par la methode in.readRecord())
*/
! if (format_.isFormatEnColonne(iparam))
{
--- 362,366 ----
* (sauf le premier car deja lus par la methode in.readRecord())
*/
! if (SerafinKeyWord.isFormatEnColonne(iparam))
{
***************
*** 402,406 ****
for (int i = 0; i < nbv1; i++)
{
! if (format_.isFormatEnColonne(iparam))
in.readRecord();
donnees = new double[npoin1];
--- 402,406 ----
for (int i = 0; i < nbv1; i++)
{
! if (SerafinKeyWord.isFormatEnColonne(iparam))
in.readRecord();
donnees = new double[npoin1];
Index: SerafinWriter.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/SerafinWriter.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SerafinWriter.java 1 Apr 2003 13:45:44 -0000 1.2
--- SerafinWriter.java 11 Apr 2003 16:09:21 -0000 1.3
***************
*** 10,13 ****
--- 10,14 ----
import java.io.File;
import java.io.FileNotFoundException;
+ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
***************
*** 24,29 ****
import org.fudaa.dodico.tr.TrWriterInterface;
- import java.io.FileOutputStream;
-
/**
* Classe permettant d'ecrire un fichier serafin (utilise un buffer pour
--- 25,28 ----
***************
*** 143,148 ****
_initAnalyze().addTranslateError(
"Le tableau des parametres est invalide");
! boolean isIdateDefini = format_.isIdateDefini(iparam);
! boolean isFormatColonne = format_.isFormatEnColonne(iparam);
int nbPasTemps = donnees_.getNbPasDeTemps();
if (nbPasTemps <= 0)
--- 142,147 ----
_initAnalyze().addTranslateError(
"Le tableau des parametres est invalide");
! boolean isIdateDefini = SerafinKeyWord.isIdateDefini(iparam);
! boolean isFormatColonne = SerafinKeyWord.isFormatEnColonne(iparam);
int nbPasTemps = donnees_.getNbPasDeTemps();
if (nbPasTemps <= 0)
Index: TelemacCLReader.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/TelemacCLReader.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TelemacCLReader.java 1 Apr 2003 13:45:44 -0000 1.2
--- TelemacCLReader.java 11 Apr 2003 16:09:21 -0000 1.3
***************
*** 21,26 ****
import org.fudaa.dodico.tr.TrReaderCharSimpleAbstract;
- import com.memoire.fu.FuVectorint;
-
/**
*
--- 21,24 ----
|
|
From: <de...@us...> - 2003-04-11 16:16:19
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/sipor In directory sc8-pr-cvs1:/tmp/cvs-serv18427/sipor Modified Files: BTest.java DCalculSipor.java DParametresSipor.java DResultatsSipor.java ServeurSipor.java TestSiporClient.java testResultatsSipor.java testSipor.java Log Message: Maj des imports Index: BTest.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/sipor/BTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Index: DCalculSipor.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/sipor/DCalculSipor.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Index: DParametresSipor.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/sipor/DParametresSipor.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Index: DResultatsSipor.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/sipor/DResultatsSipor.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Index: ServeurSipor.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/sipor/ServeurSipor.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Index: TestSiporClient.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/sipor/TestSiporClient.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Index: testResultatsSipor.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/sipor/testResultatsSipor.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Index: testSipor.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/sipor/testSipor.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 |
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/tr
In directory sc8-pr-cvs1:/tmp/cvs-serv18427/tr
Modified Files:
TrFileFormat.java TrReaderWriterAbstract.java
TrReaderWriterSimpleAbstract.java
TrWriterCharSimpleAbstract.java
Log Message:
Maj des imports
Index: TrFileFormat.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/tr/TrFileFormat.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TrFileFormat.java 1 Apr 2003 13:47:16 -0000 1.2
--- TrFileFormat.java 11 Apr 2003 16:09:22 -0000 1.3
***************
*** 10,15 ****
import java.io.File;
- import java.io.FileNotFoundException;
- import java.io.FileReader;
import java.io.IOException;
--- 10,13 ----
***************
*** 19,23 ****
/**
- *
* @author deniger
* @version $Id$
--- 17,20 ----
Index: TrReaderWriterAbstract.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/tr/TrReaderWriterAbstract.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TrReaderWriterAbstract.java 1 Apr 2003 13:47:16 -0000 1.2
--- TrReaderWriterAbstract.java 11 Apr 2003 16:09:23 -0000 1.3
***************
*** 25,29 ****
{
protected ProgressionInterface progressReceiver_;
!
/**
* Returns the progressReceiver.
--- 25,29 ----
{
protected ProgressionInterface progressReceiver_;
!
/**
* Returns the progressReceiver.
***************
*** 34,40 ****
return progressReceiver_;
} /**
! * Sets the progressReceiver.
! * @param progressReceiver The progressReceiver to set
! */
public final void setProgressReceiver(ProgressionInterface progressReceiver)
{
--- 34,40 ----
return progressReceiver_;
} /**
! * Sets the progressReceiver.
! * @param progressReceiver The progressReceiver to set
! */
public final void setProgressReceiver(ProgressionInterface progressReceiver)
{
***************
*** 42,70 ****
//if(progressReceiver!=null) afficheAvance_=true;
}
!
! public void manageException(FileNotFoundException _e,DodicoAnalyze _analyze)
{
! _analyze.addTranslateError("Fichier non trouvé");
! _analyze.addInfo(_e.getMessage());
! if(DodicoLib.DEBUG) _e.printStackTrace();
}
!
! public void manageException(IOException _e,DodicoAnalyze _analyze)
{
! _analyze.addTranslateError("Erreur d'entrée/sortie");
! _analyze.addInfo(_e.getMessage());
! if(DodicoLib.DEBUG) _e.printStackTrace();
}
!
! public void manageException(NumberFormatException _e,DodicoAnalyze _analyze,FortranReader _l)
{
! _analyze.addError("Format du champ incorrect",_l);
! _analyze.addInfo(_e.getMessage());
! if(DodicoLib.DEBUG) _e.printStackTrace();
}
-
-
-
-
}
--- 42,89 ----
//if(progressReceiver!=null) afficheAvance_=true;
}
!
! public void manageException(FileNotFoundException _e, DodicoAnalyze _analyze)
{
! _analyze.addTranslateError("Fichier non trouvé");
! _analyze.addInfo(_e.getMessage());
! if (DodicoLib.DEBUG)
! _e.printStackTrace();
}
!
! public void manageException(IOException _e, DodicoAnalyze _analyze)
{
! _analyze.addTranslateError("Erreur d'entrée/sortie");
! _analyze.addInfo(_e.getMessage());
! if (DodicoLib.DEBUG)
! _e.printStackTrace();
}
!
! public void manageException(
! NumberFormatException _e,
! DodicoAnalyze _analyze,
! FortranReader _l)
{
! _analyze.addError("Format du champ incorrect", _l);
! _analyze.addInfo(_e.getMessage());
! if (DodicoLib.DEBUG)
! _e.printStackTrace();
! }
! public void manageException(
! IllegalArgumentException _e,
! DodicoAnalyze _analyze)
! {
! _analyze.addTranslateError("Erreur interne d'argument");
! _analyze.addInfo(_e.getMessage());
! if (DodicoLib.DEBUG)
! _e.printStackTrace();
! }
!
! public void manageException(Exception _e, DodicoAnalyze _analyze)
! {
! _analyze.addTranslateError("Erreur d'exécution");
! _analyze.addInfo(_e.getMessage());
! if (DodicoLib.DEBUG)
! _e.printStackTrace();
}
}
Index: TrReaderWriterSimpleAbstract.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/tr/TrReaderWriterSimpleAbstract.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TrReaderWriterSimpleAbstract.java 1 Apr 2003 13:47:16 -0000 1.1
--- TrReaderWriterSimpleAbstract.java 11 Apr 2003 16:09:23 -0000 1.2
***************
*** 9,19 ****
package org.fudaa.dodico.tr;
- import java.io.File;
- import java.io.FileNotFoundException;
- import java.io.FileReader;
-
import org.fudaa.dodico.commun.DodicoAnalyze;
- import org.fudaa.dodico.commun.DodicoLib;
- import org.fudaa.dodico.commun.ProgressionInterface;
/**
--- 9,13 ----
***************
*** 22,40 ****
* @version $Id$
*/
! public abstract class TrReaderWriterSimpleAbstract extends TrReaderWriterAbstract
{
-
protected DodicoAnalyze analyze_;
!
protected DodicoAnalyze _initAnalyze()
{
! if(analyze_==null) analyze_=new DodicoAnalyze();
return analyze_;
}
!
public void razAnalyzes()
{
! if(analyze_!=null) analyze_.clear();
}
--- 16,36 ----
* @version $Id$
*/
! public abstract class TrReaderWriterSimpleAbstract
! extends TrReaderWriterAbstract
{
protected DodicoAnalyze analyze_;
!
protected DodicoAnalyze _initAnalyze()
{
! if (analyze_ == null)
! analyze_ = new DodicoAnalyze();
return analyze_;
}
!
public void razAnalyzes()
{
! if (analyze_ != null)
! analyze_.clear();
}
***************
*** 44,57 ****
public final DodicoAnalyze getAnalyze()
{
! return analyze_;
}
public final DodicoAnalyze[] getAnalyzes()
{
! return analyze_==null?null:new DodicoAnalyze[]{analyze_};
}
-
-
-
}
--- 40,57 ----
public final DodicoAnalyze getAnalyze()
{
! return analyze_;
}
public final DodicoAnalyze[] getAnalyzes()
{
! return analyze_ == null ? null : new DodicoAnalyze[] { analyze_ };
! }
!
! public boolean analyzeContainsError()
! {
! if (analyze_ == null)
! return false;
! return analyze_.containsErrors();
}
}
Index: TrWriterCharSimpleAbstract.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/tr/TrWriterCharSimpleAbstract.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TrWriterCharSimpleAbstract.java 1 Apr 2003 13:47:16 -0000 1.1
--- TrWriterCharSimpleAbstract.java 11 Apr 2003 16:09:24 -0000 1.2
***************
*** 14,18 ****
import java.io.Writer;
- import org.fudaa.dodico.commun.DodicoAnalyze;
import org.fudaa.dodico.commun.DodicoLib;
--- 14,17 ----
***************
*** 88,91 ****
--- 87,91 ----
return (e==null?null:new IOException[] {e});
}
+
}
|