|
From: <de...@us...> - 2003-10-29 11:41:31
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/type
In directory sc8-pr-cvs1:/tmp/cvs-serv13994/h2d/type
Modified Files:
H2dBordType.java H2dClType.java H2dElementType.java
H2dFileFormatType.java H2dMethodeResolutionType.java
H2dProjetType.java H2dSchemaResolutionType.java
H2dVariableType.java
Log Message:
Ajout du pattern command pour annuler des operations
Index: H2dBordType.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/type/H2dBordType.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** H2dBordType.java 6 Oct 2003 07:43:04 -0000 1.5
--- H2dBordType.java 29 Oct 2003 11:41:27 -0000 1.6
***************
*** 1 ****
! /*
* @file H2dBordType.java
* @creation 26 juin 2003
* @modification $Date$
* @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.type;
import org.fudaa.dodico.h2d.H2dResource;
/**
* @author deniger
* @version $Id$
*/
public class H2dBordType extends H2dEnumType {
public static H2dBordType SOLIDE=
new H2dBordType(1, H2dResource.getS("Solide"), true);
public static H2dBordType SOLIDE_FROTTEMENT=
new H2dBordType(1, H2dResource.getS("Solide frottement"), true);
public static H2dBordType LIQUIDE=
new H2dBordType(2, H2dResource.getS("Liquide"));
public static H2dBordType LIQUIDE_VITESSES_IMPOSEES=
new H2dBordType(2, H2dResource.getS("Liquide vitesses imposées"));
public static H2dBordType LIQUIDE_HAUTEUR_VITESSES_IMPOSEES=
new H2dBordType(
2,
H2dResource.getS("Liquide hauteur et vitesses imposées"));
public static H2dBordType LIQUIDE_HAUTEUR_IMPOSEE=
new H2dBordType(2, H2dResource.getS("Liquide hauteur imposée"));
public static H2dBordType LIQUIDE_DEBIT_IMPOSE=
new H2dBordType(3, H2dResource.getS("Liquide débit imposé"));
public static H2dBordType LIQUIDE_ONDE_INCIDENCE=
new H2dBordType(4, H2dResource.getS("Liquide onde incidence"));
private boolean isLiquide_;
/**
*
*/
H2dBordType(int _id, String _nom) {
this(_id, _nom,false);
}
H2dBordType(int _id, String _nom, boolean _isSolide) {
super(_id, _nom);
isLiquide_= !_isSolide;
}
public boolean isLiquide() {
return isLiquide_;
}
public boolean equals(H2dBordType _t) {
return _t == null ? false : (id_ == _t.id_);
}
}
\ No newline at end of file
--- 1 ----
! /*
* @file H2dBordType.java
* @creation 26 juin 2003
* @modification $Date$
* @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.type;
import org.fudaa.dodico.h2d.H2dResource;
/**
* @author deniger
* @version $Id$
*/
public class H2dBordType extends H2dEnumType {
public static H2dBordType SOLIDE=
new H2dBordType(1, H2dResource.getS("Solide"), true);
public static H2dBordType SOLIDE_FROTTEMENT=
new H2dBordType(2, H2dResource.getS("Solide frottement"), true);
public static H2dBordType LIQUIDE=
new H2dBordType(3, H2dResource.getS("Liquide"));
public static H2dBordType LIQUIDE_VITESSES_IMPOSEES=
new H2dBordType(4, H2dResource.getS("Liquide vitesses imposées"));
public static H2dBordType LIQUIDE_HAUTEUR_VITESSES_IMPOSEES=
new H2dBordType(
2,
H2dResource.getS("Liquide hauteur et vitesses imposées"));
public static H2dBordType LIQUIDE_HAUTEUR_IMPOSEE=
new H2dBordType(5, H2dResource.getS("Liquide hauteur imposée"));
public static H2dBordType LIQUIDE_DEBIT_IMPOSE=
new H2dBordType(6, H2dResource.getS("Liquide débit imposé"));
public static H2dBordType LIQUIDE_ONDE_INCIDENCE=
new H2dBordType(7, H2dResource.getS("Liquide onde incidence"));
private boolean isLiquide_;
/**
*
*/
H2dBordType(int _id, String _nom) {
this(_id, _nom,false);
}
H2dBordType(int _id, String _nom, boolean _isSolide) {
super(_id, _nom);
isLiquide_= !_isSolide;
}
public boolean isLiquide() {
return isLiquide_;
}
public boolean isSolide() {
return !isLiquide_;
}
public boolean equals(H2dBordType _t) {
return _t == null ? false : (id_ == _t.id_);
}
}
\ No newline at end of file
Index: H2dClType.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/type/H2dClType.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** H2dClType.java 23 Sep 2003 19:38:22 -0000 1.2
--- H2dClType.java 29 Oct 2003 11:41:27 -0000 1.3
***************
*** 1,32 ****
! /*
! * @file H2dClType.java
! * @creation 26 juin 2003
! * @modification $Date$
! * @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.type;
!
! import org.fudaa.dodico.commun.DodicoResource;
!
! /**
! * @author deniger
! * @version $Id$
! */
! public class H2dClType extends H2dEnumType
! {
! public static H2dClType LIBRE=new H2dClType(1,DodicoResource.getS("Libre"));
! public static H2dClType PERMANENT=new H2dClType(2,DodicoResource.getS("Permanent"));
! public static H2dClType TRANSITOIRE=new H2dClType(3,DodicoResource.getS("Transitoire"));
!
!
! /**
! *
! */
! H2dClType(int _id,String _nom)
! {
! super(_id,_nom);
! }
!
! }
--- 1 ----
! /*
* @file H2dClType.java
* @creation 26 juin 2003
* @modification $Date$
* @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.type;
import org.fudaa.dodico.commun.DodicoResource;
/**
* @author deniger
* @version $Id$
*/
public class H2dClType extends H2dEnumType {
public static H2dClType LIBRE= new H2dClType(1, DodicoResource.getS("Libre"));
public static H2dClType PERMANENT=
new H2dClType(2, DodicoResource.getS("Permanent"));
public static H2dClType TRANSITOIRE=
new H2dClType(3, DodicoResource.getS("Transitoire"));
/**
*
*/
H2dClType(int _id, String _nom) {
super(_id, _nom);
}
}
\ No newline at end of file
Index: H2dElementType.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/type/H2dElementType.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** H2dElementType.java 23 Sep 2003 19:38:22 -0000 1.2
--- H2dElementType.java 29 Oct 2003 11:41:27 -0000 1.3
***************
*** 1,50 ****
! /*
! * @file H2dElementType.java
! * @creation 19 août 2003
! * @modification $Date$
! * @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.type;
!
! import org.fudaa.dodico.commun.DodicoPermanentList;
!
! /**
! * @author deniger
! * @version $Id$
! */
! public class H2dElementType extends H2dEnumType {
! public static final H2dElementType T3=new H2dElementType(0,"T3",3);
! public static final H2dElementType T6=new H2dElementType(1,"T6",6);
! public static final H2dElementType Q4=new H2dElementType(2,"Q4",4);
! public static final H2dElementType Q8=new H2dElementType(3,"Q8",8);
!
! public static H2dElementType getCommunType(int _nbPoint)
! {
! if(_nbPoint==T3.getNbPt()) return T3;
! else if(_nbPoint==T6.getNbPt()) return T6;
! else if(_nbPoint==Q4.getNbPt()) return Q4;
! else if(_nbPoint==Q8.getNbPt()) return Q8;
! else return null;
! }
!
! int nbPt_;
!
! /**
! * @param _id
! * @param _nom
! */
! private H2dElementType(int _id, String _nom,int _nbPt) {
! super(_id, _nom);
! nbPt_=_nbPt;
! }
!
! /**
! *
! */
! public int getNbPt() {
! return nbPt_;
! }
!
! }
--- 1 ----
! /*
* @file H2dElementType.java
* @creation 19 août 2003
* @modification $Date$
* @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.type;
import org.fudaa.dodico.commun.DodicoPermanentList;
/**
* @author deniger
* @version $Id$
*/
public class H2dElementType extends H2dEnumType {
public static final H2dElementType T3= new H2dElementType(0, "T3", 3);
public static final H2dElementType T6= new H2dElementType(1, "T6", 6);
public static final H2dElementType Q4= new H2dElementType(2, "Q4", 4);
public static final H2dElementType Q8= new H2dElementType(3, "Q8", 8);
public static H2dElementType getCommunType(int _nbPoint) {
if (_nbPoint == T3.getNbPt())
return T3;
else if (_nbPoint == T6.getNbPt())
return T6;
else if (_nbPoint == Q4.getNbPt())
return Q4;
else if (_nbPoint == Q8.getNbPt())
return Q8;
else
return null;
}
int nbPt_;
/**
* @param _id
* @param _nom
*/
private H2dElementType(int _id, String _nom, int _nbPt) {
super(_id, _nom);
nbPt_= _nbPt;
}
/**
*
*/
public int getNbPt() {
return nbPt_;
}
}
\ No newline at end of file
Index: H2dFileFormatType.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/type/H2dFileFormatType.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** H2dFileFormatType.java 23 Sep 2003 19:38:22 -0000 1.3
--- H2dFileFormatType.java 29 Oct 2003 11:41:27 -0000 1.4
***************
*** 1,58 ****
! /*
! * @file H2dFileFormatType.java
! * @creation 14 août 2003
! * @modification $Date$
! * @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.type;
!
! import java.util.List;
!
! import org.fudaa.dodico.commun.DodicoLib;
! import org.fudaa.dodico.commun.DodicoPermanentList;
! import org.fudaa.dodico.h2d.H2dResource;
!
! /**
! * @author deniger
! * @version $Id$
! */
! public class H2dFileFormatType extends H2dEnumType {
!
! public static final H2dFileFormatType PROJET=
! new H2dFileFormatType(0, H2dResource.getS("Projet"));
! public static final H2dFileFormatType MAILLAGE=
! new H2dFileFormatType(1, H2dResource.getS("Maillage"));
! public static final H2dFileFormatType CL=
! new H2dFileFormatType(2, H2dResource.getS("Conditions limites"));
! public static final H2dFileFormatType CL_LIQUIDE=
! new H2dFileFormatType(3, H2dResource.getS("Conditions limites liquides"));
! public static final H2dFileFormatType COURBE_TRANSITOIRE=
! new H2dFileFormatType(4, H2dResource.getS("Courbes transitoire"));
! public static final H2dFileFormatType FOND=
! new H2dFileFormatType(5, H2dResource.getS("Fond"));
!
! public static final List LIST=
! new DodicoPermanentList(
! DodicoLib.sort(
! new H2dFileFormatType[] {
! PROJET,
! MAILLAGE,
! CL,
! CL_LIQUIDE,
! COURBE_TRANSITOIRE }));
!
! /**
! * @param _id
! * @param _nom
! */
! private H2dFileFormatType(int _id, String _nom) {
! super(_id, _nom);
! }
!
! public boolean equals(H2dFileFormatType _t) {
! return _t == null ? false : (id_ == _t.id_);
! }
!
! }
--- 1 ----
! /*
* @file H2dFileFormatType.java
* @creation 14 août 2003
* @modification $Date$
* @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.type;
import java.util.List;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.commun.DodicoPermanentList;
import org.fudaa.dodico.h2d.H2dResource;
/**
* @author deniger
* @version $Id$
*/
public class H2dFileFormatType extends H2dEnumType {
public static final H2dFileFormatType PROJET=
new H2dFileFormatType(0, H2dResource.getS("Projet"));
public static final H2dFileFormatType MAILLAGE=
new H2dFileFormatType(1, H2dResource.getS("Maillage"));
public static final H2dFileFormatType CL=
new H2dFileFormatType(2, H2dResource.getS("Conditions limites"));
public static final H2dFileFormatType CL_LIQUIDE=
new H2dFileFormatType(3, H2dResource.getS("Conditions limites liquides"));
public static final H2dFileFormatType COURBE_TRANSITOIRE=
new H2dFileFormatType(4, H2dResource.getS("Courbes transitoire"));
public static final H2dFileFormatType FOND=
new H2dFileFormatType(5, H2dResource.getS("Fond"));
public static final List LIST=
new DodicoPermanentList(
DodicoLib.sort(
new H2dFileFormatType[] {
PROJET,
MAILLAGE,
CL,
CL_LIQUIDE,
COURBE_TRANSITOIRE }));
/**
* @param _id
* @param _nom
*/
private H2dFileFormatType(int _id, String _nom) {
super(_id, _nom);
}
public boolean equals(H2dFileFormatType _t) {
return _t == null ? false : (id_ == _t.id_);
}
}
\ No newline at end of file
Index: H2dMethodeResolutionType.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/type/H2dMethodeResolutionType.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** H2dMethodeResolutionType.java 23 Sep 2003 19:38:22 -0000 1.3
--- H2dMethodeResolutionType.java 29 Oct 2003 11:41:27 -0000 1.4
***************
*** 1,67 ****
! /*
! * @file H2dMethodeResolution.java
! * @creation 27 juin 2003
! * @modification $Date$
! * @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.type;
!
! import java.util.Iterator;
! import java.util.List;
!
! import org.fudaa.dodico.commun.DodicoLib;
! import org.fudaa.dodico.commun.DodicoPermanentList;
! import org.fudaa.dodico.h2d.H2dResource;
!
! /**
! * @author deniger
! * @version $Id$
! */
! public class H2dMethodeResolutionType extends H2dEnumType
! {
!
! public static H2dMethodeResolutionType LINEAIRE=new H2dMethodeResolutionType(1,H2dResource.getS("Linéaire"),"LINEAIRE");
! public static H2dMethodeResolutionType NEWTON_RAPHSON=new H2dMethodeResolutionType(2,H2dResource.getS("Newton Raphson"),"NEWTON");
! public static H2dMethodeResolutionType NEWTON_RAPHSON_BCD=new H2dMethodeResolutionType(3,H2dResource.getS("Newton Raphson banc découvrant"),"NEWTON_BCD");
! public static H2dMethodeResolutionType SELECT_LUMPING=new H2dMethodeResolutionType(4,H2dResource.getS("Select Lumping"),"SELUMP");
! public static H2dMethodeResolutionType SELECT_LUMPING_BCD=new H2dMethodeResolutionType(5,H2dResource.getS("Select Lumping banc découvrant"),"SELUMP_BCD");
!
! public static final List LIST =
! new DodicoPermanentList(
! DodicoLib.sort(
! new H2dMethodeResolutionType[] { LINEAIRE,NEWTON_RAPHSON,NEWTON_RAPHSON_BCD,SELECT_LUMPING,SELECT_LUMPING_BCD }));
!
! private String refluxId_;
!
! /**
! * @param _id
! * @param _nom
! */
! public H2dMethodeResolutionType(int _id, String _nom,String _refluxId)
! {
! super(_id, _nom);
! refluxId_=_refluxId;
! }
!
! public static H2dMethodeResolutionType getTypeForRefluxId(String _id)
! {
! H2dMethodeResolutionType t;
! for(Iterator it=LIST.iterator();it.hasNext();)
! {
! t=(H2dMethodeResolutionType)it.next();
! if(t.refluxId_.equals(_id)) return t;
! }
! return null;
! }
!
!
! /**
! *
! */
! public String getRefluxId() {
! return refluxId_;
! }
!
! }
--- 1 ----
! /*
* @file H2dMethodeResolution.java
* @creation 27 juin 2003
* @modification $Date$
* @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.type;
import java.util.Iterator;
import java.util.List;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.commun.DodicoPermanentList;
import org.fudaa.dodico.h2d.H2dResource;
/**
* @author deniger
* @version $Id$
*/
public class H2dMethodeResolutionType extends H2dEnumType {
public static H2dMethodeResolutionType LINEAIRE=
new H2dMethodeResolutionType(1, H2dResource.getS("Linéaire"), "LINEAIRE");
public static H2dMethodeResolutionType NEWTON_RAPHSON=
new H2dMethodeResolutionType(
2,
H2dResource.getS("Newton Raphson"),
"NEWTON");
public static H2dMethodeResolutionType NEWTON_RAPHSON_BCD=
new H2dMethodeResolutionType(
3,
H2dResource.getS("Newton Raphson banc découvrant"),
"NEWTON_BCD");
public static H2dMethodeResolutionType SELECT_LUMPING=
new H2dMethodeResolutionType(
4,
H2dResource.getS("Select Lumping"),
"SELUMP");
public static H2dMethodeResolutionType SELECT_LUMPING_BCD=
new H2dMethodeResolutionType(
5,
H2dResource.getS("Select Lumping banc découvrant"),
"SELUMP_BCD");
public static final List LIST=
new DodicoPermanentList(
DodicoLib.sort(
new H2dMethodeResolutionType[] {
LINEAIRE,
NEWTON_RAPHSON,
NEWTON_RAPHSON_BCD,
SELECT_LUMPING,
SELECT_LUMPING_BCD }));
private String refluxId_;
/**
* @param _id
* @param _nom
*/
public H2dMethodeResolutionType(int _id, String _nom, String _refluxId) {
super(_id, _nom);
refluxId_= _refluxId;
}
public static H2dMethodeResolutionType getTypeForRefluxId(String _id) {
H2dMethodeResolutionType t;
for (Iterator it= LIST.iterator(); it.hasNext();) {
t= (H2dMethodeResolutionType)it.next();
if (t.refluxId_.equals(_id))
return t;
}
return null;
}
/**
*
*/
public String getRefluxId() {
return refluxId_;
}
}
\ No newline at end of file
Index: H2dProjetType.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/type/H2dProjetType.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** H2dProjetType.java 23 Sep 2003 19:38:22 -0000 1.3
--- H2dProjetType.java 29 Oct 2003 11:41:27 -0000 1.4
***************
*** 1,72 ****
! /*
! * @file H2dProjetType.java
! * @creation 26 juin 2003
! * @modification $Date$
! * @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.type;
!
! import java.util.Iterator;
! import java.util.List;
!
! import org.fudaa.dodico.commun.DodicoLib;
! import org.fudaa.dodico.commun.DodicoPermanentList;
! import org.fudaa.dodico.h2d.H2dResource;
!
! /**
! * @author deniger
! * @version $Id$
! */
! public class H2dProjetType extends H2dEnumType
! {
!
! public static final H2dProjetType COURANTOLOGIE_2D =
! new H2dProjetType(1, H2dResource.getS("Courantologie 2D"), "VIT_NU_CON");
! public static final H2dProjetType COURANTOLOGIE_2D_LMG =
! new H2dProjetType(
! 2,
! H2dResource.getS("Courantologie 2D longueur mélange"),
! "VIT_NU_LMG");
! public static final H2dProjetType TRANSPORT =
! new H2dProjetType(3, H2dResource.getS("Transport"), "TEMPERATURE");
!
! public static final List LIST =
! new DodicoPermanentList(
! DodicoLib.sort(
! new H2dProjetType[] {
! COURANTOLOGIE_2D,
! COURANTOLOGIE_2D_LMG,
! TRANSPORT }));
!
!
! public static H2dProjetType getProjetFromRefluxId(String _s)
! {
! H2dProjetType t;
! for (Iterator it = LIST.iterator(); it.hasNext();)
! {
! t = (H2dProjetType) it.next();
! if (t.refluxId_.equals(_s))
! return t;
! }
! return null;
! }
!
! private String refluxId_;
!
! /**
! * @param _id
! * @param _nom
! */
! public H2dProjetType(int _id, String _nom, String _refluxId)
! {
! super(_id, _nom);
! refluxId_ = _refluxId;
! }
!
! public String getRefluxId(){
! return refluxId_;
! }
!
! }
--- 1 ----
! /*
* @file H2dProjetType.java
* @creation 26 juin 2003
* @modification $Date$
* @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.type;
import java.util.Iterator;
import java.util.List;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.commun.DodicoPermanentList;
import org.fudaa.dodico.h2d.H2dResource;
/**
* @author deniger
* @version $Id$
*/
public class H2dProjetType extends H2dEnumType {
public static final H2dProjetType COURANTOLOGIE_2D=
new H2dProjetType(1, H2dResource.getS("Courantologie 2D"), "VIT_NU_CON");
public static final H2dProjetType COURANTOLOGIE_2D_LMG=
new H2dProjetType(
2,
H2dResource.getS("Courantologie 2D longueur mélange"),
"VIT_NU_LMG");
public static final H2dProjetType TRANSPORT=
new H2dProjetType(3, H2dResource.getS("Transport"), "TEMPERATURE");
public static final List LIST=
new DodicoPermanentList(
DodicoLib.sort(
new H2dProjetType[] {
COURANTOLOGIE_2D,
COURANTOLOGIE_2D_LMG,
TRANSPORT }));
public static H2dProjetType getProjetFromRefluxId(String _s) {
H2dProjetType t;
for (Iterator it= LIST.iterator(); it.hasNext();) {
t= (H2dProjetType)it.next();
if (t.refluxId_.equals(_s))
return t;
}
return null;
}
private String refluxId_;
/**
* @param _id
* @param _nom
*/
public H2dProjetType(int _id, String _nom, String _refluxId) {
super(_id, _nom);
refluxId_= _refluxId;
}
public String getRefluxId() {
return refluxId_;
}
}
\ No newline at end of file
Index: H2dSchemaResolutionType.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/type/H2dSchemaResolutionType.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** H2dSchemaResolutionType.java 23 Sep 2003 19:38:22 -0000 1.3
--- H2dSchemaResolutionType.java 29 Oct 2003 11:41:27 -0000 1.4
***************
*** 1,75 ****
! /*
! * @file H2dSchemaResolutionType.java
! * @creation 27 juin 2003
! * @modification $Date$
! * @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.type;
!
! import java.util.Iterator;
! import java.util.List;
!
! import org.fudaa.dodico.commun.DodicoLib;
! import org.fudaa.dodico.commun.DodicoPermanentList;
! import org.fudaa.dodico.h2d.H2dResource;
!
! /**
! * @author deniger
! * @version $Id$
! */
!
! public class H2dSchemaResolutionType extends H2dEnumType
! {
!
! public static H2dSchemaResolutionType STATIONNAIRE =
! new H2dSchemaResolutionType(
! 1,
! H2dResource.getS("Stationnaire"),
! "STATIONNAIRE",new H2dMethodeResolutionType[]{H2dMethodeResolutionType.SELECT_LUMPING,H2dMethodeResolutionType.SELECT_LUMPING_BCD,H2dMethodeResolutionType.NEWTON_RAPHSON,H2dMethodeResolutionType.NEWTON_RAPHSON_BCD,H2dMethodeResolutionType.LINEAIRE});
! public static H2dSchemaResolutionType KAWAHARA =
! new H2dSchemaResolutionType(2, H2dResource.getS("Kawahara"), "SELUMP",new H2dMethodeResolutionType[]{H2dMethodeResolutionType.SELECT_LUMPING,H2dMethodeResolutionType.SELECT_LUMPING_BCD});
! public static H2dSchemaResolutionType EULER =
! new H2dSchemaResolutionType(2, H2dResource.getS("Euler"), "EULER",new H2dMethodeResolutionType[]{H2dMethodeResolutionType.NEWTON_RAPHSON,H2dMethodeResolutionType.NEWTON_RAPHSON_BCD,H2dMethodeResolutionType.LINEAIRE});
!
! public static final List LIST =
! new DodicoPermanentList(
! DodicoLib.sort(
! new H2dSchemaResolutionType[] { STATIONNAIRE, KAWAHARA, EULER }));
!
! public static H2dSchemaResolutionType getTypeForRefluxId(String _id)
! {
! H2dSchemaResolutionType t;
! for(Iterator it=LIST.iterator();it.hasNext();)
! {
! t=(H2dSchemaResolutionType)it.next();
! if(t.refluxId_.equals(_id)) return t;
! }
! return null;
! }
!
!
! String refluxId_;
! DodicoPermanentList methodeList_;
! /**
! * @param _id
! * @param _nom
! */
! public H2dSchemaResolutionType(int _id, String _nom, String refluxId, H2dMethodeResolutionType[] _methode)
! {
! super(_id, _nom);
! refluxId_ = refluxId;
! methodeList_=new DodicoPermanentList(_methode);
! }
!
! public boolean isSupported(H2dMethodeResolutionType _methode)
! {
! return methodeList_.contains(_methode);
! }
!
! public String getRefluxId(){
! return refluxId_;
! }
!
! }
--- 1 ----
! /*
* @file H2dSchemaResolutionType.java
* @creation 27 juin 2003
* @modification $Date$
* @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.type;
import java.util.Iterator;
import java.util.List;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.commun.DodicoPermanentList;
import org.fudaa.dodico.h2d.H2dResource;
/**
* @author deniger
* @version $Id$
*/
public class H2dSchemaResolutionType extends H2dEnumType {
public static H2dSchemaResolutionType STATIONNAIRE=
new H2dSchemaResolutionType(
1,
H2dResource.getS("Stationnaire"),
"STATIONNAIRE",
new H2dMethodeResolutionType[] {
H2dMethodeResolutionType.SELECT_LUMPING,
H2dMethodeResolutionType.SELECT_LUMPING_BCD,
H2dMethodeResolutionType.NEWTON_RAPHSON,
H2dMethodeResolutionType.NEWTON_RAPHSON_BCD,
H2dMethodeResolutionType.LINEAIRE });
public static H2dSchemaResolutionType KAWAHARA=
new H2dSchemaResolutionType(
2,
H2dResource.getS("Kawahara"),
"SELUMP",
new H2dMethodeResolutionType[] {
H2dMethodeResolutionType.SELECT_LUMPING,
H2dMethodeResolutionType.SELECT_LUMPING_BCD });
public static H2dSchemaResolutionType EULER=
new H2dSchemaResolutionType(
3,
H2dResource.getS("Euler"),
"EULER",
new H2dMethodeResolutionType[] {
H2dMethodeResolutionType.NEWTON_RAPHSON,
H2dMethodeResolutionType.NEWTON_RAPHSON_BCD,
H2dMethodeResolutionType.LINEAIRE });
public static final List LIST=
new DodicoPermanentList(
DodicoLib.sort(
new H2dSchemaResolutionType[] { STATIONNAIRE, KAWAHARA, EULER }));
public static H2dSchemaResolutionType getTypeForRefluxId(String _id) {
H2dSchemaResolutionType t;
for (Iterator it= LIST.iterator(); it.hasNext();) {
t= (H2dSchemaResolutionType)it.next();
if (t.refluxId_.equals(_id))
return t;
}
return null;
}
String refluxId_;
DodicoPermanentList methodeList_;
/**
* @param _id
* @param _nom
*/
public H2dSchemaResolutionType(
int _id,
String _nom,
String refluxId,
H2dMethodeResolutionType[] _methode) {
super(_id, _nom);
refluxId_= refluxId;
methodeList_= new DodicoPermanentList(_methode);
}
public boolean isSupported(H2dMethodeResolutionType _methode) {
return methodeList_.contains(_methode);
}
public String getRefluxId() {
return refluxId_;
}
}
\ No newline at end of file
Index: H2dVariableType.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/type/H2dVariableType.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** H2dVariableType.java 23 Sep 2003 19:38:22 -0000 1.2
--- H2dVariableType.java 29 Oct 2003 11:41:27 -0000 1.3
***************
*** 1,101 ****
! /*
! * @file H2dVariable.java
! * @creation 25 juin 2003
! * @modification $Date$
! * @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.type;
!
! import java.util.Iterator;
! import java.util.List;
!
! import org.fudaa.dodico.commun.DodicoLib;
! import org.fudaa.dodico.commun.DodicoPermanentList;
! import org.fudaa.dodico.commun.DodicoResource;
!
! /**
! * @author deniger
! * @version $Id$
! */
! public class H2dVariableType extends H2dEnumType
! {
! public static final H2dVariableType DEBIT =
! new H2dVariableType(1, DodicoResource.getS("Débit"), "Q");
! public static final H2dVariableType COTE_EAU =
! new H2dVariableType(2, DodicoResource.getS("Côte eau"), "SL");
! public static final H2dVariableType TRACEUR =
! new H2dVariableType(5, DodicoResource.getS("Traceur"), "T");
! public static final H2dVariableType VITESSE_U =
! new H2dVariableType(3, DodicoResource.getS("Vitesse u"), "U");
! public static final H2dVariableType VITESSE_V =
! new H2dVariableType(4, DodicoResource.getS("Vitesse v"), "V");
! public static final H2dVariableType RUGOSITE =
! new H2dVariableType(4, DodicoResource.getS("Rugosité"), null);
! public static final H2dVariableType VISCOSITE =
! new H2dVariableType(4, DodicoResource.getS("Viscosité"), null);
! public static final H2dVariableType PERTE_CHARGE =
! new H2dVariableType(4, DodicoResource.getS("Perte de charge"), null);
! public static final H2dVariableType ALPHA_LONGUEUR_MELANGE =
! new H2dVariableType(4, DodicoResource.getS("Alpha longueur mélange"), null);
!
! private static List LIST_TELEMAC =null;
! private static List LIST_REFLUX =null;
!
! public static List LIST_TELEMAC()
! {
! if(LIST_TELEMAC==null) LIST_TELEMAC = new DodicoPermanentList(DodicoLib.sort(new H2dVariableType[] { DEBIT, COTE_EAU, TRACEUR, VITESSE_U, VITESSE_V }));
! return LIST_TELEMAC;
! }
!
! public static List LIST_REFLUX()
! {
! if(LIST_REFLUX==null) LIST_REFLUX = new DodicoPermanentList(DodicoLib.sort(new H2dVariableType[] { ALPHA_LONGUEUR_MELANGE,RUGOSITE,VISCOSITE,PERTE_CHARGE }));
! return LIST_REFLUX;
! }
!
! private String telemacID_;
!
! /**
! *
! */
! private H2dVariableType(int _id, String _nom, String _telemacID)
! {
! super(_id,_nom);
! telemacID_ = _telemacID;
! }
!
! public String getTelemacID()
! {
! return telemacID_;
! }
!
! public boolean equals(H2dVariableType _o)
! {
! return equalsVariable(_o);
! }
!
! public boolean equalsVariable(H2dVariableType _o)
! {
! return _o==null?false:(_o.id_==id_);
! }
!
! public static H2dVariableType getVariableForTelemacId(String _s)
! {
! for (Iterator it = LIST_TELEMAC().iterator(); it.hasNext();)
! {
! H2dVariableType v = (H2dVariableType) it.next();
! if (_s.equals(v.telemacID_))
! return v;
! }
! return null;
! }
!
!
! public static void main(String[] args)
! {
! DodicoLib.printObject(LIST_TELEMAC(),true);
! }
!
! }
--- 1 ----
! /*
* @file H2dVariable.java
* @creation 25 juin 2003
* @modification $Date$
* @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.type;
import java.util.Iterator;
import java.util.List;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.commun.DodicoPermanentList;
import org.fudaa.dodico.commun.DodicoResource;
/**
* @author deniger
* @version $Id$
*/
public class H2dVariableType extends H2dEnumType {
public static final H2dVariableType DEBIT=
new H2dVariableType(1, DodicoResource.getS("Débit"), "Q");
public static final H2dVariableType COTE_EAU=
new H2dVariableType(2, DodicoResource.getS("Côte eau"), "SL");
public static final H2dVariableType TRACEUR=
new H2dVariableType(3, DodicoResource.getS("Traceur"), "T");
public static final H2dVariableType VITESSE_U=
new H2dVariableType(4, DodicoResource.getS("Vitesse u"), "U");
public static final H2dVariableType VITESSE_V=
new H2dVariableType(5, DodicoResource.getS("Vitesse v"), "V");
public static final H2dVariableType RUGOSITE=
new H2dVariableType(6, DodicoResource.getS("Rugosité"), null);
public static final H2dVariableType VISCOSITE=
new H2dVariableType(7, DodicoResource.getS("Viscosité"), null);
public static final H2dVariableType PERTE_CHARGE=
new H2dVariableType(8, DodicoResource.getS("Perte de charge"), null);
public static final H2dVariableType ALPHA_LONGUEUR_MELANGE=
new H2dVariableType(9, DodicoResource.getS("Alpha longueur mélange"), null);
public static final H2dVariableType VITESSE=
new H2dVariableType(10, DodicoResource.getS("Vitesse"), null);
private static List LIST_TELEMAC= null;
private static List LIST_REFLUX= null;
public static List LIST_TELEMAC() {
if (LIST_TELEMAC == null)
LIST_TELEMAC=
new DodicoPermanentList(
DodicoLib.sort(
new H2dVariableType[] {
DEBIT,
COTE_EAU,
TRACEUR,
VITESSE_U,
VITESSE_V }));
return LIST_TELEMAC;
}
public static List LIST_REFLUX() {
if (LIST_REFLUX == null)
LIST_REFLUX=
new DodicoPermanentList(
DodicoLib.sort(
new H2dVariableType[] {
ALPHA_LONGUEUR_MELANGE,
RUGOSITE,
VISCOSITE,
PERTE_CHARGE }));
return LIST_REFLUX;
}
private String telemacID_;
/**
*
*/
private H2dVariableType(int _id, String _nom, String _telemacID) {
super(_id, _nom);
telemacID_= _telemacID;
}
public String getTelemacID() {
return telemacID_;
}
public boolean equals(H2dVariableType _o) {
return equalsVariable(_o);
}
public boolean equalsVariable(H2dVariableType _o) {
return _o == null ? false : (_o.id_ == id_);
}
public static H2dVariableType getVariableForTelemacId(String _s) {
for (Iterator it= LIST_TELEMAC().iterator(); it.hasNext();) {
H2dVariableType v= (H2dVariableType)it.next();
if (_s.equals(v.telemacID_))
return v;
}
return null;
}
public static void main(String[] args) {
DodicoLib.printObject(LIST_TELEMAC(), true);
}
}
\ No newline at end of file
|