[Castore-commits] TypeDoc.java 1.6 1.7
Stéphane Bouchet
sbouchet at adullact1.hosting.cri74.org
Mer 19 Avr 16:45:37 CEST 2006
Update of /cvsroot/castore/castore-core/src/java/fr/emn/castor/admin/gestionTypeDoc
In directory adullact1:/tmp/cvs-serv13876/src/java/fr/emn/castor/admin/gestionTypeDoc
Modified Files:
TypeDoc.java
Log Message:
Refactoring java 1.5.
Index: TypeDoc.java
===================================================================
RCS file: /cvsroot/castore/castore-core/src/java/fr/emn/castor/admin/gestionTypeDoc/TypeDoc.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** TypeDoc.java 22 Mar 2006 15:25:57 -0000 1.6
--- TypeDoc.java 19 Apr 2006 14:45:35 -0000 1.7
***************
*** 92,96 ****
* liste des métadonnées associées au type de doc.
*/
! private List listeMeta = new ArrayList();
/**
--- 92,96 ----
* liste des métadonnées associées au type de doc.
*/
! private List<Metadonnee> listeMeta = new ArrayList<Metadonnee>();
/**
***************
*** 120,129 ****
/**
! * liste contenant le nom des fichiers xml de métadonnées : base1.xml + 1 autre fichier spécifique.
*/
private ArrayList<String> files = new ArrayList<String>();
- //TODO a reexternaliser
/**
*/
DateFormat dateFormat = new SimpleDateFormat("dd-MM-yy");
--- 120,130 ----
/**
! * liste contenant le nom des fichiers xml de métadonnées :
! * base1.xml + 1 autre fichier spécifique.
*/
private ArrayList<String> files = new ArrayList<String>();
/**
+ * Le format des dates.
*/
DateFormat dateFormat = new SimpleDateFormat("dd-MM-yy");
***************
*** 196,200 ****
*/
public void addFile(String file) {
! files.add(file);
}
--- 197,201 ----
*/
public void addFile(String file) {
! this.files.add(file);
}
***************
*** 208,213 ****
* @param commentaire
*/
! public TypeDoc(String nom, boolean isPublier, List listeMeta,
! String createur, String commentaire) {
/*
* Attention : il faut veiller a avoir un identifiant unique!!
--- 209,214 ----
* @param commentaire
*/
! public TypeDoc(String nom, boolean isPublier,
! List<Metadonnee> listeMeta, String createur, String commentaire) {
/*
* Attention : il faut veiller a avoir un identifiant unique!!
***************
*** 224,228 ****
this.commentaire = commentaire;
Date date = new Date();
! this.dateCreation = dateFormat.format(date).toString();
}
--- 225,229 ----
this.commentaire = commentaire;
Date date = new Date();
! this.dateCreation = this.dateFormat.format(date).toString();
}
***************
*** 235,239 ****
this.nom = "";
this.isPublier = false;
! this.listeMeta = new ArrayList();
this.createur = "";
this.commentaire = "";
--- 236,240 ----
this.nom = "";
this.isPublier = false;
! this.listeMeta = new ArrayList<Metadonnee>();
this.createur = "";
this.commentaire = "";
***************
*** 247,254 ****
public List getListeMetaString() {
List<String> listeMetaString = new ArrayList<String>();
! for (int i = 0; i < listeMeta.size(); i++) {
! Metadonnee meta = (Metadonnee) listeMeta.get(i);
listeMetaString.add(meta.toString());
-
}
return listeMetaString;
--- 248,254 ----
public List getListeMetaString() {
List<String> listeMetaString = new ArrayList<String>();
! for (int i = 0; i < this.listeMeta.size(); i++) {
! Metadonnee meta = this.listeMeta.get(i);
listeMetaString.add(meta.toString());
}
return listeMetaString;
***************
*** 261,265 ****
public List getListMeta() {
! return listeMeta;
}
--- 261,265 ----
public List getListMeta() {
! return this.listeMeta;
}
***************
*** 268,272 ****
*/
public String getNom() {
! return nom;
}
--- 268,272 ----
*/
public String getNom() {
! return this.nom;
}
***************
*** 340,344 ****
public void setNom(String nom) {
this.nom = nom;
! this.idTypeDoc = nom + idTypeDoc;
}
--- 340,344 ----
public void setNom(String nom) {
this.nom = nom;
! this.idTypeDoc = nom + this.idTypeDoc;
}
***************
*** 347,351 ****
*/
public String getIdTypeDoc() {
! return idTypeDoc;
}
--- 347,351 ----
*/
public String getIdTypeDoc() {
! return this.idTypeDoc;
}
***************
*** 361,365 ****
*/
public boolean isPublier() {
! return isPublier;
}
--- 361,365 ----
*/
public boolean isPublier() {
! return this.isPublier;
}
***************
*** 376,380 ****
*/
public List getListeMeta() {
! return listeMeta;
}
--- 376,380 ----
*/
public List getListeMeta() {
! return this.listeMeta;
}
***************
*** 383,387 ****
*/
public void setListeMeta(List listeMeta) {
! this.listeMeta = listeMeta;
}
--- 383,387 ----
*/
public void setListeMeta(List listeMeta) {
! this.listeMeta = this.listeMeta;
}
***************
*** 391,395 ****
*/
public List getListeMetaBase() {
! return listeMetaBase;
}
--- 391,395 ----
*/
public List getListeMetaBase() {
! return this.listeMetaBase;
}
***************
*** 475,479 ****
*/
public String getWorkflowid() {
! return workflowid;
}
--- 475,479 ----
*/
public String getWorkflowid() {
! return this.workflowid;
}
***************
*** 493,497 ****
public Map translateToMap() {
Map typeDocMap = new HashMap();
! Map<String, Map> listeMD = new HashMap<String, Map> ();
Iterator listeMetaIter = this.listeMeta.iterator();
while (listeMetaIter.hasNext()) {
--- 493,497 ----
public Map translateToMap() {
Map typeDocMap = new HashMap();
! Map<String, Map> listeMD = new HashMap<String, Map>();
Iterator listeMetaIter = this.listeMeta.iterator();
while (listeMetaIter.hasNext()) {
Plus d'informations sur la liste de diffusion Castore-commits